FitTrack is an app designed to help users track their fitness journeys, activities, and goals. The application supports two types of users: Employees/Admins and Customers, each with specific roles that determine their permissions and access throughout the app. These roles define the user's authority over various CRUD (Create, Read, Update, Delete) operations.
The backend of FitTrack is implemented as a RESTful API using C# and ASP.NET.
User (Client):
- Username: client
- Password: client
User (Admin/Employee):
- Username: admin
- Password: admin
Users can add, edit, and delete fitness activities. Activity details include name, description, start date, activity type, and duration time.
Example 1: Listed Activities (Table)
Activity types are predefined values (from a dropdown list): run, walk, hike, swim, etc.
Example 4: Predefined Activity Types from Dropdown List (Displayed in Add/Edit Activity)
Users can filter activities by start date and activity type.
Example 5: Filtering by Date and Activity Type
Users can search activities by name and description.
Example 6: Filtering (Search Bar) by Name and Description
Users can set personal goals, such as the sum of all activities during the day or the total duration of activities during the day. Example goals: activity 1x per day or 30 mins per day.
Example 7, 8, 9: Goal Setting (View/table/list, edit, add, delete(same as prev.))
Users can access and manage their achievements by clicking the "View Achievements" button on the previous Goal table page. Each achievement is associated with a specific goal and activity, providing the following column information. The crucial element is the "achieved" boolean, indicating whether the goal has been accomplished. If the achievement's duration (achieved time) is equal to or less than the set goal duration, the achievement is considered successful; otherwise, it's marked as a failure. Alternatively, if the goal is defined by a frequency rather than a duration, the "achieved" boolean reflects whether the achievement's frequency matches or exceeds that of the goal.
Achievements that are successfully achieved are displayed as green rows. Otherwise, the failed ones are red. Example 10: Achievement table, column information. The record (achievement) is presented in relation to the success of the goal, using red and green colors.
Example 11: Adding achievements Goals are listed in a select list with a predefined activity name for each specific goal. Each goal can have either a defined duration or frequency. Consequently, the new achievement record follows the same pattern: if you select a goal with a defined duration, the achievement can only specify an achieved time (duration); alternatively, if you choose a goal with a defined frequency, the new achievement record can only specify a frequency.
The Repository Pattern abstracts the data layer and provides a consistent API for data access. It centralizes data access in repository and service classes, ensuring that CRUD operations are performed uniformly for every entity in the database.
MVC (Model-View-Controller) is a software architectural pattern used for organizing code in web applications. It separates the application into three interconnected components: Model (handles data and business logic), View (renders the user interface), and Controller (processes user input and updates the Model and View). This separation facilitates modular development, easier maintenance, and a clear structure for managing complex applications.