PackagePro β Custom Packaging Marketplace.
A full-stack packaging marketplace: a custom packaging marketplace that connects factories with traders β catalog + search, custom design editor, dynamic quoting, Stripe payments, vendor routing, production & QA workflow, DHL fulfilment, settlements and analytics β implemented as a monorepo with a Fastify + PostgreSQL backend and a Next.js frontend.
| Home | Catalog | Design editor |
|---|---|---|
![]() |
![]() |
![]() |
Screenshots show the frontend run locally against its seed data.
This is the fastest way to get started:
# 1. Clone the project
git clone https://github.com/Ma7moudll/packagepro.git
cd packagepro
# 2. Run the setup script
chmod +x scripts/setup.sh
./scripts/setup.sh
# 3. Run the project
# Terminal 1: Backend
cd backend && npm run dev
# Terminal 2: Frontend
cd frontend && npm run devApp access:
- Frontend: http://localhost:3001
- Backend API: http://localhost:3000
- API Docs: http://localhost:3000/api
- Database Studio:
cd backend && npm run prisma:studio
- π PROJECT_REVIEW.md - Comprehensive project review
- π ACTION_PLAN.md - Action plan
- β‘ QUICK_SUMMARY.md - Quick summary
- π§ͺ TESTING_GUIDE.md - Testing guide
- π DEPLOYMENT_GUIDE.md - Deployment guide
- π€ CONTRIBUTING.md - Contribution guide
- ποΈ ARCHITECTURE.md - Architecture documentation
- β COMPLETION_SUMMARY.md - Completion summary
packagepro/
βββ backend/ # Fastify + TypeScript Backend
βββ frontend/ # Next.js 15 Frontend
βββ shared/ # Shared types and utilities
βββ docs/ # Documentation
βββ .github/ # GitHub Actions & Workflows
βββ *.md # Documentation files
- Node.js 20+
- PostgreSQL 15+
- Redis 7+
- Docker & Docker Compose (optional)
- npm or pnpm
- Navigate to backend directory:
cd backend- Install dependencies:
npm install- Set up environment variables:
cp env.example .env
# Edit .env with your configuration- Set up database:
npm run prisma:generate
npm run prisma:migrate
npm run prisma:seed- Start development server:
npm run devBackend will run on http://localhost:3000
- Navigate to frontend directory:
cd frontend- Install dependencies:
npm install- Set up environment variables:
Create
.env.local:
NEXT_PUBLIC_API_URL=http://localhost:3000
- Start development server:
npm run devFrontend will run on http://localhost:3001
API endpoints are available at /api. Main endpoints:
POST /api/auth/register- Register new user Β·POST /api/auth/login- Login Β·POST /api/auth/refresh- Refresh token
POST /api/pricing/calculate- Calculate price Β·GET /api/pricing/materials- Get materials
POST /api/orders- Create order Β·GET /api/orders/:id- Get order Β·GET /api/orders- List orders Β·PATCH /api/orders/:id/status- Update status
POST /api/designs/session- Create design session Β·POST /api/designs/save- Save design Β·GET /api/designs/:id- Get design
POST /api/payments/create-intentΒ·POST /api/payments/confirmΒ·POST /api/webhooks/stripe
POST /api/orders/:id/prepress-checkΒ·GET /api/orders/:id/prepress-resultsΒ·POST /api/orders/:id/request-approvalΒ·POST /api/orders/:id/approve
POST /api/orders/:id/create-poΒ·GET /api/purchase-orders/:idΒ·POST /api/purchase-orders/:id/confirm
POST /api/production/start/:poIdΒ·POST /api/production/:id/progressΒ·GET /api/production/:id
POST /api/production/:productionId/samplesΒ·POST /api/samples/:id/approveΒ·POST /api/samples/:id/reject
POST /api/shipments/create/:idΒ·GET /api/shipments/:id/trackingΒ·POST /api/webhooks/dhl
POST /api/reviewsΒ·GET /api/reviews/order/:orderIdΒ·GET /api/vendors/:id/reviews
POST /api/settlements/process/:idΒ·GET /api/vendors/:id/paymentsΒ·GET /api/finance/reports
- Marketplace catalog β search, categories, verified factories, featured products, sample requests.
- Dynamic Pricing Engine β real-time quoting over materials and specs (
/api/pricing/calculate). - Custom Design Editor β design sessions, save/session API, 200+ templates.
- Order lifecycle β orders β pre-press quality check β soft-proof approval β vendor router (multi-criteria scoring + 4h handshake) β PO (PDF) β production/QA β DHL shipment β settlement (72h) β reviews.
- Payments β Stripe payment intents + webhooks (also PayPal/COD scaffolding).
- Security baseline β JWT (15 min access + 7d refresh), bcrypt cost 12, Redis rate limiting with exponential backoff + reCAPTCHA v3, persistent AuditLog.
- Jobs & integrations β BullMQ workers (email, settlement, reminders, marketing, export), SendGrid/SES email service, S3/R2 file storage + image optimization, DHL tracking.
- Fastify 4 (web framework) Β· Prisma 5 ORM Β· PostgreSQL Β· Redis
- BullMQ (job queues) Β· Stripe (payments) Β· AWS S3 / CloudFlare R2 (files)
- JWT auth Β· bcrypt (cost 12) Β· reCAPTCHA v3 Β· nodemailer (SendGrid/SES)
- pdfkit / pdf-lib (PO & reports)
- Next.js 15 (App Router) Β· React 19 Β· TypeScript 5.3
- Tailwind CSS Β· 3D package preview Β· design editor
.github/workflows/ci.ymlβ lint, type-check, tests and build on push/PR..github/workflows/deploy.ymlβ deployment pipeline stub..github/dependabot.ymlβ dependency updates.
See backend/env.example for all required environment variables
(database, Redis, JWT, S3/R2, Stripe, DHL, email providers, analytics).
- Backend is the most complete part β 17 modules, 11 services, 18 Prisma
tables, 5 BullMQ workers, Stripe/DHL/SES wired (per
docs/guides/COMPLETION_SUMMARY.md). The frontend marketplace is the active focus (connecting real APIs perSPEC-029); several pages currently render seed/fixture data. - Third-party credentials are required, not bundled β Stripe, DHL,
SendGrid/SES, S3/R2, reCAPTCHA and analytics keys come from
backend/.env(cp env.example .env). None are committed (.envis gitignored). - Not deployed β
deploy.ymlis a pipeline stub; production hosting and environment provisioning are the operator's responsibility. - Backend tests run with Vitest; both packages expose
npm run lint. - The FAQ/statistics on the landing page show seed figures until wired to the live API.


