refactor: rename public routes and templates to platform
Complete the public -> platform naming migration across the codebase. This aligns with the naming convention where "platform" refers to the marketing/public-facing pages of the platform itself. Changes: - Update all imports from public to platform modules - Update template references from public/ to platform/ - Update route registrations to use platform prefix - Update documentation to reflect new naming - Update test files for platform API endpoints Files affected: - app/api/main.py - router imports - app/modules/*/routes/*/platform.py - route definitions - app/modules/*/templates/*/platform/ - template files - app/modules/routes.py - route discovery - docs/* - documentation updates - tests/integration/api/v1/platform/ - test files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -132,24 +132,24 @@ Standalone page with:
|
||||
|
||||
## API Endpoints
|
||||
|
||||
All endpoints under `/api/v1/public/`:
|
||||
All endpoints under `/api/v1/platform/`:
|
||||
|
||||
### Pricing Endpoints
|
||||
|
||||
```
|
||||
GET /api/v1/public/tiers
|
||||
GET /api/v1/platform/tiers
|
||||
Returns all public subscription tiers
|
||||
Response: TierResponse[]
|
||||
|
||||
GET /api/v1/public/tiers/{tier_code}
|
||||
GET /api/v1/platform/tiers/{tier_code}
|
||||
Returns specific tier by code
|
||||
Response: TierResponse
|
||||
|
||||
GET /api/v1/public/addons
|
||||
GET /api/v1/platform/addons
|
||||
Returns all active add-on products
|
||||
Response: AddOnResponse[]
|
||||
|
||||
GET /api/v1/public/pricing
|
||||
GET /api/v1/platform/pricing
|
||||
Returns complete pricing info (tiers + addons + trial_days)
|
||||
Response: PricingResponse
|
||||
```
|
||||
@@ -157,17 +157,17 @@ GET /api/v1/public/pricing
|
||||
### Letzshop Vendor Endpoints
|
||||
|
||||
```
|
||||
GET /api/v1/public/letzshop-vendors
|
||||
GET /api/v1/platform/letzshop-vendors
|
||||
Query params: ?search=&category=&city=&page=1&limit=20
|
||||
Returns paginated vendor list (placeholder for future)
|
||||
Response: LetzshopVendorListResponse
|
||||
|
||||
POST /api/v1/public/letzshop-vendors/lookup
|
||||
POST /api/v1/platform/letzshop-vendors/lookup
|
||||
Body: { "url": "letzshop.lu/vendors/my-shop" }
|
||||
Returns vendor info from URL lookup
|
||||
Response: LetzshopLookupResponse
|
||||
|
||||
GET /api/v1/public/letzshop-vendors/{slug}
|
||||
GET /api/v1/platform/letzshop-vendors/{slug}
|
||||
Returns vendor info by slug
|
||||
Response: LetzshopVendorInfo
|
||||
```
|
||||
@@ -175,17 +175,17 @@ GET /api/v1/public/letzshop-vendors/{slug}
|
||||
### Signup Endpoints
|
||||
|
||||
```
|
||||
POST /api/v1/public/signup/start
|
||||
POST /api/v1/platform/signup/start
|
||||
Body: { "tier_code": "professional", "is_annual": false }
|
||||
Creates signup session
|
||||
Response: { "session_id": "...", "tier_code": "...", "is_annual": false }
|
||||
|
||||
POST /api/v1/public/signup/claim-vendor
|
||||
POST /api/v1/platform/signup/claim-vendor
|
||||
Body: { "session_id": "...", "letzshop_slug": "my-shop" }
|
||||
Claims Letzshop vendor for session
|
||||
Response: { "session_id": "...", "letzshop_slug": "...", "vendor_name": "..." }
|
||||
|
||||
POST /api/v1/public/signup/create-account
|
||||
POST /api/v1/platform/signup/create-account
|
||||
Body: {
|
||||
"session_id": "...",
|
||||
"email": "user@example.com",
|
||||
@@ -197,17 +197,17 @@ POST /api/v1/public/signup/create-account
|
||||
Creates User, Company, Vendor, Stripe Customer
|
||||
Response: { "session_id": "...", "user_id": 1, "vendor_id": 1, "stripe_customer_id": "cus_..." }
|
||||
|
||||
POST /api/v1/public/signup/setup-payment
|
||||
POST /api/v1/platform/signup/setup-payment
|
||||
Body: { "session_id": "..." }
|
||||
Creates Stripe SetupIntent
|
||||
Response: { "session_id": "...", "client_secret": "seti_...", "stripe_customer_id": "cus_..." }
|
||||
|
||||
POST /api/v1/public/signup/complete
|
||||
POST /api/v1/platform/signup/complete
|
||||
Body: { "session_id": "...", "setup_intent_id": "seti_..." }
|
||||
Completes signup, attaches payment method
|
||||
Response: { "success": true, "vendor_code": "...", "vendor_id": 1, "redirect_url": "...", "trial_ends_at": "..." }
|
||||
|
||||
GET /api/v1/public/signup/session/{session_id}
|
||||
GET /api/v1/platform/signup/session/{session_id}
|
||||
Returns session status for resuming signup
|
||||
Response: { "session_id": "...", "step": "...", ... }
|
||||
```
|
||||
@@ -430,7 +430,7 @@ STRIPE_TRIAL_DAYS=30
|
||||
|
||||
### Automated Tests
|
||||
|
||||
Test files located in `tests/integration/api/v1/public/`:
|
||||
Test files located in `tests/integration/api/v1/platform/`:
|
||||
|
||||
| File | Tests | Description |
|
||||
|------|-------|-------------|
|
||||
@@ -440,7 +440,7 @@ Test files located in `tests/integration/api/v1/public/`:
|
||||
|
||||
**Run tests:**
|
||||
```bash
|
||||
pytest tests/integration/api/v1/public/ -v
|
||||
pytest tests/integration/api/v1/platform/ -v
|
||||
```
|
||||
|
||||
**Test categories:**
|
||||
@@ -479,15 +479,15 @@ pytest tests/integration/api/v1/public/ -v
|
||||
|
||||
```bash
|
||||
# Get pricing
|
||||
curl http://localhost:8000/api/v1/public/pricing
|
||||
curl http://localhost:8000/api/v1/platform/pricing
|
||||
|
||||
# Lookup vendor
|
||||
curl -X POST http://localhost:8000/api/v1/public/letzshop-vendors/lookup \
|
||||
curl -X POST http://localhost:8000/api/v1/platform/letzshop-vendors/lookup \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"url": "letzshop.lu/vendors/test-shop"}'
|
||||
|
||||
# Start signup
|
||||
curl -X POST http://localhost:8000/api/v1/public/signup/start \
|
||||
curl -X POST http://localhost:8000/api/v1/platform/signup/start \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"tier_code": "professional", "is_annual": false}'
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user