The challenge was straightforward but restrictive: build a comprehensive cross-platform business management suite and salesperson credit system for a real client without racking up massive monthly infrastructure costs. When building Vardhman Saathi, I needed an architecture that scaled down to zero cost when idle but could handle daily operations reliably.
I opted for a highly decoupled, heavily optimized tech stack designed specifically to live within generous free tiers.
"You don't need a data center. You need the right architecture."
For the database and authentication, I used Supabase. By leveraging PostgreSQL Row Level Security (RLS) policies directly within Supabase, I eliminated the need for a massive middleware layer just to handle authorization. The database handled access control natively, keeping the backend lean.
The backend itself was written in TypeScript using Hono, deployed as a REST API on Render. It handles core business logic, Google OAuth integration, and Server-Sent Events (SSE) for real-time notifications to the desktop client. To ensure the mobile application (built in React Native) stayed perfectly synchronized, I integrated the Firebase Admin SDK to push real-time updates directly to the Android app.
Image storage is traditionally where costs spiral. Instead of AWS S3, I utilized Cloudflare R2, which offers 10 GB/month of free storage with zero egress fees. This single decision effectively nullified the client's asset hosting costs.
// Example Hono route for secure asset retrieval
app.get('/api/assets/:id', async (c) => {
const assetId = c.req.param('id');
const asset = await r2.get(assetId);
return c.body(asset.body);
});
By heavily researching cloud providers and writing efficient, decoupled code (Electron desktop, React Native mobile, Hono backend), I successfully brought the total monthly operating bill to just $7/month, completely eliminating database and storage costs.
You can see the final product architecture live at vardhmansaathi.shop.