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
- Replit Production
- Docker
Local Development Setup
Perfect for development on your local machine with full control over all components.Install Dependencies
- 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.
Database Setup
Choose one of these PostgreSQL options:
Option A: Local PostgreSQL
Option A: Local PostgreSQL
Install PostgreSQL on your machine:Set your
DATABASE_URL:Option B: Supabase (Recommended)
Option B: Supabase (Recommended)
Free cloud PostgreSQL with storage included:
- Sign up at https://supabase.com
- Create a new project
- Go to Settings → Database
- Copy the connection string (URI format)
- Paste into
.envasDATABASE_URL
Option C: Neon
Option C: Neon
Serverless PostgreSQL with generous free tier:
- Sign up at https://neon.tech
- Create a new project
- Copy the connection string
- Add to
.envasDATABASE_URL
Neon is optimized for serverless deployments and has excellent cold start performance.
Environment Configuration
Copy the example environment file:Edit Generate a secure session secret:
.env with required values: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.
Start Development Server
- Vite HMR on port 5173 (auto-proxied)
- API routes under
/api - Client application served at root
Verify Installation
Check Server Logs
Check Server Logs
You should see output like:
Test Database Connection
Test Database Connection
Visit
http://localhost:5000 and try logging in. The local auth strategy allows any credentials in development.Post-Installation Setup
Configure API Integrations
Reddit API Setup
Reddit API Setup
Required for Reddit-based sessions:
Create Reddit App
- Go to https://www.reddit.com/prefs/apps
- Click “Create App” or “Create Another App”
- Choose “script” for personal use
- Fill in app details:
- Name: “JOIP Local Dev”
- Redirect URI:
http://localhost:5000/callback
OpenRouter AI Setup
OpenRouter AI Setup
Recommended for AI caption generation:
Sign Up
Create an account at https://openrouter.ai
Generate API Key
- Navigate to Settings → API Keys
- Click “Create API Key”
- Copy the key (starts with
sk-or-v1-)
Supabase Storage Setup
Supabase Storage Setup
Required for manual sessions and Media Vault:
Create Supabase Project
- Sign up at https://supabase.com
- Click “New Project”
- Choose organization and set project details
Get API Credentials
- Go to Settings → API
- Copy:
- Project URL
- anon public key
- service_role key (keep secret!)
AI Image Services
AI Image Services
Optional for AI Undress feature:xAI (Primary Provider):Freepik (Fallback Provider):Provider Selection:
Build for Production
Run Production Build
- Logo Generation:
node scripts/generate-logos.mjs - Client Build:
vite build→ outputs todist/public - Server Build:
esbuild→ outputs todist/index.js- Platform: Node.js
- Format: ESM
- Minified with tree-shaking
NPM Scripts Reference
Troubleshooting
Module Not Found Errors
Module Not Found Errors
Symptom: Cannot find module errors during startupSolution:
Database Connection Failed
Database Connection Failed
Symptom: “Connection refused” or timeout errorsSolution:
- Verify
DATABASE_URLis correctly formatted - For local PostgreSQL: Check if service is running
- For cloud database: Verify firewall allows your IP
- Test connection:
Build Failures
Build Failures
Symptom: Build process fails with errorsSolution:
Port Already in Use
Port Already in Use
Symptom: “Port 5000 is already in use”Solution:
Supabase Storage Issues
Supabase Storage Issues
Symptom: Manual sessions fail with 503 errorsSolution:
- Verify Supabase credentials in
.env - Check if project is paused (resume in Supabase dashboard)
- Test storage status:
- Review error codes:
STORAGE_CONFIG_ERROR: Missing env variablesSTORAGE_UNREACHABLE: Cannot connect to SupabaseSTORAGE_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
Environment Security
- Never commit
.envfiles to Git - Use strong
SESSION_SECRET(32+ characters) - Rotate API keys regularly
- Use environment-specific API keys
Database Security
- Use strong database passwords
- Enable SSL for database connections
- Restrict database IP whitelist
- Regular backup schedule
Next Steps
Environment Setup
Complete guide to all environment variables and configuration options
Quick Start
Create your first session and explore features