Skip to main content
This guide will walk you through cloning the repository and installing all necessary dependencies.

Clone the Repository

1

Clone via Git

Clone the repository to your local machine:
git clone https://github.com/dodopayments/dodo-supabase-subscription-starter.git
2

Navigate to Project Directory

Change into the project directory:
cd dodo-supabase-subscription-starter

Install Dependencies

Install the project dependencies using your preferred package manager:
npm install
The installation may take a few minutes as it downloads all required packages including Next.js, React, Supabase, and Dodo Payments libraries.

Project Structure

After installation, your project structure will look like this:
dodo-supabase-subscription-starter/
├── app/                    # Next.js app directory
├── components/            # React components
├── lib/                   # Utility functions and configurations
├── db/                    # Database schema and migrations
├── supabase/              # Supabase Edge Functions
│   └── functions/
│       └── dodo-webhook/  # Webhook handler
├── public/                # Static assets
├── .env.example          # Environment variables template
├── package.json          # Project dependencies and scripts
└── drizzle.config.ts     # Drizzle ORM configuration

Available Scripts

The package.json includes these useful scripts:
"dev": "next dev --turbopack"
Starts the development server with Turbopack for faster builds.
npm run dev
"build": "next build --turbopack",
"start": "next start"
Build the application for production and start the production server.
npm run build
npm start
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
"db:studio": "drizzle-kit studio"
  • db:generate - Generate migration files from schema
  • db:migrate - Run database migrations
  • db:push - Push schema changes directly to database
  • db:studio - Open Drizzle Studio for database management
"lint": "eslint",
"typecheck": "tsc --noEmit"
  • lint - Run ESLint for code quality checks
  • typecheck - Run TypeScript type checking
"deploy:webhook": "supabase functions deploy dodo-webhook --no-verify-jwt"
Deploy the Dodo webhook handler to Supabase Edge Functions.
npm run deploy:webhook -- --project-ref your-project-ref
"ngrok": "ngrok http 3000"
Create a public URL for local development webhook testing.
npm run ngrok

Verify Installation

To verify that everything is installed correctly, run:
npm run typecheck
This command checks for any TypeScript errors. If it completes without errors, your installation is successful.
Do not run the development server yet. You need to configure environment variables first.

Next Steps

With the dependencies installed, proceed to Configuration to set up your environment variables and connect to Supabase and Dodo Payments.

Build docs developers (and LLMs) love