"I hate doing repetitive document summarization... so I automated it!"
AI-powered document summarization and quiz generation application. Upload PDFs or text documents to get instant summaries, keyword extraction, and automatically generated comprehension quizzes.
NEW: AutoNotes batch processor - process entire folders of documents in one command!
- π PDF & Text Support: Upload PDF files or paste text directly
- π€ AI-Powered Analysis: Automatic summarization using LLM
- π Keyword Extraction: Identifies key concepts and terms
- β Quiz Generation: Creates 5 multiple-choice questions
- πΎ Persistent Storage: SQLite database for note history
- π¨ Modern UI: Clean, responsive interface
- π Batch Processing: Process entire folders of documents
- β‘ One Command: Analyze dozens of files automatically
- π HTML Index: Beautiful overview of all results
- ποΈ Organized Output: Each document in its own folder with metadata
- π Cross-Platform: Works on Windows, Mac, and Linux
- Python 3.11 or higher
- pip package manager
- Clone the repository:
git clone https://github.com/yourusername/smartnotes.git
cd smartnotes- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env.example .env
# Edit .env and add your LLM API key- Run the application:
python app/main.py- Run the application:
python run.py- Open your browser to
http://localhost:5000
Process entire folders of documents automatically:
# Process a folder of documents
python scripts/auto_notes.py /path/to/documents
# Specify output location
python scripts/auto_notes.py /path/to/documents -o my_output
# Run the demo
bash scripts/run_demo.shWhat you get:
- Organized folder structure (one folder per document)
- metadata.json with full analysis for each document
- summary.txt for quick reference
- Beautiful HTML index showing all results
- Original files preserved
Example:
# Process test fixtures
python scripts/auto_notes.py tests/fixtures -o auto_notes_output
# Open the index
open auto_notes_output/index.html # Mac
start auto_notes_output/index.html # Windows
xdg-open auto_notes_output/index.html # LinuxRun the complete test suite:
pytest tests/ -vRun with coverage report:
pytest tests/ -v --cov=app --cov-report=htmlUpload a document for analysis.
Request:
- Method: POST
- Content-Type: multipart/form-data or application/x-www-form-urlencoded
Parameters:
file: PDF or text file (multipart/form-data)text: Raw text content (form data or JSON)
Response:
{
"id": 1,
"summary": "Document summary...",
"keywords": ["keyword1", "keyword2", "keyword3"],
"quiz": [
{
"q": "Question text?",
"options": ["A", "B", "C", "D"],
"answer_index": 0
}
]
}Health check endpoint.
Response:
{
"status": "healthy",
"service": "SmartNotes"
}- Create a new Heroku app:
heroku create your-app-name- Deploy:
git push heroku main- Set environment variables:
heroku config:set LLM_API_KEY=your_key_heredocker build -t smartnotes .
docker run -p 5000:5000 -e LLM_API_KEY=your_key smartnotessmartnotes/
βββ app/
β βββ main.py # Flask application entry point
β βββ api.py # API endpoints
β βββ models.py # Data models
β βββ db.py # Database layer
β βββ services/
β βββ llm_client.py # LLM integration
β βββ pdf_parser.py # PDF processing
β βββ summarizer.py # Text processing
βββ templates/
β βββ index.html # Frontend HTML
βββ static/
β βββ app.js # Frontend JavaScript
β βββ styles.css # Styles
βββ tests/ # Test suite
βββ .kiro/ # Kiro AI workflows
βββ docs/ # Documentation
Environment variables (see .env.example):
LLM_API_KEY: Your LLM API keyLLM_API_URL: LLM API endpointSECRET_KEY: Flask secret keyDATABASE_PATH: SQLite database pathFLASK_DEBUG: Enable debug modeHOST: Server host (default: 0.0.0.0)PORT: Server port (default: 5000)
This project was built with assistance from Kiro AI. Here's exactly what Kiro generated:
- β Complete directory structure (app/, tests/, docs/, .kiro/)
- β Configuration files (requirements.txt, .env.example, Procfile)
- β Git configuration (.gitignore with .kiro/ included)
- β
Flask application with REST API (
app/main.py,app/api.py) - β
Service layer abstraction (
services/llm_client.py,pdf_parser.py,summarizer.py) - β
Database layer with SQLite (
app/db.py,app/models.py) - β Error handling and logging throughout
- β Environment variable configuration
- β
Single-page application (
templates/index.html) - β
Responsive CSS with modern gradient design (
static/styles.css) - β
Interactive JavaScript (
static/app.js) - β Tab-based interface and quiz functionality
- β
Comprehensive pytest test suite (
tests/test_*.py) - β Mocked external dependencies (LLM, PDF parsing)
- β Test fixtures and sample data
- β Cross-platform compatibility
- β
Batch processing script (
scripts/auto_notes.py) - β
Demo automation (
scripts/run_demo.sh) - β HTML index generation
- β Organized output structure
- β
Tests for AutoNotes (
tests/test_auto_notes.py)
- β Main README with installation and usage
- β Deployment guide (Heroku, AWS, Docker)
- β Git commands and workflow
- β AWS Builder Center blog drafts (2 posts)
- β Demo recording instructions
- β Troubleshooting guides
- β
Workflow definition (
.kiro/kiro.json) with 8 steps - β Task prompts for regeneration (4 prompt files)
- β
Kiro usage documentation (
.kiro/README_kiro.md)
Total: 40+ files, ~3,000+ lines of production-ready code, all generated with Kiro assistance.
See .kiro/README_kiro.md for detailed Kiro workflow documentation.
MIT License - see LICENSE file for details
Contributions welcome! Please open an issue or submit a pull request.