Reading the repo
Opening the box…
Reading the repo
Opening the box…
How to install on Linux
Saved setup from 22 h ago
Will it work on Linux?
Heads-upBuilding it yourself? It also needs 40 settings in .env (5 secret).
docs/development.mdPrerequisites: Node 22.x, Python 3.12+, and a Firebase project only when testing authenticated behavior.
After installing the existing npm/Python dependencies, run npm run dev from the repository
root. The launcher uses .venv when present, enables only the explicit local sandbox,
starts Academic (8001), Scheduling (8002), Gateway (8000), and Vite (5173), then verifies
service health and sandbox API reachability before reporting Ready. Existing compatible
services are reused; incompatible ports produce an actionable error. Ctrl+C stops only
processes started by this launcher. There is no automatic import, database reset,
authentication bypass or publication.
The canonical browser origin is http://127.0.0.1:5173/. Use this exact host and
port for the presentation. Vite binds IPv4 loopback and uses strictPort; an occupied
5173 is an error, never an automatic move to 5174. localhost, another port and
127.0.0.1 have independent browser session storage. Do not expect a selected role
or sample to transfer between them. The launcher prints its Gateway and database
paths so alternate instances can be identified.
For occupied ports: npm run dev -- --base-port 8830 --web-port 5190.
ACADEMIC_DATABASE_PATH and SCHEDULING_DATABASE_PATH remain configurable; defaults
continue to use the existing var/ databases. Set alternate paths explicitly for QA;
never replace working records with samples. Academic migration v3 adds calendar metadata;
scheduling draft schema v2 and immutable publication tables retain existing records.
Use alternate ports deliberately, not to work around an unidentified old service.
If a second frontend is needed against the same default backend, run
npm run dev --workspace=@classync/web -- --host 127.0.0.1 --port 5174 --strictPort.
Its Gateway defaults to 8000; set CLASSSYNC_GATEWAY_URL explicitly for another
Gateway. Leave VITE_API_BASE_URL unset for the same-origin /api/v1 proxy.
The 5190 QA workspace previously used separate databases; its data is not the
canonical workspace's data.
Open Administrator → Academic Setup → Sample Academic Scenario → Review sample setup → Import sample period. Review readiness, generate and Save Draft. The default scenario is BSIT 3A, two synthetic offerings/teachers and four synthetic classroom candidates. The nine-program catalog remains separate from the November 2026 53-space row-classified room inventory. Provisional inventory rooms are not made solver eligible until operational condition and room type are verified. Imports are idempotent and do not overwrite edits. A sample with edited/incomplete requirements must be repaired or configured separately, not silently replaced.
In Student/Teacher preview, choose Open a sample timetable when no matching publication exists. Only server-approved synthetic drafts appear. Unpublished review is clearly labelled and remembered within that origin's P0 session. Entered or institutional drafts are never silently selected as anonymous review. No saved sample means setup is required; no published timetable does not imply a free day.
The browser must use the Vite URL printed by this command so its proxy reaches the
matching Gateway. npm run dev:web alone starts only the frontend and does not verify
the backend. If a service fails, retry after restarting the launcher; do not interpret
the unavailable timetable as a free day. Real publishing still requires verified
Administrator credentials even in the local synthetic dataset.
.env.example to .env, and apps/web/.env.example to apps/web/.env. Leave Firebase values empty to run the neutral web shell and service health checks. The gateway reads the root .env regardless of its working directory.npm run dev from the root.Ports: gateway 8000, academic 8001, scheduling 8002, notification 8003. Check GET /health on each process. The gateway can proxy a health check at /api/v1/services/{academic|scheduling|notification}/health.
Quality commands: npm run build, npm run lint, npm run typecheck, npm run test:web, pytest, and ruff check services packages after installing ruff in the development environment.
See the runnable S1 instructions for the Gateway → Scheduling → OR-Tools workflow. Both services must have CLASSSYNC_ENV=development and ENABLE_SCHEDULING_SANDBOX=true; the sandbox remains disabled by default. The Vite client uses the same-origin /api/v1 proxy to Gateway port 8000. Run pip install -r requirements.txt from each service directory because the editable shared-contract dependency is relative to that directory.
After changing Python scheduling models, regenerate the checked-in browser contracts with .\.venv\Scripts\python.exe scripts/export_scheduling_contracts.py from the root. Run the root Python suite with .\.venv\Scripts\python.exe -m pytest; importlib collection keeps identically named service health tests independent.
S2A uses SCHEDULING_DATABASE_PATH (default var/scheduling.sqlite3, rooted at the
repository). Migrations run on database access. Keep the database on durable local
storage and outside Git. Draft persistence details cover
schema checks, API scopes, idempotency and restart verification.
Start Academic on port 8001 as well as Gateway (8000) and Scheduling (8002).
All three require both explicit sandbox flags for the local entry workflow.
Academic owns ACADEMIC_DATABASE_PATH (default var/academic.sqlite3). Both service
databases migrate transactionally to schema version 2; existing draft snapshots
remain unchanged. Back up databases before deployments or manual maintenance.
Open Administrator → Schedule Manager → Manage Academic Data. Create a period, enter source records, then check readiness before generating. The original S1 synthetic example remains a separate development-only source. See S2B details for endpoints, source classifications, startup commands and limitations. Do not copy local QA records into institutional data or infer room suitability from the provisional catalog.
The connected local workspace above remains the canonical development workflow.
For a reviewed public presentation artifact, explicitly build with both
VITE_ENABLE_ROLE_PREVIEW=true and VITE_ENABLE_PRESENTATION_SAMPLE=true.
Defaults remain false. The role chooser discloses the read-only sample before entry.
It loads the versioned synthetic classsync-presentation-v1 dataset, with no API,
generation, save, publication or live synchronization. Dates cover October–December
2026; outside that range an empty agenda is accurate. Local users can deliberately
select this source in context settings; service errors never select it automatically.
Ordinary production builds do not enable three-role preview. Production deployment
requires owner approval. The staged root vercel.json assumes repository-root Root
Directory and apps/web/dist; frontend route rewrites exclude /api. Actual Vercel
settings must be checked before use. See deployment decision
and Firebase readiness. Firebase initialization
does not supply a timetable API or grant backend Administrator authorization.
For the R1 public release, use npm run build:presentation followed by
npm run preview:presentation (strict port 5188). This produces and checks the
explicit read-only artifact. See R1 release settings and approval procedure.
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
git clone https://github.com/Kakashimoto14/ClassSync.git cd ClassSync
Node.js 22.x
# needs nvm: https://github.com/nvm-sh/nvm nvm install 22
Fill in secrets: GOOGLE_APPLICATION_CREDENTIALS, VITE_FIREBASE_API_KEY, FIREBASE_WEB_API_KEY, GEMINI_API_KEY, FIREBASE_PRIVATE_KEY
cp .env.academic.example .env
npm ci
npm run dev
No reports for Linux yet.
GitManual AI Agent reads the 13 key files and writes a step-by-step guide for Linux. Once written, it's saved for everyone.