Go to App
← Back to Documentation

Installation

Production-ready installation guide for Intrex. Includes environment setup, database configuration, and deployment preparation.

DevelopmentStagingProduction

Prerequisites

Node.js20+

JavaScript runtime

pnpm8+

Package manager (npm install -g pnpm)

Git2.30+

Version control

Supabase-

Database and Auth (free tier works)

Step 1: Clone Repository

git clone https://github.com/your-org/intrex.git cd intrex

Step 2: Install Dependencies

pnpm install

Step 3: Configure Environment

Copy the example environment file and fill in your credentials:

cp .env.example .env
VariableRequiredDescriptionExample
POSTGRES_URLRequiredSupabase PostgreSQL connection string (use connection pooler)postgresql://...
AUTH_SECRETRequired32+ char random string for JWT signing (HS256)openssl rand -base64 32
BASE_URLRequiredApplication base URL (no trailing slash)https://app.yourdomain.com
PLATFORM_SMTP_HOSTRequiredSMTP server host for transactional emailssmtp.gmail.com
PLATFORM_SMTP_PORTRequiredSMTP port (587 for TLS, 465 for SSL)587
PLATFORM_SMTP_USERRequiredSMTP username/email addressnoreply@yourdomain.com
PLATFORM_SMTP_PASSRequiredSMTP password or app-specific password****
PLATFORM_EMAIL_FROMRequiredDefault sender name and email"Intrex" <noreply@yourdomain.com>
STRIPE_SECRET_KEYOptionalStripe secret key for billing (prod)sk_live_...
STRIPE_WEBHOOK_SECRETOptionalStripe webhook endpoint secretwhsec_...
SENTRY_DSNOptionalSentry DSN for error monitoringhttps://...
LOG_LEVELOptionalLogging level (debug, info, warn, error)info

Step 4: Setup Database

Run migrations to create the database schema, then seed initial data:

# Run database migrations pnpm db:migrate # Seed Bangladesh jurisdiction data and templates pnpm db:seed

Step 5: Start Development Server

pnpm dev # Application will be available at: # http://localhost:3000

Production Build

For production deployment, build the application first:

# Build for production pnpm build # Start production server pnpm start # Or deploy to Vercel (recommended) vercel --prod

Production Checklist

  • Database connection string uses connection pooler
  • AUTH_SECRET is 32+ characters and unique
  • SMTP credentials verified working
  • BASE_URL matches production domain
  • RLS policies enabled in Supabase
  • Cron jobs configured in Vercel
  • Error monitoring (Sentry) configured
  • Database backups enabled

Common Issues & Solutions

AUTH_SECRET too short

Must be at least 32 characters. Generate with: openssl rand -base64 32

Database connection failed

Check POSTGRES_URL format and ensure IP is allowed in Supabase settings. Use connection pooler for serverless.

Migration fails

Ensure database exists and user has CREATE privileges. Check that extensions are enabled.

Build fails on Vercel

Ensure all environment variables are set in Vercel dashboard. Check that Node.js version is 20+.

Verify Installation

After starting the server, verify everything is working:

  • ✓ Landing page loads at http://localhost:3000
  • ✓ Sign-up page accessible at /sign-up
  • ✓ Can create new account
  • ✓ Dashboard loads after login
  • ✓ Can create a test branch