Giter Site home page Giter Site logo

xindixu / complaza-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lilili77/cc-proj

0.0 0.0 0.0 116 KB

Search products by uploading images of it. Save products to your wishlist to keep track of their prices.

Home Page: https://complaza.xindixu.xyz

Python 100.00%
aws aws-cloudformation aws-codepipeline aws-dynamodb aws-lambda aws-apigateway aws-sam

complaza-backend's Introduction

Complaza Backend Stack

Backend Resources

Lambda functions

  • LF0: Call ML endpoint to return product names
  • LF1: Call 3rd party APIs to fullfil search and save to user's search history
  • LF2: Interaction with the wishlist table
  • LF3: Return search history
  • LF4: Get price and update price history
  • LF5: Get product details and price history

Databases

Table Name Hash Key Range Key Other Fields
SearchHistoryTable uid datetime imgKey, q
ProductTable id created image, link, name, price, retailer
WishlistTable uid pid created
PriceHistoryTable pid date price

API gateway

Endpoint Description Lambda Fn Auth
GET /image/{key} get the keyword associated with the image by key in S3 LF0 No
GET /product/{pid} get the product detail and price history by pid LF5 No
GET /search?{q, image, sort_by, uid} search by provided keyword q, add to search history if uid exists LF1 Depends
GET /history/{uid} gets all the search history of a user by uid LF3 Yes
GET /search/history/{uid}?q={q} search in the search history of a user by uid matching q LF3 Yes
GET /wishlist/{uid} gets all products from a user's wishlist by uid LF2 Yes
GET /search/wishlist/{uid}?q={q} search in the wishlist of a user by uid matching q LF2 Yes
POST /wishlist/{uid} adds a product to a user's wishlist LF2 Yes
DELETE /wishlist/{uid}/{pid} delete a product from a user's wishlist LF2 Yes

CodePipeline (CI/CD)

code-pipeline-template.yaml is a Cloudformation template that sets up the code pipeline.

OpenSearch

SageMaker (ML model)

Cloudformation Template

template.yaml is a Cloudformation template that creates/updates all AWS resources needed in this project.

Input

  • UserPoolIdentifier: Cognito
  • ImgBucket: S3 bucket storing the search image
  • PredictEndPoint: predict search image keywords
  • OpensearchEndPoint: search product name with the image keywords
  • RapidAPIKey: External API key

Output

  • ApiUrl: API Gateway endpoint

Structure

resources

complaza-backend's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.