Skip to content

feat: add cart service with lambda, api gateway, rds and typeorm - #54

Open
Javlon999 wants to merge 1 commit into
rolling-scopes-school:mainfrom
Javlon999:task-8-backend
Open

feat: add cart service with lambda, api gateway, rds and typeorm#54
Javlon999 wants to merge 1 commit into
rolling-scopes-school:mainfrom
Javlon999:task-8-backend

Conversation

@Javlon999

@Javlon999 Javlon999 commented Jun 4, 2026

Copy link
Copy Markdown

What was done?

Task 8.1
Forked and ran the NestJS Cart Service template repository
Created a separate CDK project for infrastructure
Added AWS Lambda to run the NestJS application
Added API Gateway to expose Cart Service endpoints
Deployed the Cart Service to AWS using CDK

Task 8.2
Created a PostgreSQL RDS instance using AWS CDK
Configured PostgreSQL as the database engine
Configured connectivity between Lambda and RDS
Verified that the RDS instance was created successfully and is available

Task 8.3
Integrated the NestJS Cart Service with PostgreSQL using TypeORM
Implemented database entities for:
carts
cart_items
Added database-backed cart operations
Verified that tables were created in RDS
Verified that cart data is stored in PostgreSQL
Implemented and tested the following Cart Service API operations:

GET /api/profile/cart
PUT /api/profile/cart
DELETE /api/profile/cart
PUT /api/profile/cart/order
Verified flow:

GET /api/profile/cart returns [] when the cart is empty
PUT /api/profile/cart adds a product to the cart
GET /api/profile/cart returns persisted cart items from PostgreSQL
DELETE /api/profile/cart clears the cart
PUT /api/profile/cart/order creates an order and clears the cart

Task 8.4
Committed Cart Service and CDK changes to branch task-8
Pushed branch to forked repository
Updated frontend to use Cart Service APIs for cart interactions
Prepared PR for review
Additional scope
Added created_at and updated_at fields
Verified RDS tables directly in PostgreSQL
Verified deployed API manually with terminal requests and frontend integration

Link to Cart Service API
https://xu7nizk4sf.execute-api.ap-southeast-2.amazonaws.com/prod/api/profile/cart

Link to FE PR
EPAM-JS-Competency-center/shop-react-redux-cloudfront#624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant