{"id":22922431,"url":"https://github.com/md-habib-ulla/scribestation","last_synced_at":"2026-04-11T03:03:07.874Z","repository":{"id":265804974,"uuid":"896554246","full_name":"MD-HABIB-ULLA/ScribeStation","owner":"MD-HABIB-ULLA","description":"The Stationery Shop API is a comprehensive backend solution for managing a stationery store. Built with Node.js, Express, TypeScript, and MongoDB, it enables efficient management of products and orders with robust validation and error handling.","archived":false,"fork":false,"pushed_at":"2024-12-26T11:22:48.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T14:31:34.444Z","etag":null,"topics":["bcrypt","cors","dotenv","express","mongodb","mongoose","nodejs","nodemon","prettier","typescript","zod"],"latest_commit_sha":null,"homepage":"https://scribe-station.vercel.app","language":"TypeScript","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/MD-HABIB-ULLA.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-30T17:11:30.000Z","updated_at":"2024-12-26T11:22:51.000Z","dependencies_parsed_at":"2024-12-01T02:22:25.647Z","dependency_job_id":"881b21b3-e4c2-4c29-ac04-b67d1dcee68f","html_url":"https://github.com/MD-HABIB-ULLA/ScribeStation","commit_stats":null,"previous_names":["md-habib-ulla/scribestation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MD-HABIB-ULLA/ScribeStation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MD-HABIB-ULLA%2FScribeStation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MD-HABIB-ULLA%2FScribeStation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MD-HABIB-ULLA%2FScribeStation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MD-HABIB-ULLA%2FScribeStation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MD-HABIB-ULLA","download_url":"https://codeload.github.com/MD-HABIB-ULLA/ScribeStation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MD-HABIB-ULLA%2FScribeStation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31667034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","cors","dotenv","express","mongodb","mongoose","nodejs","nodemon","prettier","typescript","zod"],"created_at":"2024-12-14T08:10:08.139Z","updated_at":"2026-04-11T03:03:07.841Z","avatar_url":"https://github.com/MD-HABIB-ULLA.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [ScribeStation](https://scribestation.vercel.app/) API Documentation\n\n## Objective\n\nThe **Stationery Shop API** is a comprehensive backend solution for managing a stationery store. Built with **Node.js**, **Express**, **TypeScript**, and **MongoDB**, it enables efficient management of products and orders with robust validation and error handling .\n\n---\n\n## Features\n\n### 1. **Stationery Product Management**\n\n- **Create Products**: Add new stationery items with detailed attributes like name, brand, price, category, description, quantity, and stock status.\n- **Retrieve All Products**: Fetch all available stationery products or filter them by search terms (name, brand, or category).\n- **Retrieve a Specific Product**: View the details of any product by its unique ID.\n- **Update Products**: Modify specific attributes of a product, such as price or quantity.\n- **Delete Products**: Remove products from the inventory.\n\n### 2. **Order Management**\n\n- **Place Orders**: Customers can place orders by specifying the product and quantity. The system automatically adjusts the product inventory and handles stock status updates.\n- **Inventory Management**: Automatically updates the product quantity and sets stock status (`inStock`) to `false` when the quantity reaches zero.\n\n### 3. **Revenue Calculation**\n\n- **Total Revenue**: Calculate total revenue from all orders using MongoDB's aggregation pipeline.\n\n### 4. **Error Handling**\n\n- **Validation Errors**: Ensures that all data adheres to defined schemas, with descriptive error messages for invalid inputs.\n- **Not Found Errors**: Returns appropriate responses when products or orders are not found.\n- **Inventory Errors**: Prevents orders from being placed if there is insufficient stock, with relevant error messages.\n\n---\n\n## Code Quality\n\n- Clean, modular, and well-documented code.\n- Meaningful variable and function names.\n- Follows a consistent API structure and response format.\n\n---\n\n## API Design Highlights\n\n- Built using **Express.js** for robust and scalable routing.\n- **TypeScript** ensures type safety and better developer experience.\n- **Mongoose** is used for MongoDB schema definitions and validations.\n- RESTful endpoints designed for efficiency and clarity.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmd-habib-ulla%2Fscribestation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmd-habib-ulla%2Fscribestation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmd-habib-ulla%2Fscribestation/lists"}