This repository contains the backend services for the CollaborateWise application, including API services, authentication, and database management.
The backend consists of:
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- API Services: RESTful APIs for core business logic
- Real-time: Supabase Realtime for collaborative features
The database is managed through Supabase. Schema definitions and migrations are located in the supabase/ directory.
The application uses various backend services:
Handles user registration, login, and session management using Supabase Auth.
/api/auth/hybrid/signup- User registration with email verification/api/auth/hybrid/reset-password- Password reset functionality/api/auth/hybrid/verify-otp- Email OTP verification/api/auth/hybrid/resend-verification- Resend verification codes
Manages document creation, storage, retrieval, and sharing functionality.
Handles user profile management and settings.
Manages user subscriptions and billing.
Tracks usage metrics and user engagement.
Core API functionality includes:
- User authentication and authorization
- Document management
- Collaboration features
- Billing and subscription management
- Analytics and reporting
Backend configuration requires the following environment variables:
SUPABASE_URL- Supabase project URLSUPABASE_SERVICE_ROLE_KEY- Supabase service role keyJWT_SECRET- JWT signing secretDATABASE_URL- PostgreSQL database connection string
The backend is deployed using Supabase cloud services. Database migrations and edge functions are handled through the Supabase platform.
- Set up Supabase locally or connect to the hosted instance
- Configure environment variables
- Run the development server with proper database connectivity
- All API requests are authenticated using Supabase JWT tokens
- Row-level security (RLS) policies are enforced in the database
- Input validation is performed on all endpoints
- Rate limiting is implemented for API endpoints