A step-by-step guide to get the Paintjob application running on your machine.
- Prerequisites
- Initial Setup
- Backend Setup
- Frontend Setup
- Running the Application
- Verification
- Troubleshooting
- Next Steps
Install these before proceeding:
# Check if installed
python3 --version
# If not installed:
# Windows: Download from https://www.python.org/downloads/
# macOS: brew install python@3.11
# Linux: sudo apt install python3.11# Check if installed
psql --version
# If not installed:
# Windows: Download from https://www.postgresql.org/download/windows/
# macOS: brew install postgresql@14
# Linux: sudo apt install postgresql-14# Check Node.js version
node --version
# If not installed:
# Download from https://nodejs.org/ (LTS version)
# Install pnpm globally
npm install -g pnpm
# Verify pnpm
pnpm --version# Check if installed
git --version
# If not installed:
# Download from https://git-scm.com/downloads# Clone the repository
git clone https://github.com/YOUR_USERNAME/paintjob.git
# Navigate to project directory
cd paintjobVerify you have both directories:
# You should see:
# - paintjob/ (Backend)
# - paintjob-fe/ (Frontend)
# - README.md
# - CLA.md
# - CONTRIBUTING.md
ls -lacd paintjobWhy? Virtual environments isolate Python dependencies per project.
# Create virtual environment named 'venv'
python3 -m venv venvWindows (PowerShell):
.\venv\Scripts\Activate.ps1
# If you get an execution policy error, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Then try activating againWindows (Command Prompt):
.\venv\Scripts\activate.batmacOS / Linux:
source venv/bin/activateVerification: Your prompt should now show (venv) at the beginning.
Poetry is a modern Python dependency manager.
# Install poetry
pip install poetry
# Verify installation
poetry --version# Install all project dependencies
poetry install
# This will install:
# - FastAPI
# - SQLAlchemy
# - PostgreSQL drivers
# - Pytest and testing tools
# - All other backend dependenciesNote: This may take a few minutes on first install.
# Start PostgreSQL (if not already running)
# macOS: brew services start postgresql@14
# Linux: sudo systemctl start postgresql
# Windows: PostgreSQL should auto-start
# Connect to PostgreSQL
psql -U postgres
# In PostgreSQL shell, create database:
CREATE DATABASE paintjob;
# Create user (optional, if not using postgres user):
CREATE USER paintjob_user WITH PASSWORD 'your_secure_password';
GRANT ALL PRIVILEGES ON DATABASE paintjob TO paintjob_user;
# Exit PostgreSQL shell
\qThe .env file should already exist in paintjob/ directory.
Verify it exists:
ls -la .envIf it doesn't exist, create it:
# Create .env file
touch .env
# Or on Windows:
echo. > .envEdit .env file with your database credentials:
# Database connection string
DATABASE_URL=postgresql+asyncpg://postgres:your_password@localhost:5432/paintjob
# JWT Secret Key (generate a secure random key)
SECRET_KEY=your-super-secret-key-here-change-this-in-production
# JWT Algorithm
ALGORITHM=HS256
# Token expiration (in minutes)
ACCESS_TOKEN_EXPIRE_MINUTES=720
# CORS origins (for frontend)
CORS_ORIGINS=http://localhost:3000Generate a secure SECRET_KEY:
# Python method
python3 -c "import secrets; print(secrets.token_urlsafe(32))"
# Or use any random string generatorAlembic manages database schema migrations.
# Apply all migrations to create tables
alembic upgrade head
# You should see output like:
# INFO [alembic.runtime.migration] Running upgrade -> e7dabe5987e3, initial
# INFO [alembic.runtime.migration] Running upgrade e7dabe5987e3 -> ..., ...Verify tables were created:
psql -U postgres -d paintjob -c "\dt"
# You should see tables:
# - users
# - projects
# - rooms
# - walls# Run the FastAPI application
python3 main.py
# You should see:
# INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
# INFO: Started reloader process
# INFO: Started server process
# INFO: Waiting for application startup.
# INFO: Application startup complete.Keep this terminal open - the backend is now running.
Open a new terminal and test the API:
# Test health endpoint
curl http://localhost:8000/
# Or open in browser:
# http://localhost:8000/docs (Swagger UI)
# http://localhost:8000/redoc (ReDoc UI)Open a NEW terminal (keep backend running in the first one).
cd paintjob-fe# Install all dependencies
pnpm install
# This will install:
# - Next.js 15
# - React
# - TypeScript
# - Konva (canvas library)
# - Zustand (state management)
# - shadcn/ui components
# - Tailwind CSS
# - All other frontend dependenciesNote: This may take a few minutes on first install.
The .env.local file should already exist in paintjob-fe/ directory.
Verify it exists:
ls -la .env.localIf it doesn't exist, create it:
# Create .env.local file
touch .env.local
# Or on Windows:
echo. > .env.localEdit .env.local file:
# Backend API URL
NEXT_PUBLIC_API_URL=http://localhost:8000/api
# Optional: Environment
NEXT_PUBLIC_ENV=development# Run Next.js development server
pnpm dev
# You should see:
# ▲ Next.js 15.0.0
# - Local: http://localhost:3000
# - Ready in X.X secondsKeep this terminal open - the frontend is now running.
Open your browser to:
http://localhost:3000
You should see the Paintjob home page.
Terminal 1 - Backend:
cd paintjob
source venv/bin/activate # or .\venv\Scripts\Activate.ps1 on Windows
python3 main.pyTerminal 2 - Frontend:
cd paintjob-fe
pnpm dev- Frontend: http://localhost:3000
- Backend API: http://localhost:8000/api
- API Docs: http://localhost:8000/docs
- API ReDoc: http://localhost:8000/redoc
Open http://localhost:3000 and:
- Click "Sign Up" or register link
- Create a new account
- Login with credentials
- Verify you're logged in
- Click "Open Editor"
- Create a new project
- Add rooms
- Add walls
- Place windows
- Verify all interactions work
# Create a user
curl -X POST http://localhost:8000/api/users/ \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"password123","full_name":"Test User"}'
# Login
curl -X POST http://localhost:8000/api/users/login \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"password123"}'
# Copy the access_token from response and use in next requests# Check PostgreSQL is running
psql -U postgres -c "SELECT 1;"
# Check DATABASE_URL in .env
cat paintjob/.env | grep DATABASE_URL
# Verify database exists
psql -U postgres -c "SELECT datname FROM pg_database WHERE datname='paintjob';"# Ensure virtual environment is activated
# You should see (venv) in prompt
# Reinstall dependencies
poetry install# Find process using port 8000
# Windows:
netstat -ano | findstr :8000
# macOS/Linux:
lsof -ti:8000
# Kill the process
# Windows:
taskkill /PID <PID> /F
# macOS/Linux:
kill -9 <PID># Run on different port
pnpm dev -- -p 3001
# Or kill process on port 3000
# Windows:
netstat -ano | findstr :3000
taskkill /PID <PID> /F
# macOS/Linux:
lsof -ti:3000 | xargs kill -9# Install pnpm globally
npm install -g pnpm
# Verify
pnpm --version# Clear cache and reinstall
rm -rf node_modules pnpm-lock.yaml
pnpm install
# Or on Windows:
rmdir /s /q node_modules
del pnpm-lock.yaml
pnpm install# Check NEXT_PUBLIC_API_URL in .env.local
cat paintjob-fe/.env.local
# Should be: http://localhost:8000/api
# Restart frontend after changing .env.local# Check Python version
python3 --version
# If too old, update Python
# Then recreate virtual environment:
cd paintjob
rm -rf venv
python3 -m venv venv
source venv/bin/activate
poetry install# Windows PowerShell execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# macOS/Linux file permissions
chmod +x <file>- Read API_DOCUMENTATION.md
- Read Frontend README
- Explore the project structure
- Try the example API calls in the docs
# Backend tests
cd paintjob
pytest -v
# See TESTING_GUIDE.md for details- Read CONTRIBUTING.md first
- Read and accept CLA.md
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Documentation for production deployment coming soon.
cd paintjob
source venv/bin/activate
python3 main.py # Run server
pytest # Run tests
alembic upgrade head # Run migrations
alembic revision --autogenerate # Create migrationcd paintjob-fe
pnpm dev # Run dev server
pnpm build # Build for production
pnpm start # Run production build
pnpm lint # Lint codeIf you encounter issues:
- Check this guide first
- Review the troubleshooting section
- Check README.md
- Search existing Issues
- Open a new issue with detailed information
Setup Complete! 🎉
You're now ready to start using and developing Paintjob!
Last Updated: October 5, 2025