# gurungsh/dev-pulse-api architecture

> Architecture diagram of the GitHub repository gurungsh/dev-pulse-api, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gurungsh/dev-pulse-api
- Repository: https://github.com/gurungsh/dev-pulse-api

## Overview

dev-pulse-api is a small Express API for tracking service names and statuses. Clients list services with optional ID or case-insensitive name filters, or create and update records through the same endpoint; handlers use Prisma to access PostgreSQL. The source excerpt shows route registration and Prisma calls, while the README documents the API and database relationship. The schema and deployment templates are present in the tree but were not sampled, so their internal wiring is not expanded here.

Main entry points: [`src/index.ts`](https://github.com/gurungsh/dev-pulse-api/blob/main/src/index.ts) (Express server), [`prisma/schema.prisma`](https://github.com/gurungsh/dev-pulse-api/blob/main/prisma/schema.prisma) (Service data model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API runtime"]
  node_server["Express server<br/>[index.ts]"]
  node_list["List services<br/>[index.ts]"]
  node_write["Create or update<br/>[index.ts]"]
end

subgraph group_data["Service data"]
  node_prisma["Prisma access<br/>[index.ts]"]
  node_model["Service data model<br/>[schema.prisma]"]
  node_postgres[("PostgreSQL")]
end

node_client(("API client"))

node_client -->|"sends requests"| node_server
node_server -->|"routes GET"| node_list
node_server -->|"routes POST"| node_write
node_list -->|"queries via"| node_prisma
node_write -->|"creates or updates"| node_prisma
node_prisma -->|"reads and writes"| node_postgres
node_model -.->|"defines service table"| node_postgres

click node_server "https://github.com/gurungsh/dev-pulse-api/blob/main/src/index.ts"
click node_list "https://github.com/gurungsh/dev-pulse-api/blob/main/src/index.ts"
click node_write "https://github.com/gurungsh/dev-pulse-api/blob/main/src/index.ts"
click node_prisma "https://github.com/gurungsh/dev-pulse-api/blob/main/src/index.ts"
click node_model "https://github.com/gurungsh/dev-pulse-api/blob/main/prisma/schema.prisma"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_server,node_list,node_write,node_client toneBlue
class node_prisma,node_model,node_postgres toneAmber
```

## Components

### API runtime

- [Express server](https://github.com/gurungsh/dev-pulse-api/blob/main/src/index.ts): `src/index.ts`
- [List services](https://github.com/gurungsh/dev-pulse-api/blob/main/src/index.ts): `src/index.ts`
- [Create or update](https://github.com/gurungsh/dev-pulse-api/blob/main/src/index.ts): `src/index.ts`

### Service data

- [Prisma access](https://github.com/gurungsh/dev-pulse-api/blob/main/src/index.ts): `src/index.ts`
- [Service data model](https://github.com/gurungsh/dev-pulse-api/blob/main/prisma/schema.prisma): `prisma/schema.prisma`
- **PostgreSQL**

### Other components

- **API client**

## Connections

- API client → Express server: sends requests (evidence: `README.md`)
- Express server → List services: routes GET (evidence: `src/index.ts`)
- Express server → Create or update: routes POST (evidence: `src/index.ts`)
- List services → Prisma access: queries via (evidence: `src/index.ts`)
- Create or update → Prisma access: creates or updates (evidence: `src/index.ts`)
- Prisma access → PostgreSQL: reads and writes (evidence: `README.md`)
- Service data model → PostgreSQL: defines service table
