Inspiration

Forums are basically “community mood sensors”, but most discussion UIs stay static even when the conversation turns heated or toxic. I wanted to prove that a headless forum backend (Foru.ms) + a generative frontend (v0) can create a forum that is both fun and practical: it reacts to tone, and it gives readers instant context on long threads.

What it does

  • Full forum experience powered by Foru.ms: browse threads, open a thread, read replies, register/login, create threads, and reply.
  • AI “Thread Status” panel (Gemini): one click generates a TL;DR, key points, and an overall sentiment label for the thread.
  • AI thread recommendations: finds the most related threads and explains why they match.
  • Mood-driven UI: the homepage computes the community’s dominant mood and subtly shifts the page background + stats styling to match.

How we built it

  • Next.js App Router for server components + routing.
  • A server-side forumsApi wrapper that talks to Foru.ms using FORU_MS_API_URL + FORU_MS_API_KEY (kept server-side).
  • Next.js API routes for auth, creating threads, and replying, with the user token stored in an HTTP cookie (forumUserToken).
  • Gemini via @google/genai for structured outputs (summary/sentiment/recommendations) enforced with Zod JSON schemas so the UI stays reliable.
  • v0 + shadcn/ui (Radix) + Tailwind CSS for fast UI iteration.

Challenges we ran into

  • Different API response shapes (arrays vs { threads: [...] } / { posts: [...] }) → added defensive parsing.
  • LLM rate limits / quota → graceful fallbacks so the app still works without AI.
  • Keeping the Foru.ms API key private while still supporting rich client interactions → split server/client API layers.

Accomplishments that we're proud of

  • End-to-end forum UX built on a headless backend, with auth + thread + post flows.
  • AI features that return machine-readable JSON (not fragile text) and drop directly into UI.
  • A unique “mood-driven” identity that makes the forum feel alive, not generic.

What we learned

  • Headless APIs are a superpower: you can reinvent the forum UX without rebuilding the backend.
  • Schema-guided prompting is the difference between “cool demo” and “ship-ready AI”.
  • Building AI features as API routes makes them composable and easy to extend.

What's next for MoodForum

  • Add a semantic search UI (the API route is already implemented) so users can search by meaning, not keywords.
  • Add inline sentiment badges per thread/post + a lightweight moderation view.
  • Add AI reply suggestions to help users respond constructively in heated threads.

Built With

Share this project:

Updates