Skip to content

Kabbya04/Lumen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lumen

React TypeScript Vite Tailwind CSS Groq

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.


Table of Contents


Overview

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.


Features

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.

Supported Formats

  • PDF — Text extraction via pdfjs-dist
  • DOCX — Text extraction via Mammoth
  • TXT — Plain text
  • Markdown — Rendered in preview and used as-is for analysis

Prerequisites


Getting Started

1. Clone the repository

git clone https://github.com/your-username/lumen.git
cd lumen

2. Install dependencies

From the project root, go into the app directory and install:

cd crack_the_doc
npm install

3. Configure environment

Copy .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_here

Get 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.

4. Run the development server

npm run dev

Open the URL shown in the terminal (e.g. http://localhost:5173) in your browser.


Environment Variables

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.

Available Scripts

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.

Project Structure

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

About

LUMEN turns PDFs, DOCX, TXT, and Markdown into interactive, AI-powered study guides with summaries, key points, and auto-generated questions. Chat with your document, preview content, and listen via built-in TTS—powered by Groq for fast, responsive analysis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors