Skip to content

Commit 0de3f6d

Browse files
authored
Refactor README and documentation structure
1 parent fa5ff48 commit 0de3f6d

26 files changed

+65
-18
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ Without further ado, let's get started.
2525

2626
## Table of Contents
2727

28-
1. [Story](docs/1_Story)
29-
2. [Prerequisites and development environment setup](docs/2_Prerequisites)
30-
3. [Getting started - app frontend and backend creation](docs/3_GettingStarted)
31-
4. [OctoFit Tracker database and app backend setup](docs/4_BackendSettings)
32-
5. [Populate the database with sample data](docs/5_PopulateDBwData)
28+
1. [The OctoFit Tracker app story](docs/1_Story/README.md)
29+
2. [Prerequisites and asetup of the development environment](docs/2_Prerequisites/README.md)
30+
3. [Getting started - app frontend and backend creation](docs/3_GettingStarted/README.md)
31+
4. [The OctoFit Tracker database and app backend creation](docs/4_BackendSettings/README.md)
32+
5. [Populate the database with sample data](docs/5_PopulateDBwData/README.md)
33+
6. [Using the Codespace endpoint to access the Django REST Framework](docs/6_CodespaceDjangoRESTFramework/README.md)

docs/1_Story/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Your journey to develop a fitness tracker app with GitHub Copilot now begins!
1+
# The OctoFit Tracker app story
22

33
![OctoFit Tracker](../../images/octofit-tracker.png)
44

@@ -105,4 +105,4 @@ Join us for this exciting journey into the future of software development, where
105105

106106
In this workshop, you are going to assume to be the lead developer. You will be responsible for building the application with GitHub Copilot’s help. Good luck!
107107

108-
[Next: Prerequisite and setup of the development environment](../2_Prerequisites)
108+
[Next: Prerequisite and setup of the development environment](../2_Prerequisites/README.md)

docs/2_Prerequisites/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ When the codespace is created you may get the following message for the GitHub C
3838
- If you choose this option we recommend using VSCode as your IDE, but this workshop is not limited to VSCode
3939
- URL for REACT and Django will be `http://localhost` or `http://127.0.0.1`
4040

41-
[Back :: Previous: Story](../1_Story) | [Next :: Getting started](../3_GettingStarted/)
41+
[Back :: Previous: The OctoFit Tracker app story](../1_Story/README.md) | [Next :: Getting started - app frontend and backend creation](../3_GettingStarted/README.md)

docs/3_GettingStarted/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Getting started
1+
# Getting started - app frontend and backend creation
22

33
In this section, we will start by setting up the face of our OctoFit application by building the front end page. To do that, we will keep it as simple as possible for now. We need resources like HTML and CSS to start decorating first, and we will later modify the page to extend the functionalities.
44

@@ -75,4 +75,4 @@ Important to avoid using public code and we do NOT need to initialize the git re
7575

7676
![octofit-tracker app directory tree](./3_3_OctoFitTrackerDirTree.png)</br>
7777

78-
[Back :: Previous: Prerequisites and development environment setup](../2_Prerequisites) | [Next :: OctoFit Tracker database and app backend setup](../4_BackendSettings/)
78+
[Back :: Previous: Prerequisites and development environment setup](../2_Prerequisites/README.md) | [Next :: The OctoFit Tracker database and app backend creation](../4_BackendSettings/README.md)
Loading
Binary file not shown.
Loading
Loading
Loading
Loading
Loading
-87.9 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

docs/4_BackendSettings/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# OctoFit Tracker database and app backend setup
1+
# The OctoFit Tracker database and app backend creation
22

33
## Initialize the database, setup database and install apps in settings.py, models, serializers, urls, and views
44

@@ -16,10 +16,11 @@ In our next steps lets think step by step and setup the following in this order
1616
6. make sure urls.py has a root, admin, and api endpoints
1717
```
1818

19-
![OctoFit Tracker backend files](./4_1_OctoFitTrackerBackendFiles.png)</br>
20-
![update settings](./4_2_UpdateSettings.png)</br>
21-
![project files - models and serializers](./4_3_CreateBackendProjectFiles1.png)</br>
22-
![project files - views and urls](./4_3_CreateBackendProjectFiles2.png)</br>
19+
![OctoFit Tracker backend prompt](./4_1_BackendSettingsPrompt.png)</br>
20+
![OctoFit Tracker backend response step 1](./4_2_BackendSettingsStep1.png)</br>
21+
![OctoFit Tracker backend response step 2 and 3](./4_2_BackendSettingsStep2Step3_1.png)</br>
22+
![OctoFit Tracker backend response step 3 continued](./4_2_BackendSettingsStep3_2.png)</br>
23+
![OctoFit Tracker backend response step 3 continued](./4_2_BackendSettingsStep3_3.png)</br>
2324

2425
### Sample settings.py
2526

@@ -188,4 +189,4 @@ urlpatterns = [
188189
]
189190
```
190191

