mirror of
https://github.com/bitbaum/evig.git
synced 2026-12-04 17:38:05 +01:00
Implements comprehensive P2P marketplace with instant listing creation, in-app messaging, seller profiles, reviews, and smart search. **Phase 1: Core Marketplace MVP (Tasks 1-6)** Database (Migration 031): - listings table (SSOT for all products): seller_id, title, price, category, condition, delivery/payment options, German full-text search - seller_profiles table (auto-created on first listing) - listing_images table (up to 8 images per listing) - listing_favorites table (wishlist functionality) - marketplace_orders table (for Phase 3) Config & Schemas: - src/config/marketplace.ts: MARKETPLACE_CATEGORIES, LISTING_STATUSES, DELIVERY_OPTIONS, PAYMENT_MODES, SORT_OPTIONS, CONDITIONS, MARKETPLACE_LIMITS - src/config/database.ts: Add TABLE_NAMES for new tables - src/lib/schemas/marketplace.ts: ListingsQuerySchema, CreateListingSchema, UpdateListingSchema, ContactSellerSchema API Routes: - GET/POST /api/listings: Public browse with filters + create listing - GET/PATCH/DELETE /api/listings/[id]: Detail, update, soft delete - POST /api/listings/[id]/favorite: Toggle favorite - GET /api/listings/mine: My listings with status filter Pages: - /marketplace: Browse with search, filters, pagination, grid layout - /marketplace/[id]: Detail page with image gallery, seller info, actions - /marketplace/sell: Create listing with two-step flow (form → preview) - /dashboard/listings: My listings management **Phase 2: Trust & Discovery (Tasks 7-16)** Messaging Integration (Migration 032): - POST /api/listings/[id]/contact: Create conversation tied to listing - Updated conversation types to include 'marketplace' Seller Profiles: - GET /api/sellers/[id]: Public seller profile + active listings + reviews - GET/PATCH /api/sellers/me: Own seller profile management - /sellers/[id]: Public seller profile page - /dashboard/profile/seller: Edit seller profile Edit Flow: - Updated /marketplace/sell to handle edit mode via ?edit=ID param Reviews: - ListingReviews component: Display reviews on listing detail - ReviewForm component: Submit reviews with ratings - Reuses existing review system with target_type='listing' Meilisearch Integration: - src/lib/search/meilisearch.ts: Client + index management - POST /api/search/listings: Search with facets and filters - scripts/reindex-listings.ts: One-time indexing script - Auto-index on create/update/delete Email Notifications: - src/lib/email/templates/marketplace.ts: Listing published, new message, review notification, status updates Image Optimization: - Updated /api/uploads to generate thumbnail + medium sizes with sharp Advanced Features: - GET /api/listings/similar: Similar listings suggestions - GET /api/listings/favorites: User's favorited listings - /dashboard/favorites: Favorites dashboard **Key Architecture:** - No seller approval gate - instant listing creation - Two payment modes: 'secure' (Stripe escrow, 5% commission) or 'direct' (contact seller) - Delivery options: 'pickup', 'shipping', or 'both' - In-app messaging (no mailto links) - Meilisearch for fast, typo-tolerant search with facets - Image optimization with sharp (thumbnail + medium sizes) - Swiss German UI throughout **Cleanup:** - Add "Verkaufen" to main navigation - Add /dashboard/listings to dashboard sidebar - Deprecate old /api/marketplace/products routes - Remove requireSeller() gate Verified: tsc --noEmit (zero errors), npm run lint (zero errors) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
145 lines
5.9 KiB
JSON
145 lines
5.9 KiB
JSON
{
|
|
"name": "revampit",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "WATCHPACK_POLLING=1 next dev",
|
|
"dev:frontend": "npm run dev",
|
|
"dev:full": "./scripts/start-all.sh",
|
|
"dev:no-medusa": "./scripts/start-all.sh --no-medusa",
|
|
"d": "npm run services:up && concurrently -n 'medusa,next' -c 'magenta,cyan' 'npm run medusa:dev' 'sleep 10 && npm run dev'",
|
|
"db:up": "docker compose up -d db",
|
|
"db:down": "docker compose down db",
|
|
"services:up": "docker compose up -d db medusa_db medusa_redis meilisearch listmonk",
|
|
"services:down": "docker compose down",
|
|
"start:all": "./scripts/start-all.sh",
|
|
"stop:all": "./scripts/stop-all.sh",
|
|
"setup": "npm run services:up && echo 'Waiting for services...' && sleep 5",
|
|
"setup-admins": "npx tsx scripts/setup-all-admins.ts",
|
|
"generate:admin-hash": "node scripts/generate-admin-hash.js",
|
|
"reset": "npm run services:down && docker compose down -v && npm run setup",
|
|
"listmonk:setup": "./scripts/setup-listmonk.sh",
|
|
"listmonk:up": "docker compose up -d listmonk",
|
|
"listmonk:down": "docker compose stop listmonk",
|
|
"listmonk:logs": "docker compose logs -f listmonk",
|
|
"build": "next build && next-sitemap",
|
|
"build:cms": "echo 'CMS disabled'",
|
|
"start": "next start",
|
|
"start:cms": "echo 'CMS disabled'",
|
|
"medusa:start": "./scripts/start-medusa.sh",
|
|
"medusa:up": "docker compose -f docker-compose.medusa.yml up -d medusa_db medusa_redis meilisearch",
|
|
"medusa:bootstrap": "node scripts/medusa-bootstrap.mjs",
|
|
"medusa:bootstrap:9001": "MEDUSA_BACKEND_URL=http://localhost:9001 node scripts/medusa-bootstrap.mjs",
|
|
"medusa:setup": "npm run medusa:start && node scripts/medusa-bootstrap.mjs",
|
|
"dev:all": "npm run medusa:setup && npm run dev",
|
|
"medusa:setup:9001": "npm run medusa:up && MEDUSA_BACKEND_URL=http://localhost:9001 node scripts/medusa-bootstrap.mjs",
|
|
"medusa:dev": "cd medusa-backend && npm run dev",
|
|
"medusa:dev:9001": "cd medusa-backend && MEDUSA_PORT=9001 npm run dev",
|
|
"medusa:down": "docker compose -f docker-compose.medusa.yml down",
|
|
"medusa:logs": "docker compose -f docker-compose.medusa.yml logs -f medusa",
|
|
"lint": "eslint .",
|
|
"lint:umlauts": "bash scripts/lint-umlauts.sh src",
|
|
"test": "jest",
|
|
"test:watch": "jest --watch",
|
|
"test:coverage": "jest --coverage",
|
|
"test:e2e": "playwright test",
|
|
"test:e2e:ui": "playwright test --ui",
|
|
"test:all": "npm run test && npm run test:e2e",
|
|
"deploy": "bash tools/deployment/deploy.sh",
|
|
"setup-deploy": "bash tools/deployment/setup-deploy-keybind.sh",
|
|
"ship": "bash scripts/ship.sh",
|
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
"migrate-to-prod": "./scripts/migrate-to-production.sh",
|
|
"db:migrate-users": "psql -h localhost -U postgres -d revampit_cms -f scripts/migrate-existing-users.sql",
|
|
"prod:build": "docker build -f Dockerfile.prod -t revampit-app:latest .",
|
|
"prod:up": "docker compose -f docker-compose.prod.yml up -d",
|
|
"prod:down": "docker compose -f docker-compose.prod.yml down",
|
|
"prod:logs": "docker compose -f docker-compose.prod.yml logs -f",
|
|
"prod:restart": "docker compose -f docker-compose.prod.yml restart",
|
|
"prod:health": "curl -f http://localhost:3000/api/health",
|
|
"hirn:ingest": "npx tsx scripts/hirn-ingest.ts",
|
|
"hirn:ingest:docs": "npx tsx scripts/hirn-ingest.ts --dir ./docs",
|
|
"hirn:ingest:src": "npx tsx scripts/hirn-ingest.ts --dir ./src --extensions .ts,.tsx",
|
|
"hirn:stats": "npx tsx scripts/hirn-ingest.ts --stats",
|
|
"transcription:start": "./services/transcription/start.sh",
|
|
"transcription:setup": "python3 -m venv services/transcription/.venv && services/transcription/.venv/bin/pip install faster-whisper flask"
|
|
},
|
|
"dependencies": {
|
|
"@auth/pg-adapter": "^1.11.1",
|
|
"@eslint/eslintrc": "^3.3.3",
|
|
"@eslint/js": "^9.39.2",
|
|
"@headlessui/react": "^2.1.0",
|
|
"@heroicons/react": "^2.1.1",
|
|
"@medusajs/js-sdk": "^2.12.0",
|
|
"@stripe/react-stripe-js": "^5.4.1",
|
|
"@stripe/stripe-js": "^8.6.0",
|
|
"@supabase/ssr": "^0.8.0",
|
|
"@supabase/supabase-js": "^2.87.1",
|
|
"@tanstack/react-query": "^5.90.11",
|
|
"@types/jsonwebtoken": "^9.0.5",
|
|
"@types/nodemailer": "^7.0.1",
|
|
"@types/puppeteer": "^5.4.7",
|
|
"@types/uuid": "^10.0.0",
|
|
"@vercel/blob": "^2.0.1",
|
|
"bcryptjs": "^2.4.3",
|
|
"cookie": "^1.0.2",
|
|
"csv-parse": "^6.1.0",
|
|
"exceljs": "^4.4.0",
|
|
"framer-motion": "^12.23.25",
|
|
"gray-matter": "^4.0.3",
|
|
"ioredis": "^5.8.2",
|
|
"jsonwebtoken": "^9.0.2",
|
|
"leaflet": "^1.9.4",
|
|
"lucide-react": "^0.488.0",
|
|
"next": "^16.1.1",
|
|
"next-auth": "^5.0.0-beta.30",
|
|
"next-sitemap": "^4.2.3",
|
|
"next-themes": "^0.2.1",
|
|
"node-html-parser": "^7.0.1",
|
|
"nodemailer": "^7.0.11",
|
|
"pg": "^8.16.3",
|
|
"puppeteer": "^24.34.0",
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.2.0",
|
|
"react-leaflet": "^4.2.1",
|
|
"react-markdown": "^10.1.0",
|
|
"recharts": "^3.7.0",
|
|
"redis": "^5.10.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"sharp": "^0.34.5",
|
|
"stripe": "^20.1.0",
|
|
"tailwind-merge": "^3.2.0",
|
|
"uuid": "^13.0.0",
|
|
"zod": "^4.3.6"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.55.1",
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@testing-library/react": "^16.3.0",
|
|
"@testing-library/user-event": "^14.6.1",
|
|
"@types/bcryptjs": "^2.4.6",
|
|
"@types/cookie": "^0.6.0",
|
|
"@types/jest": "^30.0.0",
|
|
"@types/leaflet": "^1.9.21",
|
|
"@types/node": "^20.11.24",
|
|
"@types/pg": "^8.15.5",
|
|
"@types/react": "^18.2.61",
|
|
"@types/react-dom": "^18.2.19",
|
|
"autoprefixer": "^10.4.18",
|
|
"concurrently": "^9.2.0",
|
|
"critters": "^0.0.25",
|
|
"eslint": "^9.39.2",
|
|
"eslint-config-next": "^16.1.1",
|
|
"jest": "^30.2.0",
|
|
"jest-environment-jsdom": "^30.2.0",
|
|
"npm-run-all": "^4.1.5",
|
|
"postcss": "^8.4.35",
|
|
"postcss-import": "^16.1.0",
|
|
"tailwindcss": "^3.4.1",
|
|
"typescript": "^5.3.3"
|
|
},
|
|
"overrides": {
|
|
"fast-xml-parser": "^5.3.4"
|
|
}
|
|
}
|