{"id":18908435,"url":"https://github.com/leticiareis6858/market-api","last_synced_at":"2026-04-13T00:40:19.863Z","repository":{"id":240123135,"uuid":"800141020","full_name":"leticiareis6858/market-API","owner":"leticiareis6858","description":"Rest API for a market.","archived":false,"fork":false,"pushed_at":"2024-09-29T21:13:38.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T01:46:06.425Z","etag":null,"topics":["bcrypt","express","jwt","market","nodejs","rest-api","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leticiareis6858.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-05-13T19:24:14.000Z","updated_at":"2024-09-29T21:13:41.000Z","dependencies_parsed_at":"2024-05-28T07:05:18.499Z","dependency_job_id":"1627021e-4940-4db4-bee6-9e61b62f8ac9","html_url":"https://github.com/leticiareis6858/market-API","commit_stats":null,"previous_names":["leticiareis6858/mercado-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leticiareis6858/market-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leticiareis6858%2Fmarket-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leticiareis6858%2Fmarket-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leticiareis6858%2Fmarket-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leticiareis6858%2Fmarket-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leticiareis6858","download_url":"https://codeload.github.com/leticiareis6858/market-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leticiareis6858%2Fmarket-API/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264506258,"owners_count":23619005,"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":["bcrypt","express","jwt","market","nodejs","rest-api","typescript"],"created_at":"2024-11-08T09:26:20.807Z","updated_at":"2026-04-13T00:40:14.837Z","avatar_url":"https://github.com/leticiareis6858.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛒| Market - REST API\n\nThis project is a market REST API that allows the management of purchases, workers, and product stock.\n\n## ⚙| Technologies Used\n\n- Node.js\n- Express.js\n- TypeScript\n- PostgreSQL\n- JWT \u0026 bcrypt for authentication\n- Postman\n\n## 📝| Features\n\n- User/worker authentication and authorization\n- Batch product creation and management\n- Easy addition of products to stock through batch creation\n- Stock management\n- Sales profit and expected profit management\n- Worker management\n- Purchase creation\n\n## 💻| Installation\n\n1. Clone the repository or download the `.zip` file.\n2. Import the application Postman collection using the file `market-API.postman_collection.json`.\n3. Install the required dependencies using `npm install`.\n4. Rename the file `.envExample` to `.env`.\n5. Set up the database and configure the connection in the `.env` file.\n6. Run the application through the console using `npm start`.\n7. Use the application routes through **Postman**.\n\n## 🕸| Application main URL:\n\nThis application main url is `localhost:3000/api-market/`.\n\n## 📦| Usage\n\n1. Use the application through _Postman_.\n2. Create an _admin_ user first to use the application(use the route `/user/register/admin` for this).\n3. After creating an admin you can access the route `/user/register/worker` to create workers.\n4. Log in with the created user by using the route `/user/login`\n5. Remember to always provide the Bearer token when accessing a route. Also, remember that the token expires in 1 hour.\n\nFor a better first experience with the application, I recommend creating an Admin user and explore all the routes using this user.\n\n## 📋| Roles Access\n\n- **_Admins:_** Can access all routes.\n- **_Managers:_** Can access the following routes:\n  - **Create User/Worker -** /user/register/worker\n  - **Update User/Worker -** /user/update/:id\n  - **Update User/Worker Role -** /user/update/role/:id\n  - **Delete User/Worker -** /user/delete/:id\n  - **Get All Stockers -** /user/all/stocker\n  - **Get All Cashiers -** /user/all/cashier\n  - **Get Stocker by ID -** /user/stocker/:id\n  - **Get Cashier by ID -** /user/cashier/:id\n  - **Get User/Worker by Name -** /user/name\n  - **Get Stock Total Profit (estimated value) -** /stock/total-profit\n  - **All routes related to batch management**\n  - **Almost all routes related to purchase management, except the route to create a purchase**\n- **_Stockers:_**\n  - **All routes related to stock management**\n  - **All routes related to product management**\n- **_Cashiers:_**\n  - **Can only access the route to create a purchase**\n\n## ⚖| License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## 📃| To-do:\n\n- [ ] Document this API using Swagger\n- [ ] Add description to the folders of the Postman Collection\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleticiareis6858%2Fmarket-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleticiareis6858%2Fmarket-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleticiareis6858%2Fmarket-api/lists"}