DEV Community

Aayush Yadav
Aayush Yadav

Posted on

πŸš€ Modern Auth System with Next.js, MongoDB, TypeScript & Mailtrap – Open Source & Deployed!

Hey devs! πŸ‘‹

I’m thrilled to share my latest project: a full-stack authentication system built with the latest web technologies. If you’re looking for a robust, secure, and beautifully designed auth boilerplate for your next SaaS, side project, or just want to learn modern auth flowsβ€”this is for you!

πŸ› οΈ Tech Stack
Frontend: Next.js (App Router, React 18)
Backend: Next.js API Routes
Database: MongoDB (with Mongoose)
Language: TypeScript
Email: Mailtrap (for safe email testing)
Styling: Tailwind CSS

✨ Features
User Authentication (Sign Up, Login, Logout)
Email Verification (secure, token-based)
Forgot/Reset Password (with time-limited links)
Protected User Profile
Transactional Emails (Mailtrap integration)
TypeScript for type safety
Modern, Responsive UI (Tailwind CSS)
Security Best Practices (hashed passwords, token expiry, etc.)

🚦 Getting Started
Clone the repo:
git clone https://github.com/aayush130405/nextjs-auth.git
cd nextjs-auth

Install dependencies:
npm install

or

yarn install

Set up environment variables:
Create a .env.local file and add your MongoDB URI, Mailtrap credentials, etc. (see README for details).

Run locally:
npm run dev
Open http://localhost:3000 and try it out!

🌍 Live Demo
The project is deployed on Vercel for instant access:
πŸ‘‰ Live Demo: nextjs-auth-self-two.vercel.app

πŸ“š Well-Documented
Every feature, setup step, and code section is clearly explained in the GitHub README (https://github.com/aayush130405/nextjs-auth). Whether you’re a beginner or a seasoned dev, you’ll find it easy to follow and extend.

🀝 Contribute & Feedback
Star ⭐ the repo if you find it useful!
Fork and submit PRs for improvements or new features.
Open issues for bugs or suggestions.

πŸ’‘ Why This Project?
Authentication is a core part of almost every app, but it’s easy to get wrong. I wanted to create a reference project that’s:
Secure by default
Easy to understand and extend
Uses the latest Next.js and TypeScript features
Looks great out of the box

πŸ”— Links
GitHub: https://github.com/aayush130405/nextjs-auth
Live Demo: nextjs-auth-self-two.vercel.app

Thanks for reading!

Would love your feedback, suggestions, and contributions.
Happy coding! πŸš€

nextjs #typescript #mongodb #mailtrap #webdev #opensource #authentication #vercel

Top comments (0)