> For the complete documentation index, see [llms.txt](https://charity.childsafetyfund.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://charity.childsafetyfund.org/strategy/prospects/reporting-tech/software/architecture.md). Agents can also search and read this documentation through its [MCP server](https://charity.childsafetyfund.org/~gitbook/mcp).

# Architecture

CSF’s technology architecture is built on a secure, modular framework designed for scalability, transparency, and compliance. Each layer of the system, from user interface to database, will be purpose-built to ensure that reports are collected, processed, and stored in a manner that protects sensitive information while maintaining operational efficiency.

**The architecture follows a three-tier design:**

1. **Application Layer** – the user-facing web application that guides reporters through structured questions.
2. **Processing Layer** – the logic and API services that validate, organize, and route reports.
3. **Data Layer** – the encrypted data warehouse and analytics environment that ensures long-term storage and performance monitoring.

***

### Architectural Summary

| Layer                 | Core Function                                                                                      | Primary Services                          | Security Features                                                                  |
| --------------------- | -------------------------------------------------------------------------------------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------- |
| **Application Layer** | User interface for submitting reports through guided forms and smart prompts.                      | Cloud Run (frontend), Firebase Hosting    | HTTPS/TLS 1.3 encryption, CAPTCHA, access throttling                               |
| **Processing Layer**  | Validates report data, applies AI-assisted summarization, and transmits final reports to agencies. | Cloud Functions, Cloud Pub/Sub, Vertex AI | API Gateway authentication, IAM roles, audit logs                                  |
| **Data Layer**        | Secure storage and analytics for structured and unstructured report data.                          | BigQuery, Cloud Storage, Firestore        | Encryption at rest (AES-256), field-level access control, HIPAA/FedRAMP compliance |

### Data Flow Summary

1. **User Submission**
   * A reporter completes the guided reporting form.
   * Inputs are validated client-side to prevent incomplete or malformed data.
2. **Processing & Classification**
   * The structured report is routed through Cloud Functions for preprocessing.
   * AI logic (via Vertex AI) generates a clear, objective summary for review and transmission.
3. **Transmission to Agency**
   * Once validated, the completed report is sent to the designated child protection agency via a secure API or encrypted email channel.
   * Confirmation of delivery is logged in the metadata record.
4. **Secure Storage in BigQuery**
   * A complete copy of the report—including narrative and identifiers—is stored in BigQuery.
   * Access is limited by RBAC permissions.
   * De-identified analytics views are automatically generated for evaluation and performance monitoring.
5. **Analytics & Continuous Improvement**
   * Anonymized data are analyzed to identify trends, reduce reporting gaps, and strengthen training curricula.
   * Reports are never used to train AI models directly; only de-identified patterns are analyzed.

***

### Key Architectural Principles

* **Security by Design** – All system components inherit Google Cloud’s FedRAMP and HIPAA controls.
* **Modularity** – Each layer can be updated or replaced independently, minimizing downtime.
* **Auditability** – Every user and system action is logged and reviewable.
* **Scalability** – Horizontal scaling allows thousands of concurrent reports without performance loss.
* **Resilience** – Automated backups, regional failover, and load balancing ensure continuous availability.

***

### Future Enhancements

The architecture is designed to accommodate:

* State-specific API integrations for direct intake into agency case management systems.
* Role-based dashboards for administrators, educators, and policymakers.
* Predictive analytics modules to identify systemic bottlenecks in reporting or response time.

These enhancements will be developed in alignment with CSF’s Responsible AI Policy and ethical data-governance framework.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://charity.childsafetyfund.org/strategy/prospects/reporting-tech/software/architecture.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
