Skip to main content
Step 3
Setup

Setup

Configure your database, authentication, and customize your application

Database Setup

Set up your PostgreSQL database and run the initial migrations:

Database setup and migration process
# Install PostgreSQL (if not already installed)
# macOS with Homebrew
brew install postgresql
brew services start postgresql

# Create database
createdb boilerclick

# Run migrations
npx prisma migrate dev

# Generate Prisma client
npx prisma generate

Authentication Configuration

Configure Passport.js for user authentication:

Passport.js configuration with OAuth providers
// src/lib/auth.ts
import passport from 'passport';
import { Strategy as GoogleStrategy } from 'passport-google-oauth20';
import { Strategy as GitHubStrategy } from 'passport-github2';

export const authConfig = {
  google: {
    clientID: process.env.GOOGLE_CLIENT_ID!,
    clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
    callbackURL: '/auth/google/callback'
  },
  github: {
    clientID: process.env.GITHUB_CLIENT_ID!,
    clientSecret: process.env.GITHUB_CLIENT_SECRET!,
    callbackURL: '/auth/github/callback'
  }
};

// Configure Google OAuth
passport.use(new GoogleStrategy(authConfig.google, async (accessToken, refreshToken, profile, done) => {
  // Your authentication logic here
  return done(null, profile);
}));

// Configure GitHub OAuth
passport.use(new GitHubStrategy(authConfig.github, async (accessToken, refreshToken, profile, done) => {
  // Your authentication logic here
  return done(null, profile);
}));

Customization

Customize your application's appearance and functionality:

Customize your color scheme
/* src/app/globals.css */
:root {
  --primary: 222.2 84% 4.9%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222.2 84% 4.9%;
  /* Add your custom colors */
}