Get started

You're browsing the /app router documentation.

Hey maker, welcome to SaaSInMinutes 👋

Here's a quick overview of the boilerplate. Follow along to get your app up and running.

Once you're done, start with this tutorial to launch your project in 5 minutes. Let's build that startup, FAST ⚡️

Start a local server

1. In your terminal, run the following commands one-by-one:

1git clone https://github.com/your-repo/saasinminutes.git [YOUR_APP_NAME]
2cd [YOUR_APP_NAME]
3npm install
4git remote remove origin
5npm run dev

SaaSInMinutes requires Node 18.17 or greater. Type node -v in your terminal to check version.

2. Rename .env.example to .env.local

1mv .env.example .env.local

3. Open http://localhost:3000 to see your site. And voila!

You will see errors in the console but nothing important.

NextJS 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 (LemonSqueezy & SendGrid, auth etc.)
  • /models → Database models

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.

.env file

Rename the .env.example file to .env.local. Change NEXTAUTH_SECRET to anything else (15 characters minimum). The file content should look like this:

.env.local
1NEXTAUTH_URL=http://localhost:3000
2NEXTAUTH_SECRET=your-secret-key-here-min-15-chars
3GOOGLE_ID=
4GOOGLE_SECRET=
5SUPABASE_URL=
6SUPABASE_ANON_KEY=
7SUPABASE_SERVICE_ROLE_KEY=
8LEMONSQUEEZY_API_KEY=
9SENDGRID_API_KEY=
10MIXPANEL_TOKEN=

Now go ahead and follow this tutorial to get your startup live within 5 minutes!