A sleek web application built on Next.js featuring user regisration and user authentication, secure password handling, and on-the-fly validation.
This is a project bootstrapped with create-next-app.
- 🔐 User Authentication (Sign up, Login, Logout)
- 🚨 Form Validation
- 🔒 Secure Password Handling with bcrypt
- 📱 Responsive Design
- Next.js 15 - Full-stack framework
- React 19 - UI framework
- MongoDB - Database
- Mongoose - MongoDB Modeling
- TailwindCSS 4 - Utility-first CSS framework
- bcryptjs - Password hashing
- Node.js 18.x or later
- MongoDB Atlas account or MongoDB Compass
Open the terminal and clone this GitHub repository locally at a desired location.
git clone https://github.com/RukshS/SpiritX_Eternal_Coders_01.gitChange into the cloned directory.
cd SpiritX_Eternal_Coders_01
git checkout frontend-changeCreate a .env file in the root of the project directory with the following variables:
MONGODB_URI=your_mongodb_connection_string/database_name
NEXTAUTH_SECRET=your_secret
NEXTAUTH_URL=http://localhost:your_port_number (default 3000)
# Install necessary dependencies
npm install# Development mode with Turbopack (Fast Refresh)
npm run devOpen http://localhost:3000 with your browser to see the result.
SpiritX_Eternal_Coders_01/ ├── app/ │ ├── api/ │ │ ├── auth/ │ │ │ └── [...nextauth]/ │ │ │ └── route.js │ │ ├── register/ │ │ │ └── route.js │ │ └── userExists/ │ │ └── route.js │ ├── dashboard/ │ │ └── page.jsx │ ├── login/ │ │ └── page.jsx │ ├── register/ │ │ └── page.jsx │ ├── globals.css │ ├── layout.js │ ├── page.jsx │ └── Providers.js ├── components/ │ ├── LandingPage.jsx │ ├── LoginForm.jsx │ ├── RegisterForm.jsx │ └── UserInfo.jsx ├── lib/ │ └── mongodb.js ├── models/ │ └── user.js ├── README.md ├── .gitignore ├── eslint.config.mjs ├── jsconfig.json ├── next.config.mjs ├── package.json ├── postcss.config.mjs └── tailwind.config.js
The application implements a comprehensive authentication system staisfying all the requirements as in the guidelines:
-
Registration:
- Form validation with real-time feedback on Signup page
- Password strength requirements (length, special chars, case mixing)
- User data stored in MongoDB with bcrypt password hashing
- API endpoint at /api/register
-
Login:
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!