feat: add cart service with lambda, api gateway, rds and typeorm - #54
Open
Javlon999 wants to merge 1 commit into
Open
feat: add cart service with lambda, api gateway, rds and typeorm#54Javlon999 wants to merge 1 commit into
Javlon999 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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