Skip to content

Repository files navigation

🚴 Bi Cycle Store (Backend)

An Inventory Management Application

This repository contains the Bi Cycle Store, an Inventory Management Application focusing on backend technologies. It provides robust APIs for managing bicycle inventory and orders. Built using modern tools and technologies, this project demonstrates scalable backend development practices.


🔗 Links


💻 Technologies Used

  • Programming Language: TypeScript
  • Frameworks and Libraries:
    • Node.js
    • Express.js
    • Mongoose
    • Zod (for validation)
  • Database: MongoDB
  • Tools:
    • MongoDB Compass (Database Management)
    • Postman (API Testing)

🚀 Features

  1. CRUD Operations for Products:
    • Add, view, update, and delete bicycle details.
  2. Order Management:
    • Place orders and manage inventory dynamically.
  3. Revenue Calculation:
    • Calculate total revenue using MongoDB aggregation.
  4. Search Functionality:
    • Search bicycles by name, brand, or type using query parameters.
  5. Inventory Management:
    • Automatically update stock levels when orders are placed.
    • Handle insufficient stock scenarios.

🔐 Credentials

User Credentials →

Email: nion@gmail.com
Password: securePass123

Email: johndoe@gmail.com
Password: securePass123

Admin Credential →

Email: admin@gmail.com
Password: securePass123


🛠️ API Endpoints

Common Path: /api/v1/products

  1. Create a Bicycle

    • Endpoint: /createProduct
    • Method: POST
  2. Get All Bicycles

    • Endpoint: /
    • Method: GET
    • Query: ?searchTerm=type
  3. Get a Specific Bicycle

    • Endpoint: /:productId
    • Method: GET
  4. Update a Bicycle

    • Endpoint: /:productId
    • Method: PUT
  5. Delete a Bicycle

    • Endpoint: /:productId
    • Method: DELETE

Common Path: /api/v1/orders

  1. Order a Bicycle

    • Endpoint: /
    • Method: POST
  2. Calculate Revenue from Orders

    • Endpoint: /revenue
    • Method: GET

⚙️ Setting Up Locally

  1. Clone the repository:

    git clone https://github.com/Nadim-Nion/bi-cycle-store.git
    cd bicycle-store
  2. Install dependencies:

    npm install
  3. Set up environment variables:
    Create a .env file in the root directory with the following variables:

    MONGO_URI=your-mongodb-connection-string
    PORT=5000
  4. Start the development server:

    npm run dev
  5. Test the APIs using Postman or your preferred API testing tool.


🧪 Testing API Endpoints

Use Postman or MongoDB Compass to test API functionality.


About Me

Hi, I am Nadim Mahmud Nion. I have recently concluded my graduation from the department of Computer Science and Engineering (CSE) at the Daffodil International University (DIU). I have been learning MERN Stack Web Development since 2022. I am expertise in the following skills:

  • React

  • Express.js

  • TypeScript

  • Mongoose

  • Postman

  • MongoDB Compass

  • NoSQLBooster

  • Node.js

  • MongoDB Atlas

  • JWT

  • Stripe

  • Vite

  • React Router

  • Firebase (Authentication & Hosting)

  • Vercel

  • JavaScript

  • Advanced JavaScript

  • Daisy UI

  • Bootstrap

  • Tailwind

  • HTML5

  • CSS3

  • Media Query

I have built multiple projects using these skills. You are invited to my GitHub profile to know about my projects and don't forget to give a star to my projects.

About

Bi Cycle Store is a backend-focused Inventory Management API built with TypeScript, Node.js, Express, MongoDB, and Zod. Features CRUD operations, order management, and revenue calculation.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages