Choudai
In Active DevelopmentA Mercari-style C2C marketplace for Thai secondhand goods — built on Go, clean architecture, and a custom escrow system to eliminate transaction fraud.

The Problem
Peer-to-peer trading in Thailand is largely unstructured — scattered across social media groups, general classifieds, and chat-based negotiations with no buyer protection. Transaction fraud is rampant: sellers disappear after receiving payment, buyers dispute deliveries, and there's no neutral party to mediate. Choudai was built to solve this trust deficit with a purpose-built marketplace that makes C2C trading safe by default.
Platform & Market Position
The platform serves two markets simultaneously. First, the broad domestic secondhand market — everyday items traded between Thai consumers. Second, a curated vertical of secondhand goods imported from Japan, which are highly valued locally for their affordability and excellent condition. This Japanese-import angle gives Choudai a differentiated positioning that generic marketplaces can't replicate.
Escrow-First Trust Model
The backbone of the platform is a custom escrow payment system. When a buyer purchases an item, their payment is held securely by the platform — not forwarded to the seller. Funds are only released once the buyer confirms delivery and verifies the item matches its listing. This eliminates the most common fraud vectors in C2C trading: non-delivery, item misrepresentation, and payment disputes.
User verification adds another trust layer. All accounts require phone verification to establish baseline legitimacy, and a customer identity system supports Thai National ID verification with PDPA consent tracking — ensuring compliance with Thailand's data protection regulations while keeping bad actors off the platform.
Core Features
Sellers create detailed product listings with structured metadata, while buyers navigate inventory through robust search and filtering. An integrated contextual chat system links conversations directly to specific product listings — negotiations happen in-context without needing external messaging apps, and the transaction history is preserved for dispute resolution.
Backend Architecture
The backend follows strict Clean Architecture with clearly separated layers: domain entities and repository interfaces at the core, usecases encapsulating business logic, and HTTP controllers at the delivery boundary. Dependencies flow inward — the domain layer has zero knowledge of frameworks, databases, or transport protocols. This makes the business logic independently testable and the entire system adaptable to infrastructure changes without touching core logic.
The API is built with Go and the Gin framework, chosen for its raw throughput and efficient goroutine-based concurrency — critical for a marketplace handling concurrent transactions. PostgreSQL serves as the primary datastore with SQLC for type-safe, compile-time-verified database queries — no ORM magic, just SQL that maps cleanly to Go structs. Redis handles session caching and high-velocity data like popular listing retrieval.
Authentication uses Auth0 with the PKCE flow for the mobile frontend and RS256 JWT validation on the backend. The API validates tokens against Auth0's JWKS endpoint with response caching, checks issuer and audience claims, and extracts custom scopes for fine-grained authorization. All protected routes sit behind JWT middleware with consistent error responses.
12-Factor App Compliance
The backend is designed around the 12-Factor App methodology. Configuration is externalized through environment variables with Viper handling hierarchical config loading — defaults, .env files for local development, and environment variable overrides in production. The application ships as a statically-linked binary in a minimal Alpine Docker image with multi-stage builds, debug symbols stripped, and API documentation bundled. Graceful shutdown handles SIGINT/SIGTERM with request draining and a 5-second timeout.
Frontend
The mobile frontend is built with React Native and Expo SDK 54, targeting iOS, Android, and web from a single codebase. The UI uses React Native Paper (Material Design) with file-based routing via Expo Router, Reanimated for fluid animations, and Storybook for component-driven development.
Technical Highlights
- -Custom escrow payment system eliminating peer-to-peer transaction fraud
- -Clean Architecture with strict layer separation and dependency inversion
- -12-Factor App methodology — externalized config, stateless processes, graceful shutdown
- -Auth0 PKCE authentication with RS256 JWT validation and scope-based authorization
- -Type-safe database layer with SQLC — compile-time-verified SQL, no ORM
- -Thai National ID verification with PDPA consent tracking
- -Contextual chat linked to product listings for in-context negotiation
- -React Native + Expo cross-platform mobile frontend with Storybook
- -Multi-stage Docker builds with stripped binaries on Alpine
- -Git Flow branching strategy with semantic versioning