Breeze
An ai powered chat and pdf assistant
Created on 20th January 2026
β’
Breeze
An ai powered chat and pdf assistant
The problem Breeze solves
AI Chat Platform
A full-stack AI chat and pdf application
π Authentication using NextAuth
π¬ Real-time AI chat with OpenAI
π§ Chat session auto-generation
ποΈ Supabase DB storage for chats/messages
β Favourites & history
π« Rate limiting per user
β‘ Server Actions for backend logic
π¨ Modern UI with Tailwind + ShadCN
| Category | Tech |
|---|---|
| Framework | Next.js 14 (App Router) |
| AI | OpenAI (AI SDK) |
| DB | Supabase / PostgreSQL |
| Auth | NextAuth |
| Styling | Tailwind CSS, ShadCN |
| Deployment | Vercel |
app/
βββ (auth)/
βββ api/
β βββ v1/
β βββ chat/
β βββ route.ts
β βββ rate-limit/route.ts
β βββ favourite/route.ts
βββ actions/
β βββ chatSession.ts
components/
lib/
supabase/
.env.local
NEXTAUTH -------------------------
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key
OPENAI ---------------------------
OPENAI_API_KEY=your-openai-key
SUPABASE -------------------------
SUPABASE_URL=https://xxxxx.supabase.co
SUPABASE_ANON_KEY=your-public-anon-key
SUPABASE_SERVICE_KEY=your-service-role-key
RATE LIMIT -----------------------
RATE_LIMIT=5
Local Development
npm install
npm run dev
DEPLOYMENT
git add .
git commit -m "Deploying to Vercel"
git push origin main
- Import repo into Vercel
- Add all environment variables
From .env.local
- After deployment, update:
- NEXTAUTH_URL=https://your-
Challenges I ran into
There are some challenges that come in building this application
- Architecture & System Design Challenges
πΉ Server vs Client Components (Next.js App Router)
Deciding what runs on Server Components, Client Components, or Edge
AI calls often require secrets β must stay server-side
Overusing client components can hurt performance
Challenge: Clean separation of concerns without duplicating logic
πΉ API Layer Design
Choosing between:
Next.js Route Handlers
Separate backend (NestJS, FastAPI, etc.)
AI workloads can be long-running or streaming
Challenge: Avoid blocking requests and manage async AI workflows - Performance & Scalability
πΉ AI Latency
LLM calls are slow (1β10+ seconds)
Streaming responses complicate UI logic
Users expect instant feedback
Challenge: Maintaining good UX despite slow AI responses
Mitigations:
Token streaming
Skeleton loaders
Background jobs + polling
πΉ Cold Starts & Serverless Limits
Serverless functions may cold-start
AI SDKs increase bundle size
Edge runtime has limited Node APIs
Challenge: Choosing the right runtime (Node vs Edge)
πΉ Caching Complexity
AI responses are often:
Non-deterministic
User-specific
Contextual
Challenge: Traditional caching strategies often donβt apply - Data & State Management
πΉ Prompt Engineering at Scale
Prompts evolve frequently
Hard-coded prompts become unmaintainable
Challenge: Versioning, testing, and managing prompts like code
Tracks Applied (1)
AOPS
Technologies used
