michaelshimeles / nextjs-starter-kit

The Ulimate Nextjs Starter Kit. Build your next SAAS product of your dreams. Batteries included.
https://starter.rasmic.xyz/
MIT License
842 stars 202 forks source link
clerk nextjs nextjs-boilerplate nextjs-starter-kit nextjs-starter-saas nextjs-template nextjs14 starter-kit supabase upstash

Getting Started

Watch me Setting Up My Starter Kit on YouTube.

Prerequisites

Setup

  1. Clone the repository:

    git clone <repository-url>
    cd <project-directory>
  2. Install dependencies:

    yarn
  3. Set up environment variables: Create a .env file in the root directory with the following variables:

    SUPABASE_URL=<your-supabase-project-url>
    SUPABASE_SERVICE_KEY=<your-supabase-service-key>
    
    # If using Stripe
    STRIPE_SECRET_KEY=<your-stripe-secret-key>
    NEXT_PUBLIC_STRIPE_PRICE_ID=<your-stripe-price-id>
    
    # If using Clerk
    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=<your-clerk-publishable-key>
    CLERK_SECRET_KEY=<your-clerk-secret-key>
    NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
    NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
    NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
    NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/
  4. Configure features: In config.ts, set the desired features:

    const config = {
     auth: {
       enabled: true, // Set to false if not using Clerk
     },
     payments: {
       enabled: true, // Set to false if not using Stripe
     }
    };
  5. Set up the database: Run Prisma migrations:

    npx prisma migrate dev
  6. Start the development server:

    yarn dev
  7. Open your browser and navigate to http://localhost:3000 to see your application running.

Additional Configuration

Important Security Notes

Learn More

Refer to the documentation of the individual technologies used in this project for more detailed information: