Chevaliers Marketplace
A marketplace for buying and selling pets and pet supplies. Built with Next.js 16 and Firebase Firestore, with seller and buyer profiles, listings, and built-in messaging.
Buying or selling a pet is a conversation, not a one-click checkout. This marketplace pairs listings with real-time chat between buyer and seller, and Firestore keeps new posts and messages live as they happen.
What it solves
- Pet buyers and sellers have no central marketplace to list animals and supplies.
- Negotiating over WhatsApp is messy and offers no protection.
- Without ratings or verified sellers, buyers worried about a pet's welfare have nothing to trust.
- Stock lives in spreadsheets, with no real-time updates.
Impact
Buy/sell animals & supplies
Seller-buyer chat

Architecture
Data flow
- Public browse → query Firestore /listings
- Filter by pet type / location → client-side
- Click listing → detail + seller profile + message button
- Sign in → choose role (seller / buyer)
- Contact Seller → /messages/{sellerId}_{buyerId}
- Seller gets real-time update → responds
- Seller dashboard: CRUD listings, messages, ratings
- Admin: approve / flag listings, manage sellers
Engineering decisions
Firestore for real-time
Messages appear instantly with no polling — suitable for small marketplace traffic.
Firebase Auth with custom claims
A role of seller or buyer is stored as a custom claim for access control.
Cloud Storage rules
Only sellers can upload pet images; buyers can read.
Messaging via Firestore
A /messages/{docId} collection with senderId, receiverId, timestamp, and text, with real-time listeners on the client.
Seller verification
A manual review step (planned); admins set verified: true on the seller profile.
Gallery


