Hello World
FastAPI + Microservices + Auth Demo
🔐 Authentication Module (hit.auth)
Demonstrates hit.auth SDK integration
📧 Email Module (hit.email)
Demonstrates hit.email SDK integration
Local Counter
⚠ UNTESTEDStored in this service's database
Database: hello_world
💡 Direct database access within this service
Via API
⚠ UNTESTEDFrontend → API Service → ping-pong (via Python SDK)
Path: Frontend → API (8085) → ping-pong (8099)
🔄 Frontend calls API, API uses Python SDK
Frontend → API Connection:
Direct SDK
⚠ UNTESTEDFrontend → Next.js route → ping-pong (TypeScript SDK server-side)
Path: Frontend → /api/direct-counter → ping-pong (8099)
🚀 Next.js route calls TypeScript SDK with server-side env vars
📡 Event Log (Pub/Sub)
hit-hello_worldDisconnectedWaiting for WebSocket connection...
No messages yet
Send a message below to see it appear here and in other apps!
💡 Pure pub/sub demo - no database, just Redis events. Messages shown to last 20.
Channel: hit:events:hit-hello-world:chat.*
🎯 What This Demonstrates
Local Counter
- ✓ Traditional single-service architecture
- ✓ Direct database access
- ✓ Fast (no network calls)
- ✓ Simple for basic apps
Via API
- ✓ Frontend → API → ping-pong
- ✓ API uses Python SDK
- ✓ Backend handles communication
- ✓ Works with CORS restrictions
Direct SDK
- ✓ Frontend → Next.js route → ping-pong
- ✓ Route uses TypeScript SDK with server env vars
- ✓ Avoids exposing service URLs to browser
- ✓ Works without CORS from ping-pong service
Try this: Increment all three counters multiple times. Notice they're completely independent! The local counter is stored in this service's database, while both microservice counters are stored in the ping-pong service's database. Compare the "Via API" and "Direct SDK" methods to see which works in your environment.