- Navigate to
.\WorkoutTracker\docs
- Launch PowerShell Window
- Optional run
docfx docfx.json
- (only necessary if you have made changes to the docstrings and/or files)
- Run
docfx serve _site
- Open
http://localhost:8080
in your browser
App.razor serves as the root component in a Blazor application. It’s the entry point where routing is configured and where other components are referenced.
Essentially it contains a reference to <Routes>
which is a component that is responsible for routing in Blazor.
Routes.razor is a component that is responsible for routing in Blazor. It contains a list of <RouteView>
components that are used to render the appropriate component based on the current route.
It also checks the auth state so that only authenticated users can access certain pages; rerouting them to login page if they try to access a page without being logged in.
MainLayout.razor is a component that defines the layout of the application. It contains a header and a body. The body is where the main content of the application is rendered. Routes.razor applies this layout to all the pages in the application.
Login.razor is a component that is responsible for logging in a user. It contains a form that takes in a username and password and sends a POST request to the server to authenticate the user.
LogoutButton.razor is a component that is responsible for logging out a user. It contains a button that sends a POST request to the server to log out the user. It is included in the mainlayout so that it is accessible from all pages.
SimpleStateAuthenticationProvider.cs is a class that is responsible for managing the authentication state of the user. It contains methods to log in and log out a user and to check if a user is authenticated.
Greets the user by their name.
TODO - add table of previous workouts with links to workout details
UserService.cs is a class that is responsible for managing the user data. Currently it only contains a method to get the current user's name.
- As a user, I want to be able to see a list of my previous workouts so that I can track my progress.
- As a user, I want to be able to see diagrams based on my previous workouts as it helps me to better understand my progress.
- As a user, I want to be able to see the exercises I did in my previous workouts, so I can plan my next workout.
- As a user, I want to be able to add new workouts, so that I can track my progress.
- As a user, when I add a new workout, I want it to suggest exercises based on my previous workouts of the same type, so I can save time.
- As a user, when I add an exercise, I want to see the reps, sets, and weight I used in the past for that exercise; so I can improve my performance.
- User logs in
- User is on the main page
- User sees a list of previous workouts
- User clicks on a workout
- User sees a list of exercises in the workout
- User taps on an exercise to see the historic details
- User sees a diagram of the historic details (eg weight changes over time)
- User either:
- Presses back button to go back to the main page
- Presses delete button if they want to delete the workout
- User logs in
- User is on the main page
- User clicks on the add workout button
- User sees an empty Table with a button to add exercises
- User clicks on the add exercise button
- User types in the exercise name, with autofill suggestions based on previous workouts
- If we have previous data for this exercise, we autofill the reps, sets, and weight
- User modifies these values if they want
- User clicks on the Confirm button
- Repeat steps 5-9 until the user is done
- User either
- Clicks on the Save button if they want to save the workout
- Clicks on the Cancel button if they want to discard the workout
- User is taken back to the main page