DEV Community

kol kol
kol kol

Posted on

The Hidden Cost of Monolithic Frontends — Why I Switched to Component-First Architecture

The Art of the One-Person Tech Stack: How I Run Multiple Products Without Losing My Mind

Most startup advice assumes you have a team. "Hire a backend engineer." "Get a DevOps person." "Your CTO should handle infrastructure."

But what if you're one person shipping multiple products? You don't have the luxury of specialization. You need a stack that compounds — where every hour spent learning pays dividends across all your products.

Here's the tech stack I built to run a multi-product portfolio solo, and why each choice matters more than you think.


The Core Principle: Leverage Over Perfection

When you're a solo developer, the question isn't "what's the best technology?" It's "what technology will save me the most hours across all my products?"

That means choosing tools that:

  • Share authentication across products
  • Use the same deployment pipeline
  • Have overlapping skill requirements
  • Don't require dedicated ops people

1. The Framework: Next.js (Not Because It's Trendy)

I chose Next.js not because it's fashionable — but because it collapses 4 jobs into 1:

  • Frontend → React components
  • Backend → API routes
  • SSR/SEO → Built-in server rendering
  • Deployment → Zero-config on Vercel

Before this, I was juggling a separate Express backend, a React SPA, an Nginx config, and a Docker compose file. That's 4 surfaces for bugs to hide in. With Next.js, it's one codebase, one npm run dev, one deploy button.

The real win: Every bug I fix in one product's pattern applies to all of them. Shared components, shared middleware, shared error handling.

2. The Database: PostgreSQL + Supabase

Here's why I didn't go with MongoDB, Firebase, or any NoSQL option:

Relational data is multi-product data. When your products share users, billing records, and analytics, you need joins. You need transactions. You need data integrity.

Supabase gave me:

  • Postgres (battle-tested, no lock-in)
  • Real-time subscriptions out of the box
  • Row-level security for multi-tenant patterns
  • Auto-generated TypeScript types from my schema

The killer feature? Row-Level Security (RLS). I can run multiple products on a single database instance and let Postgres enforce isolation. No custom middleware, no leaky abstractions. Just policy statements in SQL.

-- Users can only access their own data
CREATE POLICY "User isolation" ON user_data
  FOR ALL USING (auth.uid() = user_id);
Enter fullscreen mode Exit fullscreen mode

That single line replaces hundreds of lines of authorization code in a traditional backend.

3. The Auth: NextAuth.js with Provider Agnosticism

Authentication is the one thing you absolutely cannot get wrong. A data leak in auth is game over.

NextAuth.js handles:

  • OAuth (Google, GitHub, Twitter)
  • Email magic links
  • Session management
  • JWT rotation
  • CSRF protection

The multi-product trick: I run a shared auth service that all products point to. One user table, one session store, sign up once, access everything. It's basically SSO for a one-person company.

4. The Payments: Lemon Squeezy (Not Stripe)

Stripe is great. Lemon Squeezy is better for solo founders because it's a Merchant of Record. That means:

  • They handle global tax compliance (VAT, GST, sales tax)
  • No need to register as a business entity in every jurisdiction
  • They file the tax returns
  • You just get paid

For a solo dev shipping globally, that's not a convenience — it's the difference between launching in 3 countries and launching everywhere.

5. The Deployment: Vercel + GitHub Actions

One git push and everything happens:

  • Tests run
  • Preview deploy (every PR gets a URL)
  • Production deploy (on main branch)
  • Database migrations (via GitHub Actions)
  • CDN propagation (automatic)

The numbers: My deployment pipeline handles 8 products. Total CI/CD config: 3 files. Average deploy time: 45 seconds.

The Stack in Numbers

Layer Technology Why
Framework Next.js 15 Full-stack, one codebase
Database PostgreSQL + Supabase RLS, real-time, types
Auth NextAuth.js Provider agnostic, secure
Payments Lemon Squeezy MoR = no tax headaches
Deploy Vercel Zero-config, instant rollbacks
Monitoring Vercel Analytics + Sentry Free tier covers early stage
CI/CD GitHub Actions 2000 free minutes/month

What I Avoided (And Why)

Docker/Kubernetes: Overkill for products with <1000 users. Adds complexity without benefit at this scale.

Microservices: The coordination cost kills solo teams. Monorepo > microservices when you're one person.

GraphQL: REST + TypeScript types gets you 95% there with less boilerplate.

Self-hosted everything: Your time is the scarcest resource. Pay for managed services that save you hours.

The Real Lesson: Stack Choices Are Business Decisions

Every technology choice is a bet on your future time. When you're solo, that bet has to pay off across multiple products.

The stack above isn't the most technically impressive. It won't win Hacker News. But it lets me ship fast, stay lean, and focus on what actually matters — building products people want to pay for.

Because at the end of the day, the best tech stack is the one that gets out of your way.


What's in your solo dev stack? What would you change? Drop a comment — I'm always looking to optimize.

Top comments (0)