191-
[Back :: Previous: Getting started](../3_GettingStarted) | [Next :: Populate database with data via manage.py](../5_PopulateDBwData)
192+
[Back :: Previous: Getting started - app frontend and backend creation](../3_GettingStarted/README.md) | [Next :: Populate the database with sample data](../5_PopulateDBwData/README.md)
Loading
Loading
Loading
Binary file not shown.
-172 KB
Binary file not shown.

docs/5_PopulateDBwData/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Populate database with data via manage.py
1+
# Populate the database with sample data
22

33
## Example of not being specific
44

@@ -27,7 +27,9 @@ Let's use manage.py to get the database setup and populated based on fields in m
2727
- Include steps to migrate in the octofit_tracker project
2828
```
2929

30-
![populate db Code app name octofit_tracker](./5_2_PopulateDbCodeOctoFitAppSecond.png)
30+
![populate the database with data prompt](./5_1_PopulateDBwDataPrompt.png)
31+
![create the populate_db.py step 1_1](./5_2_PopulateDBwDataStep1_1.png)
32+
![create the populate_db.py step 1_2](./5_2_PopulateDBwDataStep1_2.png)
3133

3234
### Sample code for populate_db.py
3335

@@ -143,3 +145,5 @@ class Command(BaseCommand):
143145
```
144146

145147
![Migrate and populate db](./5_3_MigratePopulateDb.png)
148+
149+
[Back :: Previous: Getting started - app frontend and backend creation](../4_BackendSettings/README.md) | [Next :: Using the Codespace endpoint to access the Django REST Framework](../6_CodespaceDjangoRESTFramework/README.md)
Loading
Loading
Loading
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Using the Codespace endpoint to access the Django REST Framework
2+
3+
> NOTE: Skip this step if not using codespaces
4+
5+
Type the following prompt in GitHub Copilot Chat:
6+
7+
```text
8+
Let's do the following step by step
9+
10+
- update #file:views.py to replace the return for the rest api url endpiints with the codespace url http://upgraded-space-happiness-959pr7vpgw3p7vv.github.dev/-8000.app.github.dev for django
11+
- Replace <codespace-name> with [REPLACE-THIS-WITH-YOUR-CODESPACE-NAME]
12+
- Run the Django server
13+
14+
HTTP 200 OK
15+
Allow: GET, HEAD, OPTIONS
16+
Content-Type: application/json
17+
Vary: Accept
18+
19+
{
20+
"users": "http://localhost:8000/api/users/?format=api",
21+
"teams": "http://localhost:8000/api/teams/?format=api",
22+
"activities": "http://localhost:8000/api/activities/?format=api",
23+
"leaderboards": "http://localhost:8000/api/leaderboards/?format=api",
24+
"workouts": "http://localhost:8000/api/workouts/?format=api"
25+
}
26+
27+
becomes
28+
29+
HTTP 200 OK Allow: GET, HEAD, OPTIONS Content-Type: application/json Vary: Accept
30+
31+
{
32+
"users": "http://<codespace-name>-8000.app.github.dev/users/api/users/?format=api",
33+
"teams": "http://<codespace-name>-8000.app.github.dev/api/teams/?format=api",
34+
"activities": "http://<codespace-name>-8000.app.github.dev/api/activities/?format=api",
35+
"leaderboards": "http://<codespace-name>-8000.app.github.dev/api/leaderboards/?format=api",
36+
"workouts": "http://<codespace-name>-8000.app.github.dev/api/workouts/?format=api"
37+
}
38+
```
39+
40+
[Back :: Previous: Getting started - app frontend and backend creation](../4_BackendSettings/README.md | [Next :: Using the Codespace endpoint to access the Django REST Framework](../6_CodesapceDjangoRESTFramework/)

octofit-tracker/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Django==4.1
22
djangorestframework==3.14.0
33
django-allauth==0.51.0
4+
django-cors-headers==4.5.0
45
dj-rest-auth
56
djongo==1.3.6
67
pymongo==3.12

0 commit comments

Comments
 (0)