ESP32-S3 Bench Guide
ESP32-S3 N16R8 bench guide: live pinout, lessons, simulators and the bench log.
翻訳待ち
No updates detected yet. GitHub releases will appear here.
Loading the full README. The saved excerpt is shown below.
A real (not toy) backend for the Blueprint-Driven Assessment Engine, built on
Next.js API routes + Supabase Postgres - matching the stack the rest of the
OneGrasp platform is already built on.
This is a direct extension of the interactive prototype (assessment_engine.html)
from earlier: same distribution algorithm, same duplicate-prevention logic,
same gap-detection philosophy - now backed by a real schema and seeded with
4,492 real questions pulled straight out of your uploaded question banks
(not sample/placeholder data).
What's real vs. what needs your inputRead the full README ↗A real (not toy) backend for the Blueprint-Driven Assessment Engine, built on Next.js API routes + Supabase Postgres - matching the stack the rest of the OneGrasp platform is already built on.
This is a direct extension of the interactive prototype (assessment_engine.html)
from earlier: same distribution algorithm, same duplicate-prevention logic,
same gap-detection philosophy - now backed by a real schema and seeded with
4,492 real questions pulled straight out of your uploaded question banks
(not sample/placeholder data).
Real, seeded, working:
Still gaps (same ones from the audit - the schema and API don't paper over them):
missing_pool at generation time rather than fabricating content."status": "thin".supabase/
migrations/0001_init.sql - schema (journeys → blueprint_parameters → sub_traits → questions → sessions)
seed/seed.sql - real question data, generated from your xlsx files (~590KB, 4,492 questions)
scripts/
gen_seed.py - regenerates seed.sql if the source xlsx files change
lib/
supabase/client.ts - anon + service-role Supabase clients
engine/
types.ts
blueprintEngine.ts - distributeAcrossSubtraits() - the core allocation algorithm
selectionEngine.ts - generateSession() - orchestrates blueprint → pool → sample → persist
scoring/
types.ts
likertAverageStrategy.ts - default 0–100 normalization (Likert/Yes-No/MCQ)
riasecStrategy.ts - Holland Code top-3 ranking
registry.ts - parameter name → strategy lookup
app/api/
journeys/route.ts GET list active journeys
journeys/[code]/blueprint/route.ts GET blueprint + live pool-size status per parameter
assessment/generate/route.ts POST create a session, run the full engine
assessment/[sessionId]/answers/route.ts POST record one response
assessment/[sessionId]/complete/route.ts POST close session, compute scores
assessment/[sessionId]/score/route.ts GET retrieve computed scores
npm install
cp .env.example .env.local # fill in your Supabase project URL + keys
# apply schema
supabase db push # or: psql "$DATABASE_URL" -f supabase/migrations/0001_init.sql
# seed real question data
psql "$DATABASE_URL" -f supabase/seed/seed.sql
npm run dev
# 1. see what's available
curl localhost:3000/api/journeys
# 2. check a journey's blueprint + real pool status before generating
curl localhost:3000/api/journeys/career_discovery/blueprint
# 3. generate an assessment session
curl -X POST localhost:3000/api/assessment/generate \
-H "Content-Type: application/json" \
-d '{"journeyCode":"career_discovery"}'
# -> { sessionId, parameters: [...], totalQuestions }
# 4. answer questions
curl -X POST localhost:3000/api/assessment/<sessionId>/answers \
-H "Content-Type: application/json" \
-d '{"questionId":"<uuid>","value":"4"}'
# 5. complete + score
curl -X POST localhost:3000/api/assessment/<sessionId>/complete
# 6. read results
curl localhost:3000/api/assessment/<sessionId>/score
Every response follows the same envelope:
{ "success": true, "message": "...", "statusCode": 200, "data": {...} }
Duplicate prevention is enforced twice, deliberately. selectionEngine.ts
tracks a usedIds Set in memory while sampling, but the real backstop is the
unique (session_id, question_id) constraint on session_questions in the
schema - if the in-memory logic ever has a bug, the insert fails loudly
instead of silently shipping a duplicate.
The blueprint conflict case is real, not hypothetical. Personality in
Career Discovery has 9 sub-traits but only an 18-question budget - a strict
4-per-subtrait floor would need 36. distributeAcrossSubtraits() detects
this, logs a warning, and falls back to a proportional (largest-remainder)
split. This was caught and fixed once already during development - the first
version of the proportional fallback used naive per-trait rounding and didn't
reliably sum back to the target total. Verified against your actual blueprint
numbers in lib/engine/blueprintEngine.ts's design comments.
Scoring is pluggable by parameter name, not hardcoded per-instrument.
registry.ts maps "Career Interests" to the RIASEC top-3-code strategy;
everything else falls through to a generic 0–100 normalized average. Real
psychometric scoring (Big Five T-scores, Hogan HDS risk bands, JEPI norms)
needs actual normed data to implement correctly - this scaffolding is where
those would plug in, not a claim that generic averaging is clinically valid.
RLS is on by default. Journeys/blueprints/questions are public-read (the frontend needs to render them). Sessions/responses/scores are locked to their owner. All the API routes above use the service-role client, which bypasses RLS - that's intentional (the API is the trust boundary, not the DB row), but means these routes should not be called directly from client components with the service key; keep it server-side only, as scaffolded.
No admin portal, no blueprint editor UI, no adaptive testing, no report generation, no auth wiring. The prompt this was extended from asked for a 100+ file enterprise Java rewrite with an admin RBAC system, audit logging, and a dozen future features up front - none of that reflects what's actually running (Next.js/Supabase) or what's been asked for outside that injected document. This is the real, working core: schema + engine + API, seeded with your real data. Happy to build any of the above next if you actually want it.