Skip to content

Commit 5eaf052

Browse files
Added local build instructions
1 parent 2e0cdbb commit 5eaf052

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,70 @@ Another closed-source mobile application, titled [Finch](https://finchcare.com/)
6464

6565
Research will need to be conducted on the various software resources needed to complete this project, including JavaScript, React, HTML/CSS, Django, SQLite, and Canvas API. React will be used for the front-end, Django for the back-end, and a combination of a SQLite Database with a schema defined and managed by Django and a Static File store. A required resource is an Ubuntu server which will either be run on an old laptop or a hosting service will be used. No other hardware resources are required.
6666

67+
## Local Build Instructions
68+
69+
### Prerequisites
70+
71+
* Python 3.8 or higher
72+
73+
* pip3 22 or higher
74+
75+
* npm 8 or higher
76+
77+
> A secret key and a gmail password will be required in backend `.env` file for the project to run correctly. If you are an approved developer on this project, reach out to your team lead to receive the requisite credentials. Modification of the backend code source code will be required in order to send email verifications on user registration. Our team is happy to assist in guiding you through this process.
78+
79+
### Set Up
80+
81+
1. <a href=https://github.com/Capstone-Projects-2023-Spring/project-virtual-pet/releases>Download</a> the zip file in the release and open. Open a terminal, then navigate to the project directory.
82+
83+
2. Insert your development keys to `~/sb/backend/.env`
84+
```
85+
SECRET_KEY=<YOUR-KEY>
86+
GMAIL_PASSWORD=<YOUR-PASSWORD>
87+
```
88+
3. Navigate to the backend:
89+
90+
```bash
91+
cd <your-path>/sb/backend
92+
```
93+
94+
4. Activate a Python virtual environment and install dependencies:
95+
> (MacOS/Unix)
96+
97+
```bash
98+
source tutorial-env/bin/activate
99+
pip3 install -r requirements.txt
100+
```
101+
> Windows
102+
103+
```bash
104+
tutorial-env\Scripts\activate.bat
105+
pip3 install -r requirements.txt
106+
```
107+
108+
5. Activate the backend with the following instructions:
109+
110+
```bash
111+
python3 manage.py makemigrations
112+
python3 manage.py migrate
113+
python3 manage.py runserver
114+
```
115+
116+
6. Now, open a new terminal and from the project directory, navigate to the frontend:
117+
118+
```bash
119+
cd <your-path>/sb/frontend
120+
```
121+
7. Build the frontend as follows. Dependencies will be downloaded and compiled for you:
122+
123+
```bash
124+
npm install
125+
npm run build
126+
nmp start
127+
```
128+
8. In your browser, navigate in the search bar to <a href="http://localhost:3000">http://localhost:3000</a>.
129+
130+
67131
## Collaborators
68132

69133
[//]: # ( readme: collaborators -start )

0 commit comments

Comments
 (0)