This is the NestJS backend for the frontend of Haiders Desk. The server provides RESTful APIs for managing Admins, Logos, and Emails. Authentication is implemented using JWT Tokens for secure access.
- NestJS Framework for a modular and scalable backend
- MongoDB Atlas for database storage
- JWT Authentication for secure access
- RESTful APIs for CRUD operations on Admins, Logos, and Emails
- Environment Variables Support for configuration
git clone https://github.com/BilalSubhani/haiderDeskBackend.git
cd haiderDeskBackend
npm install
A .env
file must be created in the root directory with the following variables:
MONGO_URI=your_mongodb_atlas_connection_string
JWT_SECRET=your_jwt_secret
PORT=3000 # (Optional: Default is 3000)
npm run start:dev
npm run build
npm run start:prod
Method | Endpoint | Description |
---|---|---|
POST | /admin |
Create an admin |
GET | /admin |
Get all admins |
GET | /admin/:id |
Get admin by ID |
GET | /admin/email/:email |
Get admin by email |
PATCH | /admin/:id |
Update an admin |
DELETE | /admin/:id |
Delete an admin |
Method | Endpoint | Description |
---|---|---|
POST | /categories |
Create a category |
GET | /categories |
Get all categories |
GET | /categories/:id |
Get category by ID |
PATCH | /categories/:id |
Update a category |
DELETE | /categories/:id |
Delete a category |
Method | Endpoint | Description |
---|---|---|
POST | /logo |
Create a logo |
GET | /logo |
Get all logos |
GET | /logo/:id |
Get logo by ID |
PATCH | /logo/:id |
Update a logo |
DELETE | /logo/:id |
Delete a logo |
Method | Endpoint | Description |
---|---|---|
POST | /email |
Add an email |
GET | /email |
Get all emails |
GET | /email/:id |
Get email by ID |
PATCH | /email/:id |
Update an email |
DELETE | /email/:id |
Delete an email |
Method | Endpoint | Description |
---|---|---|
POST | /send-email |
Send email to connected emails |
Method | Endpoint | Description |
---|---|---|
POST | /orders |
Add an order |
GET | /orders |
Get all orders |
GET | /orders/:id |
Get order by ID |
PATCH | /orders/:id/status |
Update an order status |
DELETE | /orders/:id |
Delete an order |
- NestJS - Backend framework
- MongoDB Atlas - Cloud database
- Mongoose - ODM for MongoDB
- JWT - Authentication & Authorization
- RESTful APIs - CRUD operations
For any issues or queries, contact me at: 📧 Email: [email protected]