{"id":49592966,"url":"https://github.com/rantu01/srs-backend","last_synced_at":"2026-05-04T01:40:27.727Z","repository":{"id":298064924,"uuid":"997992585","full_name":"rantu01/srs-backend","owner":"rantu01","description":" Service Review System (SRS) Backend A secure Node.js/Express REST API powering a service review platform. Features:  ✔ Firebase Auth + JWT for secure user authentication ✔ MongoDB database with full CRUD for services/reviews ✔ Protected routes \u0026 middleware for authorization ","archived":false,"fork":false,"pushed_at":"2025-10-23T15:39:14.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-23T16:33:25.731Z","etag":null,"topics":["cors","express","mongodb","node"],"latest_commit_sha":null,"homepage":"https://service-review-system-a0858.web.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/rantu01.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-07T16:30:30.000Z","updated_at":"2025-10-23T15:39:18.000Z","dependencies_parsed_at":"2025-10-23T16:18:38.038Z","dependency_job_id":"c8752653-847b-4b52-b474-e039fc94c73f","html_url":"https://github.com/rantu01/srs-backend","commit_stats":null,"previous_names":["rantu01/srs-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rantu01/srs-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rantu01%2Fsrs-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rantu01%2Fsrs-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rantu01%2Fsrs-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rantu01%2Fsrs-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rantu01","download_url":"https://codeload.github.com/rantu01/srs-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rantu01%2Fsrs-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32591603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: 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":["cors","express","mongodb","node"],"created_at":"2026-05-04T01:40:26.003Z","updated_at":"2026-05-04T01:40:27.716Z","avatar_url":"https://github.com/rantu01.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Here’s a clean and professional `README.md` file tailored for your **[SRS Backend](https://github.com/rantu01/srs-backend)** repository — the backend for your **Service Review System** project.\n\n---\n\n```markdown\n# 💬 Service Review System - Backend\n\nThis is the **backend** for the [Service Review System (SRS)](https://github.com/rantu01/SRS), a full-stack web application where users can add services, write reviews, and explore feedback from others. This backend is built using **Node.js**, **Express.js**, and **MongoDB**, and uses **JWT with cookies** for secure authentication.\n\n\u003e 🔗 **Frontend Repository:** [SRS Frontend](https://github.com/rantu01/SRS)\n\n---\n\n## ⚙️ Features\n\n- 🔐 JWT authentication with secure HTTP-only cookies\n- ➕ Add new services with details (image, title, description, etc.)\n- 💬 Post, update, and delete service reviews\n- 🧑 Routes protected by user authentication middleware\n- 📅 Auto timestamp for services and reviews\n- 📁 Organized route and controller structure\n- 🌐 CORS-enabled API to connect with frontend\n\n---\n\n## 🛠️ Tech Stack\n\n- [Node.js](https://nodejs.org/)\n- [Express.js](https://expressjs.com/)\n- [MongoDB](https://www.mongodb.com/)\n- [Mongoose](https://mongoosejs.com/)\n- [JWT](https://jwt.io/)\n- [Cookie-parser](https://www.npmjs.com/package/cookie-parser)\n- [CORS](https://www.npmjs.com/package/cors)\n- [dotenv](https://www.npmjs.com/package/dotenv)\n\n---\n\n## 📁 Folder Structure\n\n```\n\nsrs-backend/\n├── controllers/\n│   ├── authController.js\n│   ├── serviceController.js\n│   └── reviewController.js\n├── middlewares/\n│   └── verifyJWT.js\n├── models/\n│   ├── Service.js\n│   ├── Review\\.js\n│   └── User.js\n├── routes/\n│   ├── authRoutes.js\n│   ├── serviceRoutes.js\n│   └── reviewRoutes.js\n├── .env\n├── index.js\n├── package.json\n└── README.md\n\n````\n\n---\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- **Node.js** and **npm**\n- **MongoDB Atlas** or local MongoDB\n\n### Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/rantu01/srs-backend.git\n   cd srs-backend\n````\n\n2. **Install dependencies**\n\n   ```bash\n   npm install\n   ```\n\n3. **Create a `.env` file**\n\n   ```env\n   PORT=5000\n   MONGODB_URI=your_mongodb_connection_string\n   JWT_SECRET=your_jwt_secret\n   ```\n\n4. **Run the server**\n\n   ```bash\n   npm start\n   ```\n\nAPI will be running on `http://localhost:5000`\n\n---\n\n## 🔐 Authentication\n\n* Users login/register and receive a JWT in an **HTTP-only cookie**\n* Use `verifyJWT` middleware to protect routes\n* Example request headers:\n\n  ```\n  Cookie: token=your_jwt_token\n  ```\n\n---\n\n## 🔄 API Endpoints\n\n### ✅ Auth Routes\n\n| Method | Endpoint        | Description              |\n| ------ | --------------- | ------------------------ |\n| POST   | `/api/register` | Register a new user      |\n| POST   | `/api/login`    | Login and set JWT cookie |\n| POST   | `/api/logout`   | Clear cookie and logout  |\n| GET    | `/api/me`       | Get current user         |\n\n### 📦 Service Routes\n\n| Method | Endpoint            | Description                     |\n| ------ | ------------------- | ------------------------------- |\n| GET    | `/api/services`     | Get all services                |\n| GET    | `/api/services/:id` | Get single service              |\n| POST   | `/api/services`     | Add new service (auth required) |\n\n### 💬 Review Routes\n\n| Method | Endpoint           | Description                     |\n| ------ | ------------------ | ------------------------------- |\n| GET    | `/api/reviews`     | Get all reviews                 |\n| GET    | `/api/reviews/:id` | Get reviews for a service       |\n| POST   | `/api/reviews`     | Add a review (auth required)    |\n| PATCH  | `/api/reviews/:id` | Update a review (auth required) |\n| DELETE | `/api/reviews/:id` | Delete a review (auth required) |\n\n---\n\n## 🙋‍♂️ Author\n\n**Rantu Mondal**\n🔗 [LinkedIn](https://www.linkedin.com/in/rantubytes)\n📧 [rantumondal06@gmail.com](mailto:rantumondal06@gmail.com)\n\n---\n\n## 📄 License\n\nLicensed under the [MIT License](LICENSE)\n\n---\n\n## 🧑‍💻 Contributing\n\nContributions are welcome! Please fork this repo and submit a pull request with your changes.\n\n---\n\n## 🔗 Related\n\n* Frontend: [SRS](https://github.com/rantu01/SRS)\n\n```\n\n---\n\nLet me know if you'd like to include example request payloads, Swagger docs, or a Postman collection link!\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frantu01%2Fsrs-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frantu01%2Fsrs-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frantu01%2Fsrs-backend/lists"}