{"id":25233109,"url":"https://github.com/emam-bokhari/book-shop-server","last_synced_at":"2026-04-12T05:34:47.886Z","repository":{"id":275425782,"uuid":"921736274","full_name":"Emam-Bokhari/Book-Shop-Server","owner":"Emam-Bokhari","description":"This repository contains the bookshop e-commerce backend application , developed using Node.js, Express, and MongoDB.","archived":false,"fork":false,"pushed_at":"2025-03-29T19:59:03.000Z","size":360,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T17:11:17.424Z","etag":null,"topics":["express","jwt","mongodb","sslcommerz","typescript"],"latest_commit_sha":null,"homepage":"https://book-shop-server-3trk.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/Emam-Bokhari.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":"2025-01-24T14:16:36.000Z","updated_at":"2025-03-29T19:59:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"f377fd6a-6075-4616-ad16-ae47e5f577b7","html_url":"https://github.com/Emam-Bokhari/Book-Shop-Server","commit_stats":null,"previous_names":["emam-bokhari/book-shop-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Emam-Bokhari/Book-Shop-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emam-Bokhari%2FBook-Shop-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emam-Bokhari%2FBook-Shop-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emam-Bokhari%2FBook-Shop-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emam-Bokhari%2FBook-Shop-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Emam-Bokhari","download_url":"https://codeload.github.com/Emam-Bokhari/Book-Shop-Server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emam-Bokhari%2FBook-Shop-Server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31705574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T05:11:36.334Z","status":"ssl_error","status_checked_at":"2026-04-12T05:11:27.332Z","response_time":58,"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":["express","jwt","mongodb","sslcommerz","typescript"],"created_at":"2025-02-11T13:56:11.609Z","updated_at":"2026-04-12T05:34:47.870Z","avatar_url":"https://github.com/Emam-Bokhari.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📚 Book Shop Backend\n\nThis **Book Shop Backend** is application designed to manage `books`, `customers`, and `transactions` efficiently. Developed with `TypeScript`, `Node.js`, `Express.js`, and `MongoDB` with `Mongoose`, it provides **role-based** functionalities for `admins` and `users`. The system supports secure authentication, dynamic `filtering`, `sorting`, and `searching`.\n\n### 🌐 Live Deployment \u0026 🎥 Explanation Video Link\n\n- **Live Site**: [Visit the Deployment](https://book-shop-server-3trk.vercel.app)\n\n## 🔑 Key Features\n\n**🛒 Book Management**\n\n- Admins can **add**, **update**, **delete**, or **manage** books.\n- Users can view **books** and purchase them.\n\n**🧑‍💻 Role-Based Access Control**\n\n- **Admin:** Manage books, view all transactions, and banned users.\n- **User:** Explore, purchase books, and view their order history.\n\n**🔐 Authentication \u0026 Authorization**\n\n- **JWT-based secure authentication** for all users.\n- Role-specific authorization for admin and user functionalities.\n\n**🔎 Advanced Filtering, Sorting \u0026 Searching**\n\n- Filter books by `category`, `price range`, `author`, or `publication date`.\n- Sort books based on `price`, and `author`.\n- Search books by `title`, `author`, or `category`.\n\n**💳 Transactions \u0026 Orders**:\n\n- Users can place orders for books and view their order history.\n- Admins can view all user transactions and monitor order details.\n\n## 🛠️ Installation and Setup\n\nTo get started with the project locally, follow these steps:\n\n### 1. Clone the Repository\n\nFirst, clone the repository to your local machine:\n\n```bash\ngit clone https://github.com/Emam-Bokhari/Book-Shop-Server\n\n```\n\n### 2. Navigate to the Project Folder\n\nGo to the project directory:\n\n```bash\ncd Book-Shop-Server\n\n```\n\n### 3. Install Dependencies\n\nInstall the required dependencies using npm or yarn:\n\n```bash\nnpm install\n# or\nyarn install\n```\n\n### 4. Setup Environment Variables\n\nCreate a `.env` file in the root of the project and add the following environment variables:\n\n```bash\nPORT=3000\nNODE_ENV=development\nDATABASE_USER_NAME=book-shop\nDATABASE_PASS=l8Fvv42z7tcTRt8M\nDATABASE_URL=mongodb+srv://book-shop:l8Fvv42z7tcTRt8M@cluster0.kndeci6.mongodb.net/book-shop?retryWrites=true\u0026w=majority\u0026appName=Cluster0\nBCRYPT_SALT_ROUNDS=12\nSTORE_ID=dream67950c298b8c2\nSTORE_PASS=dream67950c298b8c2@ssl\nJWT_ACCESS_SECRET=9e32781d05012e2a584089f77efad27f71788034266983baeda45d366ad13a49d1b2c4431b4cf1434d792ae0b79a54ad189d9d9904e645570ccc325987a74531\n```\n\n### 5. Run the Application\n\nStart the development server:\n\n```bash\nnpm run start:dev\n```\n\nYour application should now be running at `http://localhost:3000`.\n\n### 6. Access the Application\n\n- Visit the site in your browser at `http://localhost:3000`.\n- You can now use the application to create, update, delete, and manage blogs based on the user roles.\n\n### 7. Additional Notes\n\n- To access protected routes, use Bearer Tokens for authentication.\n\n## ⚙️ Technologies Used\n\nThis project is built using technologies that ensure smooth performance and easy development:\n\n### Backend\n\n- **Node.js**: JavaScript runtime environment.\n- **Express.js**: Framework for building RESTful APIs\n- **MongoDB**: NoSQL database for storing data.\n- **Mongoose**: ODM library for MongoDB.\n- **TypeScript**: Typed superset of JavaScript.\n\n### Authentication \u0026 Authorization\n\n- **JWT (JSON Web Tokens)**: Token-based secure authentication..\n- **bcrypt.js**: Secure password hashing.\n\n### Deployment\n\n- **Vercel**: Deployment platform.\n- **dotenv**: Manage environment variables.\n\n### Other Tools\n\n- **bcryptjs**: For hashing passwords securely.\n- **CORS**: Middleware to enable cross-origin resource sharing.\n\nThese technologies work together to create a secure, scalable, and user-friendly blogging platform.\n\n## 📁 Folder Structure\n\nBelow is the folder structure for the project:\n\n```bash\n├── dist/                                             # Compiled Code\n│   ├── app/\n│   ├── app.js\n│   └── server.js\n├── node_modules/                                     # Project dependencies\n├── src/                                              # Source code\n│   ├── app/                                          # Main application logic\n│   │   ├── builder/\n│   │   ├── config/                                   # Configuration files (e.g., database, JWT, etc.)\n│   │   ├── errors/                                   # Custom error handling classes and utilities\n│   │   ├── interface/                                # TypeScript interfaces and types\n│   │   ├── middleware/                               # Express middleware functions\n│   │   ├── modules/                                  # Feature-specific modules\n│   │   │   ├── Auth/\n│   │   │   └── Product/\n│   │   │   └── Order/\n│   │   │   └── ShippingAddress/\n│   │   │   └── User/\n│   │   ├── routes/                                   # Express routes (API endpoints)\n│   │   ├── utils/\n│   ├── app.ts                                        # Application entry point\n│   └── server.ts                                     # Main server file\n├── .env                                              # Environment variables\n├── .gitignore                                        # Specifies which files should not be tracked by Git\n├── .prettierignore                                   # Prettier configuration to ignore specific files\n├── .prettierrc                                       # Prettier configuration file\n├── .eslint.config.mjs                                # ESLint configuration file\n└── etc                                               # Other files (e.g., documentation, package-lock.json etc.)\n```\n\n## 📞 Contact\n\nFor any inquiries, or suggestions, feel free to reach out:\n\n- **Email**: [moshfiqurrahman37@gmail.com](mailto:moshfiqurrahman37@gmail.com)\n- **GitHub**: [Emam-Bokhari](https://github.com/Emam-Bokhari)\n- **LinkedIn**: [Moshfiqur Rahman](https://www.linkedin.com/in/moshfiqur-rahman-a302b32a3/)\n\nI am always open to feedback ! 😊\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femam-bokhari%2Fbook-shop-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femam-bokhari%2Fbook-shop-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femam-bokhari%2Fbook-shop-server/lists"}