# nycslav/saraya architecture

> Architecture diagram of the GitHub repository nycslav/saraya, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nycslav/saraya
- Repository: https://github.com/nycslav/saraya

## Overview

Saraya is a scaffold for a personalized Philippines travel companion. The documented user-facing flow is a traveler using the Expo/React Native app, which uses the typed API client to communicate with the Express REST API. The tree lays out discovery, trip-planning, safety, and engagement domains, but their files are placeholders; their runtime wiring and persistence are not established by the sampled source. The database and integration directories indicate planned capabilities, not verified calls.

Main entry points: [`apps/mobile`](https://github.com/nycslav/saraya/tree/main/apps/mobile) (Travel companion app), [`packages/api-client`](https://github.com/nycslav/saraya/tree/main/packages/api-client) (Typed API client), [`apps/api`](https://github.com/nycslav/saraya/tree/main/apps/api) (REST API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_mobile_app["Travel companion app"]
  node_mobile_features["Travel features"]
  node_discovery["Discovery screens"]
end

subgraph group_shared["Shared packages"]
  node_api_client["Typed API client"]
  node_contracts["API contracts"]
end

subgraph group_api["API domains"]
  node_rest_api["REST API"]
  node_auth["Authentication"]
  node_destinations["Destinations"]
  node_itineraries["Itineraries"]
  node_cultural_guides["Cultural guides"]
  node_festivals["Festivals"]
  node_safety["Safety alerts"]
  node_checkins["Check-ins"]
  node_engagement["Travel engagement"]
  node_integrations["External integrations"]
end

subgraph group_data["Data layer"]
  node_postgres[("PostGIS database<br/>[schema.sql]")]
end

node_traveler(("Traveler"))

node_traveler -->|"uses"| node_mobile_app
node_mobile_app -->|"uses"| node_api_client
node_api_client -->|"requests"| node_rest_api

click node_mobile_app "https://github.com/nycslav/saraya/tree/main/apps/mobile"
click node_mobile_features "https://github.com/nycslav/saraya/tree/main/apps/mobile/src/features"
click node_discovery "https://github.com/nycslav/saraya/tree/main/apps/mobile/src/features/discovery"
click node_api_client "https://github.com/nycslav/saraya/tree/main/packages/api-client"
click node_contracts "https://github.com/nycslav/saraya/tree/main/packages/contracts/src"
click node_rest_api "https://github.com/nycslav/saraya/tree/main/apps/api"
click node_auth "https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/auth"
click node_destinations "https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/destinations"
click node_itineraries "https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/itineraries"
click node_cultural_guides "https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/cultural-guides"
click node_festivals "https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/festivals"
click node_safety "https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/safety-alerts"
click node_checkins "https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/check-ins"
click node_engagement "https://github.com/nycslav/saraya/tree/main/apps/api/src/modules"
click node_integrations "https://github.com/nycslav/saraya/tree/main/apps/api/src/integrations"
click node_postgres "https://github.com/nycslav/saraya/blob/main/database/schema.sql"

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_mobile_app,node_mobile_features,node_discovery toneBlue
class node_api_client,node_contracts toneAmber
class node_rest_api,node_auth,node_destinations,node_itineraries,node_cultural_guides,node_festivals,node_safety,node_checkins,node_engagement,node_integrations toneMint
class node_postgres toneRose
class node_traveler toneIndigo
```

## Components

### Mobile app

- [Travel companion app](https://github.com/nycslav/saraya/tree/main/apps/mobile): `apps/mobile`
- [Travel features](https://github.com/nycslav/saraya/tree/main/apps/mobile/src/features): `apps/mobile/src/features`
- [Discovery screens](https://github.com/nycslav/saraya/tree/main/apps/mobile/src/features/discovery): `apps/mobile/src/features/discovery`

### Shared packages

- [Typed API client](https://github.com/nycslav/saraya/tree/main/packages/api-client): `packages/api-client`
- [API contracts](https://github.com/nycslav/saraya/tree/main/packages/contracts/src): `packages/contracts/src`

### API domains

- [REST API](https://github.com/nycslav/saraya/tree/main/apps/api): `apps/api`
- [Authentication](https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/auth): `apps/api/src/modules/auth`
- [Destinations](https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/destinations): `apps/api/src/modules/destinations`
- [Itineraries](https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/itineraries): `apps/api/src/modules/itineraries`
- [Cultural guides](https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/cultural-guides): `apps/api/src/modules/cultural-guides`
- [Festivals](https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/festivals): `apps/api/src/modules/festivals`
- [Safety alerts](https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/safety-alerts): `apps/api/src/modules/safety-alerts`
- [Check-ins](https://github.com/nycslav/saraya/tree/main/apps/api/src/modules/check-ins): `apps/api/src/modules/check-ins`
- [Travel engagement](https://github.com/nycslav/saraya/tree/main/apps/api/src/modules): `apps/api/src/modules`
- [External integrations](https://github.com/nycslav/saraya/tree/main/apps/api/src/integrations): `apps/api/src/integrations`

### Data layer

- [PostGIS database](https://github.com/nycslav/saraya/blob/main/database/schema.sql): `database/schema.sql`

### Other components

- **Traveler**

## Connections

- Traveler → Travel companion app: uses
- Travel companion app → Typed API client: uses
- Typed API client → REST API: requests
