Skip to content

Latest commit

 

History

History
190 lines (131 loc) · 6.06 KB

README.md

File metadata and controls

190 lines (131 loc) · 6.06 KB

🌟 Introduction

🧙 Workout Wizards 🧙 is a fitness app that complements the popular Strava fitness app. Its aim is to help local Singaporean users along in their fitness journey. It implements many meaningful features, such as personalized workout and running route recommendations.

The overall objective of this app is to elevate the standard of fitness guidance and support available to Singaporean Strava users, tailoring each aspect of their exercise regimen for an optimized and engaging workout journey that they will enjoy.

📋 Table of Contents

🗺 Project Layout

Frontend The front-end of the app, built using React Native and TypeScript!
app The main frontend logic behind the app
components Helper components, functions and constants
styles Common CSS styles reused across the app
backend The back-end of the app, built using Django and PostgreSQL!

📚 Getting Started

This is an Expo project created with create-expo-app. To learn more about Expo, do look at the following resources:

  • Expo documentation: Learn fundamentals, or go into advanced topics with their guides.
  • Learn Expo tutorial: Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
  • Required software: Python, Node Package Manager (NPM), PostgresSQL

Setting up the Front-end:

  1. Navigate into Frontend folder.

    Note that all the following commands and creations are to be done in this subfolder.

       cd ./Frontend
  2. Install dependencies in the Frontend folder.

       npm install
  3. Create .env file under Frontend folder

       touch .env
  4. Add the following attribute into the .env file.

    If it is your first time developing mobile application, the most straight-forward way to access your back-end sever during development is to connect to localhost over the same Wifi network. You can refer to this webpage for more infomation.

       # API Endpoint
       EXPO_PUBLIC_DOMAIN='your back-end domain'
    

    An example of an .env file:

       # API Endpoint
       EXPO_PUBLIC_DOMAIN='http://191.300.50.50:8000/'
    
  5. Start the app

       npx expo start --tunnel
  6. Scan the QR Code displayed on the terminal. Alternatively, view the app on an emulator.

Setting up the Back-end:

  1. Before setting up the back-end, you will need a OneMap account, Strava account, Groq account and a local Postgres database set up. Please also set up a Strava api application.

  2. Navigate into ./backend folder.

    Note that all the following commands and creations are to be done in this subfolder.

       cd ./backend
  3. Create a virtual environment in the backend folder.

    This command will create a venv subfolder.

       python -m venv venv
  4. Activate the virtual environment

       venv\Scripts\activate
  5. Install all dependencies

       pip install -r ./requirements.txt
  6. Create .env file under the ./backend folder

       touch .env
  7. Add the following attributes into the .env file.

       # DB Config
       DATABASE_NAME='your postgres database name'
       DATABASE_USER='your postgres user'
       DATABASE_PASSWORD='your postgres database password'
       DATABASE_HOST='your postgres host' 
       DATABASE_PORT='your postgres port'
    
       # OneMap API Config 
       ONEMAP_EMAIL='your onemap account email'
       ONEMAP_EMAIL_PASSWORD ='your onemap account password'
    
       # Strava App Config
       STRAVA_CLIENT_ID='your strava api application's client id'
       STRAVA_CLIENT_SECRET='your strava api application's secret'
       MAX_USERS='your strava api application's number of athletes allowed to connect'
    
       # Groq Config
       GROQ_API_KEY="your groq api key"
    

    An example of an .env file:

    # DB Config
    DATABASE_NAME='orbital'
    DATABASE_USER='Tom'
    DATABASE_PASSWORD='12345'
    DATABASE_HOST='localhost' 
    DATABASE_PORT='5432'
    
    # One Map API Config 
    ONEMAP_EMAIL= '[email protected]'
    ONEMAP_EMAIL_PASSWORD = 'tom123' 
    
    # Strava App Config
    STRAVA_CLIENT_ID='12100'
    STRAVA_CLIENT_SECRET='a1234567890b1234567890'
    MAX_USERS='1'
    
    # Groq Config
    GROQ_API_KEY="a1234567890b1234567890"
    
  8. Apply the migrations:

       python manage.py migrate
  9. You can now run the backend development server:

       python manage.py runserver 0.0.0.0:8000
  10. Whitelist metro's domain in Strava's callback domain field.

📅 Current Progress

The following pages have been implemented

  • Sign up page
  • Login page
  • Location page
  • Stats page

Please note that the rest of the app is still in development.

💙 The Team

This project was made possible by two epic team members!
Team Member 1
Team Member 2