Production-grade Authentication System (Full Stack)
Authify is a complete authentication and session management system built with a modern full-stack architecture. It handles secure user onboarding, session control, and email workflows with scalability in mind.
Live - Authify
- React + TypeScript
- TanStack Query
- Axios
- React Hook Form + Zod
- React Router DOM
- Tailwind CSS + DaisyUI
- Sonner (toasts)
- Lucide React (icons)
- Node.js + Express
- PostgreSQL + Prisma ORM
- JWT (Access + Refresh tokens)
- Redis + BullMQ (background jobs)
- Zod (validation)
- Express Rate Limit (security)
- Helmet (headers security)
- CORS
- User Registration
- Login (JWT-based)
- Email Verification
- Send Verification Email
- Forgot Password
- Reset Password
- Change Password
- Get Profile
- Update Profile
- Multi-device session tracking
- View active sessions
- Logout from specific devices
- Refresh Token rotation
- Email queue (verification, reset, etc.) using BullMQ + Redis
- Access & Refresh token separation
- HTTP-only cookies for sensitive tokens
- Rate limiting to prevent brute-force attacks
- Input validation using Zod
- Secure headers via Helmet
- Hashed passwords (argon2)
Client (React)
↓
API (Express)
↓
PostgreSQL (Prisma)
↓
Redis (Queues + Sessions)
↓
Worker (BullMQ)
git clone https://github.com/brijeshdevio/authify.git
cd authify# client
cd client && pnpm install
# server
cd ../server && pnpm installVITE_API_URL=""
NODE_ENV=""
PORT=
DATABASE_URL=""
JWT_SECRET=""
FRONTEND=""
EMAIL_USERNAME=""
EMAIL_PASSWORD=""
REDIS_URL=""
# backend
pnpm run dev
# frontend
pnpm run dev
| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/register | Register user |
| POST | /auth/login | Login user |
| POST | /auth/refresh | Rotate refresh token |
| POST | /auth/verify-email/:token | Verify email |
| POST | /auth/send-verification-email | Send verification email |
| POST | /auth/forgot-password | Send reset link |
| POST | /auth/reset-password/:token | Reset password |
| POST | /users/change-password | Change password |
| GET | /users/me | Get user profile |
| PATCH | /users/me | Update profile |
| GET | /users/sessions | Get active sessions |
- Not running worker → emails won’t send
- Wrong Redis URL → queues fail silently
- Missing
trust proxy→ wrong IP logging - Storing tokens in localStorage → insecure
- OAuth (Google, GitHub)
- 2FA (OTP / Authenticator apps)
- Role-based access control (RBAC)
- Audit logs
Built by a developer focused on real-world backend systems and production-ready architecture.