Get Started
Welcome to LaunchFa.st π
Hereβs a quick overview of the boilerplate. Follow along to get your app up and running.
Start a local server
- In your terminal, run the following commands:
npm i -g pnpm
pnpm install
pnpm dev
- Copy
.env.example
to.env
cp .env.example .env
- Open localhost:3000 to see your site. And voila!
Project Structure
/src/pages
β Pages (1 directory and/or 1file.astro
= 1 page)/src/pages/api
β API calls (1 file = 1 API endpoint with multiple methods)/src/components
β Astro Components/src/lib
β Libraries helper functions (Stripe, Lemon Squeezy, Resend, Upstash, Google Auth, Email Auth, etc.)
/src/routes
β Pages (1 directory and/or 1file.svelte
= 1 page) (e.g. Landing page, Protected Routes, etc.)/src/routes/api
β API calls (1 directory and/or 1 file+server.ts
= 1 API endpoint with multiple methods) (e.g. Storage via Firebase, Emails with Resend, Authentication via Credentials/Google etc.)/src/components
β 1 directory and/or 1 filefile.svelte
= 1 Svelte Component (e.g. Button Lead, Button Checkout, SEO, Footer, Header, PostHog, etc.)/src/lib
β 1 directory and/or 1 filefile.ts
= 1 helper function library (e.g. Stripe, Lemon Squeezy, Resend, Upstash, Google Auth, Email Auth, etc.)
/pages
β Pages (1 directory and/or 1file.tsx
= 1 page)/pages/api
β API calls (1 file = 1 API endpoint with multiple methods)/components
β React/Next.js Components/lib
β Libraries helper functions (Stripe, Lemon Squeezy, Resend, Upstash, Google Auth, Email Auth, etc.)
Environment Variables (.env
file)
Rename the .env.example
file to .env
. The file content should look like this:
HOST="0.0.0.0"
PORT="3000"
NODE_VERSION="18"
PUBLIC_FONT_NAME="Archivo"
SECRET_KEY="..."
PRIVATE_ACCESS_KEY="..."
RESEND_KEY="re_..."
UPSTASH_REDIS_REST_URL="https://...upstash.io"
UPSTASH_REDIS_REST_TOKEN="...="
GOOGLE_AUTH_ID="...-....apps.googleusercontent.com"
GOOGLE_AUTH_SECRET="...-...-..."
GOOGLE_AUTH_CALLBACK_URL="http://localhost:3000/api/auth/callback/google"
TWITTER_CLIENT_ID="..."
TWITTER_CLIENT_SECRET="..."
TWITTER_AUTH_CALLBACK_URL="http://127.0.0.1:3000/api/auth/callback/twitter"
STRIPE_SECRET_KEY="sk_live_..."
SMTP2GO_USERNAME="..."
SMTP2GO_PASSWORD="..."
DEPLOYMENT_PLATFORM="netlify"
HOST="0.0.0.0"
PORT="3000"
NODE_VERSION="18"
PUBLIC_FONT_NAME="Archivo"
SECRET_KEY="..."
PRIVATE_ACCESS_KEY="..."
AUTH_TRUST_HOST=true
AUTH_SECRET="2cd2b8d248d002d850a1c4404865b0725dcc73d265532193cca571c63965fcde"
RESEND_KEY="re_..."
UPSTASH_REDIS_REST_URL="https://..upstash.io"
UPSTASH_REDIS_REST_TOKEN="...="
GOOGLE_AUTH_ID="...-....apps.googleusercontent.com"
GOOGLE_AUTH_SECRET="...-...-..."
GOOGLE_AUTH_CALLBACK_URL="http://localhost:3000/api/auth/callback/google"
TWITTER_CLIENT_ID="..."
TWITTER_CLIENT_SECRET="..."
TWITTER_AUTH_CALLBACK_URL="http://127.0.0.1:3000/api/auth/callback/twitter"
STRIPE_SECRET_KEY="sk_live_..."
SMTP2GO_USERNAME="..."
SMTP2GO_PASSWORD="..."
DEPLOYMENT_PLATFORM="node"
HOST="0.0.0.0"
PORT="3000"
NODE_VERSION="18"
SECRET_KEY="..."
PRIVATE_ACCESS_KEY="..."
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="...="
GOOGLE_AUTH_ID="...-....apps.googleusercontent.com"
GOOGLE_AUTH_SECRET="...-...-..."
TWITTER_CLIENT_ID="..."
TWITTER_CLIENT_SECRET="..."
RESEND_KEY="re_..."
UPSTASH_REDIS_REST_URL="https://...upstash.io"
UPSTASH_REDIS_REST_TOKEN="...="
STRIPE_SECRET_KEY="sk_live_..."
SMTP2GO_USERNAME="..."
SMTP2GO_PASSWORD="..."
DEPLOYMENT_PLATFORM="netlify"
Now go ahead and follow this tutorial to launch your startup live within hours!