Skip to content

Running Your App

Now that your project is configured, let’s start the development server and explore the generated application.

Start the Development Server

  1. Navigate to your project

    Terminal window
    cd my-app
  2. Start the dev server

    Terminal window
    npm run dev

    You’ll see output like:

    ▲ Next.js 15.x.x
    - Local: http://localhost:3000
    - Environments: .env
    ✓ Starting...
    ✓ Ready in 2.1s
  3. Open in your browser

    Visit http://localhost:3000 to see your app.

Explore the Generated App

If you selected Better Auth during setup, your app includes a complete authentication system.

Authentication Pages

Sign Up

Visit /signup to create a new account. The form includes email and password fields with validation.

Login

Visit /login to sign in with existing credentials. Includes error handling for invalid attempts.

Try the Auth Flow

  1. Create an account

    Go to http://localhost:3000/signup and register with:

    • Email address
    • Password
  2. Sign in

    After registration, go to http://localhost:3000/login and sign in.

  3. Check the database

    Use Drizzle Studio to inspect your data:

    Terminal window
    npx drizzle-kit studio

    This opens a web interface at https://local.drizzle.studio where you can browse your tables and data.

Available Scripts

Your project includes these npm scripts:

ScriptDescription
npm run devStart development server with hot reload
npm run buildBuild for production
npm run startStart production server
npm run lintRun ESLint

Database Scripts

ScriptDescription
npx drizzle-kit pushPush schema changes to database
npx drizzle-kit studioOpen Drizzle Studio GUI
npx drizzle-kit generateGenerate migration files
npx drizzle-kit migrateRun pending migrations

Using Docker Compose

If you selected BullMQ during setup, your project includes a docker-compose.yml for Redis:

Terminal window
# Start Redis in the background
docker compose up -d
# View logs
docker compose logs -f
# Stop services
docker compose down

Making Changes

Adding UI Components

RocketFuel includes shadcn/ui. Add new components with:

Terminal window
npx shadcn@latest add button
npx shadcn@latest add card
npx shadcn@latest add dialog

Browse all available components at ui.shadcn.com.

Modifying the Database Schema

  1. Edit the schema

    Open src/server/db/schema.ts and add or modify tables.

  2. Push changes

    Terminal window
    npx drizzle-kit push

    For production, use migrations instead:

    Terminal window
    npx drizzle-kit generate
    npx drizzle-kit migrate

Troubleshooting

Database Connection Errors

If you see connection errors:

  1. Verify PostgreSQL is running
  2. Check DATABASE_URL in your .env file
  3. Ensure the database exists
  4. Test the connection string with a tool like psql

Auth Not Working

If authentication fails:

  1. Verify BETTER_AUTH_SECRET is set
  2. Check BETTER_AUTH_URL matches your dev server URL
  3. Ensure database migrations have run (npx drizzle-kit push)

Port Already in Use

If port 3000 is busy:

Terminal window
# Find what's using the port
lsof -i :3000
# Or use a different port
npm run dev -- -p 3001

Next Steps

You now have a working RocketFuel application! Here’s where to go next: