{"id":29024637,"url":"https://github.com/ana-yet/service-sys-server","last_synced_at":"2026-04-04T22:33:09.141Z","repository":{"id":301161474,"uuid":"1008329608","full_name":"ana-yet/service-sys-server","owner":"ana-yet","description":"The backend of Service Review System uses Node.js, Express, and MongoDB to provide a secure REST API. It handles user authentication via Firebase Admin SDK, manages services and reviews, calculates dynamic ratings, and supports CRUD operations, ensuring smooth communication between frontend and database for real-time functionality.","archived":false,"fork":false,"pushed_at":"2025-10-24T04:09:26.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-24T05:36:08.879Z","etag":null,"topics":["database","expressjs","mongodb","nodejs"],"latest_commit_sha":null,"homepage":"https://review-system-app.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/ana-yet.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-25T11:29:20.000Z","updated_at":"2025-10-24T04:09:29.000Z","dependencies_parsed_at":"2025-10-24T05:26:43.508Z","dependency_job_id":"369b135b-5ec7-49fa-80e5-cb7b906c2563","html_url":"https://github.com/ana-yet/service-sys-server","commit_stats":null,"previous_names":["ana-yet/service-sys-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ana-yet/service-sys-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ana-yet%2Fservice-sys-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ana-yet%2Fservice-sys-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ana-yet%2Fservice-sys-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ana-yet%2Fservice-sys-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ana-yet","download_url":"https://codeload.github.com/ana-yet/service-sys-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ana-yet%2Fservice-sys-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31416771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"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":["database","expressjs","mongodb","nodejs"],"created_at":"2025-06-26T04:18:30.791Z","updated_at":"2026-04-04T22:33:09.095Z","avatar_url":"https://github.com/ana-yet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔧 Service Review System - Backend\n\nThis is the **server-side application** for the Service Review System. It provides a RESTful API built with **Express.js** and **MongoDB**, handles authentication using **Firebase Admin SDK**, and performs core business logic like reviews, ratings, and service management.\n\n🔗 **Live Frontend Link**: [https://review-system-app.web.app/](https://review-system-app.web.app/)\n\n---\n\n## 🚀 Features\n\n- 🔐 JWT-based Firebase authentication middleware\n- 📦 Add, edit, delete services (protected routes)\n- 🗳️ Add, update, and delete reviews\n- ⭐ Dynamic rating calculation per service\n- 🧮 Dashboard count summary (users, reviews, services)\n- 🔍 Filter and search services\n- 📚 Distinct categories from service collection\n- 🧑 User profile \u0026 services management\n- ⚙️ MongoDB with three collections:\n  - `AllServices`\n  - `Review`\n  - `User`\n\n---\n\n## 🛠️ Tech Stack\n\n- **Node.js**\n- **Express.js**\n- **MongoDB (with MongoClient and ObjectId)**\n- **Firebase Admin SDK** (JWT token verification)\n- **dotenv** (Environment variables)\n- **CORS** (Secure cross-origin requests)\n\n---\n\n## 📁 API Endpoints Overview\n\n| Method | Endpoint                      | Description                         |\n| ------ | ----------------------------- | ----------------------------------- |\n| GET    | `/services`                   | Get all services with search/filter |\n| GET    | `/services/:id`               | Get single service by ID            |\n| POST   | `/allServices`                | Add new service (protected)         |\n| PATCH  | `/my-service`                 | Update user’s own service           |\n| DELETE | `/my-service`                 | Delete user’s own service           |\n| GET    | `/my-service/:email`          | Get services by user email          |\n| GET    | `/featured`                   | Get top 6 services by review count  |\n| GET    | `/reviews?id=serviceId`       | Get reviews for a service           |\n| POST   | `/review`                     | Post a new review (protected)       |\n| PATCH  | `/review/:id`                 | Update a review and refresh ratings |\n| DELETE | `/review/:id`                 | Delete a review                     |\n| GET    | `/my-review?email=user@email` | Get user's reviews                  |\n| GET    | `/user?email=user@email`      | Get single user                     |\n| POST   | `/user`                       | Create new user                     |\n| GET    | `/counts`                     | Get user, review, service counts    |\n\n---\n\n## 🔐 Firebase Authentication (Admin SDK)\n\nThe API uses **Firebase Admin SDK** to verify tokens on protected routes.\n\n- Protected routes use a middleware called `verifyToken`.\n- JWT must be sent in the `Authorization` header:\n\n## ⚙️ Installation \u0026 Setup\n\n- 1. Clone the Repository\n\n- 2. Install Dependencies\n     `npm install`\n- 3. Add .env File\n     Follow the format above to configure your MongoDB URI and Firebase credentials.\n\n- 4. Start Server\n\n`npm start index.js`\n\n## 📂 Folder Structure\n\n```\n├── index.js                 # Main server file\n├── .env                     # Environment variables\n├── package.json             # Project config\n└── README.md\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fana-yet%2Fservice-sys-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fana-yet%2Fservice-sys-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fana-yet%2Fservice-sys-server/lists"}