feat: Complete platform enhancement with multi-tenant architecture
Major additions: - Territory manager system with application workflow - Custom pricing and page builder with Craft.js - Enhanced Stripe Connect onboarding - CodeReadr QR scanning integration - Kiosk mode for venue sales - Super admin dashboard and analytics - MCP integration for AI-powered operations Infrastructure improvements: - Centralized API client and routing system - Enhanced authentication with organization context - Comprehensive theme management system - Advanced event management with custom tabs - Performance monitoring and accessibility features Database schema updates: - Territory management tables - Custom pages and pricing structures - Kiosk PIN system - Enhanced organization profiles - CodeReadr integration tables 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
40
CLAUDE.md
40
CLAUDE.md
@@ -22,6 +22,10 @@ npm run preview # Preview production build locally
|
||||
|
||||
# Database
|
||||
node setup-schema.js # Initialize database schema (run once)
|
||||
|
||||
# Stripe MCP (Model Context Protocol)
|
||||
npm run mcp:stripe # Start Stripe MCP server for AI integration
|
||||
npm run mcp:stripe:debug # Start MCP server with debugging interface
|
||||
```
|
||||
|
||||
## Tech Stack
|
||||
@@ -82,6 +86,14 @@ node setup-schema.js # Initialize database schema (run once)
|
||||
- **Platform Fees**: Automatically split from each transaction
|
||||
- **Webhooks**: Payment confirmation and dispute handling
|
||||
- **Environment**: Uses publishable/secret key pairs
|
||||
- **MCP Server**: AI-powered Stripe operations through Model Context Protocol
|
||||
|
||||
### Stripe MCP (Model Context Protocol)
|
||||
- **Purpose**: AI-powered interactions with Stripe API and knowledge base
|
||||
- **Tools**: Customer management, payment processing, subscriptions, refunds
|
||||
- **Configuration**: See `MCP_SETUP.md` for detailed setup instructions
|
||||
- **Commands**: `npm run mcp:stripe` (production) or `npm run mcp:stripe:debug` (development)
|
||||
- **Integration**: Works with Claude Desktop and other AI agents
|
||||
|
||||
### Design System
|
||||
- **Theme**: Glassmorphism with dark gradients (see DESIGN_SYSTEM.md)
|
||||
@@ -134,9 +146,35 @@ src/
|
||||
- **Form State**: Native form handling with progressive enhancement
|
||||
- **Auth State**: Supabase auth context with organization data
|
||||
|
||||
### API System
|
||||
- **Centralized API Client**: `/src/lib/api-client.ts` - Main client with authentication
|
||||
- **API Router**: `/src/lib/api-router.ts` - Browser-friendly wrapper for common operations
|
||||
- **Authentication**: Automatic session management and organization context
|
||||
- **Error Handling**: Consistent error responses with user-friendly messages
|
||||
- **Usage**: Use `import { api } from '../lib/api-router'` in components
|
||||
|
||||
#### API System Usage Examples:
|
||||
```typescript
|
||||
// In Astro components (client-side scripts)
|
||||
const { api } = await import('../lib/api-router');
|
||||
|
||||
// Load event stats
|
||||
const stats = await api.loadEventStats(eventId);
|
||||
|
||||
// Load event details
|
||||
const event = await api.loadEventDetails(eventId);
|
||||
|
||||
// Load complete event page data
|
||||
const { event, stats, error } = await api.loadEventPage(eventId);
|
||||
|
||||
// Format currency and dates
|
||||
const formattedPrice = api.formatCurrency(priceInCents);
|
||||
const formattedDate = api.formatDate(dateString);
|
||||
```
|
||||
|
||||
### API Design
|
||||
- **RESTful**: Standard HTTP methods with proper status codes
|
||||
- **Authentication**: Supabase JWT validation on all protected routes
|
||||
- **Authentication**: Automatic Supabase JWT validation on all API calls
|
||||
- **Error Handling**: Consistent error responses with user-friendly messages
|
||||
- **Rate Limiting**: Built-in protection against abuse
|
||||
|
||||
|
||||
Reference in New Issue
Block a user