ForumAI is an online platform which enables AI assistance in structured academic forums, facillutating discussions between students and faculty.
- 24/7 AI assistance to help answer questions about course material, assigments and general logistics
- Discussions boards and Q&A forums for interaction between students, instructors and teaching assistants
- Anonoymous posting and messaging for safe and inclusive discussions
Clone the project
git clone https://github.com/ubclaunchpad/forum.git
- Download and install the latest version of Node.js from nodejs.org
cd forum/frontend
yarn install # or npm install
Create a .env
file with:
NEXT_PUBLIC_SUPABASE_URL=YOUR_PUBLIC_SUPABASE_URL
NEXT_PUBLIC_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEY
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
DATABASE_URL=YOUR_DATABASE_URL
NEXT_PUBLIC_API_BASE_URL=YOUR_API_BASE_URL
Check here for details on how to find your environment variables
yarn dev # or npm run dev
- Download and install Python from python.org
- Ensure Python is added to your system's PATH
- Copy based on your OS: https://docs.astral.sh/uv/getting-started/installation/
- e.g. macOS:
curl -LsSf https://astral.sh/uv/install.sh | sh
- e.g. macOS:
cd forum/backend
uv sync
Create a .env
file with:
OPENAI_API_KEY=your_key_here
DATABASE_URL=your_database_url
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key
AUTH_MIDDLEWARE_ENABLED=true # or false
DEV_USER_EMAIL=your_email_here
DEV_USER_PASSWORD=your_password_here
DEV_LOGIN=true # or false
ENV=development # or production
- Go on Supabase and create a new project
- Go to the project settings:
- In the API section, you will find the
SUPABASE_URL
andSUPABASE_KEY
- In the Database section, you will find the
DATABASE_URL
(you want a connection string)
- In the API section, you will find the
- For most cases you will need to have the
AUTH_MIDDLEWARE_ENABLED
set totrue
and theDEV_USER_EMAIL
andDEV_USER_PASSWORD
set to your email and password- On your Supabase project, go to the
Auth
section and create a new user (you can manually set the email and password); then use these credentials in the.env
file
- On your Supabase project, go to the
- Go on OpenAI and create a new project (or use an existing one)
- You do not need this unless you use the OpenAI API
- Run the following command to create the database tables:
uv run --env-file .env alembic upgrade head
- With the virtual environment activated, run the following command:
uv run --env-file .env -m main
For more details on managing migrations and dependencies, go to /backend/README.md
Contributions are always welcome!
See CONTRIBUTING.md
for ways to get started.