Skip to content

An app for runners to track and share their achievements.

License

Notifications You must be signed in to change notification settings

scarletstudio/runflex

Repository files navigation

RunFlex

An app for runners to track and share their achievements.

If you launch a workspace with this GitPod badge, the codebase will be automatically set up for you. Then, you will be able to run the app and code in your browser.

Open in Gitpod

Tools Used

  • Frontend
    • JavaScript
    • React
    • Vite
    • React Router
    • Leaflet Maps
    • Font Awesome Icons
  • Backend
    • Python
    • Django
    • SQLite

Data for runs generated from Trail Router.

Backend Development

The backend API is a Django app which provides a RESTful API for the frontend app.

Most of the backend code for this project is written in Python.

You can trace through the backend codebase in this order to understand how it is structured:

  • The entrypoint for the backend API is backend/server/urls.py, which defines all the endpoints.
  • The endpoints process requests using the views defined in backend/server/views.py.
  • The views use data about runners, runs, and run tracking data, whose data models are defined in backend/core/models.py.
  • Raw run data is stored in the data/runs/ folder in a format called GPX, then loaded into core data models for the API.
  • The view for an individual run returns metrics about that run, which are configured in backend/analytics/main.py.
  • Each metric is implemented in a file like backend/analytics/metrics/elevation.py.
  • Each metric has tests in a file like backend/analytics/metrics/tests/test_elevation.py.

You can run tests with this command:

run manage test

You can start the backend API server with this command:

run backend

About

An app for runners to track and share their achievements.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published