Inspiration
Retail investors in India spend hours manually analyzing stock data across scattered platforms. I wanted to build a tool that lets anyone query financial datasets in plain English — no Excel, no finance degree required.
What I learned
- How to build a production-grade RAG pipeline with pgvector and OpenAI embeddings
- How to stream LLM responses token-by-token using Next.js 15 App Router
- How to design composite-indexed PostgreSQL schemas for fast queries on large datasets
- How to secure APIs with JWT authentication and rate limiting at scale
How I built it
AI Layer: RAG pipeline using OpenAI embeddings stored in PostgreSQL pgvector, enabling natural-language queries over financial datasets with token-by-token streaming — reducing perceived latency by ~60%.
Backend: FastAPI with a Moving Average Crossover algorithm for stock trend analysis. Composite-indexed PostgreSQL schema via Prisma cut query time on 100K+ row datasets by ~40%.
Frontend: Next.js 15 App Router with React Server Components for fast, streaming UI.
DevOps: Dockerized full stack with GitHub Actions CI/CD. JWT auth + rate limiting (100 req/min) securing all endpoints.
Challenges
- Optimizing pgvector similarity search across large financial datasets without latency spikes
- Streaming partial LLM responses while simultaneously running ML analysis in the background
- Designing a schema that performs well on both time-series queries and vector similarity search
Built With
- ai
- docker
- fastapi
- github-actions
- jwt
- next.js
- openai-api
- pgvector
- postgresql
- prisma
- python
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.