feat: refactor cart module to use TypeORM for database interactions - #48
Open
christopher-leal wants to merge 1 commit into
Open
feat: refactor cart module to use TypeORM for database interactions#48christopher-leal wants to merge 1 commit into
christopher-leal wants to merge 1 commit into
Conversation
- Added TypeORM integration for cart and cart item entities. - Created DatabaseModule to manage database connection using AWS Secrets Manager for credentials. - Updated CartService to handle cart operations with TypeORM. - Refactored CartController to return frontend-friendly cart items. - Introduced new entities: CartEntity and CartItemEntity. - Updated package.json to include necessary dependencies for TypeORM and AWS SDK. - Enhanced app.module.ts to include DatabaseModule and global configuration. - Added serverless support with a new lambda.ts file for AWS Lambda deployment.
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.
CartEntityandCartItemEntitywith proper column types, composite PK, and eager-loaded relations;product_data(simple-json) stores full product shape on PUT so GET can return it without external callsCartServiceis now fully async using injected TypeORM repositoriesDatabaseModulethat retrieves credentials from AWS Secrets Manager viaDB_SECRET_ARNin production, falls back to env vars locallylambda.tsentry point using@vendia/serverless-expressto wrap the NestJS app for Lambda;reflect-metadataimported first to preserve decorator metadatahttps://d2i4ewulasiv4x.cloudfront.net) and local dev (http://localhost:3000)