Skip to content

Latest commit

 

History

History
158 lines (130 loc) · 4.7 KB

readme.md

File metadata and controls

158 lines (130 loc) · 4.7 KB

Bike Rental Service API

Welcome to the Bike Rental Service API. This backend service allows users to rent bikes with advance 100 BDT payment, manage their profiles and password , and view available bikes. Admins can manage bike inventory and handle user rentals.

Front-End

Front-End
Live-Link

Live Link

Bike-Rental-Service-Backend

ER-Diagram

ER-Diagram

Requirement-Analysis

Requirement-analysis

Table of Contents

Features

  • User Authentication:

    • User Signup
    • User Login
    • Admin Signup
    • Admin Login
  • Profile Management:

    • View Profile
    • Update Profile
    • User Can Reset His Password
    • Admin Can Reset His Password
  • Bike Management:

    • View Available Bikes
    • Create, Update, Delete Bikes (Admin Only)
  • Rental Management:

    • User Can Rent A Bike By Pay 100 BDT In Advance
    • User Can View His Rental History
    • Admin Can View All Rental History
    • Admin Can Calculate Total Bill Of A Certain User
    • User Can Return A Bike By Paying The Money
    • Admin Can Verify A User Payment
  • Payment Integration:

    • AAmarPay integrated

Stack

  • Programming Language: Typescript
  • Web Framework: Express js
  • Database And ODM: mongodb and mongoose
  • Authentication : JWT
  • Validation : Zod

Installation

  1. Clone the repository:
    git clone https://github.com/minhaz1010/Bike-Rental-Service.git
    cd Bike-Rental-Service
  2. npm install

Commands

  • To run
    npm run start:dev
    
    

File structure


├── src
│   ├── app
│   │   ├── config
│   │   │   └── index.ts
│   │   ├── db
│   │   │   └── seedAdmin.ts
│   │   ├── errors
│   │   │   ├── appError.ts
│   │   │   ├── handleCastError.ts
│   │   │   ├── handleDuplicateError.ts
│   │   │   ├── handleZodError.ts
│   │   │   ├── jwtError.ts
│   │   │   └── mongooseValidationError.ts
│   │   ├── interface
│   │   │   └── index.d.ts
│   │   ├── middleware
│   │   │   ├── authMiddleware.ts
│   │   │   ├── globalErrorHandler.ts
│   │   │   ├── notFound.ts
│   │   │   └── validateRequest.ts
│   │   ├── module
│   │   │   ├── auth
│   │   │   │   ├── auth.controller.ts
│   │   │   │   ├── auth.interface.ts
│   │   │   │   ├── auth.route.ts
│   │   │   │   ├── auth.service.ts
│   │   │   │   └── auth.validation.ts
│   │   │   ├── bike
│   │   │   │   ├── bike.controller.ts
│   │   │   │   ├── bike.interface.ts
│   │   │   │   ├── bike.model.ts
│   │   │   │   ├── bike.route.ts
│   │   │   │   ├── bike.service.ts
│   │   │   │   └── bike.validation.ts
│   │   │   ├── booking
│   │   │   │   ├── booking.controller.ts
│   │   │   │   ├── booking.interface.ts
│   │   │   │   ├── booking.model.ts
│   │   │   │   ├── booking.route.ts
│   │   │   │   ├── booking.service.ts
│   │   │   │   └── booking.validation.ts
│   │   │   ├── payment
│   │   │   │   ├── payment.controller.ts
│   │   │   │   ├── payment.route.ts
│   │   │   │   └── payment.service.ts
│   │   │   └── user
│   │   │       ├── user.controller.ts
│   │   │       ├── user.interface.ts
│   │   │       ├── user.model.ts
│   │   │       ├── user.route.ts
│   │   │       ├── user.service.ts
│   │   │       └── user.validation.ts
│   │   ├── route
│   │   │   └── index.ts
│   │   └── utils
│   │       ├── bookingUtils.ts
│   │       ├── catchAsyncError.ts
│   │       ├── comparePassword.ts
│   │       ├── index.d.ts
│   │       ├── sendResponse.ts
│   │       └── userRole.ts
│   ├── app.ts
│   └── server.ts
├── tsconfig.json
└── vercel.json
├── ER.png
├── eslint.config.mjs
├── package.json
├── package-lock.json
├── readme.md
├── tsconfig.json
└── vercel.json