PromptCraft
AI-powered NFT generation and trading platform with real-time auctions
A full-stack NFT marketplace where users generate unique digital art via AI prompts, then list or auction their creations in real time. Features a live bidding system, wallet integration, and a GraphQL API powering both the marketplace and the generation pipeline.
~8s
Generation latency
< 100ms
Bid broadcast latency
Multi-room
Concurrent auctions
GraphQL + REST
API type
NFT marketplaces like OpenSea require users to bring pre-generated art. PromptCraft collapses the creation and trading workflow into a single platform — you describe what you want, the AI generates it, and you can immediately list it for sale or auction.
"How do you build a system that keeps auction state perfectly synchronized across all connected bidders in real time, while handling the latency of AI image generation without blocking the user experience?"
Architecture
- 1Vue.js 3 + Composition API frontend with the Velzon admin template
- 2NestJS backend with modular domain architecture (auth, NFTs, auctions, wallet)
- 3GraphQL API for marketplace queries and mutations
- 4WebSocket gateway for real-time auction events (new bids, countdown, sold)
- 5Server-Sent Events (SSE) for AI generation progress streaming
- 6Python microservice wrapping the image generation model
- 7PostgreSQL with Prisma ORM for transactional integrity on bids
Key features
User submits a text prompt → NestJS sends it to the Python microservice → generation progress is streamed back via SSE so the user sees live updates → final image is stored and minted as an NFT record.
Each auction room is a WebSocket namespace. Bids are validated server-side (minimum increment, wallet balance, auction active) before being broadcast. A countdown timer is synchronized server-side to prevent client-side manipulation.
All browsing, filtering, and NFT metadata queries go through GraphQL, enabling flexible front-end querying without over-fetching. Mutations (place bid, buy now, list item) go through REST for explicit error handling.
Implemented a custodial wallet model for the MVP — each user has an on-platform balance. Transfers are atomic PostgreSQL transactions to prevent double-spend on concurrent bids.
Technical challenges
Race conditions on concurrent bids — two users submitting within milliseconds. Solved with PostgreSQL row-level locking and a server-side bid queue per auction.
AI generation taking 8-15 seconds blocking UX — solved by SSE progress streaming so the user sees the image being built, not a spinner.
Keeping WebSocket auction state consistent when a user reconnects mid-auction — solved by replaying the last N events from a server-side event log on reconnect.
What I learned
- Designing real-time systems with explicit consistency guarantees
- SSE as a simpler alternative to WebSocket for unidirectional streaming
- GraphQL schema design for a marketplace domain
Interested in working together?
I am open to an end-of-year internship opportunity starting February 2027.