Skip to content

Commit bbe6da7

Browse files
committed
Update readme and added license
1 parent 03719e6 commit bbe6da7

2 files changed

Lines changed: 67 additions & 18 deletions

File tree

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Emmanuel Maduka Agbeze
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,39 @@ A full-featured RESTful Blog API built with **Node.js**, **Express**, and **Mong
1818

1919
```bash
2020
src/
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
5464
npm 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

Comments
 (0)