Skip to content

Shakilofficial/authentication-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Authentication App

A full-stack user authentication and authorization application built using:

  • Frontend: React, Next.js, TailwindCSS, Redux Toolkit, react-hook-form
  • Backend: Node.js, Express.js, TypeScript, MongoDB (Mongoose), JWT, Zod

✨ Features

  • User Registration & Login (JWT-based)
  • Secure route protection (Private/Public routes)
  • Zod-powered request validation
  • Persistent login with refresh tokens
  • Responsive and accessible UI

πŸ“‚ Tech Stack

Layer Tech Used
Frontend Next.js, React, TailwindCSS, Redux Toolkit, React Hook Form, Zod
Backend Node.js, Express, TypeScript, MongoDB, Mongoose, JWT, Zod, bcrypt
Utilities dotenv, cookie-parser, cors, eslint, prettier

πŸš€ Getting Started

Follow these steps to set up and run the project locally.


πŸ“¦ 1. Clone the Repository

git clone https://github.com/Shakilofficial/authentication-app.git
cd authentication-app

πŸ› οΈ 2. Backend Setup

cd server
npm install
cp .env.example .env
npm run dev

🎨 3. Frontend Setup

cd client
npm install
npm run dev

πŸ›‘οΈ Environment Variables

Ensure both the client and server folders have their own .env files.


πŸ“ server/.env.example

PORT=5000
MONGO_URI=mongodb://localhost:27017/authdb
JWT_ACCESS_SECRET=your_jwt_access_secret
JWT_REFRESH_SECRET=your_jwt_refresh_secret
JWT_ACCESS_EXPIRES_IN=10d
JWT_REFRESH_EXPIRES_IN=30d
CLIENT_URL=http://localhost:3000

About

A secure and scalable authentication system built using TypeScript, Node.js, Express, MongoDB, JWT, and Zod on the backend, with a modern React/Next.js, TailwindCSS, and Redux Toolkit frontend. Features include user registration, login, logout, protected routes, persistent sessions, and role-based access control.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors