Get started
Hey maker, welcome to ShipFast 👋
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:
terminal
1git clone https://github.com/Marc-Lou-Org/ship-fast.git [YOUR_APP_NAME]
2cd [YOUR_APP_NAME]
3git checkout 2a7c1cd95e4cfa07bb8da35279733702617352ce
4npm install
5git remote remove origin
6npm run dev
The pages router repo is the same as the app router repo but at a previous commit. The
The transition was made on September 28, 2023 (1 year ago).
git checkout
ensure you get the latest commit before the transition.The transition was made on September 28, 2023 (1 year ago).
2. Rename
.env.example
to .env.local
terminal
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
- /pages → Pages (1 file = 1 page)
- /pages/api → API calls (1 file = 1 API endpoint)
- /components → React components
- /libs → Libraries helper functions (Stripe & Mailgun, etc.)
- /models → Mongoose models
- /hooks → Custom hooks
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. The file content should look like this:
.env.local
1NEXTAUTH_URL=http://localhost:3000
2NEXTAUTH_SECRET=uhf3874y7fh387u87653947u4rh9394hf
3GOOGLE_ID=
4GOOGLE_SECRET=
5EMAIL_SERVER=
6MAILGUN_API_KEY=
7MONGODB_URI=
8STRIPE_PUBLIC_KEY=
9STRIPE_SECRET_KEY=
10STRIPE_WEBHOOK_SECRET=
Now go ahead and follow this tutorial to get your startup live within 5 minutes!