████████╗ ██████╗ ██████╗ ██████╗ ███████╗██╗ ██╗███████╗ ╚══██╔══╝██╔═══██╗██╔══██╗ ██╔══██╗██╔════╝██║ ██║██╔════╝ ██║ ██║ ██║██████╔╝ ██║ ██║█████╗ ██║ ██║███████╗ ██║ ██║ ██║██╔═══╝ ██║ ██║██╔══╝ ╚██╗ ██╔╝╚════██║ ██║ ╚██████╔╝██║ ██████╔╝███████╗ ╚████╔╝ ███████║ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═══╝ ╚══════╝
A campus productivity platform — roommate matching, notes storage, resume builder, PDF chat, and support tickets.
npm installCreate a .env.local file in the root with the following:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
OPENAI_API_KEY=your_openai_api_key
# Optional model defaults for PDF Studio (chat/slides/voice/video)
CHAT_TRANSFORMATION_MODEL=openai/gpt-4o-mini
CHAT_TTS_MODEL=tts-1
CHAT_TTS_VOICE=alloynpm run devOpen http://localhost:3000 in your browser.
npm run build
npm startRun the SQL scripts in order in your Supabase SQL Editor:
scripts/setup-db.sql— creates all tablesscripts/rls.sql— sets up Row Level Security policies
Resume PDF endpoints:
POST /api/resume/preview(live preview PDF)POST /api/resume/compile(download PDF)
Both compile LaTeX on the server.
classicandmoderngenerally usepdflatex.compactmay requirexelatex(auto-detected from template content).- Binary override env vars:
LATEX_BIN_PDFLATEXLATEX_BIN_XELATEX- fallback:
LATEX_BIN
Add to .env.local / Vercel / Render as needed:
# Optional local override (fallback for both engines)
LATEX_BIN=/Library/TeX/texbin/pdflatex
# Optional explicit binaries
LATEX_BIN_PDFLATEX=/Library/TeX/texbin/pdflatex
LATEX_BIN_XELATEX=/Library/TeX/texbin/xelatex
# If set, resume compile/preview routes offload compilation to Render
# Example: https://campus-flow-render.onrender.com
LATEX_RENDER_URL=
# Optional full override for remote compile endpoint
# Defaults to {LATEX_RENDER_URL}/api/latex/compile
LATEX_RENDER_COMPILE_URL=
# Shared secret between app and compile endpoint
LATEX_RENDER_SECRET=- Install TeX distribution (MacTeX/TeX Live).
- Ensure both are available:
pdflatexxelatex(important for many compact templates)
- Run app:
npm run dev
- Test both preview and download from Resume page.
Use hybrid mode:
- Vercel: UI + auth + API routes
- Render: LaTeX compile runtime (
/api/latex/compile)
Steps:
- Deploy same app on Render with TeX installed.
- Keep
/api/latex/compilereachable on Render. - Set
LATEX_RENDER_SECRETon both Vercel and Render. - Set
LATEX_RENDER_URLon Vercel to Render base URL. - Do not set
LATEX_RENDER_URLon Render (prevents proxy loops).
-
LaTeX compiler not found...- Install TeX binaries or set
LATEX_BIN_*.
- Install TeX binaries or set
-
LaTeX dependency missing: <file>.sty/.cls- Template package/class missing in runtime. Install TeX packages or use Render offload.
-
Failed to compile LaTeX- Usually template syntax/package/font issue. Check API error
detailfield.
- Usually template syntax/package/font issue. Check API error
/dashboard/chat now has:
Chattab: ask questions from selected PDFCreatetab: generate from selected PDF:Slides(markdown slide deck)Voice(podcast script + mp3)Video Plan(scene-by-scene storyboard markdown)
- PDF must be uploaded and indexed into
embeddingsfor the selectedpdf_id. OPENAI_API_KEYmust be set for voice generation (TTS).- Optional model envs:
CHAT_TRANSFORMATION_MODEL(default:openai/gpt-4o-mini)CHAT_TTS_MODEL(default:tts-1)CHAT_TTS_VOICE(default:alloy)
POST /api/chat-> PDF Q&APOST /api/chat/generate->{ type: "slides" | "voice" | "video", pdfId, prompt }
In /dashboard/chat -> Create, you can set a model in provider/model format, e.g.:
openai/gpt-4o-minianthropic/claude-3-5-sonnet-latestgoogle/gemini-2.0-flashgroq/llama-3.1-70b-versatileollama/qwen2.5
Voice output currently uses OpenAI TTS for mp3 synthesis after script generation.
Open Notebook can run inside Campus Flow at /dashboard/notebook using rewrite proxies.
Open Notebook UI should be reachable at:
http://localhost:8502
Open Notebook API should be reachable at:
http://localhost:5055
OPEN_NOTEBOOK_URL=http://localhost:8502
OPEN_NOTEBOOK_API_URL=http://localhost:5055These values are used by:
- health endpoint:
GET /api/open-notebook/health - Next.js rewrites:
/open-notebook/:path*-> Open Notebook UI/open-notebook-api/:path*-> Open Notebook API
Do not copy, reuse, or redistribute any part of this codebase without explicit written permission from the authors.
© 2026 Campus Flow. All rights reserved.