ESP32-S3 Bench Guide
ESP32-S3 N16R8 bench guide: live pinout, lessons, simulators and the bench log.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Intelligent Course Registration Assistant for Suleyman Demirel University — Next.js 16, real SDU SIS integration, AI recommendations & assistant
翻譯準備中
正在載入完整 README。
檢視完整 README ↗Plan, validate and (from Sprint 5) submit course registration for Suleyman Demirel University students.
Stack: Next.js 16 (App Router, Turbopack) · React 19 · Tailwind CSS v4 · shadcn-style components · Lucide · Sonner toasts · Prisma 7 + PostgreSQL · Zod · jose (sessions) · Vitest.
Design: minimal, monotone, modern — neutral zinc surfaces, hairline borders, soft shadows, one restrained blue accent, generous whitespace. No gradients. Colour carries meaning only (emerald = passed/open, red = conflict/full, amber = limited). Design tokens live in app/globals.css.
Status: this is the first delivery. It covers the project skeleton, the database schema for all 7 sprints, the SDU integration service (mock and live adapters), and the main planner dashboard. The rule engine for Sprints 2–3 (credit limit, seat status, time conflicts, prerequisites) is already built into the dashboard, because the timetable can't be interactive without it.
Requires Node.js ≥ 20.9.
npm install
cp .env.example .env.local # defaults run fully offline against the mock SDU backend
npm run dev # http://localhost:3000 → sign in as a demo student
Tests and checks:
npm test # 31 unit/integration tests (rules, search, SDU client + mock)
npm run typecheck
npm run build
Database (optional for the dashboard in mock mode):
# set DATABASE_URL in .env.local first
npm run db:migrate # applies prisma/migrations (schema + CHECK constraints)
npm run db:seed # syncs departments, catalog, demo students via the SDU adapter
Demo accounts (mock SSO): 230107021, Aigerim Tulegenova, CS year 3 (has a failed course to retake); 240103118, Nursultan Abenov, IS year 2.
sdu-course-assistant/
├── app/
│ ├── layout.tsx Root layout: fonts (Onest + JetBrains Mono, Kazakh-ready), toaster
│ ├── globals.css Tailwind v4 theme tokens: navy / gold / emerald / crimson / cyan
│ ├── (auth)/login/page.tsx SSO sign-in (mock mode lists demo students)
│ ├── (app)/ Authenticated shell (header + nav)
│ │ ├── layout.tsx
│ │ ├── error.tsx "SDU unreachable" boundary with retry
│ │ ├── dashboard/ ★ Planner: search sidebar + timetable + plan
│ │ └── transcript/ Completed-course tracker
│ └── api/
│ ├── auth/{login,callback,logout}/route.ts CAS SSO flow → signed session cookie
│ ├── me/route.ts Profile + transcript sync
│ ├── courses/route.ts Multi-filter catalog search
│ └── sections/availability/route.ts Live seat counts (polled)
├── components/
│ ├── ui/ shadcn-style primitives (button, badge, card, input, meter…)
│ ├── layout/ App header, nav
│ ├── dashboard/ Workspace state owner, search sidebar, result cards,
│ │ plan panel, stat strip, live-seat + plan hooks
│ └── timetable/timetable-grid.tsx ★ Interactive Mon–Fri grid with lane layout & previews
├── lib/
│ ├── domain/ App-wide types + time helpers (decoupled from SDU wire format)
│ ├── registration/ ★ Pure rule engine: conflicts, prerequisites, credit policy
│ ├── catalog/search.ts Shared search/filter (API route and client use the same code)
│ ├── auth/ JWT session (token.ts is edge/proxy-safe)
│ ├── sync/sdu-sync.ts SDU → Postgres mirror (seed today, cron later)
│ ├── data/queries.ts Request-scoped RSC loaders
│ ├── api/http.ts Route wrapper: auth + SDU error mapping
│ ├── env.ts Zod-validated environment
│ └── db.ts Prisma client (pg driver adapter)
├── services/
│ ├── sduApi.ts ★ SDU integration service: client, transports, factory
│ └── sdu/
│ ├── endpoints.ts Endpoint map (single routing table for both modes)
│ ├── contracts.ts Zod wire schemas (snake_case, validated at the boundary)
│ ├── mappers.ts Wire → domain translation
│ ├── mock-server.ts In-process fake SDU backend (atomic batch submit, seat drift)
│ └── fixtures.ts Fictional catalog, instructors, students
├── prisma/
│ ├── schema.prisma ★ All tables for Sprints 1–7
│ ├── migrations/ init + integrity CHECK constraints
│ └── seed.ts
├── proxy.ts Next 16 "proxy" (formerly middleware): auth gate
└── prisma.config.ts
| Sprint | Adds |
|---|---|
| 4 | lib/recommendation/ (scoring against DegreeRequirement), app/api/recommendations/route.ts, recommendation rail in the sidebar |
| 5 | app/api/plan/route.ts (moves the plan from localStorage to StagedSelection), app/api/registration/submit/route.ts (wraps sdu.batchSubmit and records a RegistrationBatch), app/api/waitlist/route.ts, a submit bar in PlanPanel |
| 6 | components/chat/ floating assistant + app/api/chat/route.ts (grounded in catalog and plan data), app/(advisor)/reviews/… plus app/api/advisor/reviews/… (ScheduleReview) |
| 7 | app/(admin)/capacity/… + app/api/admin/sections/[id]/capacity (CapacityChange, pushed to SDU), app/api/advisor/overrides (PrerequisiteOverride, fed into evaluatePrerequisites(…, waived)) |
Roles: the session type currently has only STUDENT. Sprints 6 and 7 add ADVISOR and REGISTRAR claims from CAS attributes. They map to StaffMember.role and get their own route groups guarded in proxy.ts.
UI / routes ──► SduApiClient ──► SduTransport ─┬─► HttpSduTransport (SDU_API_MODE=live)
(zod parse + │ CAS + REST, OAuth2 client-credentials,
wire→domain map) │ retries w/ backoff, timeouts, Idempotency-Key
└─► MockSduTransport (SDU_API_MODE=mock, default)
in-process fake answering the same endpoint keys
The mock sits at the transport level, so in dev the client's parsing, mapping, pagination and error handling all run exactly as they would in production.
| Key | Method | Path | Notes |
|---|---|---|---|
casLogin | GET | /cas/login?service= | Browser redirect |
casServiceValidate | GET | /cas/p3/serviceValidate?format=JSON | CAS protocol v3 |
casLogout | GET | /cas/logout?service= | Single sign-out |
studentProfile | GET | /api/v1/students/:studentId/profile | GPA, program, completed_credits, advisor |
studentTranscript | GET | /api/v1/students/:studentId/transcript | transcript_data[] |
departments | GET | /api/v1/departments | |
termSections | GET | /api/v1/terms/:termCode/sections?cursor= | Paginated; available_seats, total_capacity, instructor_name, time_slots, classroom |
sectionAvailability | GET | /api/v1/terms/:termCode/sections/availability?ids= | Live seats |
batchSubmit | POST | /api/v1/registration/batch-submit | Atomic, all-or-nothing; Idempotency-Key header |
waitlistJoin | POST | /api/v1/sections/:sectionId/waitlist |
⚠️ Confirm with SDU IT before going live. The CAS paths follow the public CAS protocol. The REST paths and payload shapes are a proposed contract, not a published SDU spec. When SDU provides its real OpenAPI document, the expected changes are limited to
services/sdu/endpoints.ts,contracts.tsandmappers.ts.
/api/auth/login → CAS (/cas/login?service=…/api/auth/callback) → /api/auth/callback?ticket= → server-to-server serviceValidate → profile check (suspended or graduated accounts are refused) → HS256 session cookie (8 h, httpOnly). proxy.ts redirects signed-out page views, and API routes return 401.
lib/registration/)| Rule | Behaviour | Sprint |
|---|---|---|
| Already passed | Block | 1 |
| Section full | Block (waitlist in Sprint 5) | 2 |
| Credit limit | Block over limit; standard 30 ECTS, 35 at GPA ≥ 3.33, 20 on probation | 2 |
| Prerequisites | Block. Rules are AND-of-OR groups, e.g. CSS 225 and (MAT 201 or MAT 250), and support advisor waivers | 3 |
| Time conflict | Warn (sweep-line per day, exclusive end times); highlighted per meeting on the grid | 3 |
| Same course, other section | Treated as a swap, not extra credits | — |
CREDIT_POLICY values are placeholders. Confirm them with the Registrar; they all live in lib/registration/credits.ts. The mock SDU enforces the same rules server-side on batch submit, as the real registration engine should.
The ownership model is documented at the top of prisma/schema.prisma. SDU is the system of record: students, transcripts, the catalog and enrolments are mirrored locally, keyed by SDU ids. This app owns the planning state: staged selections, batches, waitlist, reviews, overrides and capacity changes.
| Group | Tables |
|---|---|
| Structure | terms, departments, programs, degree_requirements |
| People | students, staff_members (advisor / registrar / admin), instructors |
| Catalog | courses, prerequisites (CNF: groupNo), sections, meetings |
| Record | transcript_entries |
| Registration | staged_selections, registration_batches (idempotency key), enrollments, waitlist_entries |
| Advising / admin | schedule_reviews, prerequisite_overrides, capacity_changes |
Available seats are derived (totalCapacity − enrolledCount), never stored. The second migration adds CHECK constraints for time windows, seat counters, self-prerequisites and GPA range.
aria-disabled, so keyboard and screen-reader users hear why a section is locked.