Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
/ dsv-pvt Public archive

Lace Up & Lead The Way - A pre-race training app and social platform for runners.

License

Notifications You must be signed in to change notification settings

Edwinexd/dsv-pvt

Repository files navigation

Group 71 - Lace Up & Lead The Way

Overview

Lace Up & Lead The Way is a pre-race training app designed to be a companion and social platform for runners interested in running Midnattsloppet. This project is a collaborative effort by group 71 to design and develop a complete mobile app from scratch. The project is part of the PVT 7.5 course at DSV. The project includes a frontend, UI and a corresponding backend microservice architecture.

Team Members

Backlog

Our backlog was managed through a Github Project

Tech Stack

Features

Sign up

  • Passwords are irreversibly obfuscated and safely stored in an authentication database

Logging in and out

  • Authentication and session handling

Profiles

  • Each user can create their own profile
  • Profile can be made private

Groups

  • Users can join or leave them
  • Groups can be private or public

Activities in groups

  • Can be created by group members
  • Can be scheduled to specific dates
  • Can include planned completion of challenges

Challenges

  • Can be completed in activities by linking the activity to a certain challenge
  • Example: "Run 2,5km with 100m of elevation change!"

Achievements

  • Rewarded by completing challenges
  • Or by importing health data from phone
  • Completed achievements will be displayed on users profiles

Images

  • Ability to upload images to:
    • User profiles
    • Groups
    • Activities
    • and more...
  • Implemented using a microservice connected to S3 Storage

Sharing

  • Users can share completed achievements or activities
  • The app generates an image specific to each user whenever they complete something
    • This image can be shared to social media (e.g. Instagram or Facebook)
  • Implemented using Python PIL

API Documentation

Documentation of our REST APIs is generated using Swagger UI, through usage of FastAPI, and can be viewed by deploying respective service, and accessing its /docs endpoint.

Project Structure

dsv-pvt/
├── authentication/                 # a microservice handling user authentication
├── backend/                        # a microservice handling general user data
├── flutter_application/            # a client app, sends requests to backend
├── .github/                        # workflows and github related things
├── .gitignore
├── images/                         # a microservice handling image storage
├── LICENSE
├── proxy/                          # proxy coniguration
├── README.md
└── sessions/                       # a microservice handling login session tokens

Deploying

Microservices are to be run in separate processes independently. A few environment variables need to be set in order for them all to function properly.

Prerequisites

  • Docker — to deploy microservices
  • PostgreSQL — a database server where RDBMS data can be stored
  • Redis — a database server where bearer tokens can be stored
  • Access to S3 storage

Backend

Enironment variables:

  • API_KEY — The API that this service requires from external requests to create admin users
  • SESSIONS_URL — URL to the deployed sessions microservice. No trailing slashes!
  • AUTH_URL — URL to the deployed authentication microservice. No trailing slashes!
  • IMAGES_API_KEY — The API Key required in images microservice to upload images to S3
  • IMAGES_URL — URL to the deployed images microservice. No trailing slashes!
  • DATABASE_URL — URL to your PostgreSQL database for your general user data

Authentication

Environment variables:

  • DATABASE_URL — URL to your PostgreSQL database for authentication data

Images

Environment variables:

  • API_KEY_ID — backblaze keyID
  • API_KEY — backblaze applicationKey
  • KEY_NAME — blackblaze key name
  • AWS_ENDPOINT_URL — backblaze endpoint
  • BUCKET_NAME — backblaze bucket name
  • API_KEY_SELF — API key that this service will require to upload images to S3

Sessions

Environment variables:

  • PRIVATE_KEY_BYTES — Ed25519 PrivateKey in bytes

Client

Run the flutter application with the following environment variables set:

  • BACKEND_API_URL — URL to backend service.
  • IMAGES_API_URL — URL to images service.
  • GOOGLE_APPLE_CLIENT_ID — clientID to google for iOS devices. This is used for auth with google.
  • GOOGLE_WEB_CLIENT_ID — clientID for to google for web sessions.

Alternatives

Alternatively, all services can be run locally using uvicorn. In this case, make sure to install all dependencies first!

Screenshots

Future enhancements

  • Friend list
  • Reward system
  • Displaying groups on a map

Acknowledgments

License

Lace Up & Lead The Way is open source and released under the GPL 3.0 license. See LICENSE for more information.

Contact

For any questions or concerns, please reach out to @Edwinexd.

About

Lace Up & Lead The Way - A pre-race training app and social platform for runners.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published