Secure chat application for organizations
Before starting, ensure you have the following tools and technologies installed:
- Node.js
- Android Studio (for Android development support)
- Python 3.x
- Expo (for React Native development)
- Django (for backend development)
- PostgreSQL (database system)
- Redis (for caching and message brokering)
- Ngrok (for exposing local servers to the internet)
- PostgreSQL: https://www.postgresql.org/download/
- Ngrok: https://ngrok.com/download
- Redis:
- General download: https://redis.io/download
- For Windows, download Redis-x64-5.0.14.1.zip from https://github.com/tporadowski/redis/releases, unzip, and run
redis-server.exe.
- OpenAI Setup: Follow the Quickstart guide at https://platform.openai.com/docs/quickstart to set up your API key and environment.
- Frontend
cd frontend && npm install- Backend on Mac
python -m venv env
source env/bin/activate
cd backend
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate- Backend on Windows
python3 -m venv env
.\env\bin\activate
cd backend
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrateFor the backend setup, we need to initalize a Python virtual environment, activate it, and install your dependencies
Follow these steps to set up your project environment:
-
For Unix/Linux/macOS:
python3 -m venv env source env/bin/activate -
For Windows:
python -m venv env .\env\Scripts\activate
Install the required project dependencies by running:
pip install -r requirements.txtEnsure your local PostgreSQL instance is running, then execute the SQL schema generation commands specific to your project.
Note for Windows Users Regarding Database Configuration:
In the settings.py file, modify the DATABASES configuration to match your local PostgreSQL setup:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "postgres",
"USER": "postgres",
"PASSWORD": "your_password_here",
"HOST": "localhost",
"PORT": "5432",
}
}Replace "your_password_here" with your actual PostgreSQL user password.
Example run of making sure your virtual environment is running:
richardli@Richards-MacBook-Pro cypherchat % source env/bin/activate
(env) richardli@Richards-MacBook-Pro cypherchat % The brackets of your virtual environment name should be beside your terminal name
View our Makefile for more commands to run based on your environment
- Initialize a redis-server
make redis- Initialize Backend
make server- On another terminal window, setup ngrok
make ngrok- Setup frontend environment variables
- Setup environment variables
cd frontend
touch .envThe .env should contain:
EXPO_PUBLIC_API_URL='ngrok-url'
EXPO_PUBLIC_OPENAI_API_KEY='openai-apiKey'
Example: when you run make ngrok this is the output:
Full request capture now available in your browser: https://ngrok.com/r/ti
Session Status online
Account richardliy03@gmail.com (Plan: Free)
Version 3.8.0
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding https://c7f4-2001-1970-51a4-e00-7172-66bc-bd8c-98af.ngrok-free.app -> http://127.0.0.1:8000/
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00
To get the ngrok-url copy the forwarding link and get rid of the https://
EXPO_PUBLIC_API_URL='c7f4-2001-1970-51a4-e00-7172-66bc-bd8c-98af.ngrok-free.app'
EXPO_PUBLIC_OPENAI_API_KEY='...'
- Run frontend on another terminal window
make appContributors names and contact info
Michael Timmer Richard Li Kavith Ranchagoda Christian Petricca Reza Jodeiri