Architecture overview
The parts of ShopNexus and how they connect, from the Android app to the stores behind the server.
ShopNexus is a native Android app and one Go server. The server is a modular monolith: one binary, cut into modules that each own their tables and expose a service the others call. It serves the HTTP API on port 8080 and the endpoint Restate calls on port 9080.
flowchart LR app[Android app] -->|HTTP API, live stream| server[Go server<br/>modules] app -->|phone check| firebase[Firebase] app -->|photo upload| rustfs[(RustFS)] server --> pg[(Postgres<br/>ParadeDB)] server <-->|durable flows, events| restate[Restate] server --> rustfs server -->|verify sign-in token| firebase server --> push[FCM push] server --> llm[LLM provider]
Postgres 18 with ParadeDB holds every table and the full-text index that search runs on. Restate runs the few use cases that must finish after a crash, and delivers events from one module to the others. RustFS stores photos behind an S3 API: the app uploads straight to it with a presigned URL, and the server turns each upload into a resized public photo.
The app verifies a phone number with Firebase and hands the server the token Firebase returns. The server sends push notifications through Firebase Cloud Messaging, and asks a language model, over an OpenAI-compatible API, what a search query means.
While Restate is down, reads, sign-in refresh and every use case that is not a durable flow keep working, and events wait in their table.