{"id":29024667,"url":"https://github.com/wdnaimur/bulknest-server","last_synced_at":"2026-05-06T08:32:29.040Z","repository":{"id":301123830,"uuid":"1008153365","full_name":"wdNaimur/BulkNEST-server","owner":"wdNaimur","description":"Backend server for BulkNest — a B2B wholesale platform managing authentication, product operations, and secure API services.","archived":false,"fork":false,"pushed_at":"2025-06-25T08:22:52.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T09:32:27.085Z","etag":null,"topics":["dotenv","express","jsonwebtoken","mongodb"],"latest_commit_sha":null,"homepage":"https://bulknest.web.app","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/wdNaimur.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-06-25T05:43:25.000Z","updated_at":"2025-06-25T08:31:49.000Z","dependencies_parsed_at":"2025-06-25T09:34:06.575Z","dependency_job_id":"bcbdb337-efb7-4a93-b80b-8c790a3a5583","html_url":"https://github.com/wdNaimur/BulkNEST-server","commit_stats":null,"previous_names":["wdnaimur/bulknest-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wdNaimur/BulkNEST-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdNaimur%2FBulkNEST-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdNaimur%2FBulkNEST-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdNaimur%2FBulkNEST-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdNaimur%2FBulkNEST-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wdNaimur","download_url":"https://codeload.github.com/wdNaimur/BulkNEST-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdNaimur%2FBulkNEST-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261998013,"owners_count":23242318,"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":["dotenv","express","jsonwebtoken","mongodb"],"created_at":"2025-06-26T04:18:35.542Z","updated_at":"2026-05-06T08:32:29.034Z","avatar_url":"https://github.com/wdNaimur.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BulkNest Backend\r\n\r\nBackend server for **BulkNest**, a B2B wholesale marketplace designed to simplify and streamline bulk purchasing. It handles authentication, product and order management, and secure API operations.\r\n\r\n## 🚀 Tech Stack\r\n\r\n- **Express.js** – Web framework for Node.js\r\n- **MongoDB** – NoSQL database\r\n- **Firebase Admin SDK** – Firebase backend services\r\n- **JWT** – Token-based authentication with `jsonwebtoken`\r\n- **dotenv** – Environment variable management\r\n- **CORS** – Cross-origin request handling\r\n- **cookie-parser** – Cookie parsing middleware\r\n\r\n## 🔐 Key Features\r\n\r\n- Secure RESTful APIs for product and order management\r\n- JWT authentication integrated with Firebase\r\n- Protected routes and email-based authorization\r\n- Dynamic quantity control on order placement\r\n- Environment-based configuration using `.env`\r\n- Scalable MongoDB integration with clean data structure\r\n\r\n## 🔥 API Endpoints\r\n\r\n### 🛒 Products\r\n\r\n| Method | Endpoint                | Description                                           |\r\n| ------ | ----------------------- | ----------------------------------------------------- |\r\n| GET    | `/products/:email`      | Get all products (filter with `available=true` query) |\r\n| GET    | `/categories/:category` | Get products by category                              |\r\n| GET    | `/product/:id`          | Get a single product by ID                            |\r\n| GET    | `/myProducts/:email`    | Get products added by a specific user                 |\r\n| POST   | `/products/:email`      | Add a new product                                     |\r\n| PATCH  | `/product/:id`          | Update a product                                      |\r\n\r\n### 📦 Orders\r\n\r\n| Method | Endpoint         | Description                                                |\r\n| ------ | ---------------- | ---------------------------------------------------------- |\r\n| GET    | `/orders/:email` | Get all orders placed by a user (includes product details) |\r\n| POST   | `/orders/:email` | Place an order (validates quantity \u0026 availability)         |\r\n| DELETE | `/orders/:id`    | Cancel or delete an order                                  |\r\n\r\n## 📦 NPM Packages Used\r\n\r\n`express`, `mongodb`, `firebase-admin`, `jsonwebtoken`, `cors`, `cookie-parser`, `dotenv`\r\n\r\n## 🛠️ BulkNest Server – Local Setup Instructions\r\n\r\n- **Clone the repository and install dependencies:**\r\n\r\n  ```bash\r\n  git clone https://github.com/wdNaimur/bulknest-server.git\r\n  cd bulknest-server\r\n  npm install\r\n  ```\r\n\r\n- **Create a `.env` file** in the project root and add the following environment variables:\r\n\r\n  ```\r\n  MONGODB_URI=your_mongodb_connection_string\r\n  JWT_SECRET_KEY=your_jwt_secret_key\r\n  FIREBASE_SERVICE_KEY=your_firebase_service_key_json_string_or_path\r\n  ```\r\n\r\n- **Run the development server:**\r\n\r\n  ```bash\r\n  npm run dev\r\n  ```\r\n\r\n- **Access the server locally at:**  \r\n  `http://localhost:3000`\r\n\r\n## 🌐 Live Frontend \u0026 Client Repository\r\n\r\n🔗 [BulkNEST Live](https://bulknest.web.app/)  \r\n 📂 [Client Repository (GitHub)](https://github.com/wdNaimur/bulknest-client)\r\n\r\n\u003cp align=\"center\"\u003e\u003csub\u003e\u003cstrong\u003eDesigned \u0026 Developed by Md. Naimur Rahman\u003c/strong\u003e\u003c/sub\u003e\u003c/p\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdnaimur%2Fbulknest-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwdnaimur%2Fbulknest-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdnaimur%2Fbulknest-server/lists"}