Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from riipandi/develop
Browse files Browse the repository at this point in the history
Create Initial Release
  • Loading branch information
riipandi committed Aug 19, 2022
2 parents f24d400 + 97f2d34 commit 40267e4
Show file tree
Hide file tree
Showing 23 changed files with 388 additions and 186 deletions.
88 changes: 50 additions & 38 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,44 +1,56 @@
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
"plugin:react/jsx-runtime",
"plugin:prettier/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
"plugin:react/jsx-runtime",
"plugin:prettier/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "import", "jsx-a11y", "react-hooks", "prettier"],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
"plugins": [
"react",
"@typescript-eslint",
"import",
"jsx-a11y",
"react-hooks",
"prettier"
],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],

"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",

"prettier/prettier": [
"warn",
{
"endOfLine": "auto",
"singleQuote": true
}
]
}
"prettier/prettier": [
"warn",
{
"endOfLine": "auto",
"singleQuote": true
}
]
}
}
9 changes: 2 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
const { data } = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: `app-v${process.env.PACKAGE_VERSION}`,
name: `Desktop App v${process.env.PACKAGE_VERSION}`,
tag_name: `v${process.env.PACKAGE_VERSION}`,
name: `Authenticator v${process.env.PACKAGE_VERSION}`,
body: 'Take a look at the assets to download and install this app.',
draft: true,
prerelease: false
Expand Down Expand Up @@ -78,11 +78,6 @@ jobs:
VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }}
with:
releaseId: ${{ needs.create-release.outputs.release_id }}
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: "App v__VERSION__"
releaseBody: "See the assets to download this version and install."
releaseDraft: true
prerelease: false

publish-release:
runs-on: ubuntu-20.04
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
tsconfig.tsbuildinfo

node_modules
dist
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ out/
package-lock.json
package.json
yarn.lock
vite-env.d.ts
src/main.css
72 changes: 66 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,82 @@
<a href="https://github.com/riipandi/otentik-authenticator-desktop/pulse">
<img src="https://img.shields.io/badge/Contributions-welcome-blue.svg?style=flat-square" alt="Contribution welcome">
</a>
<a href="https://github.com/riipandi/otentik-authenticator-desktop">
<img src="https://img.shields.io/github/languages/top/riipandi/otentik-authenticator-desktop?style=flat-square" alt="Top language">
<a href="https://github.com/riipandi/otentik-authenticator-desktop/releases/tag/latest">
<img src="https://github.com/riipandi/otentik-authenticator-desktop/actions/workflows/release.yml/badge.svg?branch=main" alt="Release Status">
</a>
<a href="https://choosealicense.com/licenses/apache-2.0">
<img src="https://img.shields.io/github/license/riipandi/otentik-authenticator-desktop?style=flat-square" alt="License">
</a>
<a href="https://github.com/riipandi/otentik-authenticator-desktop/actions/workflows/release.yml">
<img src="https://github.com/riipandi/otentik-authenticator-desktop/actions/workflows/release.yml/badge.svg?branch=main" alt="Release Status">
</a>
<a href="https://github.com/sponsors/riipandi">
<img src="https://img.shields.io/static/v1?color=26B643&label=Sponsor&message=%E2%9D%A4&logo=GitHub&style=flat-square" alt="Sponsors">
</a>
</p>

## Introduction

Otentik is a secure app to manage your 2-step verification tokens for your online services.
Feeling bothered about having to switch devices when you want to enter an OTP code when logging into a website or service?
Now you can use Otentik Authenticator to manage your OTP code. Otentik is a secure app to manage your 2-step verification (2FA)
tokens for your online services. This app compatible with Google Authenticator.

