iBidDZ - Algerian iPhone Marketplace + Live Auctions | P2P COD | Next.js + NestJS + Prisma
# iBidDZ - Algerian iPhone Marketplace + Live Auctions
A full-stack platform for buying and selling iPhones in Algeria with live auction capabilities, COD delivery, and trust scoring.
## π Features
- **Live Auctions** - Real-time bidding with anti-sniping protection
- **COD Delivery** - Cash on delivery with token verification
- **Trust Scoring** - Algorithmic user reputation system
- **Multi-language** - Arabic, French, English with RTL support
- **Admin Dashboard** - Full moderation and financial management
- **Broadcast System** - Push notifications and announcements
## ποΈ Architecture
```
Auction01/
βββ apps/
β βββ api/ NestJS backend (16 modules)
β βββ web/ Next.js 14 frontend
βββ packages/
β βββ db/ Prisma schema (16 models)
β βββ shared/ Types, constants, validators
β βββ ui/ Shared components
βββ docker-compose.yml
```
## π οΈ Tech Stack
- **Backend**: NestJS, Prisma, PostgreSQL, Redis, Socket.io, BullMQ
- **Frontend**: Next.js 14, TailwindCSS, next-intl, Socket.io-client
- **Infrastructure**: Docker, GitHub Actions, Turborepo
## π¦ Quick Start
```bash
# Install dependencies
npm install
# Start infrastructure
docker compose up -d postgres redis
# Push database schema
npx prisma db push
# Start development servers
npm run dev
```
## π API Endpoints
All endpoints follow the blueprint specification:
| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/v1/auth/otp` | Send SMS verification |
| POST | `/v1/auth/verify` | Validate OTP, issue JWT |
| GET | `/v1/listings` | Filtered browsing |
| POST | `/v1/listings` | Create listing |
| POST | `/v1/bids` | Place bid |
| POST | `/v1/orders` | Create order |
| POST | `/v1/webhooks/courier` | Delivery status sync |
| POST | `/v1/cod/confirm` | Validate token, trigger payout |
| GET | `/v1/user/trust` | View trust score |
| POST | `/v1/reviews` | Submit review |
| POST | `/v1/broadcasts` | Schedule broadcast |
## π§ͺ Testing β¦