{"id":18275834,"url":"https://github.com/gr7800/techprimelab-assignment","last_synced_at":"2026-04-04T21:31:31.690Z","repository":{"id":172928799,"uuid":"648541203","full_name":"gr7800/TechPrimeLab-assignment","owner":"gr7800","description":"This is a Node.js-based API for managing user authentication and project management.","archived":false,"fork":false,"pushed_at":"2023-06-09T04:41:54.000Z","size":249,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T22:20:07.029Z","etag":null,"topics":["bcrypt","chakra-ui","chartjs","css","express","html","javascript","jsonwebtoken","mongodb","nodejs","react-chartjs-2","reactjs","redux"],"latest_commit_sha":null,"homepage":"https://techprimelab-gt.netlify.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/gr7800.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":"2023-06-02T07:59:00.000Z","updated_at":"2024-12-16T12:15:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"17a603ba-85aa-4a07-af94-517031d4b684","html_url":"https://github.com/gr7800/TechPrimeLab-assignment","commit_stats":null,"previous_names":["gr7800/techprimelab-assignment"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gr7800/TechPrimeLab-assignment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr7800%2FTechPrimeLab-assignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr7800%2FTechPrimeLab-assignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr7800%2FTechPrimeLab-assignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr7800%2FTechPrimeLab-assignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gr7800","download_url":"https://codeload.github.com/gr7800/TechPrimeLab-assignment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr7800%2FTechPrimeLab-assignment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31415110,"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":["bcrypt","chakra-ui","chartjs","css","express","html","javascript","jsonwebtoken","mongodb","nodejs","react-chartjs-2","reactjs","redux"],"created_at":"2024-11-05T12:14:12.500Z","updated_at":"2026-04-04T21:31:31.668Z","avatar_url":"https://github.com/gr7800.png","language":"JavaScript","readme":"# TechPrimeLab-assignment\n\n#### Login Email and Passwrd : \u003cgt29015@gmail.com\u003e \u003c12345\u003e\n\n## Project Management API\n\nThis is a Node.js-based API for managing user authentication and project management.\n\n### Backend Depolyed link: \u003chttps://techprimelab-heaz.onrender.com\u003e\n\n### Forntend Depolyes link: \u003chttps://techprimelab-gt.netlify.app\u003e\n\n## Prerequisites\n\n- Node.js\n- Express.js\n- MongoDB\n- bcrypt\n- jsonwebtoken\n\n## Installation\n\n1. Clone the repository: git clone \u003chttps://github.com/gr7800/TechPrimeLab-assignment\u003e\n\n2. Navigate to the project directory: cd project-management-api\n\n3. Install the dependencies: npm install\n\n4. Set up the environment variables:\n- Create a `.env` file in the project root directory.\n- Add the following environment variables:\n  ```\n  JWT_SECRET=\u003cyour_jwt_secret_key\u003e\n  ```\n\n5. Start the server: npm start\n\n\n## User Routes\n\n### Signup\n\nCreate a new user account.\n\n- URL: `POST /api/users/signup`\n- Request body:\n- `email`: User's email address\n- `password`: User's password\n- Response:\n- Success: `{ \"message\": \"Signup successful\" }`\n- Error: `{ \"error\": \"Signup failed\" }`\n\n### Login\n\nAuthenticate a user and generate a JWT token.\n\n- URL: `POST /api/users/login`\n- Request body:\n- `email`: User's email address\n- `password`: User's password\n- Response:\n- Success: `{ \"token\": \"\u003cgenerated_jwt_token\u003e\" }`\n- Error: `{ \"error\": \"Invalid credentials\" }` or `{ \"error\": \"Login failed\" }`\n\n### Get all users\n\nRetrieve a list of all users.\n\n- URL: `GET /api/users`\n- Response:\n- Success: Array of user objects\n- Error: `{ \"error\": \"Unable to fetch users\" }`\n\n## Project Routes\n\n### Get all projects\n\nRetrieve a paginated list of projects with optional search and sorting.\n\n- URL: `GET /api/projects`\n- Query parameters:\n- `search`: Search query string (optional)\n- `page`: Page number (optional)\n- `sort`: Sort order (`field:order`) (optional)\n- Response:\n- Success:\n ```json\n {\n   \"projects\": [ Array of project objects ],\n   \"pagination\": {\n     \"count\": Total project count,\n     \"pageCount\": Total page count\n   }\n }\n ```\n- Error: `{ \"error\": \"Unable to fetch projects\" }`\n\n### Create a new project\n\nCreate a new project.\n\n- URL: `POST /api/projects/create`\n- Request body: Project details\n- Response:\n- Success: `{ \"message\": \"Project created successfully\" }`\n- Error: `{ \"error\": \"Unable to create project\" }`\n\n### Update project status to \"Running\"\n\nUpdate the status of a project to \"Running\".\n\n- URL: `PATCH /api/projects/statusrun/:id`\n- Response:\n- Success: Updated project object or `{ \"error\": \"Project not found\" }`\n- Error: `{ \"error\": \"Unable to update project status\" }`\n\n### Update project status to \"Closed\"\n\nUpdate the status of a project to \"Closed\".\n\n- URL: `PATCH /api/projects/statusclose/:id`\n- Response:\n- Success: Updated project object or `{ \"error\": \"Project not found\" }`\n- Error: `{ \"error\": \"Unable to update project status\" }`\n\n### Update project status to \"Cancelled\"\n\nUpdate the status of a project to \"Cancelled\".\n\n- URL: `PATCH /api/projects/statuscancel/:id`\n- Response:\n- Success: Updated project object or `{ \"error\": \"Project not found\" }`\n- Error: `{ \"error\": \"Unable to update project status\" }`\n\n### Get total number of projects\n\nRetrieve the total count of projects based on different status types.\n\n- URL: `GET /api/projects/projectinfo`\n- Response:\n- Success:\n ```json\n {\n   \"total\": Total project count,\n   \"cancel\": Cancelled project count,\n   \"running\": Running project count,\n   \"registered\": Registered project count,\n   \"closed\": Closed project count,\n   \"delayedRunning\": Delayed running project count\n }\n ```\n- Error: `{ \"error\": \"Unable to fetch total projects\" }`\n\n### Get department statistics for a dashboard chart\n\nRetrieve department statistics for generating a chart for the dashboard.\n\n- URL: `GET /api/projects/dashboardchart`\n- Response:\n- Success: Array of department statistics objects\n- Error: `{ \"error\": \"Unable to fetch department stats\" }`\n\n## Helper Functions\n\n### updateProjectStatus\n\nHelper function to update the status of a project.\n\n- Parameters:\n- `id`: Project ID\n- `status`: New status value\n- Returns: Updated project object or `{ \"error\": \"Project not found\" }`\n\n---\n\nFeel free to customize and extend the API as per your requirements.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr7800%2Ftechprimelab-assignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgr7800%2Ftechprimelab-assignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr7800%2Ftechprimelab-assignment/lists"}