{"id":21826853,"url":"https://github.com/qharny/pricelist_backend","last_synced_at":"2026-04-10T07:03:06.294Z","repository":{"id":265079696,"uuid":"895065540","full_name":"Qharny/pricelist_backend","owner":"Qharny","description":"backend pricelist using nodeJs","archived":false,"fork":false,"pushed_at":"2024-11-28T00:01:38.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T08:26:27.524Z","etag":null,"topics":["backend","expressjs","javascript","nodejs","npm"],"latest_commit_sha":null,"homepage":"","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/Qharny.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":"2024-11-27T13:53:29.000Z","updated_at":"2024-11-28T00:01:41.000Z","dependencies_parsed_at":"2024-11-27T19:18:50.112Z","dependency_job_id":null,"html_url":"https://github.com/Qharny/pricelist_backend","commit_stats":null,"previous_names":["qharny/pricelist_backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qharny%2Fpricelist_backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qharny%2Fpricelist_backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qharny%2Fpricelist_backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qharny%2Fpricelist_backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qharny","download_url":"https://codeload.github.com/Qharny/pricelist_backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244795519,"owners_count":20511521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","javascript","nodejs","npm"],"created_at":"2024-11-27T18:11:09.000Z","updated_at":"2025-10-17T22:08:18.580Z","avatar_url":"https://github.com/Qharny.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pricelist Backend\n\n## Description\nThe Pricelist Backend is a Node.js application that serves as the backend for a product management system. It provides RESTful APIs for user authentication, product management, and role-based access control.\n\n## Features\n- User registration and login\n- Role-based access control (admin, manager, employee)\n- CRUD operations for products\n- JWT-based authentication\n- MongoDB as the database\n\n## Technologies Used\n- Node.js\n- Express.js\n- MongoDB\n- Mongoose\n- JWT (JSON Web Tokens)\n- dotenv for environment variable management\n- bcryptjs for password hashing\n- cors for enabling Cross-Origin Resource Sharing\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/qharny/pricelist-backend.git\n   cd pricelist-backend\n   ```\n\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n\n3. Create a `.env` file in the root directory and add the following environment variables:\n   ```plaintext\n   PORT=5000\n   MONGODB_URI=mongodb://localhost:27017/pricelist\n   JWT_SECRET=your_jwt_secret\n   ```\n\n4. Start the server:\n   ```bash\n   npm run dev\n   ```\n\n## API Endpoints\n\n### Authentication\n- **POST** `/api/auth/register` - Register a new user\n- **POST** `/api/auth/login` - Login an existing user\n- **GET** `/api/auth/profile` - Get user profile (requires authentication)\n- **GET** `/api/auth/admin-only` - Admin-only access (requires authentication and admin role)\n\n### Products\n- **GET** `/api/products` - Get all products\n- **GET** `/api/products/:id` - Get a product by ID\n- **POST** `/api/products` - Create a new product (requires admin role)\n- **PUT** `/api/products/:id` - Update a product by ID (requires admin role)\n- **DELETE** `/api/products/:id` - Delete a product by ID (requires admin role)\n\n## Testing\nTo run tests, use:\n\n```\n\n## License\nThis project is licensed under the ISC License.\n\n## Author\nKabutey Manasseh || Anita Araba Mends","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqharny%2Fpricelist_backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqharny%2Fpricelist_backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqharny%2Fpricelist_backend/lists"}