Add the readme.md file and fix the bug issue in db updating
This commit is contained in:
@@ -1,76 +1,73 @@
|
|||||||
# ⚡ Express Server CLI
|
# QuickLaunch Server
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/exp-node-server)
|
### This server is a nodejs server with express framework. It provides a REST API for quicklunch app. It is written in typescript and uses prisma for database.It is deployed on docker and is managed by docker compose.
|
||||||
[](https://www.npmjs.com/package/exp-node-server)
|
|
||||||
[](https://www.npmjs.com/package/exp-node-server)
|
|
||||||
[](https://www.typescriptlang.org/)
|
|
||||||
[](https://nodejs.org/)
|
|
||||||
|
|
||||||
---
|
### Features
|
||||||
|
|
||||||
## 🚀 Overview
|
- Authentication
|
||||||
|
- Authorization
|
||||||
|
- Database Management
|
||||||
|
- REST API
|
||||||
|
- Testing
|
||||||
|
- Deployment
|
||||||
|
|
||||||
A powerful `Express + TypeScript CLI` that instantly generates scalable `backend` modules with `Mongoose `/ `Prisma`, `Zod` `validation`, and `Swagger` documentation.
|
### Technologies
|
||||||
|
|
||||||
This tool helps developers quickly scaffold `clean`, `modular` `Express` APIs with minimal setup.
|
- Nodejs
|
||||||
|
- Express
|
||||||
|
- Typescript
|
||||||
|
- Prisma
|
||||||
|
- Docker
|
||||||
|
- Docker Compose
|
||||||
|
- Bullmq
|
||||||
|
-Nodemailer
|
||||||
|
|
||||||
## ✨ Features
|
### Deployment
|
||||||
|
|
||||||
- ⚡ Generate complete `Express` + `TypeScript` modules
|
- Docker
|
||||||
- 🧩 Built-in `Mongoose` / `Prisma` support
|
- Docker Compose
|
||||||
- 📘 Adds Swagger documentation automatically
|
|
||||||
- 📘 Automatic `Swagger` documentation
|
|
||||||
- 🔐 `Zod` validation ready
|
|
||||||
- 🏗️ `Modular` clean architecture
|
|
||||||
- 🚀 One command project setup
|
|
||||||
- 🔄 Add modules anytime
|
|
||||||
- 📦 Zero boilerplate setup
|
|
||||||
|
|
||||||
## 📦 Quick Start
|
### Authentication
|
||||||
|
|
||||||
Run directly using npx (recommended):
|
- JWT
|
||||||
|
|
||||||
```Bash
|
### Installation
|
||||||
npx exp-node-server -c my-api
|
|
||||||
```
|
|
||||||
|
|
||||||
This will:
|
- git clone git@codelab.techzaa.tech:summer2026/quicklanch-server.git
|
||||||
|
- cd quicklunch-server
|
||||||
|
- npm install
|
||||||
|
- npm run dev
|
||||||
|
|
||||||
- Create an Express starter project
|
### Environment variables are stored in .env file. They are:
|
||||||
- Install dependencies
|
Set up or add the following environment variables in .env file to run the server. You will copy and paste them from the .env.example file by adding Database URL,APP USER EMAIL, APP PASSWORD, CLOUD NAME, CLOUD API KEY, CLOUD API SECRET and REDIS URL :
|
||||||
- Prepare the project for development
|
- PORT = 5000
|
||||||
|
- DATABASE_URL
|
||||||
|
-ACCESS_TOKEN=8b8ba26578276a8bf9d0599f8c0ec0d2d69e0aec9171e989a314c36db0b330a23fd0365a6c9b1059406856046e28dc0e13c9d6a165e2936e6614aa2d1862af68
|
||||||
|
- ACCESS_EXPIRES=24h
|
||||||
|
- RESET_SECRET=8b8ba26578276a8bf9d0599f8c0ec0d2d69e0aec9171e989a314c36db0b330a23fd0365a6c9b1059406856046e28dc0e13c9d6a165e2936e6614aa2d1862af68
|
||||||
|
- RESET_EXPIRES=5m
|
||||||
|
- VERIFIED_TOKEN=8b8ba26578276a8bf9d0599f8c0ec0d2d69e0aec9171e989a314c36db0b330a23fd0365a6c9b1059406856046e28dc0e13c9d6a165e2936e6614aa2d1862af68
|
||||||
|
- FRONT_END_URL=http://localhost:5173/
|
||||||
|
- APP_USER_EMAIL
|
||||||
|
- APP_PASSWORD
|
||||||
|
- CLOUD_NAME
|
||||||
|
- CLOUD_API_KEY
|
||||||
|
- CLOUD_API_SECRET
|
||||||
|
- REDIS_URL
|
||||||
|
|
||||||
## 🧩 Generate a Module
|
### API Documentation
|
||||||
|
|
||||||
Inside your project run:
|
- API documentation is available at http://localhost:5000/api-docs
|
||||||
|
|
||||||
|
### API Creating
|
||||||
|
If you need to create an new api you will only run simple command the command is
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx express-server-cli -g <module-name>
|
npx exp-node-server -g API_NAME (Your api name or folder name)
|
||||||
```
|
```
|
||||||
|
|
||||||
Example: `npx express-server-cli -g order`
|
### API Structure
|
||||||
|
|
||||||
Output:
|
|
||||||
|
|
||||||
```Bash
|
|
||||||
✔ order.interface.ts created
|
|
||||||
✔ order.schema.ts created
|
|
||||||
✔ order.validation.ts created
|
|
||||||
✔ order.route.ts created
|
|
||||||
✔ order.controller.ts created
|
|
||||||
✔ order.service.ts created
|
|
||||||
✔ order.swagger.ts created
|
|
||||||
|
|
||||||
🔗 Route registered in routes.ts
|
|
||||||
📘 Swagger docs registered
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 📁 Generated Module Structure
|
|
||||||
|
|
||||||
Each module follows a clean structure:
|
|
||||||
|
|
||||||
```Bash
|
|
||||||
src/app/modules/<module-name>/
|
src/app/modules/<module-name>/
|
||||||
├── <module>.interface.ts
|
├── <module>.interface.ts
|
||||||
├── <module>.schema.ts
|
├── <module>.schema.ts
|
||||||
@@ -80,47 +77,3 @@ src/app/modules/<module-name>/
|
|||||||
├── <module>.service.ts
|
├── <module>.service.ts
|
||||||
└── <module>.swagger.ts
|
└── <module>.swagger.ts
|
||||||
```
|
```
|
||||||
|
|
||||||
## ⚙️ Run the Project
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run dev
|
|
||||||
```
|
|
||||||
|
|
||||||
Swagger docs available at:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
http://localhost:5000/docs
|
|
||||||
```
|
|
||||||
|
|
||||||
## 🧠 Tech Stack
|
|
||||||
|
|
||||||
- Express.js — Backend framework
|
|
||||||
- TypeScript — Strongly typed JavaScript
|
|
||||||
- Mongoose — MongoDB ODM
|
|
||||||
- Prisma — PostgreSQL ORM
|
|
||||||
- Zod — Runtime schema validation
|
|
||||||
- JWT — Authentication
|
|
||||||
- Swagger — API documentation
|
|
||||||
|
|
||||||
## 👨💻 Author
|
|
||||||
|
|
||||||
### Abumahid
|
|
||||||
|
|
||||||
GitHub
|
|
||||||
https://github.com/dev-abumahid
|
|
||||||
|
|
||||||
npm
|
|
||||||
https://www.npmjs.com/~dev_abumahid
|
|
||||||
|
|
||||||
Portfolio
|
|
||||||
https://abumahid.me
|
|
||||||
|
|
||||||
LinkedIn
|
|
||||||
https://linkedin.com/in/md-abu-mahid-islam
|
|
||||||
|
|
||||||
## ⭐ Support
|
|
||||||
|
|
||||||
If you find this project helpful, consider giving it a ⭐ on `GitHub`.
|
|
||||||
|
|
||||||
It helps the project grow and reach more developers.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user