Get started

    Hey Indie Hacker ;) Time to launch your SaaS FAST! 👋

    Here's a quick overview. Follow these instructions to launch your app locally. After finishing up, jump into this tutorial to get your project launched in just 5 minutes. Let's kickstart that startup, FAST! 🚀

    MicroSaaSFast requires Node 18.17 or greater. Typenode -vin your terminal to check version.
    Installing packages & environment variables
    1. In your terminal, run the following commands one by one:

    terminal

  1. git clone https://github.com/MicroSaaSFast/microsaasfast-full.git [YOUR_APP_NAME]
  2. cd [YOUR_APP_NAME]
  3. npm install
  4. git remote remove origin
  5. 2. Create a supabase organization and creating a new project.

    Make up or generate a password, and be sure to memorize it. Paste the password into the .env file.

    Copy the direct database URL and paste it into the .env file. Also copy the host, port, and database name.

    .env

  6. POSTGRES_USER=postgres
  7. POSTGRES_PASSWORD=
  8. POSTGRES_DBNAME=postgres
  9. DATABASE_HOST=
  10. DATABASE_PORT=5432
  11. DATABASE_URL=
  12. 3.Generating prisma schema and migrations:

    terminal

  13. npx prisma generate
  14. npx prisma db push
  15. 4. Connecting the Stripe environment variables:

    .env

  16. STRIPE_SECRET_KEY=
  17. STRIPE_PUBLISHABLE_KEY=
  18. We will add the WEBHOOK_SECRET after we deploy our project.
    5. Adding Clerk:

    .env

  19. NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
  20. CLERK_SECRET_KEY=
  21. NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
  22. NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
  23. 6. Adding Resend:

    .env

  24. RESEND_API_KEY=
  25. You can read more about emailshere.
    7. Adding WordPress:
    I'll use a Lightsail instance for this example. You can use any other server you want.

    .env

  26. WORDPRESS_DB_USER=user
  27. WORDPRESS_DB_PASSWORD=
  28. WORDPRESS_DB_NAME=exampledb
  29. WP_REST_ENDPOINT=
  30. 1. Copy your WP_REST_ENDPOINT and paste it into the .envfile.

    2. Go to your Lightsail SSH terminal and run the following command:

    terminal

  31. cat bitnami_application_password
  32. 3. Copy the password and paste it into the .env file.

    4. Copy your WORDPRESS_DB_USER (default: user) and paste it into the .env file.

    8. MAKE API
    If you want to use MAKE API - you need to buy any paid plan, as there is no possibility to work with API in free plan

    .env

  33. MAKE_ORGANIZATION_ID=
  34. MAKE_TEAM_ID=
  35. MAKE_API_KEY=
  36. MAKE_API_URL=
  37. 1. Go to the Make website and create an account and connect your account to your organization.

    2. Go to your profile, then API Keys and create a new API key. Copy the API key and paste it into the .envfile.

    3. Copy your MAKE_API_URL and paste it into the .envfile.

    4. Go to your team and copy the MAKE_TEAM_ID and paste it into the .env file.

    5. Go to your organization and copy the MAKE_ORGANIZATION_IDand paste it into the .env file.

    You can read more about MAKE APIhere.
    9. N8N API
    To use n8n API - you need to buy any paid plan, as there is no possibility to work with API in free plan

    .env

  38. N8N_API_KEY=
  39. N8N_API_URL=
  40. N8N_WEBHOOK_URL=
  41. 1. Go to the N8N website and create an account

    2. Create a new API key, copy it and paste it into the .env file.

    3. Copy your N8N_API_URL and paste it into the .env file. Also rewrite it to the N8N_WEBHOOK_URL

    You can read more about N8N APIhere.
    10. Renaming .env.example to .env

    terminal

  42. mv .env.example .env
  43. Deployment
    1. Creating and pushing repository on GitHub

    terminal

  44. git commit -m "Initial commit"
  45. git branch -M main
  46. git remote add origin https://github.com/your-username/your-repo.git
  47. git push -u origin main
  48. 2. Deploying to Vercel

    1. Go to Vercel website and connect your GitHub repository.

    2. Choose your project name and click on the Deploy button.

    3. Copy your .env variables and paste them into the Vercel environment variables.

    3. Creating a Stripe webhook

    Go to your Stripe dashboard and create a webhook.

    • Endpoint URL: https://your-app-name.vercel.app/api/webhook/stripe

    • Events: checkout.session.completedcheckout.session.expiredcustomer.subscription.deletedcustomer.subscription.updatedinvoice.paidinvoice.payment_failed

    Copy the WEBHOOK_SECRET and paste it into the .env file.

    .env

  49. STRIPE_WEBHOOK_SECRET=
  50. Testing the app
    1. Testing Clerk
    2. Testing Stripe
    Connecting n8n & make
    1. Connecting n8n

    1. Go to the n8n and create a new workflow with your functionality.

    2. Copy the workflow ID and paste it into the scenarioArray

    3. Create new route in app/api/n8n/workflows file. Boilerplate is already have a template.

    You can read more about n8n.
    2. Testing n8n
    1. Connecting Make

    1. Go to the Make and create a new scenario with your functionality.

    2. Copy the scenario ID and paste it into the scenarioArray like a number

    3. Create new route in app/api/make/scenarios file. Boilerplate is already have a template.

    You can read more about Make.
    2. Testing make
    3. Testing Wordpress Blog

    1. Go to the your Endpoints page and create a new blog post.

    Use yoast seo plugin to create a new blog post with title, description, keywords and content.
    Project Structure

    /app → Pages (1 folder + page.js = 1 page)

    /app/api → API calls (1 file = 1 API endpoint)

    /components → React components

    /libs → Libraries helper functions (Stripe & Resend, SEO etc.)

    /types → TypeScript types

    /prisma → Prisma schema & migrations

    /assets → Assets (styles, images, etc.)

    config.js file

    It is where you configure your app. Each key is documented to know how and why it's used. Have a thorough look at it: it is the backbone of the app.

    Now, dive into this tutorial to get your startup live in just 5 minutes!