back to work
01Web2024

Ask me anything

Real-time Q&A rooms with live voting, powered by Go WebSockets and React.

Role
Full-Stack
Timeline
2 days
Context
Open-source / Tutorial
Stack
GoTypeScriptReactViteTailwindCSSPostgreSQL
Ask me anything screens
Ask me anything2024
Overview

AMA (Ask Me Anything) is a web platform, developed during Rocketseat's Tech Week, where users can create topic-based rooms to ask questions. These questions can receive likes from other users, making them more visible and of high interest.

Problem

Building a real-time Q&A experience where questions surface organically by community interest, without relying on page refreshes or polling - required a persistent, bidirectional communication layer between server and clients.

Approach

Designs were provided by Rocketseat as part of their Tech Week. The backend was built in Go using Gorilla WebSockets for real-time bidirectional updates and Go-Chi for routing, backed by PostgreSQL with migration support. The React frontend uses TanStack Query for server state and subscribes to WebSocket events for instant UI updates, new questions and votes appear live without any user action.

Key metrics
2 days
Build time
Real-time
Updates via WebSocket
0ms
Refresh needed

Summary

AMA (Ask Me Anything) is a web platform, developed during Rocketseat's Tech Week, where users can create topic-based rooms to ask questions. These questions can receive likes from other users, making them more visible and of high interest.

The backend was built with Go, focusing on real-time communication using Gorilla WebSockets, allowing instant updates for users. It also includes Go-Chi for routing, database migrations, and PostgreSQL as the database engine.

On the frontend, the application uses React with TypeScript, Vite, and TailwindCSS for a clean and responsive UI. Data fetching and state management are handled with TanStack Query, ensuring smooth interaction with the Go API.

Features

  • Room creation
  • Live voting
  • Websocket communication
Gallery
Screens of the AMA web app