{"id":16535081,"url":"https://github.com/irenaeus-xvi/saraha-app","last_synced_at":"2026-04-09T15:51:43.093Z","repository":{"id":195889667,"uuid":"675867919","full_name":"Irenaeus-XVI/SARAHA-APP","owner":"Irenaeus-XVI","description":"SARAHA-APP is a backend application for user management and authentication. It's built using Node.js, Express.js, and MongoDB.","archived":false,"fork":false,"pushed_at":"2023-09-01T19:13:56.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T15:21:30.922Z","etag":null,"topics":["authentication","bcrypt","dotenv","expressjs","global-error-handling","joi-validation","js","jsonwebtoken","mongodb","mongoose","nodejs","nodemailer"],"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}},"created_at":"2023-08-07T23:24:48.000Z","updated_at":"2025-02-02T21:55:09.000Z","dependencies_parsed_at":"2023-09-20T01:41:58.753Z","dependency_job_id":null,"html_url":"https://github.com/Irenaeus-XVI/SARAHA-APP","commit_stats":null,"previous_names":["irenaeus-xvi/saraha-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Irenaeus-XVI/SARAHA-APP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FSARAHA-APP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FSARAHA-APP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FSARAHA-APP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FSARAHA-APP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Irenaeus-XVI","download_url":"https://codeload.github.com/Irenaeus-XVI/SARAHA-APP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FSARAHA-APP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269713884,"owners_count":24463244,"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-08-10T02:00:08.965Z","response_time":71,"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":["authentication","bcrypt","dotenv","expressjs","global-error-handling","joi-validation","js","jsonwebtoken","mongodb","mongoose","nodejs","nodemailer"],"created_at":"2024-10-11T18:26:21.609Z","updated_at":"2025-12-30T19:52:08.506Z","avatar_url":"https://github.com/Irenaeus-XVI.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SARAHA-APP\n\nSARAHA-APP is a backend application for user management and authentication. It's built using Node.js, Express.js, and MongoDB.\n\n## Getting Started\n\nTo get started with the SARAHA-APP backend, follow these steps:\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/Irenaeus-XVI/SARAHA-APP.git\n   ```\n2. Install dependencies:\n    ```sh\n   cd SARAHA-APP\n   npm install\n   ```\n3. Set up environment variables:\n\n   Create a `.env` file in the root directory and add the necessary environment variables. You can use the provided .env.example as a template.   \n\n4. Start the server:\n\n```sh \n    npm start\n```\n\nThe server will start and listen on a specified port (default: 3000). You can access the API using tools like Postman or integrate it with your frontend application.\n\n\n## Configuration\n\nIn the `.env` file, you need to provide values for the following environment variables:\n\n- `SALT_ROUNDS`: Number of salt rounds for bcrypt hashing.\n- `SECRET_KEY`: Secret key for generating JWT tokens.\n- `EMAIL`: Email credentials for sending emails.\n- `PASSWORD`: Password for the email account.\n- `VERIFY_SECRET`: Secret key for email verification tokens.\n- `MODE`: Application mode (dev, prod, etc.).\n\n## Endpoints\n\n- `POST /api/v1/user/signup`: Register a new user.\n- `POST /api/v1/user/signin`: Log in a user.\n- `GET /api/v1/user/verify/:token`: Verify user email.\n- `POST /api/v1/messages/add`: Add a new message.\n- `GET /api/v1/messages:` Get all messages.\n\n\n\n\n## Global Error Handling and Status Codes\n\nThe application employs global error handling to ensure consistent error responses. HTTP status codes are utilized to indicate the nature of errors:\n\n- `404`: Resource not found.\n- `400`: Bad request - when the request is malformed or invalid.\n- `409`: Conflict - when there is a conflict with the current state of the server (e.g., attempting to create a resource that already exists).\n- `500`: Server error.\n\nThis approach helps maintain a standardized response format and enhances the user experience by providing meaningful error messages and appropriate HTTP status codes.\n\n\n\n\n## Contributing\n\nContributions are welcome! If you find a bug or have a suggestion, feel free to open an issue or create a pull request.\n\n## License\n\nThis project is licensed under the MIT License.\n\n\n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firenaeus-xvi%2Fsaraha-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firenaeus-xvi%2Fsaraha-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firenaeus-xvi%2Fsaraha-app/lists"}