{"id":26661548,"url":"https://github.com/zn-rabby/book-shop-server","last_synced_at":"2026-04-11T03:33:49.182Z","repository":{"id":274048319,"uuid":"921722591","full_name":"zn-rabby/book-shop-server","owner":"zn-rabby","description":"Welcome to The BookStack, a robust and scalable backend API designed to power an online bookstore. Built with TypeScript, Node.js, Express.js, and MongoDB, this API provides a secure and efficient foundation for managing books, users, orders, and more. Whether you're building a small bookshop or a large-scale e-commerce platform","archived":false,"fork":false,"pushed_at":"2025-04-25T17:09:18.000Z","size":266,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T12:33:57.918Z","etag":null,"topics":["express","jwt","mongose","typeorm","zod"],"latest_commit_sha":null,"homepage":"https://book-shop-client-seven.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/zn-rabby.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,"zenodo":null}},"created_at":"2025-01-24T13:48:03.000Z","updated_at":"2025-05-01T03:28:05.000Z","dependencies_parsed_at":"2025-02-25T17:41:53.429Z","dependency_job_id":"7f2b7ed5-8f23-45d3-926b-4cf63fd65430","html_url":"https://github.com/zn-rabby/book-shop-server","commit_stats":null,"previous_names":["rabby-web/book-shop-server","zn-rabby/book-shop-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zn-rabby/book-shop-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zn-rabby%2Fbook-shop-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zn-rabby%2Fbook-shop-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zn-rabby%2Fbook-shop-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zn-rabby%2Fbook-shop-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zn-rabby","download_url":"https://codeload.github.com/zn-rabby/book-shop-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zn-rabby%2Fbook-shop-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31668048,"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":["express","jwt","mongose","typeorm","zod"],"created_at":"2025-03-25T13:23:23.691Z","updated_at":"2026-04-11T03:33:49.155Z","avatar_url":"https://github.com/zn-rabby.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n---\n\n# **📚 The BookStack: Backend API for an Online Bookstore**  \n\n**The BookStack** is a **scalable, secure, and efficient** backend API for an online bookstore, built with **TypeScript, Node.js, Express.js, and MongoDB**. It provides robust features for managing books, users, orders, and authentication, making it ideal for e-commerce platforms.  \n\n🔗 **Live Demo (if deployed):** [https://book-shop-client-seven.vercel.app/](https://book-shop-client-seven.vercel.app/)  \n\n---\n\n## **✨ Key Features**  \n\n✅ **Admin Dashboard**  \n- Add, update, and delete books.  \n- Manage users, roles, and permissions.  \n- Track orders and transactions.  \n\n✅ **User Features**  \n- Browse books with **search, filtering, and sorting**.  \n- Place orders \u0026 view order history.  \n\n✅ **Authentication \u0026 Security**  \n- **JWT-based authentication** (Access \u0026 Refresh Tokens).  \n- **Role-based access control** (Admin vs. User).  \n- Password hashing with **bcrypt.js**.  \n\n✅ **Order Management**  \n- Seamless order placement \u0026 tracking.  \n- Admin-controlled order processing.  \n\n✅ **Scalable \u0026 Maintainable**  \n- Built with **TypeScript** for type safety.  \n- **MongoDB** for flexible data storage.  \n- **RESTful API** design for easy integration.  \n\n---\n\n## **⚡ Quick Setup**  \n\n### **Prerequisites**  \n- Node.js (v16+)  \n- MongoDB (local or cloud)  \n- Git (optional)  \n\n### **1. Clone the Repository**  \n```bash\ngit clone https://github.com/YourUsername/Book-Shop-Server.git\ncd Book-Shop-Server\n```\n\n### **2. Install Dependencies**  \n```bash\nnpm install\n```\n\n### **3. Configure Environment Variables**  \nCreate a `.env` file and add:  \n```env\nNODE_ENV=development\nPORT=5000\nDATABASE_URL=mongodb+srv://\u003cusername\u003e:\u003cpassword\u003e@cluster.mongodb.net/book-shop?retryWrites=true\u0026w=majority\n\n# Auth\nJWT_ACCESS_SECRET=your_access_secret\nJWT_REFRESH_SECRET=your_refresh_secret\nJWT_ACCESS_EXPIRES_IN=1d\nJWT_REFRESH_EXPIRES_IN=365d\n\n# Bcrypt\nBCRYPT_SALT_ROUNDS=12\n```\n\n### **4. Run the Application**  \n- **Development:** `npm run start:dev`  \n- **Production:** `npm run start`  \n\n---\n\n## **🛠️ Technologies Used**  \n- **Backend:** Node.js, Express.js  \n- **Database:** MongoDB (Mongoose ODM)  \n- **Authentication:** JWT, bcrypt.js  \n- **Language:** TypeScript  \n- **Middleware:** CORS, express-validator  \n\n---\n\n## **🚀 Deployment**  \nDeploy on:  \n- **Vercel**  \n- **Render**  \n- **AWS / Heroku**  \n\n---\n\n## **📄 API Endpoints (Sample)**  \n\n| Method | Endpoint             | Description                |\n|--------|----------------------|----------------------------|\n| POST   | `/api/auth/signup`   | User registration         |\n| POST   | `/api/auth/login`    | User login                |\n| GET    | `/api/books`         | Fetch all books           |\n| POST   | `/api/orders`        | Place a new order         |\n| GET    | `/api/users` (Admin) | Get all users (Admin-only)|\n\n*(See full API docs in Swagger/Postman if available.)*  \n\n---\n\n## **📞 Contact**  \nFor questions or feedback:  \n✉️ **Email:** [mailto:zn.rabby@gmail.com](mailto:zn.rabby@gmail.com)  \n\n---\n\n## **🔑 Development Steps**  \n1. **Project Setup:** `npm init -y` + TypeScript config.  \n2. **Database:** MongoDB schema design with Mongoose.  \n3. **Auth:** JWT implementation with refresh tokens.  \n4. **API Routes:** Books, Users, Orders.  \n5. **Error Handling:** Global middleware for errors.  \n6. **Deployment:** Configure for cloud hosting.  \n\n---\n\n**Happy Coding!** 🚀📖  \n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzn-rabby%2Fbook-shop-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzn-rabby%2Fbook-shop-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzn-rabby%2Fbook-shop-server/lists"}