← Back to portfolio

Project Story

How Nurun Keeps Context Alive Across AI Rate Limits

Nurun started from one problem: free AI models lose context when a chat reaches limit. The fix was not prompt tricks. The fix was architecture. Every message is stored, reconstructed, and forwarded with full history before each model call.

Core Architecture

The backend keeps conversation state in PostgreSQL and treats model providers as interchangeable execution layers. If provider A fails because of quota, provider B can continue instantly with the same reconstructed context.

Request flow

User message → Persist message → Rebuild conversation context → Call provider → Persist response → Return result

Security and User Isolation

JWT auth is used for per-user isolation. Conversation ownership is validated on every request, so no user can read another user's history.

Deployment Decisions

The app runs on DigitalOcean with Spring Boot, React, Docker Compose, Nginx reverse proxy, and SSL. This keeps operations simple while production-ready.

Stack: Java, Spring Boot, Spring Security, PostgreSQL, React, Docker, Nginx, DigitalOcean