{"id":20963047,"url":"https://github.com/wassimoubaziz/prodigy_fs_01","last_synced_at":"2025-10-12T22:49:19.928Z","repository":{"id":253634693,"uuid":"844054356","full_name":"wassimOubaziz/PRODIGY_FS_01","owner":"wassimOubaziz","description":"A modern, secure, and user-friendly authentication system built with Next.js, Tailwind CSS, and MongoDB.","archived":false,"fork":false,"pushed_at":"2024-08-18T10:54:01.000Z","size":2337,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-12T22:49:18.886Z","etag":null,"topics":["full","oubaziz","prodigy","prodigy-infotech","task","wassim","wassim-oubaziz"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wassimOubaziz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-18T08:34:47.000Z","updated_at":"2024-08-18T10:58:17.000Z","dependencies_parsed_at":"2024-08-18T11:57:17.879Z","dependency_job_id":null,"html_url":"https://github.com/wassimOubaziz/PRODIGY_FS_01","commit_stats":null,"previous_names":["wassimoubaziz/prodigy_fs_01"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wassimOubaziz/PRODIGY_FS_01","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassimOubaziz%2FPRODIGY_FS_01","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassimOubaziz%2FPRODIGY_FS_01/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassimOubaziz%2FPRODIGY_FS_01/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassimOubaziz%2FPRODIGY_FS_01/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wassimOubaziz","download_url":"https://codeload.github.com/wassimOubaziz/PRODIGY_FS_01/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wassimOubaziz%2FPRODIGY_FS_01/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013280,"owners_count":26085250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["full","oubaziz","prodigy","prodigy-infotech","task","wassim","wassim-oubaziz"],"created_at":"2024-11-19T02:40:31.387Z","updated_at":"2025-10-12T22:49:19.913Z","avatar_url":"https://github.com/wassimOubaziz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.js Authentication System\n\nA modern, secure, and user-friendly authentication system built with Next.js, Tailwind CSS, and MongoDB.\n\n![Home Page](images/home-page.png)\n\n## Features\n\n- User registration with email and password\n- Secure login with JWT authentication\n- Protected routes and role-based access control\n- Responsive design optimized for both desktop and mobile\n- Custom UI components for consistent styling\n- Server-side rendering for improved performance and SEO\n\n## 📸 Screenshots\n\n### Login Page\n\n![Login Page](images/login-page.png)\n\n### Registration Page\n\n![Registration Page](images/register-page.png)\n\n### Dashboard\n\n![Dashboard](images/dashboard.png)\n\n## 🛠️ Technologies Used\n\n- [Next.js](https://nextjs.org/) - React framework for server-side rendering and static site generation\n- [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS framework\n- [MongoDB](https://www.mongodb.com/) - NoSQL database\n- [Mongoose](https://mongoosejs.com/) - MongoDB object modeling for Node.js\n- [bcryptjs](https://github.com/dcodeIO/bcrypt.js/) - Password hashing\n- [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) - JWT implementation\n\n## 📋 Prerequisites\n\nBefore you begin, ensure you have the following installed:\n\n- Node.js (v14 or later)\n- npm or yarn\n- MongoDB\n\n## 🚀 Getting Started\n\n1. Clone the repository:\n\n```\ngit clone https://github.com/wassimOubaziz/PRODIGY_FS_01.git\n```\n\n2. Install dependencies:\n\n```\nnpm install\n```\n\nor\n\n```\nyarn install\n```\n\n3. Set up environment variables:\n   Create a `.env.local` file in the root directory and add the following:\n\n```\nMONGODB_URI=your_mongodb_connection_string\nJWT_SECRET=your_jwt_secret_key\n```\n\n4. Run the development server:\n\n```\nnpm run dev\n```\n\nor\n\n```\nyarn dev\n```\n\n5. Open [http://localhost:3000](http://localhost:3000) in your browser to see the application.\n\n## 📁 Project Structure\n\n```\nsrc/\n├── app/\n│   ├── page.js\n│   ├── layout.js\n│   └── globals.css\n├── pages/\n│   ├── api/\n│   │   └── auth/\n│   │       ├── login.js\n│   │       ├── register.js\n│   │       └── logout.js\n│   ├── login.js\n│   ├── register.js\n│   └── dashboard.js\n├── components/\n│   ├── Layout.js\n│   ├── Navbar.js\n│   ├── ClientNavbar.js\n│   ├── AuthForm.js\n│   ├── Button.js\n│   └── Input.js\n├── lib/\n│   ├── mongodb.js\n│   └── auth.js\n├── models/\n│   └── User.js\n└── middleware/\n└── authMiddleware.js\n```\n\n## 🔒 Authentication Flow\n\n1. **Registration**: Users can create an account by providing a username, email, and password. Passwords are hashed using bcrypt before being stored in the database.\n\n![mongodb](images/mongodb.png)\n\n2. **Login**: Users can log in using their email and password. Upon successful authentication, a JWT token is generated and stored in the browser's local storage.\n\n3. **Protected Routes**: Certain routes (e.g., dashboard) are protected and can only be accessed by authenticated users. The JWT token is used to verify the user's identity.\n\nhttps://github.com/user-attachments/assets/3d9230f4-bfe6-4306-b150-c7a8cf09ca93\n\n\n\n4. **Logout**: Users can log out, which removes the JWT token from local storage and redirects them to the login page.\n\n## 🎨 UI Components\n\n- `Button`: A reusable button component with consistent styling.\n- `Input`: A styled input component for form fields.\n- `AuthForm`: A flexible form component used for both login and registration.\n- `Navbar`: A responsive navigation bar with dynamic content based on authentication status.\n\n## 🔐 Security Considerations\n\n- Passwords are hashed using bcrypt before storage.\n- JWT tokens are used for maintaining user sessions.\n- Protected routes are implemented using middleware to verify authentication.\n- CORS is configured to restrict access to the API.\n- Rate limiting is implemented to prevent brute-force attacks.\n\n## 🚀 Deployment\n\nThis application can be easily deployed to platforms like Vercel or Netlify. Make sure to set up the required environment variables in your deployment platform.\n\n## 🤝 Contributing\n\nContributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/wassimOubaziz/PRODIGY_FS_01/issues).\n\n## 📝 License\n\nThis project is [MIT](https://github.com/wassimOubaziz/PRODIGY_FS_01?tab=MIT-1-ov-file) licensed.\n\n## 👤 Author\n\nWassim Oubaziz\n\n- GitHub: [@wassimOubaziz](https://github.com/wassimOubaziz)\n- LinkedIn: [wassim-oubaziz](https://www.linkedin.com/in/wassim-oubaziz/)\n\n## 🙏 Acknowledgements\n\n- [Next.js Documentation](https://nextjs.org/docs)\n- [Tailwind CSS Documentation](https://tailwindcss.com/docs)\n- [MongoDB Documentation](https://docs.mongodb.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwassimoubaziz%2Fprodigy_fs_01","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwassimoubaziz%2Fprodigy_fs_01","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwassimoubaziz%2Fprodigy_fs_01/lists"}