Skip to content

haleymartin-6/guardians

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQL + Flask Boilerplate Project

This repo contains a boilerplate setup for spinning up 3 Docker containers:

  1. A MySQL 8 container for obvious reasons
  2. A Python Flask container to implement a REST API
  3. A Local AppSmith Server

How to setup and start the containers

Important - you need Docker Desktop installed

  1. Clone this repository.
  2. Create a file named db_root_password.txt in the secrets/ folder and put inside of it the root password for MySQL.
  3. Create a file named db_password.txt in the secrets/ folder and put inside of it the password you want to use for the a non-root user named webapp.
  4. In a terminal or command prompt, navigate to the folder with the docker-compose.yml file.
  5. Build the images with docker compose build
  6. Start the containers with docker compose up. To run in detached mode, run docker compose up -d.

Project Information

Guardians is an application with the goal to provide deals and discounts to consumers on technology that is out of the mainstream large corporations. Within our design, we have Customers, Discounts, Notifications, and Products, all with the appropriate fields attributed to each one. Each customer has a first name, last name, email(s), phone number, and a promotion score. This promotional score is important because when a customer uses another customer's promo code, their promotion score increases. Each discount has the amount, the added date, the amount of likes (customers can like a discount to save it for later or emphasize the usefulness of it), the referral code, the expiration date, the retailer id, and the brand id. Notifications have a discount id for the discount it is associated with, the text of what the notification is actually saying, the status, and the date and time at which the notification is posted.The products have a name, cost, tutorial (this is for our users who may be less familiar with technology and need some guides on how/when this product could be used), product type (i.e. Computer, Phone, GPS, etc.), and brand id.

Instructions:

  1. Clone the repository to your local machine.
  2. Ensure you have Docker installed on your system.
  3. Add any necessary secret files containing passwords to the appropriate directories (e.g., secrets/).
  4. Build and start the containers using Docker Compose: docker-compose up
  5. Once the containers are up and running, the services should be accessible.
  6. SQL files will be automatically executed to set up the database schema and populate initial data.
  7. Make sure you add two .txt files called db_password and db_root_password in the secrets folder with your desired passwords for connection to the database

Group Members & Their Contributions

Shoutout to Haley, Shruthi, and Kyle for writing the SQL files. Grace added some things to the python files (discounts.py, customers.py, products.py) and is also writing the readme. Snehit did a lot of brainstorming our project idea and coming up with Guardians as a whole. We used Shruthi's computer for all of the AppSmith files, with Haley and Shruthi focused on the functionality of the AppSmith pages while Grace focused on the UI design.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.9%
  • Dockerfile 3.1%