A modern, full-stack authentication system built with Express.js and vanilla JavaScript, featuring JWT-based authentication, minimalist UI design, and secure user management.
- Live Link: Live Application
- GitHub: Source Code
- 🔐 JWT Authentication: Secure token-based authentication with 30-day expiration
- 👤 User Management: Complete signup and signin functionality
- 🛡️ Protected Routes: Middleware-based route protection
- 📱 Responsive Design: Mobile-first, minimalist UI with modern aesthetics
- 🎨 Clean Interface: Black and white design with Inter font and smooth animations
- ⚡ Real-time Validation: Client-side error handling and feedback
- 🌐 Production Ready: Deployed on Render with environment configuration
- Express.js 5.1.0 - Web framework
- jsonwebtoken 9.0.2 - JWT implementation
- dotenv 1.0.0 - Environment variable management
- path - Static file serving
- Vanilla JavaScript - Client-side logic
- Axios - HTTP requests
- HTML5/CSS3 - Structure and styling
- Font Awesome - Icons
- Google Fonts (Inter) - Typography
auth-class/
├── index.js # Express server & auth logic
├── package.json # Dependencies & scripts
├── .env # Environment variables
└── public/
├── index.js # Frontend auth functions
├── signin.html # Sign in page
├── signup.html # Sign up page
├── dash.html # Protected dashboard
└── styles.css # Global styles
-
Clone the repository
git clone https://github.com/Sahil-Singh23/Authentication-System.git cd auth-class
-
Install dependencies
npm install
-
Set up environment variables
echo "JWT_SECRET=your-secret-key" > .env
-
Start the server
npm start
-
Open browser - Navigate to
http://localhost:3000
Method | Endpoint | Description |
---|---|---|
POST |
/signup |
Create new user |
POST |
/signin |
Authenticate user |
GET |
/me |
Get user info |
- User creates account via signup page
- Server generates JWT token on signin
- Token stored in localStorage
- Protected routes validate token
- Dashboard displays user information
Built with ❤️ by Sahil Singh