Skip to content

merriekay/cs178-flask-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[Your Project Name Here]

CS178: Cloud and Database Systems — Project #1 Author: [Your Name] GitHub: [your-username]


Overview


Technologies Used

  • Flask — Python web framework
  • AWS EC2 — hosts the running Flask application
  • AWS RDS (MySQL) — relational database for [describe what you stored]
  • AWS DynamoDB — non-relational database for [describe what you stored]
  • GitHub Actions — auto-deploys code from GitHub to EC2 on push

Project Structure

ProjectOne/
├── flaskapp.py          # Main Flask application — routes and app logic
├── dbCode.py            # Database helper functions (MySQL connection + queries)
├── creds_sample.py      # Sample credentials file (see Credential Setup below)
├── templates/
│   ├── home.html        # Landing page
│   ├── [other].html     # Add descriptions for your other templates
├── .gitignore           # Excludes creds.py and other sensitive files
└── README.md

How to Run Locally

  1. Clone the repository:

    git clone https://github.com/your-username/your-repo-name.git
    cd your-repo-name
  2. Install dependencies:

    pip3 install flask pymysql boto3
  3. Set up your credentials (see Credential Setup below)

  4. Run the app:

    python3 flaskapp.py
  5. Open your browser and go to http://127.0.0.1:8080


How to Access in the Cloud

The app is deployed on an AWS EC2 instance. To view the live version:

http://[your-ec2-public-ip]:8080

(Note: the EC2 instance may not be running after project submission.)


Credential Setup

This project requires a creds.py file that is not included in this repository for security reasons.

Create a file called creds.py in the project root with the following format (see creds_sample.py for reference):

# creds.py — do not commit this file
host = "your-rds-endpoint"
user = "admin"
password = "your-password"
db = "your-database-name"

Database Design

SQL (MySQL on RDS)

Example:

  • [TableName] — stores [description]; primary key is [key]
  • [TableName] — stores [description]; foreign key links to [other table]

The JOIN query used in this project:

DynamoDB

  • Table name: [your-table-name]
  • Partition key: [key-name]
  • Used for: [description]

CRUD Operations

Operation Route Description
Create /[route] [what it does]
Read /[route] [what it does]
Update /[route] [what it does]
Delete /[route] [what it does]

Challenges and Insights


AI Assistance

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors