-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from githubuniverseworkshops/arilivigni/self-se…
…rvice-prompting Arilivigni/self service prompting
- Loading branch information
Showing
17 changed files
with
99 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,47 @@ | ||
# Getting started - Front end setup with HTML and CSS | ||
# Getting started | ||
|
||
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. | ||
|
||
## Goals/Outcome | ||
> TIP: One challenging thing about GitHub Copilot is that it is very generative. Thus, it is hard to make a consistent, repeatable tutorial unless you try to keep it simple and very progressive. | ||
- Understand the basic strategies around designing the OctoFit app by asking GitHub Copilot Chat | ||
- Start getting the feel for OctoFit app by generating HTML and CSS resources | ||
- See a front-end page with a greeting message | ||
## Explain to GitHub Copilot the goals and steps | ||
|
||
![OctoFit App with front end](../../images/0_FinalResult.jpg) | ||
It is important to lay out a plan and provide details | ||
|
||
Let’s start with the basic front end development with the help of GitHub Copilot. Although we can start using the built-in in-file Copilot suggestion, we will initiate this by using GitHub Copilot Chat. | ||
```text | ||
I want to build an OctoFit Tracker app that will include the following: | ||
After you open the GitHub Copilot Chat panel, please type the following prompt. | ||
* User authentication and profiles | ||
* Activity logging and tracking | ||
* Team creation and management | ||
* Competitive leader boards | ||
* Personalized workout suggestions in one app | ||
`I have this great idea called the OctoFit app. Can you show me the outline for how to get started? Please ignore technology stacks for now.` | ||
I want to use React.js for the frontend. I want to use Python with Django REST Framework for the backend and Mongo DB as the database to store data. | ||
![Ask Copilot for Outline](../../images/1_AskCopilot4Outline.jpg) | ||
Create the frontend and backend in the octofit-tracker directory of this repository | ||
The reason why I asked to ignore technology stack is because I want to keep it super simple. If we did not add that, what you will likely see is that some users will get code examples, while some others don’t, etc. | ||
the octofit-tracker/backend directory will store the django app with no subdirectories | ||
> TIP: One challenging thing about GitHub Copilot is that it is very generative. Thus, it is hard to make a consistent, repeatable tutorial unless you try to keep it simple and very progressive. | ||
Once you get the result, try to read to see how you can approach creating our fitness application. Your result still might look different from mine, and that is perfectly okay! | ||
the octofit-tracker/frontend directory will store the react app with no subdirectories | ||
Use a Python virtual environment and install all python dependencies from file octofit-tracker/requirements.txt in this workspace | ||
Once you get the result, try to read to see how you can approach creating our fitness application. Your result still might look different from mine, and that is perfectly okay! | ||
The octofit-tracker/requirements.txt already contains all Django requirements. Django, djongo, sqlparse | ||
Now, let’s move onto the next prompt through GitHub Copilot Chat. This time, we want to generate some assets to create our web pages. HTML, which stands for Hyper Text Markup Language, is the language of the web, though it is not exactly a programming language, and CSS, which stands for Cascading Style Sheet, is the web language for the design. Thus, we will ask to generate these two. Let’s proceed with the following prompts. | ||
Layout the directory structure with no redundant backend and frontend subdirectories | ||
`Now, how can I add HTML and CSS on these?` | ||
Use bootstrap for the frontend | ||
![Ask Copilot for HTML and CSS - Page 1](../../images/2_1_AskGenerateHTMLCSS.jpg) | ||
Let's think about this step by step | ||
![Ask Copilot for HTML and CSS - Page 2](../../images/2_2_AskGenerateHTMLCSS.jpg) | ||
Important to avoid using public code and we do NOT need to initialize the git repository | ||
``` | ||
|
||
As you can see, this prompt will generate some examples of HTML and CSS lines that you can use. Again, your result might look different from mine, and that is perfectly okay! | ||
![project plan](./3_1_AskCopilotProjectCreation.png) | ||
|
||
![directory structure](./3_2_CopilotDirectoryStructure.png) | ||
|
||
![octofit-tracker app setup](./3_3_OctFit-Tracker-Setup.png) | ||
|
||
[Back :: Previous: Prerequisites and development environment setup](../2_Prerequisites) | [Next :: MongoDB install and setup - ](../4_MongoDBInstallSetup) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# MongoDB install and setup | ||
|
||
## Use Copilot Chat and paste the following | ||
|
||
```text | ||
Provide steps to install mongodb, start it, and enable it at startup using sudo service commands and init.d | ||
example: | ||
sudo ln -s /etc/init.d/mongodb /etc/rc0.d/K01mongodb | ||
No need to create a list file for MongoDB | ||
No need to import the GPG-KEY | ||
``` | ||
|
||
![mongodb install setup](./4_1_mongodbSetup.png) | ||
|
||
[Back :: Previous: Getting started](../3_GettingStarted) | [Next :: TBD](../5_PythonVenv) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Django==4.1 | ||
djangorestframework==3.14.0 | ||
django-allauth==0.51.0 | ||
dj-rest-auth | ||
djongo==1.3.6 | ||
pymongo==3.12 | ||
sqlparse==0.2.4 | ||
stack-data==0.6.3 | ||
sympy==1.12 | ||
tenacity==9.0.0 | ||
terminado==0.18.1 | ||
threadpoolctl==3.5.0 | ||
tinycss2==1.3.0 | ||
tornado==6.4.1 | ||
traitlets==5.14.3 | ||
types-python-dateutil==2.9.0.20240906 | ||
typing_extensions==4.9.0 | ||
tzdata==2024.2 | ||
uri-template==1.3.0 | ||
urllib3==2.2.3 | ||
wcwidth==0.2.13 | ||
webcolors==24.8.0 | ||
webencodings==0.5.1 | ||
websocket-client==1.8.0 |