From 6f9a6a83e55eb7591f56be574869ebeced52f48d Mon Sep 17 00:00:00 2001 From: Oleksiy Bondar Date: Thu, 19 Feb 2026 16:13:16 +0100 Subject: [PATCH 1/7] A complete plan draft --- .../backend/weekly-plan.md | 191 ++++++++++++++++-- 1 file changed, 176 insertions(+), 15 deletions(-) diff --git a/shared-modules/mid-specialism-project/backend/weekly-plan.md b/shared-modules/mid-specialism-project/backend/weekly-plan.md index 9651e5fc..3b6571f7 100644 --- a/shared-modules/mid-specialism-project/backend/weekly-plan.md +++ b/shared-modules/mid-specialism-project/backend/weekly-plan.md @@ -1,25 +1,186 @@ -# Weekly plan +# Weekly Plan – Backend Project -Here is a guideilne of the outcomes you should reach each week to stay on track. +This document outlines the expected weekly progress and milestones for completing the backend project. +The structure aligns with the Product Requirements Document (PRD), Shared API Contract, and Technical Specification. - +--- -## Week 1 Sprint +## Week 1 Sprint – Core Data Modeling (DB week 1) -- [ ] (e.g. start with some planning tasks) +### Goal +Design and implement the foundational database schema for users and catalog entities. -## Week 2 Sprint +### Tasks -## Week 3 Sprint +- [ ] Review the Product Requirements Document (PRD) +- [ ] Design ERD (v1) including: + - `users` + - `{domain}_items` (e.g. `events`) +- [ ] Implement PostgreSQL schema with: + - Primary keys + - Foreign keys (where applicable) + - Proper constraints +- [ ] Add seed data for: + - At least 1 test user + - Multiple catalog items +- [ ] Implement and test basic SQL queries: + - List items + - Get item by ID +- [ ] Document ERD in the repository -## Week 4 Sprint +### Outcome -## Week 5 Sprint +- Working PostgreSQL database +- ERD v1 committed +- Seeded data available +- Catalog data queryable directly via SQL -- [ ] (e.g. end with some deploying tasks) +--- + +## Week 2 Sprint – Complete Database Structure (DB week 2) + +### Goal +Finalize database structure to support cart, checkout, and order flows. + +### Tasks + +- [ ] Extend ERD to include: + - `carts` + - `cart_items` + - `orders` + - `order_items` +- [ ] Implement all foreign key relationships +- [ ] Enforce “one active cart per user” rule +- [ ] Implement SQL queries for: + - Paginated item listing (`LIMIT`, sorting) + - Cart subtotal calculation + - Order totals snapshot logic +- [ ] Update ERD (v2) +- [ ] Add seed updates if needed + +### Outcome + +- Complete database schema supporting full PRD flow +- ERD v2 finalized +- Cart and order data structures functional at SQL level + +--- + +## Week 3 Sprint – Public API (NODE week 1: GET Only) + +### Goal +Expose public catalog endpoints and implement initial API documentation. + +### Tasks + +- [ ] Set up Express application structure +- [ ] Connect application to PostgreSQL +- [ ] Implement public endpoints: + - `GET /api/{domain}` (paginated) + - `GET /api/{domain}/search` + - `GET /api/{domain}/{id}` +- [ ] Implement pagination response format: + +```json +{ + "page": 1, + "limit": 20, + "total": 123, + "items": [] +} +``` + +- [ ] Implement standardized error format +- [ ] Add Swagger/OpenAPI documentation for public endpoints +- [ ] Start Postman collection (public endpoints) + +### Outcome + +- Public catalog API functional +- Pagination working +- API documented via Swagger +- Postman collection includes public routes + +--- + +## Week 4 Sprint – Authentication & Cart (NODE week 2: POST + Middleware) + +### Goal +Implement authentication and protected cart functionality. + +### Tasks + +- [ ] Implement authentication endpoints: + - `POST /api/auth/signup` + - `POST /api/auth/login` + - `GET /api/auth/me` +- [ ] Implement JWT-based authentication middleware +- [ ] Protect private endpoints +- [ ] Implement cart endpoints: + - `GET /api/cart` + - `POST /api/cart/items` + - `PATCH /api/cart/items/{itemId}` +- [ ] Validate request payloads +- [ ] Ensure consistent error responses +- [ ] Update Swagger documentation +- [ ] Extend Postman collection with auth + cart flows + +### Outcome + +- JWT authentication functional +- Protected routes working +- Cart can be created and modified +- Documentation updated + +--- + +## Week 5 Sprint – Checkout, Orders & Deployment (NODE week 3: PUT/DELETE + Transactions) + +### Goal +Complete private API, implement checkout transaction, and deploy. + +### Tasks + +- [ ] Implement remaining cart endpoints: + - `DELETE /api/cart/items/{itemId}` + - `POST /api/cart/checkout` (transactional) +- [ ] Implement order endpoints: + - `GET /api/orders` + - `GET /api/orders/{orderId}` +- [ ] Implement database transaction for: + - Converting active cart → order + - Creating order items + - Clearing/replacing active cart +- [ ] Finalize error handling across all routes +- [ ] Complete Swagger documentation +- [ ] Finalize Postman collection +- [ ] Deploy: + - Database + - API service + - Swagger documentation + +### Outcome + +- Fully functional contract-compliant backend +- Checkout flow transactional and stable +- Orders history available +- Swagger/OpenAPI docs accurately reflect the implemented API +- API + DB deployed +- Postman collection complete + +--- + +# Final Deliverables + +By the end of Week 5, you must provide: + +- [ ] GitHub repository +- [ ] ERD documentation +- [ ] Deployed PostgreSQL database +- [ ] Deployed API service (including working Swagger UI from the provided skeleton) +- [ ] Swagger/OpenAPI documentation updated to match your implementation +- [ ] Postman collection covering core flows + +--- From e8e9897bbca62b83f917ec612babb1278ad4d080 Mon Sep 17 00:00:00 2001 From: Oleksiy Bondar Date: Thu, 19 Feb 2026 20:59:09 +0100 Subject: [PATCH 2/7] Update shared-modules/mid-specialism-project/backend/weekly-plan.md Co-authored-by: karo <64137994+shpomp@users.noreply.github.com> --- .../mid-specialism-project/backend/weekly-plan.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/shared-modules/mid-specialism-project/backend/weekly-plan.md b/shared-modules/mid-specialism-project/backend/weekly-plan.md index 3b6571f7..f8341ce5 100644 --- a/shared-modules/mid-specialism-project/backend/weekly-plan.md +++ b/shared-modules/mid-specialism-project/backend/weekly-plan.md @@ -85,12 +85,14 @@ Expose public catalog endpoints and implement initial API documentation. ```json { - "page": 1, - "limit": 20, - "total": 123, - "items": [] -} -``` + "data": [], + "meta": { + "page": 1, + "pageSize": 20, + "totalItems": 245, + "totalPages": 13 + } + } - [ ] Implement standardized error format - [ ] Add Swagger/OpenAPI documentation for public endpoints From 5b5b428f1d990d6f336b720669a74aa215f0c49b Mon Sep 17 00:00:00 2001 From: Oleksiy Bondar Date: Thu, 19 Feb 2026 21:02:18 +0100 Subject: [PATCH 3/7] Update shared-modules/mid-specialism-project/backend/weekly-plan.md Co-authored-by: karo <64137994+shpomp@users.noreply.github.com> --- shared-modules/mid-specialism-project/backend/weekly-plan.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-modules/mid-specialism-project/backend/weekly-plan.md b/shared-modules/mid-specialism-project/backend/weekly-plan.md index f8341ce5..37cb4b5b 100644 --- a/shared-modules/mid-specialism-project/backend/weekly-plan.md +++ b/shared-modules/mid-specialism-project/backend/weekly-plan.md @@ -26,7 +26,7 @@ Design and implement the foundational database schema for users and catalog enti - At least 1 test user - Multiple catalog items - [ ] Implement and test basic SQL queries: - - List items + - Get all items - Get item by ID - [ ] Document ERD in the repository From 5084f4b0193bf4e81319c34c0810026461593688 Mon Sep 17 00:00:00 2001 From: Oleksiy Bondar Date: Thu, 19 Feb 2026 21:22:12 +0100 Subject: [PATCH 4/7] update table manes to singular --- .../mid-specialism-project/backend/weekly-plan.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/shared-modules/mid-specialism-project/backend/weekly-plan.md b/shared-modules/mid-specialism-project/backend/weekly-plan.md index 37cb4b5b..fbd554b9 100644 --- a/shared-modules/mid-specialism-project/backend/weekly-plan.md +++ b/shared-modules/mid-specialism-project/backend/weekly-plan.md @@ -16,8 +16,8 @@ Design and implement the foundational database schema for users and catalog enti - [ ] Review the Product Requirements Document (PRD) - [ ] Design ERD (v1) including: - - `users` - - `{domain}_items` (e.g. `events`) + - `user` + - `{domain}_item` (e.g. `event`) - [ ] Implement PostgreSQL schema with: - Primary keys - Foreign keys (where applicable) @@ -47,10 +47,10 @@ Finalize database structure to support cart, checkout, and order flows. ### Tasks - [ ] Extend ERD to include: - - `carts` - - `cart_items` - - `orders` - - `order_items` + - `cart` + - `cart_item` + - `order` + - `order_item` - [ ] Implement all foreign key relationships - [ ] Enforce “one active cart per user” rule - [ ] Implement SQL queries for: @@ -93,6 +93,7 @@ Expose public catalog endpoints and implement initial API documentation. "totalPages": 13 } } +``` - [ ] Implement standardized error format - [ ] Add Swagger/OpenAPI documentation for public endpoints @@ -123,7 +124,7 @@ Implement authentication and protected cart functionality. - [ ] Implement cart endpoints: - `GET /api/cart` - `POST /api/cart/items` - - `PATCH /api/cart/items/{itemId}` + - `PUT /api/cart/items/{itemId}` - [ ] Validate request payloads - [ ] Ensure consistent error responses - [ ] Update Swagger documentation From 9f13b0a77a18d79dbd8c6bc726af86dbdb6a90f2 Mon Sep 17 00:00:00 2001 From: Oleksiy Bondar Date: Thu, 19 Feb 2026 21:24:55 +0100 Subject: [PATCH 5/7] fix linting errors --- .../backend/weekly-plan.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/shared-modules/mid-specialism-project/backend/weekly-plan.md b/shared-modules/mid-specialism-project/backend/weekly-plan.md index fbd554b9..f11488d5 100644 --- a/shared-modules/mid-specialism-project/backend/weekly-plan.md +++ b/shared-modules/mid-specialism-project/backend/weekly-plan.md @@ -10,6 +10,7 @@ The goal is to progressively implement a fully functional, contract-compliant AP ## Week 1 Sprint – Core Data Modeling (DB week 1) ### Goal + Design and implement the foundational database schema for users and catalog entities. ### Tasks @@ -42,6 +43,7 @@ Design and implement the foundational database schema for users and catalog enti ## Week 2 Sprint – Complete Database Structure (DB week 2) ### Goal + Finalize database structure to support cart, checkout, and order flows. ### Tasks @@ -71,6 +73,7 @@ Finalize database structure to support cart, checkout, and order flows. ## Week 3 Sprint – Public API (NODE week 1: GET Only) ### Goal + Expose public catalog endpoints and implement initial API documentation. ### Tasks @@ -85,14 +88,14 @@ Expose public catalog endpoints and implement initial API documentation. ```json { - "data": [], - "meta": { - "page": 1, - "pageSize": 20, - "totalItems": 245, - "totalPages": 13 - } + "data": [], + "meta": { + "page": 1, + "pageSize": 20, + "totalItems": 245, + "totalPages": 13 } +} ``` - [ ] Implement standardized error format @@ -111,6 +114,7 @@ Expose public catalog endpoints and implement initial API documentation. ## Week 4 Sprint – Authentication & Cart (NODE week 2: POST + Middleware) ### Goal + Implement authentication and protected cart functionality. ### Tasks @@ -142,6 +146,7 @@ Implement authentication and protected cart functionality. ## Week 5 Sprint – Checkout, Orders & Deployment (NODE week 3: PUT/DELETE + Transactions) ### Goal + Complete private API, implement checkout transaction, and deploy. ### Tasks From da5d99f27809bc1c37fccbfd3c55fdf724cda258 Mon Sep 17 00:00:00 2001 From: Oleksiy Bondar Date: Thu, 19 Feb 2026 21:29:10 +0100 Subject: [PATCH 6/7] fix linting errors --- .../backend/weekly-plan.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/shared-modules/mid-specialism-project/backend/weekly-plan.md b/shared-modules/mid-specialism-project/backend/weekly-plan.md index f11488d5..5f5ebbff 100644 --- a/shared-modules/mid-specialism-project/backend/weekly-plan.md +++ b/shared-modules/mid-specialism-project/backend/weekly-plan.md @@ -9,11 +9,11 @@ The goal is to progressively implement a fully functional, contract-compliant AP ## Week 1 Sprint – Core Data Modeling (DB week 1) -### Goal +### Week 1 Goal Design and implement the foundational database schema for users and catalog entities. -### Tasks +### Week 1 Tasks - [ ] Review the Product Requirements Document (PRD) - [ ] Design ERD (v1) including: @@ -31,7 +31,7 @@ Design and implement the foundational database schema for users and catalog enti - Get item by ID - [ ] Document ERD in the repository -### Outcome +### Week 1 Outcome - Working PostgreSQL database - ERD v1 committed @@ -42,11 +42,11 @@ Design and implement the foundational database schema for users and catalog enti ## Week 2 Sprint – Complete Database Structure (DB week 2) -### Goal +### Week 2 Goal Finalize database structure to support cart, checkout, and order flows. -### Tasks +### Week 2 Tasks - [ ] Extend ERD to include: - `cart` @@ -62,7 +62,7 @@ Finalize database structure to support cart, checkout, and order flows. - [ ] Update ERD (v2) - [ ] Add seed updates if needed -### Outcome +### Week 2 Outcome - Complete database schema supporting full PRD flow - ERD v2 finalized @@ -72,11 +72,11 @@ Finalize database structure to support cart, checkout, and order flows. ## Week 3 Sprint – Public API (NODE week 1: GET Only) -### Goal +### Week 3 Goal Expose public catalog endpoints and implement initial API documentation. -### Tasks +### Week 3 Tasks - [ ] Set up Express application structure - [ ] Connect application to PostgreSQL @@ -102,7 +102,7 @@ Expose public catalog endpoints and implement initial API documentation. - [ ] Add Swagger/OpenAPI documentation for public endpoints - [ ] Start Postman collection (public endpoints) -### Outcome +### Week 4 Outcome - Public catalog API functional - Pagination working @@ -113,11 +113,11 @@ Expose public catalog endpoints and implement initial API documentation. ## Week 4 Sprint – Authentication & Cart (NODE week 2: POST + Middleware) -### Goal +### Week 4 Goal Implement authentication and protected cart functionality. -### Tasks +### Week 4 Tasks - [ ] Implement authentication endpoints: - `POST /api/auth/signup` @@ -134,7 +134,7 @@ Implement authentication and protected cart functionality. - [ ] Update Swagger documentation - [ ] Extend Postman collection with auth + cart flows -### Outcome +### Week 4 Outcome - JWT authentication functional - Protected routes working @@ -145,11 +145,11 @@ Implement authentication and protected cart functionality. ## Week 5 Sprint – Checkout, Orders & Deployment (NODE week 3: PUT/DELETE + Transactions) -### Goal +### Week 5 Goal Complete private API, implement checkout transaction, and deploy. -### Tasks +### Week 5 Tasks - [ ] Implement remaining cart endpoints: - `DELETE /api/cart/items/{itemId}` @@ -169,7 +169,7 @@ Complete private API, implement checkout transaction, and deploy. - API service - Swagger documentation -### Outcome +### Week 5 Outcome - Fully functional contract-compliant backend - Checkout flow transactional and stable From e74b5857458153052cc65693df6fec1e2ef9bcc9 Mon Sep 17 00:00:00 2001 From: Oleksiy Bondar Date: Thu, 19 Feb 2026 21:31:23 +0100 Subject: [PATCH 7/7] fix linting errors --- shared-modules/mid-specialism-project/backend/weekly-plan.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-modules/mid-specialism-project/backend/weekly-plan.md b/shared-modules/mid-specialism-project/backend/weekly-plan.md index 5f5ebbff..0bedd9d3 100644 --- a/shared-modules/mid-specialism-project/backend/weekly-plan.md +++ b/shared-modules/mid-specialism-project/backend/weekly-plan.md @@ -102,7 +102,7 @@ Expose public catalog endpoints and implement initial API documentation. - [ ] Add Swagger/OpenAPI documentation for public endpoints - [ ] Start Postman collection (public endpoints) -### Week 4 Outcome +### Week 3 Outcome - Public catalog API functional - Pagination working @@ -180,7 +180,7 @@ Complete private API, implement checkout transaction, and deploy. --- -# Final Deliverables +## Final Deliverables By the end of Week 5, you must provide: