The Deliveryman project is a backend service for managing deliveries, deliverymen, and clients. The project is built with TypeScript, Express, and Prisma, and includes features for user authentication, delivery management, and more.
- Prisma
- TypeScript
- Bcrypt
- JsonWebToken
- Express
- ts-node-dev
-
Project Structure
- Set up the project structure with necessary folders and files.
- Install required dependencies:
yarn install
-
Prisma Setup
- Initialize Prisma:
yarn prisma init
- Configure the Prisma schema and generate the client:
yarn prisma generate
- Initialize Prisma:
-
Database Tables
- Create tables for:
deliveryman
client
deliveries
- Run Prisma migrations to create the tables:
yarn prisma migrate dev
- Create tables for:
-
Express Configuration
- Set up Express server in
src/server.ts
. - Add necessary middlewares and routes.
- Set up Express server in
- Client Registration
- Endpoint to register a new client.
- Authentication
- Implement authentication using JsonWebToken.
- Deliveryman Registration
- Endpoint to register a new deliveryman.
- Deliveryman Authentication
- Implement authentication for deliverymen.
- Delivery Management
- Create and manage deliveries.
- Search for deliveries without an assigned deliveryman.
- Update delivery statuses.
- Search deliveries by client.
- Search deliveries by deliveryman.
- Start development server
yarn dev