# Development Plan

## Phase 1: Database and Foundations
1. Define the SQL schema based on the entities list.
2. Create seed data for lookups (countries, languages, etc.).
3. Setup the basic directory structure.
4. Implement configuration files and core helper functions (response, security, auth).

## Phase 2: Auth & Middleware
1. Implement basic JWT generation and verification in PHP.
2. Create API authentication middleware for Customers and Vendors.
3. Create Session-based authentication middleware for Admin dashboard.

## Phase 3: Admin Dashboard Structure
1. Create HTML/CSS layout templates (Header, Sidebar, Footer) using Bootstrap.
2. Build the Admin Authentication flow (Login page).
3. Set up the basic routing for Admin pages.

## Phase 4: Customer APIs
1. User registration, login, and profile management.
2. Home screen data aggregation.
3. Browsing Vendors and Maids (with search/filters).
4. Managing Favorites.
5. Interview scheduling.
6. Quotation requests and contract signing.

## Phase 5: Vendor APIs
1. Vendor registration, login, profile management.
2. Maid management (add, update, delete, hide/publish).
3. Uploading documents and gallery images.
4. Managing quotation requests (pricing and sending quotes).
5. Approving/Activating contracts.
6. Managing subscriptions and ads.

## Phase 6: Admin Dashboard Modules
1. Build views and controllers for all required modules:
   - Dashboard statistics
   - Customers & Vendors management
   - Maid approvals
   - Document verification
   - Interviews, Quotations, and Contracts overview
   - Subscriptions and Ads management
   - Lookup tables CMS

## Phase 7: Firebase Chat Integration
1. Configure Firebase Admin SDK or REST API if needed.
2. Implement endpoints to create or fetch `firebase_chat_id` and store it in `chat_references`.
3. Provide chat structure documentation for the mobile developers to use.

## Phase 8: Testing & Refinement
1. Verify all Postman Collection endpoints.
2. Ensure consistent JSON responses.
3. Test file uploads and CSRF protection on the admin side.
