Coming soon!
To setup the project, first fork the OSC repo. Then clone:
sh # To clone git clone https://github.com/[INSERT YOUR GITHUB USERNAME HERE]/Studygatchi.git
Make sure you have Node.js (version 18+ or 20+) installed on your machine.
-
Install the dependencies:
cd Studygatchi/frontend npm install
Start the development server:
npm run dev
Inside your terminal, enter 'o' to open the project in your browser.
To create a production build for later importation as a Chrome extension:
npm run build
This will generate the build files in the build
directory.
- Open Chrome and navigate to
chrome://extensions/
. - Enable "Developer mode" using the toggle switch in the top right corner.
- Click "Load unpacked" and select the
build
directory.
public/
: Contains static files and themanifest.json
.src/
: Contains the React app source code.vite.config.ts
: Vite configuration file.tsconfig.json
: TypeScript configuration file.package.json
: Contains the project dependencies and scripts.
This guide expects that you have Python (At least 3.12.0) installed.
-
Create the venv
cd Studygatchi python -m venv env
To activate the venv:
- On Windows PowerShell:
./env/Scripts/Activate.ps1
- On Windows Command Prompt:
./env/Scripts/activate.bat
- On Linux:
source ./env/bin/activate
-
Run the following commands to install Django and the Django Rest Framework:
pip install django pip install djangorestframework
-
Install PostgreSQL (version 17) (THIS WILL TAKE A LONG TIME)
-
Activate the venv (if it's not already active) using the corresponding command and install psycopg2
pip install psycopg2-binary
We will use this to be able to connect Django with Postgres!
-
Access the PostgreSQL shell, logged in as the superuser:
cd <directory you installed it to>/17/bin psql -U postgres
When prompted for a password, use the password you put in the install wizard.
-
Run the following SQL commands:
CREATE USER <myprojectuser> WITH PASSWORD '<your_secure_password>'; CREATE DATABASE studygatchi_db OWNER <myprojectuser>; GRANT ALL PRIVILEGES ON DATABASE studygatchi_db TO <myprojectuser>; \q
Replace
<myprojectuser>
with whatever username you want, same for the password; -
Create a file called
settings.py
in the backend directory and copy and paste the contents ofsettings_template.txt
intosettings.py
. -
In
settings.py
, go to where it saysDATABASES
, and insert your info from step 6 into the corresponding places. -
Run the following commands with the venv active to apply migrations:
python manage.py makemigrations python manage.py migrate
-
Test the connection by running this command:
python manage.py runserver
If it all goes well, cool stuff, it's working!
This guide expects that you have Python (At least 3.12.0) installed.
If Python was installed via either Homebrew or the official Python installer, you may need to use python3
and pip3
instead for the terminal to work.
-
Create the venv
cd Studygatchi python3 -m venv env
To activate the venv:
source /env/bin/activate
-
Run the following commands to install Django and the Django Rest Framework:
pip3 install django pip3 install djangorestframework
-
Install PostgreSQL (version 17) (THIS WILL TAKE A LONG TIME)
-
Activate the venv (if it's not already active) using the corresponding command and install psycopg2
pip3 install psycopg2-binary
We will use this to be able to connect Django with Postgres!
-
Create a database for Studygatchi
createdb studygatchi_db
-
Access the PostgreSQL shell, logged in as the superuser:
cd <directory you installed it to>/env/bin psql
6a. If psql is not found, try this solution
brew install pgcli brew link --force libpq
-
Run the following SQL commands:
CREATE USER <myprojectuser> WITH PASSWORD '<your_secure_password>'; CREATE DATABASE studygatchi_db OWNER <myprojectuser>; GRANT ALL PRIVILEGES ON DATABASE studygatchi_db TO <myprojectuser>; \q
Replace
<myprojectuser>
with whatever username you want, same for the password;Use
quit
to exit the PostgreSQL shell; -
Create a file called
settings.py
in the backend directory and copy and paste the contents ofsettings_template.txt
intosettings.py
. -
In
settings.py
, go to where it saysDATABASES
, and insert your info from step 7 into the corresponding places. -
Run the following commands with the venv active to apply migrations:
python3 manage.py makemigrations python3 manage.py migrate
-
Test the connection by running this command:
python3 manage.py runserver
If it all goes well, cool stuff, it's working!