{"id":16535075,"url":"https://github.com/irenaeus-xvi/simple-user-management-system","last_synced_at":"2026-04-11T09:34:54.333Z","repository":{"id":210243313,"uuid":"726029782","full_name":"Irenaeus-XVI/Simple-User-Management-System","owner":"Irenaeus-XVI","description":"Create a server-side application in Node.js to manage user accounts.","archived":false,"fork":false,"pushed_at":"2023-12-01T14:35:08.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T01:41:42.679Z","etag":null,"topics":["bcrypt","dotenv","expressjs","jsonwebtoken","mongodb","mongoose","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Irenaeus-XVI.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-12-01T11:38:24.000Z","updated_at":"2023-12-01T14:20:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"f488179d-94af-481f-9e48-b029c1ccbcc8","html_url":"https://github.com/Irenaeus-XVI/Simple-User-Management-System","commit_stats":null,"previous_names":["irenaeus-xvi/simple-user-management-system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FSimple-User-Management-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FSimple-User-Management-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FSimple-User-Management-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FSimple-User-Management-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Irenaeus-XVI","download_url":"https://codeload.github.com/Irenaeus-XVI/Simple-User-Management-System/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241686807,"owners_count":20003112,"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","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":["bcrypt","dotenv","expressjs","jsonwebtoken","mongodb","mongoose","nodejs"],"created_at":"2024-10-11T18:26:20.868Z","updated_at":"2026-04-11T09:34:49.307Z","avatar_url":"https://github.com/Irenaeus-XVI.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# User Management System\n\n## Application Architecture:\n\nThe application follows a typical Node.js and Express architecture with MongoDB as the database. Here's a breakdown of the key components:\n\n1. **Server Entry Point (`index.js`):**\n   - The `index.js` file serves as the entry point for the application.\n   - It initializes Express, connects to the MongoDB database, and sets up middleware.\n   - The API routes for authentication (`authRouter`) and user management (`userRouter`) are defined here.\n\n2. **Middleware:**\n   - Middleware functions are used to handle various aspects of the application, such as global error handling (`globalErrorHandling`) and validation of incoming data (`validation`).\n\n3. **Database (`database` folder):**\n   - The `database` folder contains the MongoDB connection setup (`dbConnection.js`).\n   - Mongoose is used as the ODM (Object Data Modeling) library to interact with the MongoDB database.\n   - The User model is defined in `user.model.js`.\n\n4. **Authentication (`auth` module):**\n   - The authentication module (`authRouter`, `auth.controller.js`, `auth.validation.js`) handles user registration, login, and token validation.\n   - JWT (JSON Web Tokens) are used for user authentication.\n\n5. **User Management (`user` module):**\n   - The user module (`userRouter`, `user.controller.js`, `user.validation.js`) provides endpoints for creating, reading, updating, and deleting user accounts.\n   - CRUD operations are implemented using Mongoose to interact with the MongoDB database.\n\n6. **Error Handling (`utils` folder):**\n   - The `AppError` class is used to create standardized error objects.\n   - The `handleAsyncError` function is a middleware that wraps asynchronous functions to catch errors and pass them to the global error handling middleware.\n\n## Technologies Used:\n\n- Node.js\n- Express\n- MongoDB\n- Mongoose\n- JWT (JSON Web Tokens)\n- bcrypt\n\n## How to Run the Application:\n\n1. **Environment Variables:**\n   - Create a `.env` file in the root directory with the following content:\n\n     ```plaintext\n     PORT=3000\n     CONNECTIONURL=mongodb://localhost:27017/user-management\n     SALT_ROUNDS=10\n     SECRET_KEY_TOKEN=your-secret-key\n     ```\n\n2. **Install Dependencies:**\n   - Run `npm install` to install the required dependencies.\n\n3. **Start MongoDB:**\n   - Ensure that MongoDB is installed and running on your local machine or update the `CONNECTIONURL` in the `.env` file accordingly.\n\n4. **Run the Application:**\n   - Execute `npm start` to start the Node.js server.\n\n5. **API Endpoints:**\n   - Access the API endpoints at `http://localhost:3000/api/v1/auth` for authentication and `http://localhost:3000/api/v1/user` for user management.\n\n6. **Testing and API Documentation:**\n   - Explore and test the API using Postman. Refer to the [Postman Documentation](https://documenter.getpostman.com/view/27083413/2s9YeK39Wr) for detailed information on available endpoints, request payloads, and responses.\n\n7. **Additional Notes:**\n   - The application assumes that you have Node.js, npm, and MongoDB installed on your machine.\n   - Make sure to replace `\"your-secret-key\"` in the `.env` file with a secure secret key for JWT token generation.\n   - This documentation provides a basic setup; in a production environment, additional security measures and optimizations may be required.\n\nFeel free to customize the documentation based on your specific requirements or add more details as needed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firenaeus-xvi%2Fsimple-user-management-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firenaeus-xvi%2Fsimple-user-management-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firenaeus-xvi%2Fsimple-user-management-system/lists"}