A walkthrough of every moving part behind Srirama's Assistant — from the browser to the AI model and back, including the live database, serverless backend, and how it all ties together for under $20 a year.
Handles domain registration and DNS for srirama.dev. Routes traffic to the right place when someone types the URL — the entry point for every visit to the site.
$12 / yearHosts and serves the website globally. Every code change pushed to GitHub automatically triggers a fresh deploy — no manual steps, no infrastructure to manage.
free tierThe secure backend that handles chat requests. Keeps the AI credentials safely server-side and acts as the bridge between the browser and the Anthropic API.
serverlessThe AI brain behind the chatbot. Receives the conversation and generates intelligent, context-aware replies. You pay only for what you use — no fixed monthly AI cost.
pay per useThe live database powering two things — the visitor counter on every page, and storing ideas submitted by visitors. Runs quietly in the background with zero configuration needed.
free tierThe entire site is built to work seamlessly on any screen size — phones, tablets, desktops. No pinching, no zooming, no broken layouts. Feels native on both iOS and Android.
iOS + Androidchat.js appends the message to the local conversation history array and renders it immediately. A typing indicator with bouncing dots appears while waiting for a response.
The full conversation history — every prior message in the session — is sent to the serverless endpoint so Claude has complete context for a relevant reply.
A redirect rule in netlify.toml maps /api/* to /.netlify/functions/:splat invisibly — the browser never sees the actual function path.
chat.js prepends the system prompt, validates messages, then calls the Claude API. The API key is read from process.env — never sent to or visible in the browser.
The model reads the system prompt and full conversation, generates a reply, and returns it as JSON to the serverless function which extracts the text and sends it back to the browser.
chat.js removes the typing indicator, renders the reply with basic markdown support (bold, inline code), appends it to history, and scrolls to the bottom. Ready for the next message.
| Service | What it does | Plan | Cost |
|---|---|---|---|
| Cloudflare | DNS + domain registration for srirama.dev | Registrar | $12 / year |
| Netlify | Hosting, CDN, serverless functions, SSL, auto-deploy | Free tier | $0 |
| Supabase | PostgreSQL for visitor counts and idea submissions | Free tier | $0 |
| Anthropic API | Claude AI model powering the chatbot responses | Pay per use | ~$0–5 / mo |
| GitHub | Version control, source of truth for deployments | Free (private) | $0 |
| Total (year 1, light usage) | ≈ $12–72 / year | ||
The chatbot is live — ask it anything. Check the ideas page to see what's being built next.