Project Info
Inspiration
Every AI engineer has lost hours asking the same question in five different tabs — ChatGPT says use agents, a tutorial says use a framework, the docs say something else entirely. The problem was never a lack of answers. It was a lack of a system that remembers your project, weighs evidence over opinion, and turns a decision into an actual next step. That's why we built GenPHD — the decision intelligence layer for AI engineers.
What it does
GenPHD turns conflicting AI advice into an evidence-backed next build action, then learns from what happens when you act on it. The core loop: You describe your goal, active project, stack, time budget, and current blocker. GenPHD builds a concise roadmap with your next three milestones. When you're stuck, you ask a real decision question — e.g. "Should I use LangGraph for this two-day RAG project?" GenPHD returns a Decision Brief: source-backed evidence, tradeoffs, a recommendation, an explicit confidence level, a counterfactual ("choose the alternative if…"), and one next action. That action becomes a Build Mission with a target outcome and acceptance criteria. Once you complete it, GenPHD records the outcome, updates your skill evidence, and adjusts your roadmap. It is not a generic chatbot, a course platform, or a multi-agent dashboard. It's a closed decision loop — evidence in, action out, learning compounding over time.
How we built it
Frontend/App: Next.js (App Router, TypeScript strict mode), Tailwind CSS, shadcn/ui, Lucide icons Backend: Supabase (PostgreSQL, Auth, Row Level Security, Storage), typed server routes, Zod schema validation at every boundary AI workflow: OpenAI as the primary reasoning layer, orchestrated as a controlled pipeline — Context Builder → Evidence Retriever → Parallel Deliberation → Claim Adjudicator → Action Composer → Reflection Evaluator — not an unconstrained autonomous agent Architecture: Deliberate modular monolith for the MVP; services split only when there's a measured reason (e.g. sandboxed code evaluation) Design system: A monochrome, restraint-first UI (Apple-level calm, Linear-level density discipline) — no gradients, no gamification, one primary action per screen Source grounding: Curated, versioned source corpus with visible URLs and dates, tiered by trust (official docs > maintainer repos > practitioner articles > unsourced social content)
Challenges we ran into
Designing a Decision Brief structure that's genuinely useful rather than "AI says X" — we had to force every recommendation to expose uncertainty and a counterfactual, not just a confident-sounding answer. Resisting the urge to build a flashy multi-agent dashboard. The real value was in a disciplined, inspectable workflow, not agent theatre. Keeping memory transparent and user-controlled (visible, editable, deletable) while still making the roadmap feel adaptive and smart. Scoping the MVP tightly — cutting gamification, social feeds, and admin dashboards that would have diluted the core loop.
Accomplishments we're proud of
A working end-to-end loop: onboarding → Decision Brief → Build Mission → reflection → updated roadmap. A Decision Brief that always shows its evidence, its confidence, and what would change the recommendation — instead of presenting model output as ground truth. A design system that stays calm and legible under real product complexity, with zero dashboard clutter.
What we learned
Model consensus isn't trust — evidence quality, recency, and fit to the user's actual constraints are what make a recommendation defensible. Building a product around a loop (decide → act → reflect → improve) creates far more lasting value than another single-turn chat interface.
What's next
for GenPHD Repository-aware evidence retrieval tied directly to a user's codebase Secure sandboxed code evaluation for Build Missions Source freshness alerts when a past decision's evidence changes Shared/team decision records for bootcamps and engineering teams Portfolio-ready, source-backed skill evidence
GenPHD
Decision intelligence for AI engineers
GenPHD turns a scattered technical question into one evidence-backed next move — then remembers what the project learned.
Open the live product · See the product requirements · Read the architecture
Why GenPHD
AI engineers rarely lack advice. They lack a reliable way to decide what to trust, what to build next, and what evidence to carry forward.
GenPHD is not another chat window or a generic dashboard. It is a private workspace that connects:
- Project context — outcome, stack, constraints, time, and blocker.
- Decision intelligence — an evidence-aware brief with trade-offs, conflicts, and a bounded next action.
- Deliberate practice — a roadmap, build mission, and coding challenge that turn advice into proof of capability.
- Learning memory — a traceable record that improves the next decision instead of rewarding streaks.
One question → one trusted recommendation → one buildable mission → durable learning evidence.
Product loop
| Step | What the engineer does | What GenPHD delivers |
|---|---|---|
| 1. Frame the work | Describe the project, stack, available time, and current blocker. | A private project context. |
| 2. Diagnose the gap | Take a short adaptive baseline across six GenAI competencies. | A skill-gap vector and prerequisite-aware roadmap. |
| 3. Ask a decision | Ask a real question such as “Should I use pgvector or Pinecone for this RAG project?” | A Decision Brief with evidence, trade-offs, conflicts, confidence, and a next move. |
| 4. Compare perspectives | Request consensus for higher-stakes choices. | Multi-model agreements, disagreements, and one reconciled next step. |
| 5. Build proof | Complete a focused mission or practical coding challenge. | Recorded completion and competency evidence. |
| 6. Continue with context | Return to the dashboard, roadmap, or memory. | A workspace that remembers what changed and why. |
What makes it different
| Capability | GenPHD approach |
|---|---|
| Decision support | Structured briefs, not unbounded chatbot replies. Every recommendation exposes its evidence and trade-off. |
| Personalization | Roadmaps are shaped by project constraints and diagnostic gaps, not a fixed course sequence. |
| Multi-model consensus | Configured models are fanned out and reconciled into agreements, conflicts, and a trusted next step. |
| Skill evidence | Progress is tied to missions and practical work, not engagement metrics or streaks. |
| Memory | Project context, decisions, and evidence remain visible and scoped to the active workspace. |
| Safe fallback | AI flows degrade from multi-model → single model → deterministic guidance when a provider is unavailable. |
Architecture
flowchart LR
U[AI engineer] --> W[Next.js workspace]
W --> A[Secure API layer]
A --> P[Project context]
A --> D[Decision engine]
A --> G[Diagnostic + roadmap engine]
A --> C[Coding challenge grader]
D --> M[Consensus reconciler]
M --> AI[OpenAI / OpenRouter / Groq]
D --> AI
C --> AI
A --> S[(Supabase Postgres)]
S --> R[RLS-scoped projects, decisions, missions, memory]
U --> T[Cloudflare Turnstile]
T --> A
U --> AU[Supabase Auth]
AU --> A
Trust boundary
- Supabase Auth verifies sessions on the server; workspace routes are not available before authentication.
- Row Level Security scopes projects, decisions, roadmaps, missions, diagnostic runs, and memory to the signed-in user.
- Cloudflare Turnstile protects sign-up and sign-in; its secret stays in Supabase Auth, never in this repository.
- Provider keys are server-only. The browser never receives OpenAI, OpenRouter, or Groq credentials.
- AI output is schema-validated before being shown or persisted. Invalid provider responses fall back safely.
GPT-5.6 integration
GenPHD uses a server-only, OpenAI-compatible provider boundary rather than calling a model from the browser.
- When
OPENAI_API_KEYis configured, Decision Brief generation can use GPT-5.6 throughOPENAI_MODEL(the project default isgpt-5.6-sol). - GPT-5.6 receives the project question and bounded project context, then returns a strict JSON Decision Brief: recommendation, summary, confidence reason, trade-off, counterfactual, sources, conflicts, and a next action.
- The response is parsed with Zod before it reaches the UI or database. A malformed or unavailable response falls through the configured provider order, then to deterministic guidance so the workspace remains usable.
- The dedicated consensus action fans a question out to multiple configured models, reconciles agreements and conflicts, and returns one trusted next step. It is user-triggered rather than silently run, so model cost stays explicit.
- The same server-side provider pattern supports content drafting and optional correctness-aware challenge grading. Provider keys never enter the client bundle.
Set OPENAI_API_KEY and optionally OPENAI_MODEL in .env.local or Render to enable GPT-5.6. See lib/decision/provider.ts for the typed fallback chain.
Key product and engineering decisions
| Decision | Why it matters |
|---|---|
| Structured Decision Briefs instead of chat | Engineers need visible evidence, trade-offs, conflicts, and a next action—not a stream of untraceable answers. |
| One active project context | Keeps every recommendation grounded in current constraints and prevents a generic “AI advisor” experience. |
| Diagnostic-led roadmap | Skills are inferred from evidence and prerequisite gaps, rather than forcing every user through the same curriculum. |
| Explicit multi-model consensus | Higher-stakes questions can surface agreement and disagreement without charging for fan-out on every routine request. |
| Supabase RLS + server-verified sessions | Private project intelligence is user-scoped at the database and API layers. |
| Provider validation and deterministic fallback | The product continues to provide a coherent, safe response when a model or provider is unavailable. |
| Next.js monolith for the hackathon | Keeps deployment, auth, data access, and iteration fast without pretending microservices are necessary at this stage. |
How Codex accelerated the build
Codex was used as an implementation partner throughout the project, while product and security choices remained deliberate human decisions.
- It translated the PRD, UI blueprint, and system design into the Next.js workspace structure, typed contracts, and API routes.
- It accelerated UI iteration across the landing experience, protected authentication flow, dashboard, navigation, and responsive states.
- It helped implement and verify typed provider fallbacks, multi-model consensus, diagnostic scoring, roadmap generation, coding challenge grading, and Supabase persistence boundaries.
- It supported production readiness work: resolving merge conflicts, keeping the Docker deployment compact, running TypeScript/tests/production builds, and checking authentication and security flows.
- Human review directed the core product identity: evidence over noise, project-scoped memory, explicit consent for model fan-out, and a calm non-dashboard-template interface.
Judge test plan
The full product can be tested with your own project. No proprietary dataset is required.
Sample project input
Use this during onboarding for a representative end-to-end evaluation:
| Field | Sample value |
|---|---|
| Project name | DocuQuery |
| Outcome | A source-grounded document assistant that makes retrieval quality visible. |
| Stack | Python, FastAPI, pgvector |
| Time available | 6 hours this week |
| Current blocker | Deciding which evaluation work proves retrieval is reliable enough to ship. |
Manual product checks
- Visit the live app and choose Start one project.
- Create an account, complete email verification, and sign in through the Supabase + Turnstile protected flow.
- Enter the sample project above. Confirm that onboarding creates a project and an ordered roadmap.
- Run the diagnostic, or select Skip for now to inspect the starter path.
- From Dashboard, ask: “Should I use pgvector or Pinecone for this RAG project?” Review the Decision Brief’s recommendation, evidence, trade-off, confidence, and next action.
- In Decisions, use the consensus option. When live provider keys are configured, inspect model agreements/conflicts; otherwise verify the clearly labelled deterministic fallback.
- Open My roadmap, start a Build Mission, and complete it. Confirm that progress and learning evidence update.
- Open Coding challenges, submit a solution, and inspect criterion-based feedback. With an AI provider key, the grader adds correctness-aware feedback; without one it uses the disclosed heuristic fallback.
- Open Learning memory to confirm the project context and decision history remain visible and scoped to the workspace.
Automated checks
npm run typecheck
npm test
npm run build
Workspace surfaces
| Surface | Purpose |
|---|---|
| Dashboard | Answers: “What should I do today?” |
| My roadmap | Answers: “What should I learn next?” |
| Decisions | Answers: “What should I trust?” |
| My project | Keeps scope, stack, time, and constraints visible. |
| Build missions | Turns a decision into a small, testable action. |
| Coding challenges | Lets users submit practical code and receive criterion-based grading. |
| Progress | Records meaningful work, not activity noise. |
| Learning memory | Shows the context and evidence shaping future decisions. |
Tech stack
- Frontend: Next.js 16, React, TypeScript, CSS
- Authentication and database: Supabase Auth + Postgres + Row Level Security
- AI orchestration: typed provider boundary for OpenAI, OpenRouter, and Groq
- Bot protection: Cloudflare Turnstile with server-validated Supabase sessions
- Validation: Zod schemas, unit tests, typed API contracts
- Deployment: compact multi-stage Docker image on Render
Run locally
Prerequisites
- Node.js 22+
- A Supabase project for private workspaces
- A Cloudflare Turnstile widget for authentication protection
- At least one AI provider key for live AI generation (OpenAI, OpenRouter, or Groq)
git clone https://github.com/ankitpt2005/GenPHD.git
cd GenPHD
npm ci
Copy-Item .env.example .env.local
npm run dev
Open http://localhost:3000.
Required configuration
Set the following values in .env.local:
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | Supabase project URL |
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY | Public browser key from Supabase |
NEXT_PUBLIC_TURNSTILE_SITE_KEY | Public Cloudflare Turnstile widget key |
NEXT_PUBLIC_SITE_URL | Local or deployed application URL |
OPENAI_API_KEY, OPENROUTER_API_KEY, or GROQ_API_KEY | At least one server-only AI provider key |
Never commit .env.local, provider keys, database passwords, or Turnstile secrets.
Database setup
- Create a Supabase project and enable Email/password authentication.
- Add
http://localhost:3000/auth/callbackto Supabase Auth redirect URLs. - Apply the migrations in
supabase/migrationsin numeric order. - Run
supabase/seed.sqlto load the competency and source catalog. - Enable Cloudflare Turnstile in Supabase Auth → Bot and Abuse Protection. Store the matching Turnstile secret there, not in application code.
Included sample data
supabase/seed.sql supplies the shared catalog used by the product: six GenAI competencies (prompting, embeddings, vector databases, retrieval, agent frameworks, and evaluations) plus official source references for LangGraph and OpenAI evaluation guidance.
It intentionally does not create fake user accounts or private projects. Use the sample project input in the judge test plan to create a real workspace and exercise the product loop.
GENPHD_ALLOW_DEMO_MODE is deliberately false by default. It can be enabled only for local, non-production exploration without Supabase.
API highlights
| Endpoint | Responsibility |
|---|---|
POST /api/onboarding | Validates and creates project context + initial roadmap. |
GET/POST /api/diagnostic | Serves adaptive questions and persists the skill-gap result. |
POST /api/decisions | Produces a validated, source-aware Decision Brief. |
POST /api/consensus | Reconciles multiple model perspectives into one decision report. |
GET /api/challenges | Returns a competency-relevant coding challenge without grading keys. |
POST /api/challenges/grade | Grades a submitted solution and records evidence on a pass. |
POST /api/missions/complete | Records a completed mission and updates learning evidence. |
GET /api/memory | Returns the visible, project-scoped memory used by the workspace. |
GET /api/health | Deployment health check. |
Deployment
The repository includes render.yaml and a small multi-stage Dockerfile. Render builds the standalone Next.js server and only ships traced production assets—never local .env, .next, or node_modules.
For a production deploy, set the Supabase public values, Turnstile site key, public site URL, and server-only provider keys in Render. Keep GENPHD_ALLOW_DEMO_MODE=false, then add the deployed /auth/callback URL to Supabase Auth redirect URLs.
Built for engineers who want a clearer next move—not another tab full of advice.
Analysis
View
Metric
- 26
- 2
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- Next.jsIn code
- ReactIn code
- SQLIn code
- SupabaseIn code
- TypeScriptIn code
- OpenAIClaimed
- PostgreSQLClaimed
- Tailwind CSSClaimed
6 of 9 appear in the indexed code. 3 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- Claude CodeConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
563 KB
Source files
122
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
ankitpt2005/GenPHD
154 files · 45.9 MB · @ 8989b3d
Structure
Interface
44 files · 29%Screens, components and styles rendered to the user.
+21 moreAPI & routing
14 files · 9%Request entry points: routes, handlers and controllers.
Application logic
30 files · 19%Domain rules, services and shared utilities.
+9 moreData & schema
13 files · 8%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript51%
- CSS31%
- Markdown15%
- SQL3%
- YAML0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 18- @studio-freight/react-lenis
- @supabase/ssr
- @supabase/supabase-js
- framer-motion
- lucide-react
- next
- react
- react-dom
- zod
- +9 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.