Skip to content

Latest commit

 

History

History
135 lines (92 loc) · 2.63 KB

File metadata and controls

135 lines (92 loc) · 2.63 KB

Nexus AI Deployment Guide

The public frontend is already deployable through GitHub Pages. The backend can be deployed separately, then connected to the frontend with the api query parameter.

Current Deployment Model

Frontend: GitHub Pages
Backend: Render
Database: SQLite for prototype deployment

For a production multi-user version, move from SQLite to PostgreSQL and add authentication.

Current live backend:

https://nexus-ai-api-upkl.onrender.com

Current full-stack frontend:

https://jasonbinong.github.io/Nexus-AI/?api=https://nexus-ai-api-upkl.onrender.com

Deploy Backend On Render

Nexus AI includes a Render blueprint at:

render.yaml

Steps:

  1. Go to Render.
  2. Create a new Blueprint or Web Service from the GitHub repo.
  3. Use the render.yaml configuration.
  4. Confirm these environment variables:
NEXUS_DB_PATH=/tmp/nexus.db
NEXUS_ALLOWED_ORIGINS=https://jasonbinong.github.io,http://127.0.0.1:8070,http://localhost:8070
  1. Wait for the backend to deploy.
  2. Open:
https://YOUR-RENDER-SERVICE.onrender.com/health

Expected response:

{"status":"ok","database":"/tmp/nexus.db"}

Note: Render free web services do not support persistent disks. The free deployment is suitable for demos, but data can reset when the service restarts. Use a paid persistent disk or PostgreSQL before real student users.

Connect Frontend To Backend

Open the GitHub Pages frontend with:

https://jasonbinong.github.io/Nexus-AI/?api=https://YOUR-RENDER-SERVICE.onrender.com

If the backend is reachable, Nexus AI will show:

API connected

If the backend is not reachable, the app safely falls back to local browser storage.

Deploy Backend On Railway

Railway can use the backend Procfile:

web: uvicorn main:app --host 0.0.0.0 --port $PORT

Set the service root to:

backend

Set environment variables:

NEXUS_DB_PATH=/data/nexus.db
NEXUS_ALLOWED_ORIGINS=https://jasonbinong.github.io,http://127.0.0.1:8070,http://localhost:8070

If Railway does not provide persistent disk storage on the selected plan, use PostgreSQL instead of SQLite.

Local Full-Stack Run

Backend:

cd backend
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
python seed.py
uvicorn main:app --reload

Frontend:

python -m http.server 8070

Open:

http://127.0.0.1:8070/

Production Notes

Before real student users:

  • Add authentication
  • Add user-specific workspace ownership
  • Move to PostgreSQL
  • Add rate limiting
  • Add clearer export/delete controls
  • Add production logging