Skip to main content

System Requirements

Runtime

  • Node.js: 18+ (LTS recommended)
  • npm: Latest version
  • PostgreSQL: 13+ or compatible cloud service

Development

  • Git: For version control
  • Code Editor: VSCode, Cursor, or similar
  • Terminal: Bash, Zsh, or PowerShell

Installation Methods

Local Development Setup

Perfect for development on your local machine with full control over all components.
1

Clone Repository

2

Install Dependencies

This installs all required packages:
  • React 18 with TypeScript
  • Express.js with TypeScript
  • Drizzle ORM for database operations
  • Tailwind CSS + Radix UI for styling
  • TanStack React Query for state management
  • Sharp for image processing
  • And 100+ other dependencies
Installation may take 2-5 minutes depending on your connection speed.
3

Database Setup

Choose one of these PostgreSQL options:
Install PostgreSQL on your machine:
Set your DATABASE_URL:
Serverless PostgreSQL with generous free tier:
  1. Sign up at https://neon.tech
  2. Create a new project
  3. Copy the connection string
  4. Add to .env as DATABASE_URL
Neon is optimized for serverless deployments and has excellent cold start performance.
4

Environment Configuration

Copy the example environment file:
Edit .env with required values:
Generate a secure session secret:
5

Apply Database Migrations

Create all required database tables:
This creates:
  • users - User profiles and authentication
  • content_sessions - Session configurations
  • session_media - Media items within sessions
  • user_media - Personal media vault
  • shared_sessions - Public sharing codes
  • community_sessions - Community feed snapshots
  • user_usage_stats - Analytics and tracking
  • And 10+ more tables with comprehensive constraints
The schema includes 36 total constraints including foreign keys, unique constraints, and indexes for data integrity.
6

Start Development Server

The server will start on http://localhost:5000 with:
  • Vite HMR on port 5173 (auto-proxied)
  • API routes under /api
  • Client application served at root
The development server includes hot module replacement (HMR) for instant updates during development.

Verify Installation

You should see output like:
Visit http://localhost:5000 and try logging in. The local auth strategy allows any credentials in development.

Post-Installation Setup

Configure API Integrations

Required for Reddit-based sessions:
1

Create Reddit App

  1. Go to https://www.reddit.com/prefs/apps
  2. Click “Create App” or “Create Another App”
  3. Choose “script” for personal use
  4. Fill in app details:
    • Name: “JOIP Local Dev”
    • Redirect URI: http://localhost:5000/callback
2

Add Credentials

Copy the client ID and secret to .env:
Recommended for AI caption generation:
1

Sign Up

Create an account at https://openrouter.ai
2

Generate API Key

  1. Navigate to Settings → API Keys
  2. Click “Create API Key”
  3. Copy the key (starts with sk-or-v1-)
3

Add to Environment

The app uses Gemini family models via OpenRouter:
  • Manual Editor: google/gemini-2.5-pro (fallback: gemini-2.5-flash-lite)
  • Smart Captions: gemini-2.5-flash-lite
Required for manual sessions and Media Vault:
1

Create Supabase Project

  1. Sign up at https://supabase.com
  2. Click “New Project”
  3. Choose organization and set project details
2

Get API Credentials

  1. Go to Settings → API
  2. Copy:
    • Project URL
    • anon public key
    • service_role key (keep secret!)
3

Configure Environment

4

Create Storage Buckets

The app automatically creates required buckets:
  • user-media: User uploads and manual sessions
  • general: Community content and shared media
Buckets are created automatically on first upload if they don’t exist.
Optional for AI Undress feature:xAI (Primary Provider):
Freepik (Fallback Provider):
Provider Selection:

Build for Production

1

Run Production Build

This executes:
  1. Logo Generation: node scripts/generate-logos.mjs
  2. Client Build: vite build → outputs to dist/public
  3. Server Build: esbuild → outputs to dist/index.js
    • Platform: Node.js
    • Format: ESM
    • Minified with tree-shaking
2

Verify Build Output

Check that these exist:
3

Start Production Server

The server:
  • Serves static files from dist/public
  • Handles API routes under /api
  • Listens on port 5000 (or PORT env var)

NPM Scripts Reference

Troubleshooting

Symptom: Cannot find module errors during startupSolution:
Symptom: “Connection refused” or timeout errorsSolution:
  • Verify DATABASE_URL is correctly formatted
  • For local PostgreSQL: Check if service is running
  • For cloud database: Verify firewall allows your IP
  • Test connection:
Symptom: Build process fails with errorsSolution:
Symptom: “Port 5000 is already in use”Solution:
Symptom: Manual sessions fail with 503 errorsSolution:
  1. Verify Supabase credentials in .env
  2. Check if project is paused (resume in Supabase dashboard)
  3. Test storage status:
  4. Review error codes:
    • STORAGE_CONFIG_ERROR: Missing env variables
    • STORAGE_UNREACHABLE: Cannot connect to Supabase
    • STORAGE_PREFLIGHT_FAILED: Bucket test failed

Health Checks

Verify your installation with these endpoints:

Performance Optimization

Database

  • Connection pooling enabled by default
  • Health monitoring with retry logic
  • Indexes on all foreign keys
  • Query timeout: 20 seconds

Application

  • Production build minified
  • Tree-shaking enabled
  • Static asset caching
  • Image optimization with Sharp

Security Checklist

1

Environment Security

  • Never commit .env files to Git
  • Use strong SESSION_SECRET (32+ characters)
  • Rotate API keys regularly
  • Use environment-specific API keys
2

Database Security

  • Use strong database passwords
  • Enable SSL for database connections
  • Restrict database IP whitelist
  • Regular backup schedule
3

Application Security

  • Keep dependencies updated
  • Enable rate limiting in production
  • Configure CORS properly
  • Use HTTPS in production
Never expose API keys or secrets in client code. All sensitive operations should go through server-side API routes.

Next Steps

Environment Setup

Complete guide to all environment variables and configuration options

Quick Start

Create your first session and explore features