Create Your First App
This tutorial walks you through creating a new Next.js application with RocketFuel. By the end, youβll have a fully configured project with authentication and database setup.
Create a New Project
-
Run the init command
Open your terminal and run:
Terminal window rocketfuel init my-appYou can replace
my-appwith any name for your project. -
Select features
RocketFuel will prompt you to select optional features:
π Welcome to Rocketfuel!Let's create your Next.js application.π¦ Select optional features:? Add Clerk for authentication? (Y/n)? Add Stripe checkout integration? (y/N)? Add BullMQ for job queues and background workers? (y/N)? Add Resend for email sending? (y/N)? Add CLAUDE.md for AI coding assistants? (Y/n)For this tutorial, select:
- Clerk: Yes (recommended for most apps)
- Stripe: No (skip for now)
- BullMQ: No (skip for now)
- Resend: No (skip for now)
- CLAUDE.md: Yes (helpful if using AI assistants)
-
Wait for project creation
RocketFuel will:
- Create a new Next.js project with TypeScript and Tailwind
- Set up the folder structure
- Install and configure shadcn/ui components
- Configure Drizzle ORM
- Add authentication pages and API routes (if selected)
- Generate configuration files
This typically completes in under a minute.
-
Review the output
When complete, youβll see:
β Your project is ready!π Next steps:cd my-app# Copy .env.example to .env and configure your variablescp .env.example .env# Set up your database and run migrationsnpx drizzle-kit push# Start the development servernpm run dev
Understanding the Project Structure
Your new project has this structure:
my-app/βββ src/β βββ app/β β βββ api/β β β βββ webhooks/clerk/route.ts # Clerk webhook handlerβ β βββ sign-in/[[...sign-in]]/β β β βββ page.tsx # Sign-in pageβ β βββ sign-up/[[...sign-up]]/β β β βββ page.tsx # Sign-up pageβ β βββ layout.tsxβ β βββ page.tsxβ βββ components/β β βββ ui/ # shadcn/ui componentsβ βββ lib/β β βββ utils.tsβ βββ middleware.ts # Clerk middlewareβ βββ server/β βββ db/β βββ index.ts # Database clientβ βββ schema.ts # Drizzle schemaβββ .env.example # Environment templateβββ docker-compose.yml # Docker servicesβββ drizzle.config.ts # Drizzle configurationβββ package.jsonβββ CLAUDE.md # AI assistant docsConfigure Environment Variables
-
Copy the environment template
Terminal window cd my-appcp .env.example .env -
Edit the
.envfileOpen
.envand configure the required variables:Terminal window # DatabaseDATABASE_URL="postgresql://user:password@localhost:5432/myapp"# Clerk AuthenticationNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_..."CLERK_SECRET_KEY="sk_test_..."CLERK_WEBHOOK_SECRET="whsec_..."NEXT_PUBLIC_CLERK_SIGN_IN_URL="/sign-in"NEXT_PUBLIC_CLERK_SIGN_UP_URL="/sign-up" -
Get your Clerk keys
Sign in to the Clerk dashboard, create an application, and copy your Publishable Key and Secret Key from the API Keys page.
Set Up the Database
RocketFuel uses Drizzle ORM with PostgreSQL. Youβll need a running PostgreSQL instance.
-
Start PostgreSQL
If you donβt have PostgreSQL running, you can use Docker:
Terminal window docker run --name postgres -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgresOr create a database on a hosted service like Neon, Supabase, or Railway.
-
Push the schema
Once your database is running and
DATABASE_URLis configured:Terminal window npx drizzle-kit pushThis creates the necessary tables for authentication.
Next Steps
Your project is configured! Continue to Running Your App to start the development server and see it in action.