Career equity desk for first--gen students — onboarding, profile, résumé draft, professor matching, and a side chat. Built for hackathons; FastAPI + Next.js 14.
From the repository root (Los-Altos-Hacks/).
-
Install Python deps (once):
cd backend python3 -m venv .venv .venv/bin/pip install -r requirements.txt cd ..
-
Install Node deps (once):
npm install --prefix frontend npm install
-
Start everything:
npm run dev
This runs FastAPI on http://127.0.0.1:8000 and Next.js on http://localhost:3000. Open the app at http://localhost:3000 (the UI proxies /api/* to the API).
WATCHPACK_POLLING=true is set automatically for the web process on macOS-style watcher limits.
If you prefer separate shells:
API
cd backend
.venv/bin/uvicorn main:app --reload --host 127.0.0.1 --port 8000Web
cd frontend
npm install
WATCHPACK_POLLING=true npm run devProfile data is stored in backend/data/profile.json when MongoDB is not configured (see .env.example).
The frontend folder sits next to backend, not inside it. From backend/ use cd ../frontend, or open a new shell at the repo root and cd frontend.
- Landing (
/) — hero and entry points. - Login (
/login) — demo login (name + email; password ignored). - Survey (
/survey) — step-by-step profile; saves to the API and marks onboarding complete in the browser. - Desk (
/dashboard,/resume,/research/professors) — main app shell + chat. Sign out clears session and sends you home.
Session flags live in localStorage (scholaris_auth, scholaris_onboarding_v1; older launchpad_* keys are migrated automatically). See frontend/lib/session.ts.
School snippet: the dashboard calls GET /api/university/summary?school=…, which fetches a short Wikipedia extract when an article title matches the school name you entered (best-effort; try the official full name if nothing shows up).
In development, the browser calls same-origin paths like /api/profile. app/api/[[...path]]/route.ts proxies those requests to FastAPI (default http://127.0.0.1:8000), which avoids Safari and other “Load failed” issues when talking straight to 127.0.0.1:8000 from the page.
- For local dev, you usually do not need
NEXT_PUBLIC_API_URLinfrontend/.env.local. - If FastAPI is not on port 8000, set
INTERNAL_API_URLwhen starting Next (see.env.example). - After changing env files, restart
npm run dev.
For production with a different API host than the default Render URL, set INTERNAL_API_URL (see .env.example).
Yes — you have to deploy the app somewhere that runs Next.js first. Changing only this repo does not change what your domain shows: scholarisapp.tech is wired for GitHub Pages (this repo has a root CNAME file with that hostname). GitHub Pages never runs next build or a Node server; it only serves static files from the branch. With no real site build there, you often just see the README (or a blank page).
-
Create a deployment
Sign in at vercel.com → Add New… → Project → import this GitHub repo.
Important: under Settings → General → Root Directory, setfrontend(recommended). That makes Vercel usefrontend/package.json, wherenextis declared, and avoids monorepo path bugs.
If you leave Root Directory empty instead, the repo rootpackage.jsonalso listsnextandpostinstallinstallsfrontend/deps beforenpm run buildruns. -
Point Vercel at your live FastAPI
The repo’srender.yamluses the web service namescholaris-api, so the Next/apiproxy defaults tohttps://scholaris-api.onrender.comon Vercel/Netlify when you have not set any API env vars. If your Render URL is different, setINTERNAL_API_URLin Vercel → Settings → Environment Variables (no trailing slash, no/apisuffix) — it overrides the default. Redeploy after changing env.Optional:
NEXT_PUBLIC_API_URLsame asINTERNAL_API_URLonly if you want the browser to call the API host directly (otherwise same-origin/apiis enough). -
Confirm the preview URL
Open the*.vercel.appURL Vercel gives you and make sure the Scholaris UI loads. Open/api/healthon the same deployment (e.g.https://yoursite.vercel.app/api/health) — you should see JSON from FastAPI (often{"status":"ok",...}), not a 503. -
Attach your domain in Vercel
Project → Settings → Domains → addscholarisapp.tech(andwwwif you want). Vercel will show the exact DNS records (usually A records for the apex, or a CNAME forwww). -
Move DNS at your registrar (where you bought
.tech)
Remove records that point the apex orwwwat GitHub (185.199.108.xstyle IPs orusername.github.io). Add only what Vercel shows. DNS can take a few minutes to 48 hours. -
Turn off GitHub Pages for this domain (avoids conflicts)
GitHub repo → Settings → Pages → clear Custom domain / set source to None, save.
You can delete the repo-rootCNAMEfile after that if you are fully on Vercel (it only exists for Pages).
| Platform | What to do |
|---|---|
| Vercel | Root Directory = frontend (best). Do not set a custom Install Command that uses --prefix frontend while Root Directory is already frontend (paths double up and Next detection fails). If Root Directory is empty, root package.json declares next and postinstall runs npm install --prefix frontend. |
| Netlify | Root netlify.toml sets base = "frontend". |
| GitHub Pages | Not suitable for this Next.js app as-is (no server, no default static export). Use Vercel/Netlify/Cloudflare Pages with the Node/Next runtime instead. |
Set INTERNAL_API_URL on the host if your API is not the default https://scholaris-api.onrender.com. Deploy the backend separately — see backend/DEPLOY_API.md (Render walkthrough; render.yaml at repo root).
Copy .env.example and follow the comments:
frontend/.env.local— optional frontend overrides.backend/.env—GOOGLE_GEMINI_API_KEYfor real LLM replies (otherwise the app uses rule-based fallbacks).
| Path | Role |
|---|---|
frontend/ |
Next.js 14 App Router, Tailwind, Framer Motion |
backend/ |
FastAPI, profile store, chat, resume stub, research routes |
SCHOLARIS.md |
Product spec, MVP scope, and judging narrative |
.env.example |
Shared reference for env var names and meanings |
| Command | Purpose |
|---|---|
npm run dev |
Runs FastAPI (port 8000) and Next.js (port 3000) together |
npm run dev:api |
API only (same as node scripts/start-backend.mjs) |
npm run dev:web |
Next only (WATCHPACK_POLLING=true, --prefix frontend) |
| Command | Purpose |
|---|---|
npm run dev |
Development server (default http://localhost:3000) |
npm run build |
Production build |
npm run start |
Serve production build |
npm run lint |
ESLint |
| Issue | What to try |
|---|---|
| Survey or desk says it cannot reach the API | Ensure uvicorn is running on 8000, then restart npm run dev. If the API is on another port/host, set INTERNAL_API_URL. |
cd: no such file or directory: frontend |
You are inside backend/; use cd ../frontend or start from repo root. |
npm run build missing in backend |
build is a frontend script; run it from frontend/. |
404 or odd routing on / |
Restart dev with WATCHPACK_POLLING=true if file watching breaks page discovery. |
| Vercel: “No Next.js version detected” | Set Root Directory to frontend, then Settings → General → Build & Development Settings → clear any custom Install / Build overrides (use defaults), redeploy. If Root Directory stays empty, ensure you pushed the latest main (root package.json must list next). |
Vercel: DNS_HOSTNAME_RESOLVED_PRIVATE / HTML 404 on /api |
Older builds used edge rewrites to 127.0.0.1 (invalid on Vercel). Current code uses a Route Handler proxy with a default upstream to https://scholaris-api.onrender.com. Override with INTERNAL_API_URL if your API host differs. |
| Vercel: “Authentication Required” / HTML instead of JSON on the desk | Deployment Protection was blocking server requests to your own *.vercel.app/api. Current code calls FastAPI directly from SSR (same default as the proxy). Redeploy. GOOGLE_GEMINI_API_KEY on Vercel does not replace the API URL — put Gemini on Render (backend/.env); use INTERNAL_API_URL on Vercel only if your API is not https://scholaris-api.onrender.com. |
Full product vision, stack targets, and stretch modules are in SCHOLARIS.md. Optional services (MongoDB Atlas, OAuth) are outlined there and in .env.example.