Project Story

Building Mydeen AI

How I designed and shipped Mydeen AI — a production-ready intelligent assistant built with FastAPI, Groq, and React — as a college student in Tamil Nadu.

Try Mydeen AI

Why I Built It

In 2024, every developer was talking about building with LLMs but most demos were toy chatbots — one input, one output, no streaming, no production thinking. I wanted to prove to myself (and show others) that a college student can ship something genuinely good.

The goal: an AI assistant that feels fast, handles multi-turn conversations, and does not cost me $200/month to run. The answer was Groq — the fastest inference platform I had ever seen — and FastAPI for async streaming.

The Architecture

Mydeen AI uses a simple but effective architecture. The React frontend sends messages to a FastAPI backend. The backend maintains a sliding context window and streams tokens back via Server-Sent Events (SSE). Each token renders in the UI as it arrives, making responses feel instantaneous even when the model is still generating.

Frontend

  • React.js
  • TypeScript
  • Tailwind CSS
  • Framer Motion

Backend

  • FastAPI (Python)
  • Groq API
  • Streaming responses

Deployment

  • Vercel (frontend)
  • Railway (backend)
  • GitHub CI

Architecture

  • Server-Sent Events (SSE)
  • Async queue
  • Rate limiting

The Hard Parts

Latency

Getting AI responses to feel instant. Solved with streaming (SSE) so the UI renders each token as it arrives, not after the full response.

Context Management

Maintaining conversation context across requests without blowing up cost or latency. Built a sliding window context strategy.

Rate Limiting

Preventing abuse without a login wall. Used IP-based rate limiting with a generous per-minute threshold for genuine users.

Core Streaming Pattern

# FastAPI streaming endpoint
@app.post("/chat/stream")
async def chat_stream(req: ChatRequest):
    async def event_generator():
        async for chunk in groq_client.chat.completions.create(
            model="llama3-70b-8192",
            messages=build_context(req.messages),
            stream=True,
        ):
            token = chunk.choices[0].delta.content or ""
            yield f"data: {json.dumps({'token': token})}\n\n"

    return StreamingResponse(event_generator(),
        media_type="text/event-stream")

What I Learned

Building Mydeen AI taught me more in two months than a full semester of coursework. Real constraints force real engineering decisions. How do you handle a model that sometimes stalls? How do you give users feedback when the stream delays? How do you manage API costs at scale?

Shipping this project gave me the confidence to write about production engineering — because I had been in production. If you are a student, build something real and deploy it. Even if nobody uses it, you will learn faster than any tutorial.