ClubSeek is service that specializes in recommending bars based on user preferences of quality and occupancy. Clients can use the API to view available Bars and get recommendations based on their personal preferences. Bar Owners can use the API to perform CRUD operations on Bars and view clients assigned to their bar
-
Install Docker. See Docker Installation Instructions
-
Clone into GitHub Repo with:
git clone https://github.com/eshaanm25/ClubSeek
-
Run
make run
in the root folder of the project -
Install the Postman API Collection and follow API Documentation to interact with API endpoint
The Testing Credentials for AuthZ are:
username:admin
password:password
API documentation is located on Postman.
- To run integration tests, run
make integrationtest
in the root folder of the project - To run unit tests, run
make unittest
in the root folder of the project
📦 YelpHelp
┣ 📂 .github
┃ ┗ 📂 workflows - GitHub Workflows
┃ ┃ ┣ integration.yml - GitHub Action Integration Tests Workflow
┃ ┃ ┗ unit.yml - GitHub Action Unit Test Workflow
┣ 📂 ClubSeek - Python Code for ClubSeek Application
┃ ┣ 📂 clubseek - Poetry Project
┃ ┃ ┣ api.py - All API Endpoints for all CRUD Operations in Application
┃ ┃ ┣ constants.py - Schemas and DB Classes for API Request Schemas and SQLAlchemy
┃ ┃ ┣ helpers.py - Helper Functions for API Endpoints
┃ ┃ ┗ main.py - Initializes Flask API and connects to Database
┃ ┣ 📂 tests
┃ ┃ ┣ test_integration_clubseek.py - Integration Tests
┃ ┃ ┗ test_unit_clubseek.py - Unit Tests
┃ ┣ poetry.lock - Poetry Metadata File
┃ ┗ pyproject.toml - Poetry Dependency File
┣ 📂 databaseInit - Script to Initialize Database
┃ ┗ init.sql - Initialization Script for Database to create Users and Bars Table
┣ 📂 secrets - Location where secrets are stored and read from
┃ ┣ application_credentials - Credentials for AuthZ with API
┃ ┣ db_password - Password for DB
┃ ┣ db_root_password - Root Password for DB
┃ ┗ db_user - Username for DB
┣ Dockerfile - Main Docker Build File for ClubSeek Image
┣ Makefile - Makefile for command shortcuts
┣ docker-compose.integrationtest.yml - Integration Test Docker Compose File
┣ docker-compose.unittest.yml - Unit Test Docker Compose File
┗ docker-compose.yml - Main Docker Compose File for ClubSeek Application
The ClubSeek Application runs on Python and the uses the following packages:
- Flask: Python web application framework used for API Endpoints
- SQLAlchemy: Used to connect and perform CRUD operations on MySQL Database
- Flask-SQLAlchemy: extension for Flask that adds support for SQLAlchemy to an application
- Flask-HTTPAuth: Flask extension that provides Basic HTTP authentication for Flask routes
- flask-expects-json: JSON Schema Validation for API Requests
- Werkzeug: Used for text hashing in AuthZ
- get-docker-secret: Used to Pull Docker Secrets in Container
Developer Dependencies:
The Application Image is created with a Dockerfile and the MySQL Database as well as the application containers are declared in a the docker-compose.yml file.
Docker Secrets are declared in the secrets folder and is used to store Database and API Endpoint Credentials
GitHub Actions are declared in the .github/workflows folder. The main
branch is protected and GitHub Actions are used to ensure that all Unit Tests and Integration Tests have passed before a PR can be merged into main
.
GitHub Actions also push images to the GitHub Container Registry and AWS Elastic Container Registry when a PR is merged to main. This meant that we always have an up to date container in AWS ECR and our GitHub Repo for clients to pull and use. This could also be used to create a pipeline for automated deployment of application updates.
GitHub Actions work by running Unit Testing and Integration Testing containers that are declared in dockerTestingFiles and reading their error codes to determine if tests have failed or passed