A robust and secure login authentication template built with Next.js, MongoDB, and TypeScript. Integrated with password reset, email verification, and notification capabilities via a cloud-based email service, ensuring a seamless and secure authentication experience.
- Secure Authentication: User passwords are securely hashed using
bcryptjs
. - Password Reset: Users can reset their passwords in case they forget them.
- Email Verification: Ensure genuine users with email verification through Mailtrap.
- Modern UI: Styled using Tailwind, providing a sleek and modern look.
- Feedback System: Using
toast
to provide feedback to users. - Type Safety: Written in TypeScript, ensuring type safety and reducing runtime errors.
- Frontend: Next.js with Tailwind CSS
- Backend: Next.js API Routes
- Database: MongoDB
- Type Checking: TypeScript
- Password Hashing: bcryptjs
- Feedback: Toast
- Email Service: Mailtrap
- Node.js
- MongoDB instance (local or cloud)
- Clone the repository:
git clone https://github.com/sdar30/authguardian.git
cd authguardian
- Install the dependencies:
npm install
- Set up your environment variables. Create a
.env
file in the root directory and fill in your values:
MONGO_URL=YOUR_MONGODB_CONNECTION_STRING
TOKEN_SECRET=YOUR_JWT_SECRET
DOMAIN=YOUR_DOMAIN
EMAIL_USER=YOUR_SMTP_USER
EMAIL_PASS=YOUR_SMTP_PASSWORD
EMAIL_HOST=YOUR_SMTP_SERVER
EMAIL_SERVER=YOUR_SERVER
- Run the development server:
npm run dev
Visit http://localhost:3000
in your browser to see the app running.
The project is currently deployed on Vercel. You can deploy it to your own Vercel instance or any other platform that supports Node.js.
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.