Skip to content

Commit

Permalink
Merge pull request #4 from joaovitoriasilva/Backend-optimization-v0.1.2
Browse files Browse the repository at this point in the history
Backend optimization v0.1.2
  • Loading branch information
joaovitoriasilva authored Jan 8, 2024
2 parents 3477c34 + d197c6a commit 1b3ebab
Show file tree
Hide file tree
Showing 52 changed files with 4,608 additions and 2,250 deletions.
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ backend/*/__pycache__/
backend/*.pyc

# Logs
backend/logs/
backend/*.log
backend/logs/*.log
backend/*.log

# Frontend
frontend/img/users_img/*.*
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<div align="center">
<img src="frontend/img/logo/logo.png" width="128" height="128">

# Endurain

A self-hosted fitness tracking service

<img src="screenshot_01.png">
</div>

> [!WARNING]
> This project is currently in **Alpha** state. You can try it out at your own risk, but be aware that things might break and **DATA LOSS** may occur.
Endurain is a self-hosted fitness tracking service that operates much like Strava but allows users to have complete control over their data and the hosting environment. The application's frontend is built using a combination of PHP, HTML, basic JavaScript, and Bootstrap CSS. On the backend, it leverages Python FastAPI and stravalib for seamless integration with Strava. The MariaDB database engine is employed to efficiently store and manage user data, while Jaeger is used for basic observability.

To deploy Endurain, Docker images are readily available, and a comprehensive example can be found in the "docker-compose.yml" file provided. Configuration is facilitated through environment variables, ensuring flexibility and ease of customization.
Expand Down Expand Up @@ -35,6 +48,8 @@ To do features (not by order):
- Comments and likes logic for activities
- Notifications logic
- Activity Pub integration?

More screenshots: https://imgur.com/a/lDR0sBf
---
# Frontend
Table bellow shows supported environemnt variables. Variables marked with optional "No" should be set to avoid errors.
Expand Down Expand Up @@ -76,6 +91,9 @@ JAEGER_PROTOCOL | http | Yes
JAEGER_HOST | jaeger | Yes
JAGGER_PORT | 4317 | Yes
STRAVA_DAYS_ACTIVITIES_ONLINK | 30 | Yes
API_ENDPOINT* | changeme | Yes

*API_ENDPOINT needs to be set if you want to enable Strava integration

Table bellow shows the obligatory environemnt variables for mariadb container. You should set them based on what was also set for backend container.

Expand Down
3 changes: 2 additions & 1 deletion backend/.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ JAEGER_ENABLED=true
JAEGER_PROTOCOL=http
JAEGER_HOST=jaeger
JAGGER_PORT=4317
STRAVA_DAYS_ACTIVITIES_ONLINK=30
STRAVA_DAYS_ACTIVITIES_ONLINK=30
API_ENDPOINT=changeme
6 changes: 6 additions & 0 deletions backend/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Constant related to version
API_VERSION="v0.1.2"

# Constants related to user access types
ADMIN_ACCESS = 2
REGULAR_ACCESS = 1
Loading

0 comments on commit 1b3ebab

Please sign in to comment.