{"id":25831359,"url":"https://github.com/rafath0ssain/worksync-server","last_synced_at":"2026-04-08T11:31:57.327Z","repository":{"id":279521796,"uuid":"916909630","full_name":"RafatH0ssain/WorkSync-Server","owner":"RafatH0ssain","description":"A full-stack employee management app with React.js, Node.js, and MongoDB. Log hours, manage payroll, and oversee roles—streamlined for Employees, HR, and Admins.","archived":false,"fork":false,"pushed_at":"2025-02-26T01:17:53.000Z","size":9331,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T14:29:25.363Z","etag":null,"topics":["backend","expressjs","firebase","fullstack","hrms","jwt","mongodb","nodejs","payroll","restapi","rolebasedauthrorization"],"latest_commit_sha":null,"homepage":"https://worksync-2ca3b.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/RafatH0ssain.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-15T01:38:15.000Z","updated_at":"2025-02-26T01:17:56.000Z","dependencies_parsed_at":"2025-02-26T02:24:53.015Z","dependency_job_id":"79e29644-12ed-486c-8b7d-48e5f22ed12d","html_url":"https://github.com/RafatH0ssain/WorkSync-Server","commit_stats":null,"previous_names":["rafath0ssain/worksync-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RafatH0ssain/WorkSync-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafatH0ssain%2FWorkSync-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafatH0ssain%2FWorkSync-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafatH0ssain%2FWorkSync-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafatH0ssain%2FWorkSync-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RafatH0ssain","download_url":"https://codeload.github.com/RafatH0ssain/WorkSync-Server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafatH0ssain%2FWorkSync-Server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31554061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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","expressjs","firebase","fullstack","hrms","jwt","mongodb","nodejs","payroll","restapi","rolebasedauthrorization"],"created_at":"2025-02-28T20:33:32.145Z","updated_at":"2026-04-08T11:31:57.305Z","avatar_url":"https://github.com/RafatH0ssain.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WorkSync Backend\n\n\n## Overview\nWorkSync's backend is built using **Node.js**, **Express.js**, and **MongoDB**, providing a robust and scalable server for managing employee data, payroll, and user authentication. The API supports role-based access with **JWT authentication** and integrates **Firebase** for secure user management.\n\n\n## Frontend:\n[Github Link](https://github.com/RafatH0ssain/WorkSync-Client)\n\n\n## 📚 API Documentation\n\n### 👥 User Management\n\n#### 🔍 Get User by UID\n**Endpoint:** `GET /users/:uid`  \n**Description:** Retrieve details of a specific user by their Firebase UID  \n**Response:**  \n```json\n{\n  \"_id\": \"string\",\n  \"name\": \"string\",\n  \"email\": \"string\",\n  \"userType\": \"admin|hr|employee\",\n  \"status\": \"active|fired\",\n  \"createdAt\": \"ISO date\"\n}\n```\n\n#### 📋 Get All Users\n**Endpoint:** `GET /users`  \n**Description:** Get all non-admin users  \n**Response:** Array of user objects  \n\n#### 📝 Register User\n**Endpoint:** `POST /users`  \n**Body:**  \n```json\n{\n  \"name\": \"string\",\n  \"email\": \"string\",\n  \"photoURL\": \"string\",\n  \"uid\": \"string\",\n  \"userType\": \"admin|hr|employee\"\n}\n```\n\n#### ⬆️ Promote to HR\n**Endpoint:** `POST /make-hr/:id`  \n**Description:** Promote an employee to HR role  \n**Params:** MongoDB document ID  \n\n### ❓ Queries\n\n#### ✉️ Submit Query\n**Endpoint:** `POST /submit-query`  \n**Body:**  \n```json\n{\n  \"heading\": \"string\",\n  \"designation\": \"string\",\n  \"details\": \"string\",\n  \"email\": \"string\"\n}\n```\n\n#### 📨 Get Queries \n**Endpoint:** `GET /queries`  \n**Query Params:** ?email=user@example.com  \n**Response:** Array of query objects  \n\n### 📅 Worksheet Management\n#### ➕ Create Worksheet Entry\n**Endpoint:** `POST /worksheet`  \n**Body:**  \n```json\n{\n  \"email\": \"string\",\n  \"hoursWorked\": \"number\",\n  \"date\": \"ISO date\"\n}\n```\n\n#### 📂 Get Worksheet Entries\n**Endpoint:** `GET /worksheet/:email`  \n**Response:** Array of worksheet entries for specified user  \n\n### 💰 Payments\n#### 💸 Process Payment\n**Endpoint:** `POST /process-payment`  \n**Body:**  \n```json\n{\n  \"email\": \"string\",\n  \"amount\": \"number\",\n  \"paidBy\": \"string\",\n  \"entries\": [\"array of entry IDs\"]\n}\n```\n\n#### 📊 Get Payment History\n**Endpoint:** `GET /payment-history/:email`  \n**Response:**  \n```json\n{\n  \"payments\": [\n    {\n      \"month\": \"string\",\n      \"salary\": \"number\",\n      \"approvedBy\": \"string\"\n    }\n  ]\n}\n```\n\n#### ⏳ Check Pending Payments\n**Endpoint:** `GET /check-pending-payment/:email`  \n**Response:**  \n```json\n{\n  \"hasPendingPayment\": \"boolean\",\n  \"pendingPayment\": \"object|null\"\n}\n```\n\n### 💼 Salary Management\n#### 📈 Adjust Salary\n**Endpoint:** `POST /adjust-salary/:id`  \n**Params:** MongoDB document ID  \n**Body:**  \n```json\n{ \"salary\": \"number\" }\n```\n\n### 📜 Get Salary History\n**Endpoint:** `GET /salary-history/:id`  \n**Response:** Array of salary adjustment objects  \n\n\n## 📬 Contact\nFor any questions or support, please contact:\n\n📧 [Email](mailto:rafat.click.hossain@gmail.com)\n\n👔 [LinkedIn](https://www.linkedin.com/in/muhammad-rafat-hossain/)\n\n**Let's connect! 🤝**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafath0ssain%2Fworksync-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafath0ssain%2Fworksync-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafath0ssain%2Fworksync-server/lists"}