Skip to content

AI-powered study notes generator using Next.js, Kafka, Redis, and AWS S3. Upload PDFs and generate structured summaries with Hugging Face models.

Notifications You must be signed in to change notification settings

konvictgit/AI-notes-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.


πŸš€ Tech Stack

πŸ“˜ Summara - AI Notes Generator

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.


πŸš€ Tech Stack

🧠 AI / GenAI

GenAI
LLMs
Hugging Face
NLP

🌐 Frontend

Next.js
React
TailwindCSS
Axios
jsPDF

βš™οΈ Backend / Worker

Node.js
Express.js
KafkaJS
Redis
Supabase
AWS S3
Multer
pdf-parse

πŸ› οΈ Infrastructure

Docker
Apache Kafka
Redis
Supabase


Frontend (Next.js + React)

  • 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)
  • Streaming: KafkaJS (for Kafka integration)
  • Build Tools: PostCSS, Autoprefixer

Worker / Backend

  • 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

Infrastructure

  • Containerization: Docker + docker-compose
  • Cloud Storage: AWS S3
  • Message Broker: Apache Kafka
  • Cache: Redis
  • Supabase: Auth, metadata, and optional storage

πŸ“‚ Project Structure

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


πŸ”„ Architecture Overview

High-Level Components

  • 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).

πŸ“Š Architecture Map

Architecture Map

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.

πŸ”€ Sequence Flow

  1. User β†’ Frontend (Next.js) β†’ Upload file/request summary.
  2. Frontend β†’ AWS S3 β†’ Upload file.
  3. Frontend β†’ Supabase β†’ Store metadata/auth.
  4. Frontend β†’ Kafka β†’ Publish job request.
  5. Kafka β†’ Worker (Express.js) β†’ Worker consumes job.
  6. Worker β†’ Redis β†’ Cache intermediate results.
  7. Worker β†’ PDF Tools β†’ Parse/process PDF.
  8. Worker β†’ AWS S3 β†’ Store processed output.
  9. Worker β†’ Supabase β†’ Store job status/result metadata.
  10. Worker β†’ Frontend β†’ Send results back.
  11. Frontend β†’ User β†’ Deliver summary/downloadable notes.

🐳 Running with Docker

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

About

AI-powered study notes generator using Next.js, Kafka, Redis, and AWS S3. Upload PDFs and generate structured summaries with Hugging Face models.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published