Installation Methods
ThinkEx offers two installation approaches: an automated setup script for quick installation, or manual setup for more control.- Automated Setup
- Manual Setup
Automated Setup (Recommended)
The interactive setup script handles all configuration automatically.Run the Setup Script
- Check prerequisites (Node.js v20+, pnpm, Docker)
- Create
.envfile from.env.example - Generate
BETTER_AUTH_SECRETautomatically usingopenssl - Start PostgreSQL in Docker (or configure local PostgreSQL)
- Set database connection string
- Install dependencies with pnpm
- Initialize database schema with migrations
- Start the development server
Configure API Keys
The setup script will prompt you to configure required API keys. Edit
.env and add:PostgreSQL Management (Docker)
If using Docker for PostgreSQL, use these commands:Post-Installation
Verify Installation
Check that all services are running:Create Your First User
- Navigate to
http://localhost:3000 - Sign up with email or Google OAuth (if configured)
- Start creating your first workspace
Better Auth handles authentication at the application level. The
auth.jwt() function created during setup is a mock for RLS policies in local development.Troubleshooting
PostgreSQL Connection Failed
PostgreSQL Connection Failed
Symptoms: Cannot connect to databaseSolutions:
- Verify PostgreSQL is running:
docker-compose psorpg_isready - Check
DATABASE_URLin.envmatches your configuration - For Docker: Ensure port 5432 is not already in use
- Wait for PostgreSQL to be ready (can take 5-10 seconds after starting)
Migration Errors
Migration Errors
Symptoms: Schema push fails or table creation errorsSolutions:
- Ensure PostgreSQL version is 12 or higher
- Check that the database user has CREATE permissions
- Try running migrations manually:
- “Already exists” errors are normal and can be ignored
Node.js Version Error
Node.js Version Error
Symptoms: Error about Node.js versionSolutions:
- Check your Node.js version:
node -v - ThinkEx requires Node.js v20 or higher
- Install latest LTS from nodejs.org
- Consider using nvm to manage Node versions
pnpm Command Not Found
pnpm Command Not Found
Symptoms:
pnpm: command not foundSolutions:- Install pnpm globally:
- Or use npx:
Docker Compose Not Found
Docker Compose Not Found
Symptoms:
docker-compose: command not foundSolutions:- For newer Docker versions, use:
docker compose(no hyphen) - Or install Docker Compose plugin: docs.docker.com/compose/install
- Alternatively, use local PostgreSQL instead
Next Steps
Configuration
Configure environment variables and optional features
Storage Setup
Set up file storage (local or Supabase)