# OROO GRIXI

> Turn anything you study into everything you need to learn.

OROO GRIXI is a production learning product that converts any study material
(PDF, image, document, presentation, website, YouTube, audio, video, live
recording, or plain text) into a connected **study pack**: notes, flashcards,
quizzes, source-grounded chat, podcasts, and a guided Learn Mode — all built on
a single central **Content Intelligence Pipeline** rather than isolated per-feature
AI calls.

This repository is a **monorepo**.

## Locked constraints

These are non-negotiable for the entire build:

| Constraint | Value |
|---|---|
| **Database** | MySQL 8 (no PostgreSQL / SQLite in production paths) |
| **Backend runtime** | Python 3.12 |
| **Frontend** | Next.js 16 + React 19 + TypeScript |

## Monorepo layout

```
oroo-academy/
├─ docs/        Design + engineering documentation (source of truth)
├─ frontend/    Next.js 16 app (React 19, TypeScript, Tailwind, Tiptap)
├─ backend/     FastAPI service (Python 3.12, SQLModel/SQLAlchemy, MySQL 8)
├─ infra/       Local + deployment infra (native MySQL 8, Redis — no Docker)
└─ README.md    This file
```

## Architecture in one line

```
SOURCE → INGESTION → NORMALIZED CONTENT → CONTENT IR → CHUNK/EMBED
      → VECTOR INDEX + MySQL → STUDY INTELLIGENCE
      → Notes / Flashcards / Quiz / Chat / Podcast / Learn Mode
```

Everything downstream consumes the **Content IR** (a canonical, format-agnostic
representation of a source), never the original file. A source is processed once
and reused across every feature — this is the core cost-control decision.

## Two hard abstractions

- **AIProvider gateway** — all LLM/embedding/transcription/TTS/image calls go
  through one interface; providers (OpenAI, Gemini, optional Claude) and model
  names are configuration-driven.
- **VectorStore interface** — FAISS in Phase 1, swappable later
  (Elasticsearch / Qdrant / Pinecone) without touching application services.

## Delivery phases

- **Phase 0** — Foundations: documentation set, frozen MySQL 8 schema, frozen
  `/api/v1` contracts, design tokens + app shell. *(in progress)*
- **Phase 1** — MVP study-pack product on the central pipeline.
- **Phase 2** — OROO Curriculum RAG.
- **Phase 3** — Personal AI tutor (personalization + mastery).
- **Phase 4** — Licensed catalog in global Ask OROO (book/chapter RAG; planned after Phase 3).

## Documentation

See [`docs/`](./docs). Start with [`docs/00-understanding.md`](./docs/00-understanding.md).
