/book-subscription-system

A cloud full stack web app for course COMS E6156

Primary LanguageJavaScriptMIT LicenseMIT

book-subscription-system

  • A cloud full-stack web app called book subscription system
  • Main function is that the administrator can manage books, customers can subscribe to books and view their orders
  • I led this group project for COMS E6156, written by 6 people.

How to run

  1. Use datagrip to set up database and schema and change credentials first
  2. Install all dependencies
  3. Run frontend and backend app independently
  • Run sql

    • modify your database url in every database.py in all folders
    • run sql_create_table.sql in datagrip to create schema
  • Update credentials as your own when you want to use google login in local

    • create your own google cloud API credentials because my credentials have expired
    • modify credentials in book-subscription-system/composition/main.py to use your own
      • GOOGLE_CLIENT_ID = "....apps.googleusercontent.com"
      • GOOGLE_CLIENT_SECRET = "GOCSPX-..."
  • Terminal 0:

    • cd frontend
    • npm install package
    • npm start
  • Terminal 1,2,3,4:

    • cd order and cd book and cd user and cd composition
    • pip install -r requirements.txt
    • python main.py
    • or if no main uvicorn main:app --reload (default port is 8000)

About requirements

About implementation

Tools or frameworks

  • fastapi as a backend framework
  • react.js as a frontend framework
  • we use microservices as a software architecture (each folder is a microservice)
  • mysql database (rds in aws)

REST APIs

  • /
  • /login
  • /auth
  • /books
  • /books/{id}
  • /orders
  • /orders/{id}
  • /users
  • /users/{id}
  • /users/search-by-email
  • /users/json
  • ...

About AWS deployment

image

About results

Identity selection interface

image

Administrator management intgerface (view all orders)

image

Add interface (user)

image

Login interface

image

Register interface

image

Customer interface

image

Customer orderlist interface (only view his own order)

image

Detailed other functions

you can download to see them if needed.