- 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
cdinto the cloned directory - Run
pip install django djangorestframework cdinto thefrontenddirectory- Run
npm installto update dependencies - Run
npm run dev; keep this process running and move onto the next step once you see areadymessage. - Open
localhost:3000in a browser; you should see "Home" in orange text. cdinto thebackenddirectory- 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-worldin 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:
cdinto thefrontenddirectory and runnpm run dev.cdinto thebackenddirectory and runpython .\manage.py runserver. Go tolocalhost:3000to see your changes. - Static Front-End Development: Add components (e.g., map icon, popup, etc.) separately in the
componentsdirectory. Follow theHelloWorldexample. Put your styling in the Sass file and put your HTML in thereturnof yourindex.tsxin the component folder. To see your changes, add the component to a file in thepagesdirectory (you can temporarily use the index.tsx file). For example, look how I added<HelloWorld />in theindex.tsxunder thehellodirectory (make sure you import HelloWorld at the top). - Using an Image: Add image files under the
publicdirectory. - 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-fontawesomeand{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