Hien Phan Logo
Published on

How I Prototype Fast with Next.js and Supabase

4 min read
Authors

Table of Contents

My 'Minimum Viable Stack' for Rapid Prototyping: Next.js, Supabase, and How I Ship in Days, Not Weeks

There’s this gnawing feeling when a killer idea hits you. You’re buzzing with excitement, ready to build.

But then, the reality of setting up a tech stack hits. Suddenly, that exciting idea feels like it’s miles away, buried under endless configuration files and framework choices.

It’s like wanting to build a simple shed, but feeling like you need to construct a skyscraper before you can even lay the foundation.

This paralysis is real, especially when you're a solo founder. The sheer volume of options out there - from backend-as-a-service providers to frontend frameworks - can be completely overwhelming.

You spend days, sometimes weeks, just researching and debating, and before you know it, the initial spark of your idea has faded. You’re stuck in "analysis paralysis," never actually shipping anything.

I’ve been there, many times. That’s why I’ve refined my approach to building MVPs with a focus on speed and simplicity. My "Lean Stack" principles are pretty straightforward:

  1. Serverless-first: I want to minimize infrastructure management. The less I've to worry about servers, the more time I've to build features and talk to users.
  2. Integrated Auth/DB: Having authentication and a database that work seamlessly together is a huge time saver. I don’t want to spend days connecting separate services.
  3. Opinionated Frameworks: I prefer tools that make strong decisions for me. This reduces the number of choices I've to make and speeds up development.
A developer coding on a laptop with a clean desk setup, symbolizing rapid prototyping.

This is where my current go-to stack comes in: Next.js for the frontend and Supabase for the backend.

Setting Up Next.js + Supabase in Minutes

Setting up a new project with this stack is incredibly fast.

First, I create a new Next.js app:

npx create-next-app@latest my-new-mvp
cd my-new-mvp

Then, I spin up a new Supabase project from their website. It takes literally minutes to get a project with a PostgreSQL database, authentication, and even a built-in admin UI.

I connect them by installing the Supabase client library:

```bash
npm install @supabase/supabase-js

And then configuring the Supabase client in my `utils/supabaseClient.js` (or similar):

```javascript
import { createClient } from '@supabase/supabase-js';

const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL;
const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;

export const supabase = createClient(supabaseUrl, supabaseAnonKey);

You just need to grab your project URL and anon key from your Supabase dashboard and add them to your `.env.local` file. That’s it. you've a fully functional backend ready to go.

![A screenshot showing a Supabase dashboard with project details and API keys.](/static/images/blog/A_screenshot_showing_a_Supabase_dashboard_with_pro_221919197_1.jpg)

### Real-World Impact: My 52-Product Challenge

I've used this exact stack for several of my products in the 52-product challenge. For instance, I built a simple content scheduler tool. The core functionality involved users creating posts, scheduling them, and then having a backend process (which Supabase Functions can handle) to push them out.

With Next.js, I could quickly set up protected routes for user dashboards and easily integrate Supabase Auth. Fetching and displaying data from Supabase was a breeze, thanks to their client library and the automatic API generation.

What would have taken me days of setting up user management, database schemas, and API endpoints with a more traditional stack, took me just a few hours with Next.js and Supabase. I was able to focus on the unique value proposition of the scheduler (its intuitive interface and scheduling logic) rather than the plumbing.

This stack allowed me to get a functional MVP out the door in about **3 days**. Compare that to the weeks I used to spend just on the initial setup, and the difference is massive. It’s about shipping value, not just code.

![A simple UI mock-up of a task manager or content scheduler built with Next.js and Supabase.](/static/images/blog/A_simple_UI_mock_up_of_a_task_manager_or_content_s_418889763_1.jpg)

### Your Actionable Roadmap

If you're feeling that same frustration of slow development cycles, I highly recommend giving Next.js and Supabase a try for your next MVP.

Here’s your simple roadmap:

1.  **Start a New Next.js Project:** Use `create-next-app`.
2.  **Create a Supabase Project:** Sign up and create a new project on Supabase.
3.  **Connect Them:** Install the Supabase JS client and configure your environment variables.
4.  **Build Features:** Leverage Supabase Auth for sign-up/login and start querying/mutating your database.

This combination removes so much of the boilerplate and decision fatigue, letting you focus on what truly matters: building a product that people will use. You can ship in days, not weeks, and start getting real feedback that much faster. That’s the power of a lean, opinionated stack.
Hien Phan

Struggling to turn ideas into profitable products? Building 52 products in 365 days, sharing the real journey from concept to revenue. Weekly insights on product development and solo founder lessons.

📚 Join readers reading 87+ articles on building profitable products

How I Prototype Fast with Next.js and Supabase | Hien Phan - Solo Developer Building 52 Products in 365 Days