This repository hosts the MVP implementation for AI PaperCraft Studio, a web platform that turns user-uploaded images into printable papercraft outputs.
apps/
web/ # Next.js frontend
services/
api/ # FastAPI API service
worker/ # Async worker and pipeline orchestration
packages/
shared-types/ # Shared DTOs and schemas
geometry-core/ # Mesh repair and geometry utilities
unfold-core/ # Unfolding and pagination logic
export-core/ # PDF/SVG export helpers
docs/
prd/ # PRD references
architecture/ # Architecture references
infra/
docker/ # Local infrastructure definitions
scripts/ # Local bootstrap scripts
- JavaScript and TypeScript workspace packages use
pnpm. - Python services will use service-local virtual environments. When implementation starts, prefer
uvor standardvenvper service instead of a single shared Python environment. - Cross-service configuration keys live in
.env.example.
Copy .env.example to .env before running local services.
Core variables:
DATABASE_URLREDIS_URLS3_ENDPOINTS3_ACCESS_KEYS3_SECRET_KEYS3_BUCKET_UPLOADSS3_BUCKET_ARTIFACTSMAX_UPLOAD_MBTASK_TIMEOUT_SECONDS
The local stack uses Docker Compose and provides:
webonlocalhost:3000apionlocalhost:8000postgresonlocalhost:5432redisonlocalhost:6379minioonlocalhost:9000with console onlocalhost:9001
docker compose -f infra/docker/docker-compose.yml up -dor:
./infra/scripts/local-up.ps1To rebuild application images while starting the full stack:
pnpm dev:dockerdocker compose -f infra/docker/docker-compose.yml psor:
./infra/scripts/local-health.ps1docker compose -f infra/docker/docker-compose.yml downor:
./infra/scripts/local-down.ps1- Copy
.env.exampleto.env. - Start the local infrastructure stack.
- Confirm
postgres,redis, andminioare healthy. - Open the MinIO console at
http://localhost:9001. - Verify the local buckets exist:
papercraft-local-uploadspapercraft-local-artifacts
The project has completed M1, M2, and M3. The current M4 branch adds the final MVP validation assets on top of the real pipeline and stabilization work: regression sample suite, regression runbook, manual assembly QA, beta release checklist, and rollback notes.
The current real pipeline runs preprocessing, base mesh generation, paperability repair, constrained decimation, unfolding/layout, PDF export, and assembly metadata generation.
Completed work:
- repository structure, local infra, and onboarding docs
- frozen MVP scope and acceptance contract
- core SQLAlchemy models and Alembic schema for projects, tasks, artifacts, and assembly metadata
- project, upload, task creation, and task status APIs
- Celery/Redis worker backbone with stage progression, retry, and cancellation
- object storage-backed source image uploads and artifact downloads through the local MinIO stack
- Docker Compose services for web, API, worker, database, Redis, and MinIO
- frontend demo flow with project creation, image upload, task polling, mock workbench previews, paper-net page switching, task history, regeneration, cancellation, retry, controlled mock failures, and PDF download
- real M3 artifacts for
preprocess_mask,preprocess_crop,base_mesh,preview_model,repaired_mesh,low_poly_mesh,net_json,net_svg, andexport_pdf - real assembly metadata derived from the exported net
- M4 paperability scoring and automatic fallback metadata on mesh/net artifacts
- task status
next_actionsfor clear recovery guidance - frontend retry-stage selection for failed or canceled tasks
- task-level observability with correlated event metadata, stage duration metrics, completion/export-rate reporting, and basic alert flags
- QA validation assets for regression samples, manual assembly review, beta release readiness, and rollback
Next development focus:
- finish issue
#17by merging the M4 QA branch - close the M4 milestone and MVP tracking issue after merge