Skip to content

aws-samples/build-serverless-ecommerce-application-with-genai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

build serverless ecommerce application with genai

this project is based on litemall,We have made some modifications to it so that it can run correctly and efficiently on AWS Lambda.

This project is only for learning purposes. If it is used for commercial purposes, please contact the original author

What changes have we made:

  1. Treat litemall as a regular Java web project and use aws-lambda-web-adapter to package it, so that we can migrate traditional Java web projects to AWS lambda with minimal changes
  2. The AWS lambda snapstart feature has been enabled, which makes the cold start speed of Java projects running on AWS lambda faster.
  3. Added Amazon ElastiCache Redis as a distributed cache,modified Litemall's Shiro to use Redis for distributed session synchronization. This allows multiple lambda instances to synchronize user login status.
  4. Added a POC(Proof Of Concept):use Amazon Q to update litemall from java 8 to java 17
  5. Add AI functionality to Litemall by using AWS Bedlock

How To deploy

Recommended software runtime environment

SDK version
JDK 1.8.x & 17.x
NodeJs 20.x

for deploy detils: litemall doc

Compile or Deploy Admin backend

  1. change to project's root directory litemall
  2. maven package project
    # maven build project
    mvn clean
    mvn install
    mvn clean package
  3. use aws sam deploy project to aws lambda
    # sam build project
    sam build
    # deploy to aws lambda
    sam deploy

Compile frontend

Admin console frontend

  1. change to project's litemall-admin directory litemall-admin
  2. use npm build frontend project
    cd litemall-admin
    npm install --registry=https://registry.npmmirror.com
    # for developing and debugging locally
    npm run dev
    # optional: for test environment
    # npm run build:dep
    # optional: for product environment
    # npm run build:prod

mall website frontend

  1. change to project's litemall-vue directory litemall-vue
  2. use npm build frontend project
    cd litemall-vue
    npm install --registry=https://registry.npmmirror.com
    # for developing and debugging locally
    npm run dev
    # optional: for test environment
    # npm run build:dep
    # optional: for product environment
    # npm run build:prod

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5