{"id":24465835,"url":"https://github.com/tahsinalahi/server-sense-server","last_synced_at":"2026-04-13T13:01:58.622Z","repository":{"id":272014319,"uuid":"915270275","full_name":"TahsinAlahi/server-sense-server","owner":"TahsinAlahi","description":"ServeSense Server is the backend of the ServeSense web app, that provides APIs for managing services, reviews, and make JWT-based authentication with MongoDB and Express.js.","archived":false,"fork":false,"pushed_at":"2025-01-11T12:25:30.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T12:28:17.090Z","etag":null,"topics":["backend","backend-api","expressjs","jwt","mongodb","nodejs"],"latest_commit_sha":null,"homepage":"https://serve-sense-server.vercel.app/","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/TahsinAlahi.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":"2025-01-11T12:16:46.000Z","updated_at":"2025-01-11T12:28:55.000Z","dependencies_parsed_at":"2025-01-11T13:32:33.508Z","dependency_job_id":"9cd503a2-b53a-4548-aae7-cc0446cbc40b","html_url":"https://github.com/TahsinAlahi/server-sense-server","commit_stats":null,"previous_names":["tahsinalahi/server-sense-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TahsinAlahi/server-sense-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TahsinAlahi%2Fserver-sense-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TahsinAlahi%2Fserver-sense-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TahsinAlahi%2Fserver-sense-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TahsinAlahi%2Fserver-sense-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TahsinAlahi","download_url":"https://codeload.github.com/TahsinAlahi/server-sense-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TahsinAlahi%2Fserver-sense-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31753551,"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":["backend","backend-api","expressjs","jwt","mongodb","nodejs"],"created_at":"2025-01-21T06:13:00.077Z","updated_at":"2026-04-13T13:01:58.606Z","avatar_url":"https://github.com/TahsinAlahi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ServeSense Server\n\nThe backend for the ServeSense application, providing APIs for service browsing, user reviews, and JWT-based authentication. Built with Express.js and MongoDB, it ensures a robust and scalable backend infrastructure.\n\n---\n\n## Table of Contents\n\n- [Features](#features)\n- [Getting Started](#getting-started)\n- [Installation](#installation)\n- [Environment Variables](#environment-variables)\n- [Scripts](#scripts)\n- [Dependencies](#dependencies)\n- [Dev Dependencies](#dev-dependencies)\n- [Routes](#routes)\n- [License](#license)\n\n---\n\n## Features\n\n- **Service Management**: APIs for adding, updating, deleting, and retrieving services.\n- **Review Management**: Endpoints to add, view, update, and delete user reviews.\n- **JWT Authentication**: Secure and token-based user authentication.\n- **Cookie Management**: HttpOnly and Secure cookies for authentication.\n\n---\n\n## Getting Started\n\n### Prerequisites\n\n- **Node.js** (v14 or later)\n- **MongoDB** (set up locally or use a cloud database like MongoDB Atlas)\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/TahsinAlahi/server-sense-server.git\n   ```\n\n2. Navigate to the project directory:\n\n   ```bash\n   cd serve-sense-server\n   ```\n\n3. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n4. Start the server:\n   ```bash\n   npm start\n   ```\n\n---\n\n## Environment Variables\n\nCreate a `.env` file in the root directory and add the following variables:\n\n```env\nPORT=your-port\nMONGO_URI=your-mongodb-uri\nJWT_SECRET=your-jwt-secret\n```\n\n---\n\n## Scripts\n\n- **Start the server**:\n\n  ```bash\n  npm start\n  ```\n\n- **Start with Nodemon**:\n\n  ```bash\n  npm run server\n  ```\n\n---\n\n## Dependencies\n\n- **[express](https://www.npmjs.com/package/express)**: Web framework for Node.js.\n- **[cors](https://www.npmjs.com/package/cors)**: Cross-Origin Resource Sharing.\n- **[dotenv](https://www.npmjs.com/package/dotenv)**: Environment variable management.\n- **[jsonwebtoken](https://www.npmjs.com/package/jsonwebtoken)**: JWT-based authentication.\n- **[mongodb](https://www.npmjs.com/package/mongodb)**: MongoDB driver for database integration.\n- **[cookie-parser](https://www.npmjs.com/package/cookie-parser)**: Middleware to parse cookies.\n\n---\n\n## Dev Dependencies\n\n- **[nodemon](https://www.npmjs.com/package/nodemon)**: Automatically restarts the server during development.\n- **[eslint](https://www.npmjs.com/package/eslint)**: JavaScript linting tool.\n- **[@types/express](https://www.npmjs.com/package/@types/express)**: TypeScript definitions for Express.\n\n---\n\n## Routes\n\n### **Services API** (`/api/services`)\n\n- `GET /home-services`: Retrieve featured services.\n- `POST /new-service`: Add a new service (protected by JWT).\n- `GET /all-services`: Retrieve all services.\n- `GET /my-services`: Retrieve services created by the logged-in user (protected by JWT).\n- `GET /service/:id`: Get details of a specific service.\n- `PATCH /service/:id`: Update a specific service (protected by JWT).\n- `DELETE /service/:id`: Delete a specific service (protected by JWT).\n\n### **Reviews API** (`/api/reviews`)\n\n- `POST /new-review`: Add a new review (protected by JWT).\n- `GET /my-reviews`: Retrieve reviews created by the logged-in user (protected by JWT).\n- `PATCH /review/:id`: Update a specific review (protected by JWT).\n- `DELETE /review/:id`: Delete a specific review (protected by JWT).\n\n### **JWT API** (`/api/jwt`)\n\n- `POST /login`: Generate a JWT token and set it as an HttpOnly cookie.\n- `POST /logout`: Clear the authentication cookie.\n\n---\n\n## License\n\nThis project is licensed under the ISC License.\n\n---\n\n## Author\n\n- **Tahsin Alahi**\n  - [GitHub](https://github.com/TahsinAlahi)\n  - [LinkedIn](https://www.linkedin.com/in/tahsinalahi/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahsinalahi%2Fserver-sense-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftahsinalahi%2Fserver-sense-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahsinalahi%2Fserver-sense-server/lists"}