@@ -18,29 +18,39 @@ A full-featured RESTful Blog API built with **Node.js**, **Express**, and **Mong
1818
1919``` bash
2020src/
21+ ├── __tests__/
2122├── api/
2223│ └── v1/
2324│ ├── controllers/
2425│ ├── routes/
25- ├── config/
26- ├── middleware/
27- ├── services/
2826├── database/
2927│ └── models/
3028│ └── schemas/
31- ├── utils/
32- ├── __tests__/
29+ │ └── database-connection.js
3330├── docs/
34- │ └── swagger.yaml
31+ │ └── swagger.yml
32+ │ └── swagger.js
33+ ├── middleware/
34+ ├── services/
35+ │ └── caching/
36+ │ └── comments/
37+ │ └── likes/
38+ │ └── posts/
39+ │ └── users/
40+ │ └── validation/
41+ ├── utils/
42+ ├── app.js
43+ ├── config.js
44+ ├── server.js
3545```
3646
3747## Running the Project
3848
3949### 🔧 Prerequisites
4050
41- - Node.js v18+
42- - Docker + Docker Compose
43- - MongoDB & Redis ( via Docker)
51+ - ** Node.js v18+**
52+ - ** Docker** & ** Docker Compose**
53+ - ** MongoDB** & ** Redis** (recommended via Docker)
4454
4555### 📦 Installation
4656
@@ -54,35 +64,53 @@ npm install
5464npm run dev
5565```
5666
57- ### 🐳 Run with Docker
67+ ## 🐳 Docker Usage
68+
69+ ### Build Production Image
5870
5971``` bash
60- docker-compose up --build
72+ npm run docker:build:prod
73+ ```
74+
75+ ### Run Production Container
76+
77+ ``` bash
78+ npm run docker:run:prod
79+ ```
80+
81+ ### Run Development Compose
82+
83+ ``` bash
84+ npm run docker:compose:dev
85+ ```
86+
87+ ### Run Production Compose
88+
89+ ``` bash
90+ npm run docker:compose:prod
6191```
6292
6393## 🛡️ Authentication
6494
6595- JWT Access Token in ` Authorization: Bearer <token> ` .
66-
6796- Refresh Token in secure HTTP-only cookie.
68-
6997- Supports user login/logout and token refreshing.
7098
7199## 🧑💻 Roles & Access
72100
73- - user ---> Default registered user
74- - author ---> Automatically promoted after 1st post
75- - admin ---> Full access to all user/admin routes
101+ - ` user ` – Default registered user
102+ - ` author ` – Automatically promoted after first post
103+ - ` admin ` – Full access to all user/admin routes
76104
77105## 📄 API Documentation
78106
79- Swagger UI available at: [ API Documentation] (< domain > /api-docs)
107+ Swagger UI available at: [ API Documentation] ( https://blog-api-tp8c.onrender.com /api-docs)
80108
81109** Live preview of all endpoints, request/response schemas, and error codes.**
82110
83111## 📝 License
84112
85- (View License Here) [ ]
113+ [ MIT License] ( LICENSE.md )
86114
87115## 👨🏫 Author
88116
0 commit comments