# SleekPixelWeb Full API & Route Reference This document provides a comprehensive overview of the SleekPixelWeb (LexCreek) system for AI agents and developers. ## System Overview - **Framework**: SvelteKit - **Backend**: Node.js API (External) - **Deployment**: Node.js Adapter - **Styling**: Tailwind CSS ## Main Public Routes - `/`: Home - `/blog`: Blog listing. Supports query params `?page`, `?search`, `?tag`. - `/blog/[slug]`: Individual blog post. - `/products`: Shop listing. Supports query params `?page`, `?search`, `?category`, `?sort`. - `/products/[slug]`: Product detail page. - `/booking`: Booking/Appointment form. - `/about`: About us. - `/services`: Services overview. ## Admin & CRM Routes (under `/panel`) - `/panel`: Dashboard overview. - `/panel/blogs`: Blog management. - `/panel/products`: Product management. - `/panel/bookings`: Booking management. - `/panel/crm`: CRM Project listing. - `/panel/crm/[projectId]`: Project dashboard. - `/panel/crm/[projectId]/leads`: Lead management. - `/panel/crm/[projectId]/contacts`: Contact management. - `/panel/crm/[projectId]/accounts`: Account management. - `/panel/crm/[projectId]/tasks`: Task management. - `/panel/users`: User management (Admin only). ## API Endpoints Summary ### Auth / User - `POST /api/user/login`: Login - `POST /api/user/register`: Register - `GET /api/user/status`: Current session status - `PUT /api/user/profile`: Update profile ### Pages (CMS) - `GET /api/pages`: List published pages - `GET /api/pages/slug/:slug`: Get page by slug ### Bookings - `GET /api/bookings/:date`: Get bookings for a date - `POST /api/booking`: Submit a booking ### CRM - `GET /api/projects`: List CRM projects - `GET /api/leads?project=:id`: List leads for a project - `GET /api/contacts?project=:id`: List contacts for a project - `GET /api/accounts?project=:id`: List accounts for a project - `GET /api/tasks?project=:id`: List tasks for a project ### Shop - `GET /api/products`: List published products - `GET /api/categories`: List product categories - `POST /api/orders`: Create an order (Stripe) ### Blogs - `GET /api/blogs`: List published blogs - `GET /api/blogs/search?q=:term`: Search blogs - `GET /api/blogs/:slug`: Get blog by slug - `GET /api/blogs/tags`: List all blog tags ## Data Models For detailed data models (Leads, Contacts, Tasks, Products, Blogs), refer to the internal `docs/api.md` file in the repository. All prices are in cents (integers). ## AI Agent Capabilities This project supports AI agency via: - **Instructions**: See `/ai.txt` for agent-specific personas and constraints. - **Manifest**: See `/ai-agents.json` for tool definitions. - **Search**: Integrated AI search component available in `src/lib/components/ai/AISearch.svelte`.