- Create a local postgres database with your own username and password. You will connect to this for your local backend project.
- Create 32 char random secret key for your local setup. Run
openssl rand -base64 32
. Copy the value you will be using this to add as SECRET_KEY for django settings.
We are using Python/Django for backend and Next.js for frontend.
- Create a python virtual environment
python3 -m venv climateconnect_env
- Run following commands to start virtual environment
cd climateconnect_env source bin/activate
- Clone github repository
git clone <URL>
Once you clone the repository start backend server.
- Go to backend directory
cd backend
- Run
pip install -r requirements.txt
to install all backend libararies. - Create
.backend_env
to include backend environment variables. Note: Connect with other collaborators to get env variables - Run
python manage.py migrate
to run django migrations. Note: This command is used for when you first start or whenever you are adding or updating database models. - Run server using
python manage.py runserver
. - If you want to run tests suite use this command:
python manage.py test
. If you want to run a specific test file or test class run this command:python manage.py test <file_path> or <file_path + class_name>
cd frontend
- Run
yarn install
to download all npm packages - Add
.env
file for frontend environment variables. - Run
yarn dev
to start developing
- Run
yarn build
to build our the website - ??? Rest of deploy procedure is work in progress. Backend deploy coming soon!