"Mr. Clarke, Hawkins' beloved science teacher, has mysteriously disappeared โ leaving behind a collection of dense physics books, radio manuals, and research notes. The AV Club needs to brief the town sheriff on the strange signals appearing around Hawkins, but reading through hundreds of pages would take too long. So they built this."
An AI-powered presentation generator that ingests your documents (PDF/TXT), retrieves the most relevant information using RAG (Retrieval-Augmented Generation), and automatically generates beautiful, animated slide decks โ all with a Stranger Things theme.
- Upload your PDF or TXT documents
- Ask a question or describe what your presentation should cover
- The AI reads your documents, finds the most relevant sections, and generates a complete animated slide deck
- Navigate through slides with animations that replay on every slide transition
- View fullscreen for a presentation-ready experience
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FRONTEND (React) โ
โ CDN React 18 + Babel Standalone + Tailwind CSS โ
โ No Node.js needed! Served via Python HTTP server โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ REST API calls
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BACKEND (Django + DRF) โ
โ โ
โ โโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Views โโ โ RAG โโ โ Groq LLM โ โ
โ โ (API) โ โ Service โ โ (Slide Generation) โ โ
โ โโโโโโโโโโโ โโโโโโฌโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโผโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ LlamaIndex โ โ HTML Exporter โ โ
โ โ (Retrieval)โ โ (Tailwind + Anim) โ โ
โ โโโโโโโฌโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโผโโโโโโโโโโโโโโโโโโโ โ
โ โ MongoDB Atlas โ โ
โ โ (Vector Search Store) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Hackfest/
โโโ .env # Environment variables (API keys)
โโโ README.md # You are here!
โ
โโโ frontend-react/ # ๐ฅ๏ธ React Frontend (CDN-based, no Node.js)
โ โโโ index.html # HTML shell โ loads React, Babel, Tailwind from CDN
โ โโโ app.jsx # Main React app (components + API calls)
โ โโโ style.css # Stranger Things theme + animation keyframes
โ โโโ particles.js # Floating "Upside Down" spore particles effect
โ
โโโ hackfest_project/ # ๐ Django Backend
โ โโโ manage.py # Django management script
โ โโโ hackfest_project/ # Django project settings
โ โ โโโ settings.py # Config (DB, CORS, API keys, etc.)
โ โ โโโ urls.py # Root URL routing
โ โ
โ โโโ api/ # ๐ REST API app
โ โโโ models.py # Project & Document database models
โ โโโ views.py # API endpoints (upload, generate, render)
โ โโโ urls.py # API URL routing
โ โโโ serializers.py # DRF request validation
โ โโโ prompts.py # LLM system prompts (Stranger Things themed)
โ โโโ llm_client.py # Groq LLM client wrapper
โ โโโ document_loaders.py # PDF/TXT parsing utilities
โ โโโ schemas.py # Pydantic data schemas
โ โ
โ โโโ services/ # Business logic layer
โ โ โโโ ingest_service.py # Document parsing โ chunking โ embedding โ MongoDB
โ โ โโโ rag_service.py # RAG pipeline: retrieve context โ LLM โ HTML slides
โ โ
โ โโโ exporters/ # Output formatters
โ โโโ html_exporter.py # Wraps slides in Tailwind + animations for fullscreen
โ
โโโ frontend/ # (Legacy) Original vanilla HTML/CSS/JS frontend
โโโ test_data/ # Sample documents for testing
โโโ env/ # Python virtual environment
- Python 3.10+ (with pip)
- MongoDB Atlas account with a cluster (free tier works!)
- Groq API key (get one free)
git clone <your-repo-url>
cd Hackfest
# Create virtual environment
python -m venv env
# Activate it
# Windows:
.\env\Scripts\activate
# macOS/Linux:
source env/bin/activatepip install django djangorestframework django-cors-headers
pip install python-dotenv pymongo
pip install llama-index llama-index-vector-stores-mongodb llama-index-llms-groq llama-index-embeddings-huggingface
pip install sentence-transformers PyMuPDFCreate a .env file in the project root:
MONGO_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/<dbname>?retryWrites=true&w=majority
GROQ_API_KEY=gsk_your_groq_api_key_here- Go to your MongoDB Atlas cluster
- Create a database (e.g.,
hackfest_db) - Create a collection (e.g.,
document_chunks) - Go to Atlas Search โ Create Index โ choose JSON Editor and use:
{
"fields": [
{
"type": "vector",
"path": "embedding",
"numDimensions": 384,
"similarity": "cosine"
}
]
}python hackfest_project/manage.py migratepython hackfest_project/manage.py runserverThe Django API will start at http://127.0.0.1:8000/.
Open a new terminal, activate the environment, and:
cd frontend-react
python -m http.server 8080Open http://localhost:8080 in your browser.
- Open
http://localhost:8080in your browser - Drag & drop (or browse) your PDF/TXT files into the upload zone
- Type a query describing what your presentation should cover, e.g.:
"Create a presentation about electromagnetic wave interference patterns"
- Click "GENERATE BRIEFING DECK" and wait for the AI
- Navigate slides with the โ PREV / NEXT โถ buttons or โ/โ arrow keys
- Click "VIEW FULLSCREEN" for a presentation-ready view
To update an existing presentation with new information, just modify your query and click "UPDATE BRIEFING DECK" โ the layout and animations are preserved while the content changes.
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/upload/ |
Upload PDF/TXT files. Returns a project_id. |
POST |
/api/generate/ |
Generate a new slide deck from uploaded docs + query. |
POST |
/api/update/ |
Update an existing presentation (preserves layout). |
GET |
/api/render/<project_id>/ |
Get the fullscreen HTML slideshow. |
GET |
/api/project/<project_id>/ |
Get project details + individual slides as an array. |
# 1. Upload a document
curl -X POST http://127.0.0.1:8000/api/upload/ \
-F "files=@my_document.pdf"
# Response: { "project_id": "abc-123-...", ... }
# 2. Generate slides
curl -X POST http://127.0.0.1:8000/api/generate/ \
-H "Content-Type: application/json" \
-d '{"query": "Summarize the key findings", "project_id": "abc-123-..."}'
# 3. View the presentation
# Open in browser: http://127.0.0.1:8000/api/render/abc-123-.../The entire UI is designed with a Stranger Things / Upside Down aesthetic:
- Dark reddish gradients (
from-[#0a0000] via-[#1a0505] to-[#2a0a0a]) - Glassmorphism cards with red tints and backdrop blur
- Neon red accents and glowing text effects
- Share Tech Mono font for that retro-terminal feel
- Floating particle spores drifting across the screen
- Flickering header animation (like Hawkins Lab lights)
- 7 animation types: fade-in, fade-up, fade-down, fade-left, fade-right, zoom-in, slide-in
- Staggered delays so elements appear sequentially on each slide
User uploads documents
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ 1. INGEST โ PyMuPDF parses PDFs โ chunks text
โ Document Loader โ Sentence-Transformers creates embeddings
โ + Embeddings โ Stores vectors in MongoDB Atlas
โโโโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ 2. RETRIEVE (RAG) โ User query โ vector similarity search
โ LlamaIndex โ Returns top-10 most relevant chunks
โโโโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ 3. GENERATE โ System prompt + context + query
โ Groq LLM โ โ Raw Tailwind HTML slides with
โ (llama/mixtral) โ CSS animations & Stranger Things theme
โโโโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ 4. RENDER โ HTML Exporter wraps slides with
โ HTML Exporter โ Tailwind CDN + animation keyframes
โ โ โ Slideshow with keyboard navigation
โโโโโโโโโโโโโโโโโโโโโโโโโ
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React 18 (CDN) | UI components |
| Styling | Tailwind CSS (CDN) | Slide design + responsive layout |
| JSX Compile | Babel Standalone | In-browser JSX โ JS compilation |
| Backend | Django + DRF | REST API + file handling |
| LLM | Groq (via LlamaIndex) | Slide content generation |
| Embeddings | Sentence-Transformers | Document chunk embeddings |
| Vector DB | MongoDB Atlas | Vector search for RAG retrieval |
| Doc Parsing | PyMuPDF | PDF text extraction |
| Issue | Fix |
|---|---|
ModuleNotFoundError: No module named 'dotenv' |
Run pip install python-dotenv |
| CORS errors in browser console | Make sure django-cors-headers is installed and CORS_ALLOW_ALL_ORIGINS = True in settings.py |
| Blank presentation panel | Check Django server logs for LLM errors. Ensure GROQ_API_KEY is valid. |
| Slides show as one big block | The LLM may not have produced <!-- SLIDE_BREAK --> markers. Try regenerating. |
| Frontend won't load | Make sure you're running python -m http.server from the frontend-react/ directory |
Built for Hackfest ๐
"Mornings are for coffee and contemplation." โ Chief Hopper