Synaplan
Open-source AI platform for companies: self-hosted AI agents, GDPR-compliant chatbot widget, RAG knowledge base, WhatsApp and Outlook AI, MCP, multi-model routing. Docker, Kubernetes or hosted in Germ
FastFix CMU ระบบแจ้งซ่อมอาคารและอุปกรณ์ มหาวิทยาลัยเชียงใหม่
Translation pending
BusinessTypeScript · PLpgSQLGitHub @NexzerfOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
โปรเจค 954244
Translation pending
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
FastFix CMU — Smart CMU Maintenance Request System
Interactive prototype for 954244 System Analysis and Design for Modern Management (Chiang Mai University).
Reporters submit and track maintenance requests, technicians work assigned jobs, and admins manage requests and see analytics.Read the full README ↗Interactive prototype for 954244 System Analysis and Design for Modern Management (Chiang Mai University). Reporters submit and track maintenance requests, technicians work assigned jobs, and admins manage requests and see analytics.
See DEMO.md for test accounts and the demo script, and REQUIREMENTS-TRACE.md for where each requirement lives in the code.
Next.js 15 (App Router, Server Actions, TypeScript) · Tailwind CSS v4 · Framer Motion · Postgres (Supabase) via postgres · Supabase Storage + Realtime Broadcast · lucide-react · Recharts · browser-image-compression · zod · jose (httpOnly JWT cookie) · bcryptjs · exceljs · pdfkit
Requires Node.js 20+.
npm install
cp .env.example .env.local # then set SESSION_SECRET to a long random string
npm run db:local # terminal 1: local Postgres (PGlite) on 127.0.0.1:5433, data in ./.pglite
npm run db:migrate # terminal 2
npm run db:seed
npm run dev # http://localhost:3000
Without Supabase settings, photos are saved to public/uploads/ and screens refresh by polling /api/pulse every 4 seconds.
Keep DATABASE_POOL_MAX=1 when using the local PGlite server.
npm run db:reset drops all tables, re-applies migrations, and re-seeds (use it to restore the demo state).
db/supabase-setup.sql, and press Run.
It creates the tables in the "SmartCMU" schema, enables RLS, creates the public request-images bucket, and loads the demo data (timestamps are relative to when you run it).
Re-running it resets the data. To regenerate the file after changing migrations or the seed: npm run db:reset && npm run db:export-sql (SETUP_SCHEMA=<name> for another schema name).
Then run db/supabase-app-role.sql (replace CHANGE_ME with a random letters-and-digits password). It creates the smartcmu_app login role with search_path = "SmartCMU", grants it access to that schema only, and adds RLS policies for it. The shared postgres role is left untouched, so other work in public is unaffected.
App DATABASE_URL: postgresql://smartcmu_app.<project-ref>:<password>@<pooler-host>:6543/postgres (the pooler ignores search_path in the URL, which is why it lives on the role).anon key, and service_role key.| Variable | Value |
|---|---|
DATABASE_URL | Transaction pooler URL for the smartcmu_app role |
DATABASE_POOL_MAX | leave empty (defaults to 5) |
SESSION_SECRET | 32+ random characters (openssl rand -hex 32) |
NEXT_PUBLIC_SUPABASE_URL | https://<project>.supabase.co |
NEXT_PUBLIC_SUPABASE_ANON_KEY | anon key (used only to subscribe to Realtime Broadcast) |
SUPABASE_SERVICE_ROLE_KEY | service role key (server only: storage uploads and broadcasts) |
SUPABASE_STORAGE_BUCKET | request-images |
Vercel serves HTTPS by default. The session cookie is Secure in production.
Passwords are bcrypt hashes. Never type a password into users.password_hash directly (the Table Editor included) — logins for that account then fail. Use db/set-password.sql in the Supabase SQL Editor, which hashes with crypt(..., gen_salt('bf', 10)), or the admin UI for technician accounts.
| Command | What it does |
|---|---|
npm run dev / build / start | Next.js |
npm run typecheck | TypeScript check |
npm run db:local | Local Postgres (PGlite over the wire protocol) |
npm run db:migrate | Apply db/migrations/*.sql in order |
npm run db:seed | Seed master data, demo accounts, ~40 requests over the last 60 days |
npm run db:reset | Drop, migrate, and seed |
npm run db:sync-locations | Apply db/locations.ts (real CMU buildings and rooms) to an existing database; moves requests off removed rooms. -- --dry to preview |
npx tsx scripts/export-locations-sql.ts | Write db/locations-sync.sql for the Supabase SQL Editor (renames and additions only, safe to re-run) |
npm run db:export-sql | Write db/supabase-setup.sql (schema + current data) for the Supabase SQL Editor |
npx tsx --conditions=react-server scripts/check-flow.ts | Automated state-machine check (creates and deletes a throwaway request) |
npx tsx --conditions=react-server scripts/demo-step.ts <code> assign <tech> | in_progress | completed | Drive a request from the terminal during a demo |
app/
login/ Simulated CMU login
(onboarding)/profile/setup First-time profile + PDPA consent
(reporter)/ home, request/new, request/[code], history, notifications, profile
(technician)/tech/ job list, job/[code], notifications, profile
(admin)/admin/ dashboard, requests (table + side panel), settings (master data)
actions/ Server Actions per role (auth, requests, technician, admin, settings, profile, notifications)
api/ upload (XHR progress), pulse (polling fallback), admin/export/{xlsx,pdf}
components/
ui/ Button, GroupedList, Sheet, StatusPill, Skeleton, SegmentedControl, Field, ...
shell/ Tab bars, notification bell/list, live updates, idle logout
request/ reporter/ tech/ admin/ Feature components
lib/
db/ Postgres client
auth/ Session (jose) and server-side guards
requests/transition.ts transitionStatus(): the single status state machine + history + notifications
requests/queries.ts Role-scoped data access
dashboard.ts, export.ts Analytics queries, Excel and PDF builders
timeline.ts, status.ts Timeline model and shared status vocabulary
db/migrations/ SQL migrations
scripts/ local DB, migrate, seed, checks
transitionInTx() in lib/requests/transition.ts, which checks the rule table (role, owner, assignee), writes status_history, and creates notifications for the reporter, followers, and technician. Invalid transitions throw and are shown as Thai error messages.user-<id> and admins topics. Clients re-fetch through authorized server code (router.refresh()), so no data travels over the public channel..woff2 files to public/fonts/ and add url() sources to the @font-face rules in app/globals.css. IBM Plex Sans Thai is the loaded fallback.