You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@
5
5
A Node.js REST API for a digital marketplace, structured according to Uncle Bob's Clean Architecture principles. This project demonstrates separation of concerns, testability, and scalability by organizing code into distinct layers: Enterprise Business Rules, Application Business Rules, Interface Adapters, and Frameworks & Drivers.
6
6
7
7
## Table of Contents
8
+
8
9
-[Introduction](#introduction)
9
10
-[Architecture Overview](#architecture-overview)
10
11
-[Features](#features)
@@ -19,9 +20,11 @@ A Node.js REST API for a digital marketplace, structured according to Uncle Bob'
19
20
-[License](#license)
20
21
21
22
## Introduction
23
+
22
24
This backend API allows users to register, authenticate, and interact with products, blogs, and ratings. It is designed for maintainability and extensibility, following Clean Architecture best practices.
23
25
24
26
## Architecture Overview
27
+
25
28
The project is organized into the following layers:
26
29
27
30
-**Enterprise Business Rules**: Core business logic and domain models (`enterprise-business-rules/`).
@@ -45,6 +48,7 @@ public/ # Static files and HTML views
45
48
```
46
49
47
50
## Features
51
+
48
52
- User registration and authentication (JWT)
49
53
- Product CRUD operations
50
54
- Blog and rating management
@@ -55,10 +59,12 @@ public/ # Static files and HTML views
55
59
## Getting Started
56
60
57
61
### Prerequisites
62
+
58
63
- Node.js (v18+ recommended)
59
64
- MongoDB instance (local or cloud)
60
65
61
66
### Installation
67
+
62
68
1. Clone the repository:
63
69
```bash
64
70
git clone <repo-url>
@@ -84,6 +90,7 @@ public/ # Static files and HTML views
84
90
The server will run at [http://localhost:5000](http://localhost:5000).
85
91
86
92
## Project Structure
93
+
87
94
-`index.js` - Main entry point, sets up Express, routes, and middleware
88
95
-`routes/` - Express route definitions for products, users, blogs
89
96
-`interface-adapters/` - Controllers, DB access, adapters, and middleware
@@ -94,6 +101,7 @@ The server will run at [http://localhost:5000](http://localhost:5000).
94
101
## API Endpoints
95
102
96
103
### Products
104
+
97
105
-`POST /products/` - Create a new product
98
106
-`GET /products/` - Get all products
99
107
-`GET /products/:productId` - Get a product by ID
@@ -102,11 +110,13 @@ The server will run at [http://localhost:5000](http://localhost:5000).
102
110
-`POST /products/:productId/:userId/rating` - Rate a product
103
111
104
112
### Users & Auth
113
+
105
114
-`POST /users/register` - Register a new user
106
115
-`POST /users/login` - User login
107
116
-`GET /users/profile` - Get user profile (auth required)
108
117
109
118
### Blogs
119
+
110
120
-`GET /blogs/` - Get all blogs
111
121
-`POST /blogs/` - Create a new blog
112
122
@@ -163,4 +173,4 @@ The server will run at [http://localhost:5000](http://localhost:5000).
163
173
164
174
## License
165
175
166
-
This project is licensed under the ISC License. See the [LICENSE](LICENSE) file for details.
176
+
This project is licensed under the ISC License. See the [LICENSE](LICENSE) file for details.
0 commit comments