Insights
Flutter, Go, and PostgreSQL: the stack behind a multi-role product
A stack is a set of decisions about who has to maintain what. This note explains the one behind RecycleOrigin, layer by layer, and where it stops being the right answer.
Why Flutter for the clients?
RecycleOrigin has three roles: generators, collectors, and facilities. Each sees a different app, and all three exist on iOS and Android. Building each natively would mean six codebases. Flutter compiles one Dart codebase to native code for both platforms and can target the web, so three roles become three apps instead of six, sharing models and API code.
The cost is at the edges. Hardware or operating-system features without a maintained plugin need platform-specific code through platform channels. When most of an app is that kind of work, native is the honest choice. The comparison is in Flutter vs native for a B2B mobile app.
Why Go for the services, and where does Python fit?
The API layer of a multi-role product spends its time waiting on the database, on other services, and on many phones at once. Go was designed for that. Goroutines make concurrent requests cheap, and the build produces one static binary that starts fast and deploys as a small container.
Python sits beside it for work where its libraries matter more than raw throughput: data processing, optimisation, and anything that touches a model. The split keeps each service in the language that suits its job. The routing problem RecycleOrigin solves is described in route optimisation for recyclable collection.
Why PostgreSQL as the system of record?
An operational product needs one place where the truth is: who requested a pickup, who collected it, what the facility weighed. PostgreSQL gives transactions, constraints, and a data model that stakeholders can read. Those properties matter more for this kind of product than a schema-free store's flexibility.
For SaaS, PostgreSQL also offers row-level security, which lets the database itself refuse a query that crosses a tenant boundary. Whether to rely on that or on separate schemas is in multi-tenant SaaS architecture decisions.
Why Docker, and where does it run?
Docker packages each service with its dependencies so the build that passed tests is the build that runs in production. It also keeps the hosting decision open. We deploy to Cloudflare, AWS, and GCP, and the region is chosen per product to match contracts and latency, not because the studio is in Istanbul.
| Layer | Choice | What it does | When we would choose differently |
|---|---|---|---|
| Clients | Flutter (Dart) | One codebase for iOS, Android, and web across three roles | Heavy hardware or OS-specific features |
| API services | Go | Concurrent request handling in a single static binary | Your team already operates another backend language |
| Data and optimisation | Python | Data processing and optimisation work | No such workload in the first release |
| System of record | PostgreSQL | Transactions, constraints, row-level security | A managed store you are already contractually tied to |
| Packaging | Docker | The same image from test to production | A fully serverless product |
| Hosting | Cloudflare, AWS, or GCP | Region chosen per product | A region or provider your contract dictates |
When would we choose something else?
If your team already runs and hires for a different stack, the best stack is usually yours, because you will maintain the product after handover. If the product is a content site or a browser-only dashboard, a web framework is simpler than Flutter. If the first release is a single integration, it may not need a new service at all. We say so in discovery. This stack is what we reach for when a product has several roles on mobile and one operational record behind them.
The product is described on RecycleOrigin. For a subscription product start with SaaS platform development.
Sources and further reading
- Flutter architectural overview — how Flutter compiles and renders.
- Effective Go — the Go project's guide, including goroutines and concurrency.
- Row security policies — PostgreSQL documentation.
- Docker overview — Docker documentation on images and containers.
- RecycleOrigin — the live product this note describes.
FAQ
What tech stack does Reorigin use?
The public example is RecycleOrigin: Flutter clients, Go and Python services, PostgreSQL, and Docker, deployed to Cloudflare, AWS, or GCP. It is the stack we use when it fits the product, not a rule.
Why use Flutter instead of native apps?
One Dart codebase compiles to native code for iOS and Android. For a product with several roles that avoids doubling every app. Native is better when the app depends on platform-specific hardware features.
Is Go a good choice for a SaaS backend?
It suits API services that handle many concurrent requests, because goroutines are cheap and the build is a single static binary. Python is the better fit for data and optimisation work.
Can PostgreSQL isolate tenants in a multi-tenant SaaS?
Yes. Row-level security lets the database apply a tenant filter to every query. Schema-per-tenant and database-per-tenant are the stricter options.