Watch the [demo video](https://youtu.be/5hPbu7xgFl4) to see how it works.

This project is an Open Source project for contributing to [The Supabase Open Source Hackathon](https://supabase.com/blog/launch-week-5-hackathon).

## Can I use this app?

Is this application finished yet? Yes and no. The main functions (OTP code generator and synchronization) are completed. I want this app to be available
in multi-platform and on mobile devices.

You can download the binary at the [release page](https://github.com/riipandi/otentik-authenticator-desktop/releases).
Currently only supports macOS with Intel chipset. Windows, Linux, and mobile versions are included in the roadmap.

## How was this built?

This app was created during the [Supabase Launch Week 5 Hackathon](https://supabase.com/blog/launch-week-5-hackathon). The idea is based on my personal
problem, everytime I want to log in to a website I have to reach for my phone just to get the OTP code. So I thought that having an application to
manage OTP code that could sync to the desktop would be helpful.

This app uses [Supabase](https://supabase.com/) for storing the collections and authenticating the user. Users can signup and log in using their
email addresses. I have no plan for using social authentication. The sensitive data such as 2FA secret and backup code
are encrypted with [AES256 encryption](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard) before storing at
Supabase.

### The complete tech stack:

- [Supabase](https://supabase.com/): auth and database.
- [Tauri](https://tauri.app/): for the desktop app.
- [Rust](https://www.rust-lang.org/): Tauri is using Rust.
- [TypeScript](https://www.typescriptlang.org/): for type checking.
- [React](https://reactjs.org/): for the UI frontend library.
- [Vite](https://vitejs.dev/): for the frontend tooling.
- [Tailwind CSS](https://tailwindcss.com/): for the styling.
- [Headless UI](https://headlessui.com/): create interactive UI.

### Why Tauri?

The simple answer is: the binary file size is smaller rather than Electron.

## Quick Start

### Prerequisites

At least you will need `Nodejs >=16` and `Rust >= 1.63` to develop this project, and your favorite IDE or code editor.
Use [rustup](https://rustup.rs/) to install Rust on your machine.

### Up and Running

Create `.env` file (you can copy from `.env.example`) then fill the `VITE_SUPABASE_URL` and `VITE_SUPABASE_ANON_KEY` values with yours.

For detailed explanation on how things work, check out [Supabase documentation](https://supabase.com/docs) and
[Tauri documentation](https://tauri.app/v1/guides/) page.

## Roadmaps

- [ ] Offline synchronization
- [ ] Create mobile version
- [ ] Create Windows version
- [ ] Create Linux version

## Security Issue

If you discover any security-related issues, please send an e-mail to [[email protected]](mailto:[email protected])
Expand All @@ -38,6 +94,10 @@ vulnerability within Otentik Authenticator, please send me a direct message on [
In general, I'd like to thank every single one who open-sources their source code for their effort to contribute
something to the open-source community. Your work means the world! 🌍 ❤️

## Maintainers

Currently, Aris Ripandi ([@riipandi](https://twitter.com/riipandi)) is the only maintainer.

## License

This project is open-sourced software licensed under the [Apache License 2.0][choosealicense].
Expand Down
7 changes: 7 additions & 0 deletions entitlements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.automation.apple-events</key><true/>
</dict>
</plist>
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
"build": "tsc && vite build",
"build:mac:arm": "tauri build --target aarch64-apple-darwin",
"build:mac:x64": "tauri build --target x86_64-apple-darwin",
"lint": "npx eslint src",
"lint": "eslint src",
"lint:fix": "npm run lint -- --fix",
"prettier": "npx prettier src --check",
"prettier:fix": "npm run prettier -- --write",
"format": "npm run prettier:fix && npm run lint:fix",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx}\" && npm run lint:fix",
"clean": "cd src-tauri && cargo clean",
"preview": "vite preview",
"tauri": "tauri"
Expand All @@ -36,28 +35,28 @@
"@tailwindcss/forms": "^0.5.2",
"@tauri-apps/cli": "^1.0.5",
"@types/node": "^18.7.6",
"@types/react-dom": "^18.0.6",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.33.1",
"@typescript-eslint/parser": "^5.33.1",
"@vitejs/plugin-react": "^2.0.1",
"autoprefixer": "^10.4.8",
"csstype": "^3.1.0",
"eslint": "^8.22.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react": "^7.30.1",
"eslint": "^8.22.0",
"eslint-plugin-react-hooks": "^4.6.0",
"postcss": "^8.4.16",
"prettier-plugin-tailwindcss": "^0.1.13",
"prettier": "^2.7.1",
"prettier-plugin-tailwindcss": "^0.1.13",
"tailwind-scrollbar-hide": "^1.1.7",
"tailwindcss": "^3.1.8",
"typescript": "^4.7.4",
"vite-tsconfig-paths": "^3.5.0",
"vite": "^3.0.8"
"vite": "^3.0.8",
"vite-tsconfig-paths": "^3.5.0"
},
"prettier": {
"jsxSingleQuote": true,
Expand Down
38 changes: 19 additions & 19 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[package]
name = "app"
name = "otentik-authenticator"
version = "0.1.0"
description = "Open Source two factor authenticator"
authors = ["Aris Ripandi <[email protected]>"]
license = "Apache-2.0"
repository = "https://github.com/feelantera/otentik-authenticator-desktop"
default-run = "app"
repository = "https://github.com/riipandi/otentik-authenticator-desktop"
edition = "2021"
rust-version = "1.63"

Expand Down Expand Up @@ -38,3 +37,15 @@ default = [ "custom-protocol" ]
# this feature is used used for production builds where `devPath` points to the filesystem
# DO NOT remove this
custom-protocol = [ "tauri/custom-protocol" ]

[[bin]]
name = "otentik-authenticator"
path = "src/main.rs"

# default to small, optimized release binaries
[profile.release]
panic = "abort"
codegen-units = 1
lto = true
incremental = false
opt-level = "s"
Loading

0 comments on commit 40267e4

Please sign in to comment.