# Fiberportal – Module System

## Overview
Fiberportal is designed as a modular SaaS system where functionality can be enabled or disabled per tenant.

## Core Modules
Always active:
- Authentication
- Tenants
- Roles & Permissions
- Module Management
- Projects
- Cases
- Comments
- Attachments
- Notifications
- Audit Logs

## Optional Modules
Can be enabled per tenant:
- Tasks
- Milestones
- Maps / GIS
- Reporting
- Cost Estimation
- Customer Portal
- Contractor Portal
- Time Tracking
- Internal Notes
- Integrations

## Module Database Naming
Prefix:
fp_mod_<module>_

Examples:
fp_mod_tasks_tasks
fp_mod_milestones_milestones
fp_mod_reports_saved_reports
fp_mod_maps_layers

## Module Activation
Modules are controlled using:
- fp_modules
- fp_tenant_modules
- fp_tenant_module_settings

## Adding New Modules
1. Create tables with prefix `fp_mod_<module>_`
2. Register the module in `fp_modules`
3. Enable it in `fp_tenant_modules`
4. Add permissions
5. Add documentation in `/docs/modules/`

## Recommended Module Folder Layout
modules/
    tasks/
    milestones/
    maps/
    reports/
    estimation/
    customerportal/
    contractorportal/
