A web-based document analysis platform that uses an LLM to summarize documents, extract key points, generate questions with answers, and provide an AI study assistant with optional text-to-speech for accessibility.
- Overview
- Features
- Supported Formats
- Prerequisites
- Getting Started
- Environment Variables
- Available Scripts
- Project Structure
- License
Lumen lets you upload documents and get AI-powered study aids in seconds. The app uses the Groq API (LLaMA 3.3 70B) to produce summaries, key point definitions, and Q&A from your content. You can chat with a document-aware assistant, use optional text-to-speech (ElevenLabs) for summaries and key points, and reinforce learning with a daily quiz and self-assessment tools.
| Feature | Description |
|---|---|
| Study | Upload a document; get a summary, key points, and generated questions. Chat with the doc, use “Explain to a 10-year-old,” rate your recall, and save a one-line takeaway. |
| Library | Self-assessment center: rate key points, practice “teach me back,” and see a confidence heatmap. Enter Focus mode from here. |
| Focus | Distraction-free view of summary and key points. |
| Daily quiz | Dedicated Quiz page with multiple questions from docs you studied yesterday (or last doc as fallback). A dot on the nav indicates a pending quiz; once started, leaving the page shows a confirmation (quiz terminates and must be restarted). |
| Document summarization | Concise, coherent summaries that capture main sections and key details. |
| Key point extraction | Headlines and definitions for important concepts, with document-specific context. |
| Question generation | Short and broad questions with answers derived from the document. |
| Document-aware chat | Ask questions about your document; answers are grounded in the uploaded content. |
| Text-to-speech (TTS) | Optional ElevenLabs TTS for summaries and key points (configurable voice). |
| Document preview | View PDFs and rendered content in a modal. |
| Doc mastery & streak | Mark a doc as mastered and track a daily streak (stored locally). |
| Dark / light theme | Theme toggle with persistent preference. |
- PDF — Text extraction via
pdfjs-dist - DOCX — Text extraction via Mammoth
- TXT — Plain text
- Markdown — Rendered in preview and used as-is for analysis
git clone https://github.com/your-username/lumen.git
cd lumenFrom the project root, go into the app directory and install:
cd crack_the_doc
npm installCopy .env.example to .env in the crack_the_doc directory and set at least the Groq key:
VITE_GROQ_API_KEY=your_groq_api_key_hereGet an API key from the Groq Console. For optional text-to-speech, add VITE_ELEVENLABS_API_KEY (and optionally VITE_ELEVENLABS_VOICE_ID); see Environment Variables.
npm run devOpen the URL shown in the terminal (e.g. http://localhost:5173) in your browser.
| Variable | Required | Description |
|---|---|---|
VITE_GROQ_API_KEY |
Yes | Groq API key for LLM summarization, key points, questions, and chat. |
VITE_ELEVENLABS_API_KEY |
No | ElevenLabs API key for text-to-speech. If omitted, TTS is disabled. |
VITE_ELEVENLABS_VOICE_ID |
No | ElevenLabs voice ID (default: Rachel). See voice library. |
| Command | Description |
|---|---|
npm run dev |
Start the Vite dev server with hot reload. |
npm run build |
Type-check and build for production. |
npm run preview |
Serve the production build locally. |
npm run lint |
Run ESLint on .ts and .tsx files. |
lumen/
├── crack_the_doc/ # Frontend application
│ ├── public/ # Static assets (e.g. PDF worker)
│ ├── src/
│ │ ├── components/ # UI components (upload, chat, analysis, TTS, TodayQuizCard, etc.)
│ │ ├── contexts/ # Theme, Session (document + analysis state)
│ │ ├── lib/ # Groq client, ElevenLabs TTS, storage (ratings, streak, quiz)
│ │ ├── pages/ # Home (Study), Library, Focus, QuizPage
│ │ ├── App.tsx
│ │ └── main.tsx
│ ├── index.html
│ ├── package.json
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.ts
├── documentation/ # Project docs and design notes
├── todo.md # Pending work (auth, storage, optional features)
└── README.md