A 3‑step shipping labels wizard that lets users upload CSVs, review/edit shipments, select shipping services, and purchase labels. The app is split into a Django + DRF backend and a Vite + React frontend.
- CSV import with async processing and progress polling
- Review table with search, filters, pagination, selection, bulk actions
- Address/package edits with modals and validation UX
- Shipping quotes + per‑row and bulk service selection
- Partial checkout: purchase eligible shipments and continue fixing others
- Presets for addresses and packages
- Backend: Django, DRF, Celery, Redis, Postgres
- Frontend: Vite, React, TanStack Router/Query/Table, Zustand, shadcn/ui, Tailwind
backend/Django + DRF APIfrontend/Vite + React UIdocker-compose.ymllocal Postgres + Redisrender.yamlproduction deployment config
- Python 3.12+
uvfor Python depsbunfor frontend deps- Docker (recommended) or local Postgres + Redis
docker compose up -dcd backend
uv syncCreate or update backend/.env (a sample exists in the repo). Required vars:
DJANGO_SECRET_KEY=dev-secret-key
DJANGO_DEBUG=1
DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1
DATABASE_URL=postgres://shipping_labels:shipping_labels@localhost:5432/shipping_labels
REDIS_URL=redis://localhost:6379/0
CELERY_BROKER_URL=redis://localhost:6379/0
CELERY_RESULT_BACKEND=redis://localhost:6379/0
CORS_ALLOWED_ORIGINS=http://localhost:5173
CORS_ALLOW_CREDENTIALS=0
Run migrations and start the server:
uv run python manage.py migrate
uv run python manage.py runserverStart the worker (separate terminal):
uv run celery --app config worker --loglevel info --concurrency 4cd frontend
bun installCreate/update frontend/.env:
VITE_API_BASE_URL=http://localhost:8000/api/v1
Start the dev server:
bun devOpen http://localhost:5173.
- Backend tests:
cd backend && uv run pytest - Backend lint:
cd backend && uv run ruff check . - Frontend lint:
cd frontend && bun run lint
- The backend is the source of truth for validation and business logic.
- Checkout purchases only eligible shipments (READY + service + verified address). Others remain available for fixes in Review.
- Use the Review “Hide purchased” toggle to focus on remaining shipments.
Render deployment config is in render.yaml. It provisions:
- Postgres database
- Redis for Celery
celery-workerprocessshipping_labelsweb service
Update environment variables as needed in Render before deploying.