readme_content = """# Summara - AI Notes Generator
Summara is a full-stack GenAI project that automates study notes generation from PDFs and other content.
It integrates modern web technologies, event streaming, caching, and cloud storage to build a scalable system.
Summara is a full-stack GenAI project that automates study notes generation from PDFs and other content.
It leverages Large Language Models (LLMs) via Hugging Face Inference API, combining AI-driven summarization with a scalable event-driven backend.
- Framework: Next.js 13.4
- UI: React 18, TailwindCSS, Lucide React, React Icons
- API / Data fetching: Axios
- PDF Export: jsPDF
- Cloud / Storage:
- AWS SDK S3 client (
@aws-sdk/client-s3,@aws-sdk/s3-request-presigner) - Supabase (
@supabase/supabase-js)
- AWS SDK S3 client (
- Streaming: KafkaJS (for Kafka integration)
- Build Tools: PostCSS, Autoprefixer
- Framework: Express.js
- Env Management: dotenv
- Cache: Redis (
ioredis) - Streaming / Queue: KafkaJS
- Cloud / Storage:
- AWS SDK S3 client
- Supabase
- File Upload / Processing: Multer
- PDF Parsing: pdf-parse
- Security/Utility: CORS, crypto-js, node-fetch
- Containerization: Docker + docker-compose
- Cloud Storage: AWS S3
- Message Broker: Apache Kafka
- Cache: Redis
- Supabase: Auth, metadata, and optional storage
ai-study-notes-generator/ βββ frontend/ # Next.js frontend β βββ pages/ # UI pages β βββ components/ # React components β βββ package.json # Frontend dependencies βββ worker/ # Express.js worker β βββ index.js # Worker entrypoint β βββ package.json # Worker dependencies βββ docker-compose.yml # Service orchestration βββ README.md
markdown Always show details
Copy code
- Frontend (Next.js) β Handles file upload, user interface, and triggers jobs.
- Kafka β Queues job requests for asynchronous processing.
- Worker (Express.js) β Consumes Kafka jobs, processes documents, and interacts with Redis, AWS S3, Supabase.
- Redis β Caches intermediate processing states.
- AWS S3 β Stores uploaded and processed files.
- Supabase β Stores metadata, auth, and job status.
- PDF Tools β
pdf-parse(extraction) +jsPDF(export).
Flow:
- Frontend publishes jobs to Kafka.
- Worker consumes jobs and processes PDFs.
- Redis is used for caching.
- Results are stored in AWS S3 and Supabase.
- User gets downloadable study notes.
- User β Frontend (Next.js) β Upload file/request summary.
- Frontend β AWS S3 β Upload file.
- Frontend β Supabase β Store metadata/auth.
- Frontend β Kafka β Publish job request.
- Kafka β Worker (Express.js) β Worker consumes job.
- Worker β Redis β Cache intermediate results.
- Worker β PDF Tools β Parse/process PDF.
- Worker β AWS S3 β Store processed output.
- Worker β Supabase β Store job status/result metadata.
- Worker β Frontend β Send results back.
- Frontend β User β Deliver summary/downloadable notes.
docker-compose up --build This starts: Frontend on http://localhost:3000 Worker API on http://localhost:4000 Kafka Broker Redis Server Connected AWS S3 + Supabase π¦ Environment Variables Frontend .env env Always show details Copy code NEXT_PUBLIC_AWS_REGION=us-east-1 NEXT_PUBLIC_AWS_ACCESS_KEY_ID=your-key NEXT_PUBLIC_AWS_SECRET_ACCESS_KEY=your-secret NEXT_PUBLIC_S3_BUCKET=your-bucket NEXT_PUBLIC_SUPABASE_URL=https://xyz.supabase.co NEXT_PUBLIC_SUPABASE_KEY=your-key Worker .env env Always show details Copy code AWS_REGION=us-east-1 AWS_ACCESS_KEY_ID=your-key AWS_SECRET_ACCESS_KEY=your-secret S3_BUCKET=your-bucket SUPABASE_URL=https://xyz.supabase.co SUPABASE_KEY=your-key REDIS_URL=redis://localhost:6379 KAFKA_BROKERS=broker1:9092,broker2:9092 π Use Cases Generate study notes from PDFs. Export AI summaries as downloadable PDFs. Handle large file uploads asynchronously via Kafka. Use Redis caching for fast retrieval. Store documents securely in AWS S3. Track job status and metadata in Supabase. π§© Future Enhancements Add LLM-based summarization via Hugging Face / OpenAI. Real-time WebSocket updates for job status. Multi-user auth with Supabase. Analytics dashboard for summaries generated. """