Repository note, April 21, 2026: this is the original
peether-protocolworkspace. Current public release work has moved to:
- Backend API: https://github.com/pinkpeether/ptdt-settlement-api
- Frontend UI: https://github.com/pinkpeether/ptdt-settlement-frontend
The content below describes an earlier file structure and is retained as legacy/reference documentation.
Last Updated: January 26, 2026
peether-protocol/
├── ✅ package.json
├── ✅ tsconfig.json
├── ✅ .env.example
├── ✅ Dockerfile
├── ✅ docker-compose.yml
├── ✅ .gitignore
├── ✅ .dockerignore
├── ✅ README.md
├── ✅ START_HERE.md
├── ✅ MASTER_FILE_INDEX.md
├── ✅ INTEGRATION_GUIDE.md
├── ✅ DEPLOYMENT.md
├── ✅ QUICK_REFERENCE.md
├── ✅ FILE_STRUCTURE_VERIFICATION.md (this file)
│
├── src/
│ ├── ✅ index.ts
│ ├── ✅ api/
│ │ ├── ✅ quote.ts
│ │ ├── ✅ payment.ts
│ │ ├── ✅ withdrawal.ts
│ │ ├── ✅ operator.ts
│ │ ├── ✅ analytics.ts
│ │ ├── ✅ health.ts
│ │ └── ✅ webhook.ts
│ │
│ ├── ✅ services/
│ │ ├── ✅ quoteService.ts
│ │ ├── ✅ paymentService.ts
│ │ ├── ✅ withdrawalService.ts
│ │ └── ✅ driverEarningsService.ts
│ │
│ ├── ✅ middleware/
│ │ ├── ✅ auth.ts
│ │ ├── ✅ errorHandler.ts
│ │ ├── ✅ requestLogger.ts
│ │ └── ✅ rateLimit.ts (NEWLY ADDED)
│ │
│ ├── ✅ utils/
│ │ ├── ✅ logger.ts
│ │ ├── ✅ bsc.ts
│ │ └── ✅ fiatGateway.ts
│ │
│ ├── ✅ types/
│ │ └── ✅ index.ts (NEWLY ADDED)
│ │
│ ├── ✅ config/
│ │ └── ✅ database.ts (NEWLY ADDED)
│ │
│ └── database/
│ └── ✅ schema.sql
│
└── ✅ prisma/
├── ✅ schema.prisma (NEWLY ADDED)
└── ✅ seed.ts (NEWLY ADDED)
| File | Location | Status | Lines |
|---|---|---|---|
| rateLimit.ts | src/middleware/rateLimit.ts | ✅ CREATED | 95 |
| index.ts | src/types/index.ts | ✅ CREATED | 190 |
| database.ts | src/config/database.ts | ✅ CREATED | 105 |
| schema.prisma | prisma/schema.prisma | ✅ CREATED | 220 |
| seed.ts | prisma/seed.ts | ✅ CREATED | 180 |
Total Files: 36+
-
Root Configuration: 8 files
- package.json
- tsconfig.json
- .env.example
- Dockerfile
- docker-compose.yml
- .gitignore
- .dockerignore
- .gitkeep (if present)
-
Documentation: 6 files
- README.md
- START_HERE.md
- MASTER_FILE_INDEX.md
- INTEGRATION_GUIDE.md
- DEPLOYMENT.md
- QUICK_REFERENCE.md
-
Source Code (src/): 20 files
- index.ts (1)
- api/*.ts (7 endpoints)
- services/*.ts (4 services)
- middleware/*.ts (4 middleware)
- utils/*.ts (3 utilities)
- types/index.ts (1 type definitions)
- config/database.ts (1 config)
-
Prisma (prisma/): 2 files
- schema.prisma
- seed.ts
- quote.ts - ✅ Present
- payment.ts - ✅ Present (moved from endpoints/)
- withdrawal.ts - ✅ Present (moved from endpoints/)
- operator.ts - ✅ Present
- analytics.ts - ✅ Present (moved from endpoints/)
- health.ts - ✅ Present
- webhook.ts - ✅ Present (moved from endpoints/)
- quoteService.ts - ✅ Present
- paymentService.ts - ✅ Present
- withdrawalService.ts - ✅ Present
- driverEarningsService.ts - ✅ Present
- auth.ts - ✅ Present
- errorHandler.ts - ✅ Present
- requestLogger.ts - ✅ Present
- rateLimit.ts - ✅ NEWLY ADDED
- logger.ts - ✅ Present
- bsc.ts - ✅ Present
- fiatGateway.ts - ✅ Present
- types/index.ts - ✅ NEWLY ADDED
- config/database.ts - ✅ NEWLY ADDED
- prisma/schema.prisma - ✅ NEWLY ADDED
- prisma/seed.ts - ✅ NEWLY ADDED
- database/schema.sql - ✅ Present
- ❌
src/endpoints/payment.ts(DELETED) - ❌
src/endpoints/withdrawal.ts(DELETED) - ❌
src/endpoints/analytics.ts(DELETED) - ❌
src/endpoints/webhook.ts(DELETED)
Status: All duplicates removed. Clean structure maintained.
| Category | Files | LOC | Status |
|---|---|---|---|
| API Endpoints | 7 | ~1,151 | ✅ Complete |
| Services | 4 | ~1,100 | ✅ Complete |
| Middleware | 4 | ~450 | ✅ Complete (rateLimit added) |
| Utils | 3 | ~765 | ✅ Complete |
| Types | 1 | ~190 | ✅ ADDED |
| Config | 1 | ~105 | ✅ ADDED |
| Database | 1 | ~300 | ✅ Complete |
| Prisma | 2 | ~400 | ✅ ADDED |
| TOTAL | 36+ | ~4,461 | ✅ COMPLETE |
All files are now present and organized in their correct directories:
✅ No missing files ✅ No duplicates ✅ Clean directory structure ✅ Complete type definitions ✅ Database configuration complete ✅ Prisma schema and seed ready ✅ Rate limiting configured
-
Install Dependencies
npm install
-
Setup Environment
cp .env.example .env # Edit .env with your configuration -
Setup Database
npm run prisma:migrate npm run prisma:seed
-
Run Development Server
npm run dev
-
Test API
curl http://localhost:3000/api/v1/health
Status: ✅ ALL FILES PRESENT & VERIFIED
Date: January 26, 2026
Commit: Latest (see GitHub commits for exact hash)