WeeShip

Get started

Hey maker, welcome to WeeShip 👋

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 ⚡️

You're browsing the /app router documentation. To use the /pages router, see here

Start a local server

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

terminal

1git clone https://github.com/Wee-Org/ship-fast.git [YOUR_APP_NAME]
2cd [YOUR_APP_NAME]
3git checkout supabase
4npm install
5git remote remove origin
6npm run dev
WeeShip requires Node 18.17 or greater. Type node -v in your terminal to check version.
The main branch is used for the default NextAuth/MongoDB features. The supabase branch is used for the Supabase/PostgreSQL features.

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

terminal

1mv .env.example .env.local

3. Go to the Supabase dashboard, create a new project and paste your 3 Supabase environment variables NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY in .env.local

4. 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 (Stripe & Resend, auth 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.

.env file

Rename the .env.example file to .env.local. The file content should look like this:

.env.local

1NEXT_PUBLIC_SUPABASE_URL=
2NEXT_PUBLIC_SUPABASE_ANON_KEY=
3SUPABASE_SERVICE_ROLE_KEY=
4RESEND_API_KEY=
5STRIPE_PUBLIC_KEY=
6STRIPE_SECRET_KEY=
7STRIPE_WEBHOOK_SECRET=

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