This is a hobby project which I use to track my workout progression.
The frontend can be found here
The backend part is written in Elixir/Phoenix, and split up using umbrella projects. The entities are housed in several umbrella apps.
PostgreSQL's support for array/objects but also having a strict schema seems like a perfect fit. Next to being my favourite DBMS to work with :P
To get associated with graphQL, the API has been written in graphQL instead of a rest way.
The project currently consists of 5 apps.
-
Api: This app contains the graphQL API. It's the point of communication for the consumers.
-
User: This app contains the user model.
-
Workout: This app tracks the workouts and its related data for the user. A workout consists of multiple performed exercises. This service consists of three subservices:
- The exercise service allows creation, editing, reading and deleting exercises (Formerly the exercises service)
- The categories services allows listing of all categories used in exercises throughout the system
- The Workout service controls the workout model, and allows tracking of your workouts.
- Progress: This app measures progress for a user, using data from exercises and workouts.
Besides the API project, the apps are divided in several layers.
-
Service: Contains the layer to which the API or other services communicate.
-
Operation: Contains frequently used operations over repository entities. See below.
-
Repository: This layer abstracts how data is fetched and saved. Can either be to a database, an external API or another app.
-
Schemas: The ecto schemas.
-
Pools All applications use an internal pool of processes. The pools folder contain the settings for these process pools.