# Web

**Kind:** Module

**Source:** `Pams/Web` (line 1)

**Part of:** [Pams](subsystem-pams)

.NET project in solution

The Web module is the .NET project in the Pams solution that hosts web-facing application code and HTTP integration points. It receives browser requests, coordinates with the rest of the Pams system, and returns responses to clients.

## Diagram

```mermaid
graph TD
    Browser[Browser Client] --> Web[Web .NET Project]
    Web --> Application[Pams Application Code]
    Application --> Data[Data Sources]
    Web --> Response[HTTP Response]
```

## Usage

```ts
// Call an endpoint exposed by the Web project from a browser client.
async function loadPamsData() {
  const response = await fetch("/api/pams");

  if (!response.ok) {
    throw new Error(`Request failed: ${response.status}`);
  }

  return response.json();
}

loadPamsData()
  .then((data) => console.log(data))
  .catch((error) => console.error(error));
```

## AI Coding Instructions

- Keep web routes, controllers, and request handlers within the Web project boundary.
- Follow the solution's existing .NET configuration and dependency-registration patterns.
- Validate request input before passing it to application or data-layer code.
- Do not expose internal implementation details or data access directly to browser clients.
- Update client calls when route names, request models, or response models change.

## Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Declared in (1)

- `Pams` — `Pams/Pams.sln`:1
