Logo

FitHub Server

View the FitHub Client

Table of Contents

  1. About The Project
  2. Technologies
  3. Getting Started
  4. Database Setup
  5. Database Commands
  6. Contributing

About The Project

FitHub allows users to create, organize and follow playlists of exercises- allowing for a convenient, centralized, and easy workout experience.

Technologies

  • Flutter/Dart - Client
  • Node/ExpressJS - Server
  • Amazon S3 - Media Storage
  • PostgreSQL - Database
  • Firebase Authentication - Authentication
  • Firebase Hosting - Client Deployment
  • Amazon EC2 - Server Deployment
  • Amazon RDS - Database Deployment

Getting Started

Prerequisites

  1. Yarn
  2. Postgres
    • When installing, use the default password "postgres"
    • For macOS users, suggested installation is through homebrew
  3. Postico
    • This is specific to macOS users.

Installation

  1. Run yarn install to install all dependencies

Configuration

Make a copy of sample.env, rename it to .env, and fill out the environment variables.

Database Setup

All database commands must start with yarn sequelize-cli due to changes in path structure.

  1. Start the postgres server.
  2. Run yarn sequelize-cli init to setup the project.
  3. Run yarn sequelize-cli db:create
    • This command only setups the dev database. There will also be databases for testing and production.
  4. Run yarn sequelize-cli db:migrate to run the pending migrations. Any changes to the tables must take place through migrations. Ensure changes are also updated in the model files.
  5. Setup Postico using the same values in the .env
  6. Start the server.
  7. Ensure all tables and attributes are correct. Check that tables are populated as intended.

Database Commands

If you are interested in running other commands, run yarn sequelize-cli --help

Contributing

Have an idea on how to make FitHub greater? Check out our Contributing Doc!