Installation
Production-ready installation guide for Intrex. Includes environment setup, database configuration, and deployment preparation.
Prerequisites
JavaScript runtime
Package manager (npm install -g pnpm)
Version control
Database and Auth (free tier works)
Step 1: Clone Repository
git clone https://github.com/your-org/intrex.git cd intrexStep 2: Install Dependencies
pnpm installStep 3: Configure Environment
Copy the example environment file and fill in your credentials:
cp .env.example .env| Variable | Required | Description | Example |
|---|---|---|---|
| POSTGRES_URL | Required | Supabase PostgreSQL connection string (use connection pooler) | postgresql://... |
| AUTH_SECRET | Required | 32+ char random string for JWT signing (HS256) | openssl rand -base64 32 |
| BASE_URL | Required | Application base URL (no trailing slash) | https://app.yourdomain.com |
| PLATFORM_SMTP_HOST | Required | SMTP server host for transactional emails | smtp.gmail.com |
| PLATFORM_SMTP_PORT | Required | SMTP port (587 for TLS, 465 for SSL) | 587 |
| PLATFORM_SMTP_USER | Required | SMTP username/email address | noreply@yourdomain.com |
| PLATFORM_SMTP_PASS | Required | SMTP password or app-specific password | **** |
| PLATFORM_EMAIL_FROM | Required | Default sender name and email | "Intrex" <noreply@yourdomain.com> |
| STRIPE_SECRET_KEY | Optional | Stripe secret key for billing (prod) | sk_live_... |
| STRIPE_WEBHOOK_SECRET | Optional | Stripe webhook endpoint secret | whsec_... |
| SENTRY_DSN | Optional | Sentry DSN for error monitoring | https://... |
| LOG_LEVEL | Optional | Logging 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:seedStep 5: Start Development Server
pnpm dev # Application will be available at: # http://localhost:3000Production Build
For production deployment, build the application first:
# Build for production pnpm build # Start production server pnpm start # Or deploy to Vercel (recommended) vercel --prodProduction 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
Must be at least 32 characters. Generate with: openssl rand -base64 32
Check POSTGRES_URL format and ensure IP is allowed in Supabase settings. Use connection pooler for serverless.
Ensure database exists and user has CREATE privileges. Check that extensions are enabled.
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