{"id":25508190,"url":"https://github.com/aaringuleria/contactmanagementapp","last_synced_at":"2026-04-16T05:32:14.148Z","repository":{"id":258324441,"uuid":"841316162","full_name":"AarinGuleria/contactManagementApp","owner":"AarinGuleria","description":"It covers different Nodejs, Express, MongoDB \u0026 JWT Topics and implementation in one single project. It showcases the Express concepts and their use in practical project.","archived":false,"fork":false,"pushed_at":"2025-01-20T10:20:05.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-20T05:08:47.351Z","etag":null,"topics":["expressjs","jwt","mongodb","node-js"],"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/AarinGuleria.png","metadata":{"files":{"readme":"readme","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,"zenodo":null}},"created_at":"2024-08-12T06:53:54.000Z","updated_at":"2025-01-20T10:20:07.000Z","dependencies_parsed_at":"2025-05-20T05:08:48.882Z","dependency_job_id":"28295c73-2014-4fcc-8328-480cecfdc30b","html_url":"https://github.com/AarinGuleria/contactManagementApp","commit_stats":null,"previous_names":["aaringuleria/contactmanagementapp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AarinGuleria/contactManagementApp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AarinGuleria%2FcontactManagementApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AarinGuleria%2FcontactManagementApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AarinGuleria%2FcontactManagementApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AarinGuleria%2FcontactManagementApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AarinGuleria","download_url":"https://codeload.github.com/AarinGuleria/contactManagementApp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AarinGuleria%2FcontactManagementApp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268016842,"owners_count":24181655,"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-07-31T02:00:08.723Z","response_time":66,"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":["expressjs","jwt","mongodb","node-js"],"created_at":"2025-02-19T07:57:06.241Z","updated_at":"2026-04-16T05:32:09.122Z","avatar_url":"https://github.com/AarinGuleria.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📞 MyContacts Backend API\n\nWelcome to the **MyContacts Backend API**! This production-ready Node.js/Express.js application provides a robust backend system for managing contacts with secure authentication and MongoDB integration.\n\n## ✨ Features\n\n- 🔐 Secure JWT Authentication \u0026 Authorization\n- 📝 Complete CRUD Operations for Contacts Management\n- 🎯 Request Validation using Express Validator\n- 🔄 Global Error Handling \u0026 Custom Error Responses\n- 📦 MongoDB \u0026 Mongoose Integration\n- 🛡️ Express Middleware for Route Protection\n- 🔒 Password Hashing with Bcrypt\n- 📊 User-specific Contact Management\n- ⚡ Async/Await Implementation with Express-Async-Handler\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Node.js (v14 or higher)\n- MongoDB (local or Atlas URI)\n- npm/yarn package manager\n\n### Installation \u0026 Setup\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/yourusername/mycontacts-backend.git\n   ```\n2. Install dependencies:\n   ```bash\n   cd mycontacts-backend\n   npm install\n   ```\n3. Create a `.env` file in the root directory:\n   ```env\n   PORT=5001\n   CONNECTION_STRING=your_mongodb_uri\n   ACCESS_TOKEN_SECRET=your_secret_key\n   ```\n\n### 🏃‍♂️ Running the Application\n\n1. Start the production server:\n   ```bash\n   npm start\n   ```\n2. For development with nodemon:\n   ```bash\n   npm run dev\n   ```\n\n## 📚 API Documentation\n\n### Authentication Endpoints\n\n- POST `/api/users/register` - Register a new user\n  - Required fields: username, email, password\n  - Returns: User object with JWT token\n- POST `/api/users/login` - Login user\n  - Required fields: email, password\n  - Returns: JWT token \u0026 user info\n- GET `/api/users/current` - Get current user info (Protected Route)\n  - Requires: Valid JWT token in Authorization header\n\n### Contacts Endpoints (Protected Routes)\n\n- GET `/api/contacts` - Get all contacts for logged in user\n  - Returns: Array of contact objects\n- POST `/api/contacts` - Create new contact\n  - Required fields: name, email, phone\n  - Optional fields: description\n- GET `/api/contacts/:id` - Get contact by ID\n  - Returns: Single contact object\n- PUT `/api/contacts/:id` - Update contact\n  - Updateable fields: name, email, phone, description\n- DELETE `/api/contacts/:id` - Delete contact\n  - Returns: Success message\n\n## 🛠️ Tech Stack\n\n- Express.js - Web framework\n- MongoDB \u0026 Mongoose - Database \u0026 ODM\n- JWT - Authentication \u0026 Authorization\n- Express-Async-Handler - Async operations handling\n- Express Validator - Input validation\n- Bcrypt - Password hashing\n- Dotenv - Environment variables management\n- Nodemon - Development server\n\n## 🔐 Security Features\n\n- Password Hashing\n- JWT Token Authentication\n- Protected Routes\n- Input Sanitization\n- User-specific Data Access\n- Error Handling\n\n## 📝 License\n\nThis project is licensed under the MIT License. Feel free to use, modify, and distribute as per the license terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaringuleria%2Fcontactmanagementapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaringuleria%2Fcontactmanagementapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaringuleria%2Fcontactmanagementapp/lists"}