{"id":27607810,"url":"https://github.com/ryzmdn/admin-dashboard-mern","last_synced_at":"2026-04-13T12:02:04.750Z","repository":{"id":288952766,"uuid":"969650423","full_name":"ryzmdn/admin-dashboard-mern","owner":"ryzmdn","description":"Authentication boilerplate using the MERN stack.","archived":false,"fork":false,"pushed_at":"2025-04-20T23:42:42.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-14T19:11:26.523Z","etag":null,"topics":["admin-dashboard","authentication","boilerplate","express","mern-stack","react"],"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/ryzmdn.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,"zenodo":null}},"created_at":"2025-04-20T16:23:48.000Z","updated_at":"2025-04-20T23:42:45.000Z","dependencies_parsed_at":"2025-04-21T11:45:41.655Z","dependency_job_id":null,"html_url":"https://github.com/ryzmdn/admin-dashboard-mern","commit_stats":null,"previous_names":["ryzmdn/admin-dashboard-mern"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryzmdn/admin-dashboard-mern","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzmdn%2Fadmin-dashboard-mern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzmdn%2Fadmin-dashboard-mern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzmdn%2Fadmin-dashboard-mern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzmdn%2Fadmin-dashboard-mern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryzmdn","download_url":"https://codeload.github.com/ryzmdn/admin-dashboard-mern/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryzmdn%2Fadmin-dashboard-mern/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31751705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["admin-dashboard","authentication","boilerplate","express","mern-stack","react"],"created_at":"2025-04-22T22:05:48.086Z","updated_at":"2026-04-13T12:02:04.730Z","avatar_url":"https://github.com/ryzmdn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MERN Auth Boilerplate\n\n**MERN Auth Boilerplate** is a starter project for building authentication and authorization systems using the **MERN Stack** (MongoDB, Express, React, Node.js). This boilerplate is designed to help developers quickly kickstart their applications with robust user security and best practices in place.\n\n## Dashboard image\n\n![dashboard](https://github.com/user-attachments/assets/65703573-9aba-4b99-be5d-e1e7dfce3f35)\n\n## Features\n\n- **User Registration \u0026 Login**\n- **JWT Authentication** with access \u0026 refresh tokens\n- **Role-Based Authorization** (Admin/User)\n- **Email Verification** (optional and extendable)\n- **Refresh Token** flow\n- **Protected Routes** (Public/Private)\n- **Modular Project Structure** for backend and frontend\n- Ready for testing and further development\n\n## Project Structure\n\n```plaintext\nadmin-dashboard-mern/\n│\n├── client/                \n│   ├── public/\n│   └── src/\n│       ├── components/\n│       └── pages/\n|           └── auth/\n│\n├── controllers/\n├── middleware/\n├── models/\n├── routes/\n│\n├── .env.example\n├── .gitignore\n├── package-lock.json\n├── package.json\n├── README.md\n└── server.js\n```\n\n## Installation\n\nTo run the project locally, follow these steps:\n\n```bash\n# Clone the repository\ngit clone https://github.com/ryzmdn/admin-dashboard-mern.git\n\n# Navigate into the project directory\ncd admin-dashboard-mern\n\n# Install server dependencies\nnpm install\n\n# Change directory to client folder\ncd client\n\n# Install client dependencies\nnpm install\n\n# Run server\nnpm run dev\n\n# Return to the original directory\ncd ..\n\n# Copy the environment config file\ncp .env.example .env\n\n# Then fill in your own values (see Configuration section)\n\n# Run server\nnode server.js\n# or\nnodemon server.js\n```\n\n## Configuration\n\nCreate a `.env` file in the root directory and add the following:\n\n```env\nPORT=4000\nMONGO_URI=\nJWT_SECRET=\n\nUSER_EMAIL=\nUSER_PASSWORD=\n```\n\n## Usage\n\n1. Run `npm run dev` to start client folder.\n2. Run `node server.js` or `nodemon server.js` to start main folder.\n3. Open your browser at `http://localhost:5173`.\n4. Register a new user or login.\n5. Test route protection, logout, and role-based access.\n\n## Technologies Used\n\n- **MongoDB** - NoSQL database\n- **Express.js** - Backend web framework\n- **React.js** - Frontend user interface\n- **Tailwind CSS** - CSS framework\n- **Node.js** - Backend runtime environment\n- **JWT (jsonwebtoken)** - Token-based authentication\n- **Axios** - HTTP client for API calls\n- **bcryptjs** - Password hashing\n- **dotenv** - Environment variable manager\n- **React Router** - Page navigation\n- **CORS** - Web security mechanisms\n- **nodemailer** - Send email from server\n\n## API Endpoints Overview\n\n| Endpoint                    | Method | Description                 |\n|-----------------------------|--------|-----------------------------|\n| `/api/auth/user`            | GET    | Get user data               |\n| `/api/auth/register`        | POST   | Register a new user         |\n| `/api/auth/login`           | POST   | Log in to the user account  |\n| `/api/auth/forgot-password` | POST   | Send email forgot password  |\n| `/api/auth/verify-code`     | POST   | Verify code from email      |\n| `/api/auth/reset-password`  | POST   | Update new password         |\n| `/api/auth/update`          | PUT    | Update a user account       |\n| `/api/user/delete`          | DELETE | Delete a user account       |\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE). You are free to use, modify, and distribute it with attribution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryzmdn%2Fadmin-dashboard-mern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryzmdn%2Fadmin-dashboard-mern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryzmdn%2Fadmin-dashboard-mern/lists"}