A comprehensive full-stack application for planning and automating wall painting projects with motion path generation.
Paintjob is a production-ready system that combines:
- Backend API (FastAPI + PostgreSQL) for managing users, projects, rooms, walls, and generating motion paths
- Frontend Editor (Next.js 15) for visual planning with canvas-based wall and window editing
This repository contains both the backend (paintjob/) and frontend (paintjob-fe/) applications in a monorepo structure.
Watch a quick overview of the Paintjob system:
π¬ Watch on YouTube
This repository is VIEW-ONLY for external contributors.
- You DO NOT own any code in this repository
- All contributions become property of the repository owner
- By contributing, you agree to the Contributor License Agreement (CLA)
- You MUST read and accept the CLA before contributing
See CONTRIBUTING.md for strict contribution guidelines.
- API Documentation - Complete API reference with endpoints, schemas, and examples
- Testing Guide - Comprehensive guide for running and writing tests
- Frontend README - Frontend editor features and usage guide
- Contributor License Agreement - Legal agreement for contributors
- Contributing Guidelines - Strict rules for contributions
Required:
- Python 3.11+
- Node.js 18+ and pnpm
- PostgreSQL
Verify installations:
python3 --version # Should be 3.11+
pnpm --version # Should be 8.0+
The backend is a FastAPI application with PostgreSQL database.
cd paintjob# Create virtual environment
python3 -m venv venv
# Activate virtual environment
# On Windows (PowerShell):
.\venv\Scripts\Activate.ps1
# On macOS/Linux:
source venv/bin/activate# Install poetry if not already installed
pip install poetry
# Install all dependencies using poetry
poetry installImportant: Environment files are already provided in the repository.
Check that .env file exists in the paintjob/ directory with these variables:
Note: Update DATABASE_URL with your actual PostgreSQL credentials.
# Apply all migrations to create tables
alembic upgrade head# Run the FastAPI application
python3 main.pyThe API will be available at http://localhost:8000
API Endpoints:
- Interactive docs: http://localhost:8000/docs
- Alternative docs: http://localhost:8000/redoc
- API base: http://localhost:8000/api
The frontend is a Next.js 15 application with TypeScript and React.
cd paintjob-fe# Install all dependencies
pnpm installImportant: Environment files are already provided in the repository.
Check that .env.local file exists in the paintjob-fe/ directory:
NEXT_PUBLIC_API_URL=http://localhost:8000/api# Run Next.js development server
pnpm devThe frontend will be available at http://localhost:3000
cd paintjob
source venv/bin/activate # or .\venv\Scripts\Activate.ps1 on Windows
python3 main.pycd paintjob-fe
pnpm dev- Open browser to http://localhost:3000
- Create an account or login
- Click "Open Editor" to start creating projects
cd paintjob
# Run all tests
pytest
# Run with verbose output
pytest -v
# Run specific test file
pytest tests/api/test_project_flow.py -v
# Run with coverage
pytest --cov=api --cov-report=htmlSee TESTING_GUIDE.md for comprehensive testing documentation.
cd paintjob-fe
# Tests to be added
pnpm testpaintjob/ # Root monorepo
βββ README.md # This file
βββ CLA.md # Contributor License Agreement
βββ CONTRIBUTING.md # Contribution guidelines
βββ TESTING_GUIDE.md # Testing documentation
β
βββ paintjob/ # Backend FastAPI application
β βββ main.py # Application entry point
β βββ pyproject.toml # Poetry dependencies
β βββ alembic.ini # Database migration config
β βββ API_DOCUMENTATION.md # Complete API reference
β βββ alembic/ # Database migrations
β β βββ versions/ # Migration files
β βββ api/ # Application code
β β βββ auth.py # JWT authentication
β β βββ database.py # Database configuration
β β βββ models/ # SQLAlchemy models
β β βββ repos/ # Repository pattern
β β βββ routers/ # API endpoints
β β βββ schemas/ # Pydantic schemas
β β βββ services/ # Business logic
β β βββ utils/ # Utilities
β βββ tests/ # Test suite
β βββ api/ # API integration tests
β βββ conftest.py # Test fixtures
β
βββ paintjob-fe/ # Frontend Next.js application
βββ README.md # Frontend documentation
βββ package.json # Node dependencies
βββ next.config.ts # Next.js configuration
βββ src/
β βββ app/ # Next.js App Router
β β βββ page.tsx # Home page
β β βββ editor/ # Editor page
β βββ components/ # React components
β β βββ canvas/ # Konva canvas components
β β βββ panels/ # Side panels
β β βββ toolbar/ # Top toolbar
β β βββ ui/ # shadcn/ui components
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utilities and state
β β βββ geometry/ # Geometric calculations
β β βββ schema/ # Zod schemas
β β βββ state/ # Zustand store
β βββ models/ # TypeScript types
β βββ services/ # API client services
βββ public/ # Static assets
# Database
DATABASE_URL=postgresql+asyncpg://user:password@localhost:5432/paintjob
# JWT Authentication
SECRET_KEY=your-secret-key-here
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=720
# Optional: For production
CORS_ORIGINS=http://localhost:3000# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:8000/api
# Optional: For production
NEXT_PUBLIC_ENV=developmentNote: These environment files are already included in the repository. Update values as needed for your setup.
- FastAPI - Modern async web framework
- SQLAlchemy - ORM with async support
- PostgreSQL - Relational database
- Alembic - Database migrations
- Pydantic - Data validation
- JWT - Token-based authentication
- Poetry - Dependency management
- Pytest - Testing framework
- Next.js 15 - React framework (App Router)
- TypeScript - Type safety
- React Konva - Canvas rendering
- Zustand - State management
- Zod - Schema validation
- shadcn/ui - UI components (Radix UI)
- Tailwind CSS - Styling
- pnpm - Package manager
- β User authentication with JWT tokens
- β Project and room management
- β Wall geometry and obstacle tracking
- β Motion path generation for automated painting
- β RESTful API with comprehensive validation
- β Cascade deletion for hierarchical data
- β Full test coverage
- β Canvas-based visual editor (Konva.js)
- β Drag-and-drop interface
- β Project/room/wall hierarchy
- β Real-time dimension editing with sliders
- β Window and door placement
- β Grid and snap functionality
- β Undo/redo history
- β Import/export JSON scenes
- β Zoom and pan controls
See API_DOCUMENTATION.md for complete reference.
POST /api/users/- Create user accountPOST /api/users/login- Login and get JWT tokenGET /api/users/me- Get current user profile
POST /api/projects/- Create projectGET /api/projects/- List user's projectsGET /api/projects/{id}/with-rooms- Get project with roomsPUT /api/projects/{id}- Update projectDELETE /api/projects/{id}- Delete project (cascades)
POST /api/rooms/- Create roomPOST /api/walls/- Create wallGET /api/rooms/{id}/walls- Get walls for roomPUT /api/walls/{id}- Update wall geometry
POST /api/paths/generate-motion-path- Generate painting pathPOST /api/paths/preview-path- Preview path statistics
cd paintjob
# Install dependencies
poetry install
# Run development server
python3 main.py
# Run tests
pytest -v
# Create new migration
alembic revision --autogenerate -m "description"
# Apply migrations
alembic upgrade head
# Rollback migration
alembic downgrade -1cd paintjob-fe
# Install dependencies
pnpm install
# Run development server
pnpm dev
# Build for production
pnpm build
# Run production build
pnpm start
# Lint code
pnpm lintDatabase connection fails:
# Check PostgreSQL is running
psql -U postgres -c "SELECT 1;"
# Verify DATABASE_URL in .env
cat paintjob/.env | grep DATABASE_URLPoetry installation issues:
# Clear poetry cache
poetry cache clear --all pypi
# Reinstall dependencies
rm poetry.lock
poetry installMigration errors:
# Reset database (β οΈ destroys all data)
alembic downgrade base
alembic upgrade headPort 3000 already in use:
# Run on different port
pnpm dev -- -p 3001pnpm not found:
# Install pnpm globally
npm install -g pnpmModule not found errors:
# Clear cache and reinstall
rm -rf node_modules pnpm-lock.yaml
pnpm installFor issues or questions:
- Check the documentation in
/docs - Review API_DOCUMENTATION.md
- Check TESTING_GUIDE.md
- Contact the repository owner
Proprietary - All Rights Reserved
This software is proprietary and confidential. Unauthorized copying, distribution, or use is strictly prohibited.
By accessing this repository:
- You agree to the terms in CLA.md
- You understand this is VIEW-ONLY access
- You acknowledge all contributions become property of the owner
- You agree to follow CONTRIBUTING.md guidelines
READ THIS BEFORE CONTRIBUTING:
This repository has STRICT contribution rules:
- Read and accept CLA.md first
- Follow CONTRIBUTING.md guidelines
- All contributions are VIEW-ONLY
- You do NOT own any code you contribute
Summary:
- Fork and create pull requests only
- No direct commits to main
- All PRs require review and approval
- Contributors grant full rights to repository owner
See CONTRIBUTING.md for complete guidelines.
- Add frontend tests (Jest + React Testing Library)
- Implement motion path visualization
- Add real-time collaboration
- Mobile app (React Native)
- Docker containerization
- CI/CD pipeline
- Production deployment guides
See git commit history for detailed changes.
Version 1.0.0 (October 2025)
- Initial release
- Complete backend API
- Frontend editor
- Database migrations
- Comprehensive test suite
Made with β€οΈ by the Paintjob Team
Last Updated: October 5, 2025