https://github.com/wazeerc/authy
Dummy authentication app (user registration and login from scratch).
https://github.com/wazeerc/authy
authentication practice-project
Last synced: 2 months ago
JSON representation
Dummy authentication app (user registration and login from scratch).
- Host: GitHub
- URL: https://github.com/wazeerc/authy
- Owner: wazeerc
- License: unlicense
- Created: 2024-10-31T07:16:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-13T11:18:15.000Z (6 months ago)
- Last Synced: 2025-12-15T01:20:32.112Z (6 months ago)
- Topics: authentication, practice-project
- Language: TypeScript
- Homepage:
- Size: 1010 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Authy
A dummy authentication app I wrote to practice user registration and login functionality (from scratch), includes an Express API server.
> [!NOTE]
> This is for Educational purposes only.
## Tech Stack & Packages
- React + TypeScript
- Express.js Backend
- Vite for Build Tool and Development Server
- TanStack Query for API calls
- Tailwind CSS for Styling
- Zustand for State Management
- LowDB for mock DB implementation
- bcrypt for Password Hashing
- jsonwebtoken for ... well it's self explanatory
### Prerequisites
- Node.js
### Usage
```sh
pnpm install && pnpm run start
```
### Setup Environment Variables
1. Create a `.env` file in the root directory of your project.
2. Add the following line to the `.env` file:
```sh
JWT_SECRET_KEY=your_secret_key_here
```
3. Replace `your_secret_key_here` with a secure, randomly generated key. You can use a tool like `openssl` to generate this key:
```sh
openssl rand -base64 32
```
### Authy Explained
- User registers with a username and password.
- Backend checks for existing username.
- Password is hashed and stored if username is unique.
- JWT token is generated and returned upon successful registration.
- User logs in with username and password.
- Backend verifies credentials and checks hashed password.
- JWT token is generated and user session is managed.