- backend
- .env: environment variables
- controllers: handles business logic and processes requests from routes
- middleware: contains functions that run before requests reach routes
- models: defines database schemas and models
- routes: defines API endpoints and routes requests to controllers
- index.js: this is the main server file for the backend
- client
- public: all pictures/videos/icons/etc stored here
- src:
- components: all components are stored here
- create a folder within to store components for a specific page along with their styles.
- pages: page components are stored here
- create a folder within to store a page along with their styles.
- routes: route components are stored here
- index.css: default styles that are applied to all components are in this file
- main.jsx: this is the root component
- Clone repository to local
# open a first terminal and clone the repository
git clone https://github.com/vas1l/CEN3031-Project.git
- Install dependencies
# open a second terminal and install client dependencies
# cd into client folder
npm install
# open a third terminal and install backend dependencies
# cd into backend folder
npm install
# return to root directory
cd ..
-
Add .env to backend
- Right click the backend folder and click new file (reference file structure above if necessary)
- Create a new file under backend named: .env
- Paste environment variables (from discord)
-
Change to dev branch
# open the first terminal and checkout to dev branch
git checkout dev
- Pull most recent changes
git pull origin dev
# or replace dev with whichever branch you are working on
- Start backend/frontend servers
# open the second terminal from before and start frontend server
npm run dev
# open the third terminal from before and start backend server
npm start