Skip to content

ClubSeek is service that specializes in recommending bars based on user preferences of quality and occupancy

Notifications You must be signed in to change notification settings

eshaanm25/ClubSeek

Repository files navigation

ClubSeek

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

Quick Start

  1. Install Docker. See Docker Installation Instructions

  2. Clone into GitHub Repo with: git clone https://github.com/eshaanm25/ClubSeek

  3. Run make run in the root folder of the project

  4. 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

API documentation is located on Postman.

Testing

  • 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

File Tree

📦 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

Technical Overview

The ClubSeek Application runs on Python and the uses the following packages:

Developer Dependencies:

  • pytest - Testing Framework for Unit Testing
  • requests - HTTP Library for Integration Testing

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.

Features

Docker Secrets

Docker Secrets are declared in the secrets folder and is used to store Database and API Endpoint Credentials

GitHub Actions

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

About

ClubSeek is service that specializes in recommending bars based on user preferences of quality and occupancy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 3

  •  
  •  
  •