ChatGPT Prompting Guide
Here is the best way to give this to Claude Sonnet: First, my recommendation Do not ask it to “build the full platform” in one prompt. Ask it to build MVP v1 with clear limits: monorepo backend API 3 frontends/views: buyer/agent portal photographer portal admin portal image upload to R2 metadata in database search + map view basic credit/purchase flow Docker + CI/CD + blue/green deployment on VPS Important architecture choice For your question: Should images be stored in DB or as plain files? Store image files in object storage, not in the database. Use: Cloudflare R2 for originals and derivatives PostgreSQL for metadata, licensing, purchases, credits, photographers, users, tags, addresses, GPS, EXIF, status, etc. Why: cheaper more scalable easier CDN delivery easier image processing pipeline better backup strategy DB stays fast So the split should be: Table Copy Data Where to store Original images R2 Thumbnails / previews R2 Metadata PostgreSQL Search indexes PostgreSQL first, later OpenSearch if needed Jobs / queues Redis Sessions / cache Redis Suggested MVP tech stack Backend Node.js TypeScript NestJS or Fastify Prisma ORM PostgreSQL + PostGIS Redis + BullMQ Zod for validation JWT + refresh tokens Stripe for credits/payments later Frontend Next.js React TypeScript Tailwind Mapbox or Leaflet for map search React Query / TanStack Query Storage / infra Cloudflare R2 Cloudflare CDN Docker / Docker Compose Nginx or Traefik reverse proxy GitHub Actions VPS hosting Search Start with PostgreSQL: full text search geo search with PostGIS filters: address, city, photographer, tags, drone/non-drone, date, price, license, resolution Later you can move to OpenSearch if needed. Best way to prompt Claude Sonnet Use this in stages. Prompt 1 — ask for architecture and repo plan text Copy code You are a senior full-stack architect and lead developer.
I want you to design MVP v1 for an open-source image marketplace platform for real estate media. The platform connects photographers and real estate agents. A key focus is drone images that can be reused and relicensed easily.
Main goals:
- Buyers/agents can browse, search, preview, and buy images.
- Photographers can bulk upload images and manage metadata, pricing, and licenses.
- Admins can manage users, images, moderation, billing, and platform settings.
- The platform must scale to 100,000+ images per year and growing users.
- App should run on a VPS with Docker. Images should be stored in Cloudflare R2 and served via Cloudflare.
- Backend must be in Node.js.
- Frontend must use React.js with Next.js.
- We want clean CI/CD with GitHub Actions and blue/green style deployment using separate ports, with easy switch to production.
Please do the following:
A. Define an MVP v1 scope only. Keep it realistic. B. Propose the full architecture. C. Recommend the exact tech stack and explain why. D. Define the monorepo structure. E. Define the database schema for:
- users
- roles
- photographers
- agents/customers
- images
- image files / variants
- locations
- tags
- licenses
- credit wallets
- credit transactions
- orders
- order items
- payouts
- audit logs F. Explain how image storage should work with R2, thumbnails, and metadata storage. G. Define the upload pipeline, including bulk upload and background jobs. H. Define the search and map browsing approach. I. Define authentication and authorization. J. Define admin features. K. Define CI/CD and blue/green deployment approach for a VPS. L. List what should be built in phase 1, 2, and 3.
Constraints:
- Open source friendly
- TypeScript everywhere
- Production ready structure
- Security and scalability matter
- Start simple but avoid dead ends
Output format:
- MVP scope
- Architecture overview
- Tech stack
- Monorepo structure
- Database schema
- API modules
- Deployment design
- Step-by-step implementation roadmap Prompt 2 — ask it to scaffold the actual repo After it answers, give this: text Copy code Now implement the project scaffold as a production-ready monorepo.
Requirements:
- pnpm workspace monorepo
- apps/web = Next.js buyer/agent portal
- apps/photographer = Next.js photographer portal
- apps/admin = Next.js admin portal
- apps/api = Node.js TypeScript backend
- packages/ui = shared UI components
- packages/config = shared eslint/tsconfig/prettier config
- packages/types = shared types
- packages/sdk = typed API client
- dockerized local development
- PostgreSQL, Redis
- Prisma schema
- environment variable examples
- health check endpoints
- basic auth module with JWT
- role system: admin, photographer, buyer
- R2 integration abstraction
- image entity and upload flow skeleton
- GitHub Actions for test, build, docker image build
Please output:
- Final repo tree
- Full file contents for each important file
- Commands to run locally
- Any migration steps
Important:
- Use TypeScript
- Use clean architecture
- Keep code complete, not pseudo-code
- If content is too long, continue in multiple messages Prompt 3 — ask it to build the first real feature set text Copy code Continue by implementing MVP v1 feature set in this order:
- Authentication
- register
- login
- refresh token
- role-based access control
- Photographer portal
- bulk image upload
- enter metadata
- set location on map
- set tags
- set license type
- set price in credits
- submit for review
- Admin portal
- review uploaded images
- approve/reject
- edit metadata
- manage users
- Buyer portal
- search images
- filter by location, tags, drone, address, date, price
- map view
- image detail page
- preview thumbnails
- buy image with credits
- Credit wallet
- credit balance
- ledger
- basic manual top-up for MVP
- purchase deduction
- Order flow
- create order
- deduct credits
- grant download access
- record photographer revenue share
Technical requirements:
- Prisma migrations
- REST API or tRPC, choose one and justify
- background jobs for image processing
- generate thumbnail and preview versions
- secure signed URLs for original downloads
- tests for critical services
Please implement complete code, migrations, and setup instructions. Prompt 4 — ask for CI/CD and deployment text Copy code Now implement production deployment and CI/CD.
Requirements:
- Dockerfiles for all apps
- docker-compose for local and VPS deployment
- Nginx or Traefik reverse proxy
- blue/green deployment strategy on one VPS
- production stack on one port set
- candidate stack on another port set
- health checks before switching traffic
- GitHub Actions pipeline:
- install
- lint
- test
- build
- build docker images
- push images
- SSH deploy to VPS
- switch reverse proxy after health check
- rollback if health check fails
Also include:
- .env.production.example
- backup strategy for PostgreSQL
- R2 config notes
- Cloudflare setup notes
- observability basics: logs, metrics, error tracking
Output:
- deployment architecture
- all config files
- GitHub Actions workflow files
- switch/rollback script
- production runbook Prompt 5 — ask it to behave correctly This helps a lot: text Copy code Important working rules:
- Do not skip implementation details.
- Do not give me high-level advice only.
- Generate actual code and file contents.
- When making assumptions, state them clearly.
- Prefer simple, maintainable solutions.
- Keep the MVP narrow and shippable.
- If a feature is too large, implement the simplest production-safe version first.
- Use TODO comments only when absolutely necessary.
- Keep security in mind: auth, signed URLs, validation, access control, rate limiting.
- Keep the code open-source friendly.
- Continue until the feature is complete. My recommended product scope for v1 You should keep v1 to this: Roles Admin Photographer Buyer/Agent Buyer portal login/register search map browsing image details preview thumbnails buy with credits download licensed images Photographer portal upload images in bulk edit metadata set price set license submit view sales Admin portal review uploads approve/reject manage users manage credits manually basic reports Backend auth upload pipeline metadata management search order flow wallet/credits image processing signed download URLs Suggested data model notes Important fields for images: Table Copy Field Notes id UUID photographer_id owner title searchable description searchable address searchable city searchable country searchable latitude geo search longitude geo search tags searchable capture_date useful for listings drone boolean property_type house/apartment/commercial/land license_type standard/editorial/exclusive/etc price_credits price status draft/review/approved/rejected/archived original_key R2 key preview_key R2 key thumb_key R2 key width/height metadata exif_json optional checksum dedupe created_at audit approved_at moderation Credit system advice For MVP: keep it simple 1 credit = fixed currency value photographer sets price in credits buyer account has wallet balance admin can top up manually or Stripe later every purchase creates immutable ledger records Do not build complicated billing first. Use: wallet table wallet_transactions table orders order_items payout_records Blue/green deployment on VPS Your idea is good.