Classifieds Marketplace API
A modern classifieds marketplace platform built with Hono, TypeScript, and Cloudflare D1. Similar to OpenSooq and Sahibinden, enabling users to post and browse listings across various categories.
POST /api/auth/register
Register new user
POST /api/auth/login
Login user
GET /api/auth/me
Get current user (protected)
GET /api/listings
Get all listings (with filtering)
GET /api/listings/:id
Get single listing with details
POST /api/listings
Create listing (protected)
GET /api/my-listings
Get user's listings (protected)
Secure token-based auth
Globally distributed SQLite
Property & car details
Filter by category, city, price
// Register a new user
curl -X POST http://localhost:3000/api/auth/register \
-H "Content-Type: application/json" \
-d '{"phone":"+1234567890","password":"secret123","name":"John Doe"}'
// Login
curl -X POST http://localhost:3000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"phone":"+1234567890","password":"secret123"}'
// Get listings
curl http://localhost:3000/api/listings?category=car&city=Dubai
// Create listing (with token)
curl -X POST http://localhost:3000/api/listings \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"category":"car","title":"Toyota Camry 2020","price":25000,"city":"Dubai"}'