globs: **/frontend/**
alwaysApply: false
---
# Airweave Frontend Architecture & Guidelines
## Tech Stack & Core Technologies
- **React 18** with TypeScript for type-safe component development
- **Vite** for fast development builds and HMR
- **TailwindCSS** with
legacy requests
4. **GET `/collections/internal/filter-schema`** - Filter schema endpoint
- Returns Qdrant Filter JSON schema for frontend validation
- Public endpoint for building UI filter builders
All endpoints use the same underlying `SearchService.search
rules: `airweave/billing/plan_logic.py`
- DB transactions (periods/usage/records): `airweave/billing/transactions.py`
- Stripe client (SDK wrapper): `airweave/integrations/stripe_client.py`
- Webhook processor: `airweave/billing/webhook_handler.py`
- Frontend flows: `frontend/src/pages/Onboarding.tsx`, `frontend/src/components/settings/BillingSettings.tsx`
Data model highlights:
- Organization billing state stored in `OrganizationBilling` with fields like
format
- Proper HTTP status codes
- Detailed error messages for debugging
### CORS Configuration
- Configured for frontend domain
- Handle preflight requests
- Support for development and production
### Environment Variables
- Stored in `supabase/functions/.env`
- Include
alwaysApply: true
---
# Frontend Architecture - React/TypeScript
## Component Architecture
### Views (Page Components)
- Located in `src/views/`
- Each view represents a full page/route
- Use React Router for navigation
- Implement proper loading and error states
cannot see all related files that might be affected
### Type Check Commands
#### Frontend (Node.js/TypeScript)
For files in `src/`, `shared/`, and other frontend directories:
```bash
npm run typecheck
```
#### Supabase Edge