This guide will walk you through cloning the repository and installing all necessary dependencies.
Clone the Repository
Clone via Git
Clone the repository to your local machine:git clone https://github.com/dodopayments/dodo-supabase-subscription-starter.git
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:
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.
"build": "next build --turbopack",
"start": "next start"
Build the application for production and start the production server.
"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
Local Tunneling (Development)
"ngrok": "ngrok http 3000"
Create a public URL for local development webhook testing.
Verify Installation
To verify that everything is installed correctly, run:
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.