- Front-End: Typescript, React, Sass, Next.js
- Back-End: Python, Django, SQLite
- Icons: Font Awesome
- Download Node.js (Recommended Version): https://nodejs.org/en/
- Download Python 9: https://www.python.org/downloads/
Follow the below steps and let Jovi know if you have any questions:
- Clone this repository
- Open a command prompt and
cd
into the cloned directory - Run
pip install django djangorestframework
cd
into thefrontend
directory- Run
npm install
to update dependencies - Run
npm run dev
; keep this process running and move onto the next step once you see aready
message. - Open
localhost:3000
in a browser; you should see "Home" in orange text. cd
into thebackend
directory- Run
python .\manage.py makemigrations
- Run
python .\manage.py migrate
- Run
python .\manage.py runserver
; keep this process running and move onto the next step once you see theQuit the server with CTRL-BREAK.
message. - Open
localhost:8000/api/hello-world
in a browser; you should see "{"msg": "Hello World (from the backend)!"}" - To verify everything is working properly, go to
localhost:3000/hello
; if you see two Hello World messages, setup is complete.
- Running the Project:
cd
into thefrontend
directory and runnpm run dev
.cd
into thebackend
directory and runpython .\manage.py runserver
. Go tolocalhost:3000
to see your changes. - Static Front-End Development: Add components (e.g., map icon, popup, etc.) separately in the
components
directory. Follow theHelloWorld
example. Put your styling in the Sass file and put your HTML in thereturn
of yourindex.tsx
in the component folder. To see your changes, add the component to a file in thepages
directory (you can temporarily use the index.tsx file). For example, look how I added<HelloWorld />
in theindex.tsx
under thehello
directory (make sure you import HelloWorld at the top). - Using an Image: Add image files under the
public
directory. - Using an Icon: Go to https://fontawesome.com/search?o=r&m=free and look for an icon you like. In your component, import
{FontAwesomeIcon}
from@fortawesome/react-fontawesome
and{iconName}
from@fortawesome/free-solid-svg-icons
. To use the icon, add the following to your HTML:<FontAwesomeIcon icon={iconName}
. For example, look how I added<FontAwesomeIcon icon={faGlobeAmericas}
to the HelloWorld component. - Back-End Development: TODO