|
| 1 | +# CoReasoning Lab |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +An AI-native learning platform where students do not just get answers from AI, they learn to reason with it. |
| 6 | + |
| 7 | +CoReasoning Lab trains three core skills: |
| 8 | +- Framing: turn ambiguous problems into precise, solvable tasks. |
| 9 | +- Judging: critique AI output and spot gaps, risks, and mistakes. |
| 10 | +- Steering: guide AI iteratively toward better results. |
| 11 | + |
| 12 | +## Why This Project Exists |
| 13 | + |
| 14 | +Most AI-in-education products optimize for speed-to-answer. |
| 15 | +CoReasoning Lab optimizes for quality-of-thinking. |
| 16 | + |
| 17 | +Learners interact with intentionally imperfect AI outputs, then improve them through structured reasoning loops. The platform measures progress across separate cognitive skills instead of a single score. |
| 18 | + |
| 19 | +## Learning Flow |
| 20 | + |
| 21 | +1. Framing phase: student refines a raw problem with assumptions, constraints, and clarifications. |
| 22 | +2. AI generates an initial solution (with realistic issues to inspect). |
| 23 | +3. Judge + Steer cycles: student evaluates quality, then sends targeted corrections. |
| 24 | +4. Platform grades Framing, Judging, and Steering independently with feedback. |
| 25 | + |
| 26 | +## Feature Snapshot |
| 27 | + |
| 28 | +- Challenge modes: practice and assessment. |
| 29 | +- Response modes: multiple-choice or open-ended per phase. |
| 30 | +- LLM-backed generation and evaluation with fallback behavior. |
| 31 | +- Multi-language content and UI assets (`en`, `he`, `fr`, `de`, `es`). |
| 32 | +- Role-based workflows: student, instructor, admin. |
| 33 | +- Course/challenge management, analytics, and PDF reporting. |
| 34 | +- Bulk YAML import for institutions, users, courses, and challenges. |
| 35 | + |
| 36 | +## Tech Stack |
| 37 | + |
| 38 | +- Runtime: Node.js 20+ |
| 39 | +- Backend: Express, Knex, Zod, Passport |
| 40 | +- DB: SQLite (dev/test) and PostgreSQL (production) |
| 41 | +- AI: OpenAI/Groq integrations with pluggable provider config |
| 42 | +- Testing: Jest, Supertest, Playwright |
| 43 | +- Deployment: Docker and Render blueprint |
| 44 | + |
| 45 | +## Architecture At A Glance |
| 46 | + |
| 47 | +```text |
| 48 | +Static Client (HTML/CSS/JS) |
| 49 | + | |
| 50 | + v |
| 51 | +Express API Routes (/api/v1/*) |
| 52 | + | |
| 53 | + v |
| 54 | +Service Layer (business logic) |
| 55 | + | |
| 56 | + +-----+------------------+ |
| 57 | + | | |
| 58 | + v v |
| 59 | +LLM Service + Prompt Database (Knex) |
| 60 | +Engine (YAML prompts) SQLite / PostgreSQL |
| 61 | +``` |
| 62 | + |
| 63 | +## Quick Start (Repo Root) |
| 64 | + |
| 65 | +Set environment variables in `code/.env.all` (copy from `.env.example` and fill required keys). |
| 66 | + |
| 67 | +```bash |
| 68 | +npm install |
| 69 | +npm run build |
| 70 | +npm run db:migrate |
| 71 | +npm run db:seed |
| 72 | +npm run dev |
| 73 | +``` |
| 74 | + |
| 75 | +Then open: |
| 76 | +- App: `http://localhost:3000` |
| 77 | +- Health check: `http://localhost:3000/api/health` |
| 78 | + |
| 79 | +## Useful Commands |
| 80 | + |
| 81 | +```bash |
| 82 | +npm run test:unit |
| 83 | +npm run test:integration |
| 84 | +npm run test:e2e |
| 85 | +npm run test:all |
| 86 | +npm run lint |
| 87 | +npm run docker:dev |
| 88 | +``` |
| 89 | + |
| 90 | +## Project Map |
| 91 | + |
| 92 | +```text |
| 93 | +code/ |
| 94 | + client/ static web UI |
| 95 | + server/ API routes, services, middleware, DB, auth |
| 96 | + prompts/ LLM prompt templates |
| 97 | + content/ i18n source data |
| 98 | + tests/ unit/integration/e2e tests |
| 99 | +docs/ concept of operations, spec, audits |
| 100 | +scenarios/ course scenario content |
| 101 | +``` |
| 102 | + |
| 103 | +## Deep Docs |
| 104 | + |
| 105 | +- Product concept: [`docs/CONOPS.md`](docs/CONOPS.md) |
| 106 | +- System spec: [`docs/spec/SPEC.md`](docs/spec/SPEC.md) |
| 107 | +- Full technical README: [`code/README.md`](code/README.md) |
| 108 | +- Developer guide: [`code/docs/developer-guide.md`](code/docs/developer-guide.md) |
| 109 | + |
| 110 | +## Notes |
| 111 | + |
| 112 | +- The hero image in this README was generated with Google Gemini Image API. |
0 commit comments