# team-hashi/hashi-server architecture

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

- Interactive diagram: https://gitdiagram.com/team-hashi/hashi-server
- Repository: https://github.com/team-hashi/hashi-server

## Overview

HASHI is a modular-monolith backend for discovering Japanese restaurants and carrying users through reservations and post-visit reviews. Its principal workflow spans restaurant discovery, authentication, reservation and point handling, then review. The README also documents content and admin capabilities and direct-to-S3 image delivery; the tree shows a separate image-transform worker and substantial media lifecycle code. Most cross-module links below are documented at the capability level; unsampled implementation details are not inferred as calls.

Main entry points: [`src/main/java/org/sopt/hashi/admin`](https://github.com/team-hashi/hashi-server/tree/develop/src/main/java/org/sopt/hashi/admin) (Admin operations), [`src/main/java/org/sopt/hashi/HashiApplication.java`](https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/HashiApplication.java) (HASHI API), [`src/main/java/org/sopt/hashi/reservation/service/ReservationService.java`](https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/reservation/service/ReservationService.java) (Reservations), [`src/main/java/org/sopt/hashi/media/service/MediaAssetService.java`](https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/media/service/MediaAssetService.java) (Media API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Discovery and content"]
  node_restaurant["Restaurant discovery"]
  node_magazine["Magazine content"]
end

subgraph group_journey["Booking and feedback"]
  node_reservation["Reservations"]
  node_points["Points<br/>[PointService.java]"]
  node_review["Reviews<br/>[ReviewService.java]"]
end

subgraph group_identity["Identity and accounts"]
  node_auth["Authentication"]
  node_userprofile["User profiles"]
end

subgraph group_media["Image platform"]
  node_mediaapi["Media API"]
  node_mediarecords[("Media assets")]
  node_s3[("S3 object storage")]
  node_cdn["CloudFront delivery"]
  node_worker["Image transform worker<br/>[worker.ts]"]
end

subgraph group_operations["Administration"]
  node_admin["Admin operations"]
  node_notices["Notices and terms"]
  node_restaurantmanage["Restaurant management"]
  node_magazinemanage["Magazine management"]
end

node_user(("Restaurant seeker"))
node_api["HASHI API"]

node_user -->|"sends requests"| node_api
node_api -->|"authenticates with"| node_auth
node_auth -->|"supports onboarding"| node_userprofile
node_api -->|"explores"| node_restaurant
node_api -->|"browses"| node_magazine
node_api -->|"books"| node_reservation
node_reservation -->|"debits and restores"| node_points
node_reservation -->|"enables visit reviews"| node_review
node_review -->|"updates ratings"| node_restaurant
node_api -->|"requests image uploads"| node_mediaapi
node_mediaapi -->|"issues direct uploads"| node_s3
node_s3 -->|"serves images through"| node_cdn
node_mediaapi -.->|"tracks asset state"| node_mediarecords
node_worker -.->|"transforms objects"| node_s3
node_user -->|"administers service"| node_admin
node_admin -->|"manages restaurants"| node_restaurantmanage
node_admin -->|"edits magazines"| node_magazinemanage
node_admin -->|"manages reservations"| node_reservation
node_admin -->|"manages users"| node_userprofile
node_admin -.->|"manages support content"| node_notices

click node_api "https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/HashiApplication.java"
click node_restaurant "https://github.com/team-hashi/hashi-server/tree/develop/src/main/java/org/sopt/hashi/restaurant"
click node_magazine "https://github.com/team-hashi/hashi-server/tree/develop/src/main/java/org/sopt/hashi/magazine"
click node_auth "https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/auth/internal/UserAuthService.java"
click node_userprofile "https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/user/service/UserProfileService.java"
click node_reservation "https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/reservation/service/ReservationService.java"
click node_points "https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/point/service/PointService.java"
click node_review "https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/review/service/ReviewService.java"
click node_mediaapi "https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/media/service/MediaAssetService.java"
click node_mediarecords "https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/media/domain/ImageAssetRepository.java"
click node_worker "https://github.com/team-hashi/hashi-server/blob/develop/worker/image-transform/src/worker.ts"
click node_admin "https://github.com/team-hashi/hashi-server/tree/develop/src/main/java/org/sopt/hashi/admin"
click node_notices "https://github.com/team-hashi/hashi-server/tree/develop/src/main/java/org/sopt/hashi/support"
click node_restaurantmanage "https://github.com/team-hashi/hashi-server/tree/develop/src/main/java/org/sopt/hashi/restaurant"
click node_magazinemanage "https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/admin/service/AdminMagazineService.java"

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_restaurant,node_magazine toneBlue
class node_reservation,node_points,node_review toneAmber
class node_auth,node_userprofile,node_api toneMint
class node_mediaapi,node_mediarecords,node_s3,node_cdn,node_worker toneRose
class node_admin,node_notices,node_restaurantmanage,node_magazinemanage,node_user toneIndigo
```

## Components

### Discovery and content

- [Restaurant discovery](https://github.com/team-hashi/hashi-server/tree/develop/src/main/java/org/sopt/hashi/restaurant): `src/main/java/org/sopt/hashi/restaurant`
- [Magazine content](https://github.com/team-hashi/hashi-server/tree/develop/src/main/java/org/sopt/hashi/magazine): `src/main/java/org/sopt/hashi/magazine`

### Booking and feedback

- [Reservations](https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/reservation/service/ReservationService.java): `src/main/java/org/sopt/hashi/reservation/service/ReservationService.java`
- [Points](https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/point/service/PointService.java): `src/main/java/org/sopt/hashi/point/service/PointService.java`
- [Reviews](https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/review/service/ReviewService.java): `src/main/java/org/sopt/hashi/review/service/ReviewService.java`

### Identity and accounts

- [Authentication](https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/auth/internal/UserAuthService.java): `src/main/java/org/sopt/hashi/auth/internal/UserAuthService.java`
- [User profiles](https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/user/service/UserProfileService.java): `src/main/java/org/sopt/hashi/user/service/UserProfileService.java`

### Image platform

- [Media API](https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/media/service/MediaAssetService.java): `src/main/java/org/sopt/hashi/media/service/MediaAssetService.java`
- [Media assets](https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/media/domain/ImageAssetRepository.java): `src/main/java/org/sopt/hashi/media/domain/ImageAssetRepository.java`
- **S3 object storage**
- **CloudFront delivery**
- [Image transform worker](https://github.com/team-hashi/hashi-server/blob/develop/worker/image-transform/src/worker.ts): `worker/image-transform/src/worker.ts`

### Administration

- [Admin operations](https://github.com/team-hashi/hashi-server/tree/develop/src/main/java/org/sopt/hashi/admin): `src/main/java/org/sopt/hashi/admin`
- [Notices and terms](https://github.com/team-hashi/hashi-server/tree/develop/src/main/java/org/sopt/hashi/support): `src/main/java/org/sopt/hashi/support`
- [Restaurant management](https://github.com/team-hashi/hashi-server/tree/develop/src/main/java/org/sopt/hashi/restaurant): `src/main/java/org/sopt/hashi/restaurant`
- [Magazine management](https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/admin/service/AdminMagazineService.java): `src/main/java/org/sopt/hashi/admin/service/AdminMagazineService.java`

### Other components

- **Restaurant seeker**
- [HASHI API](https://github.com/team-hashi/hashi-server/blob/develop/src/main/java/org/sopt/hashi/HashiApplication.java): `src/main/java/org/sopt/hashi/HashiApplication.java`

## Connections

- Restaurant seeker → HASHI API: sends requests (evidence: `README.md`)
- HASHI API → Authentication: authenticates with (evidence: `README.md`)
- Authentication → User profiles: supports onboarding (evidence: `README.md`)
- HASHI API → Restaurant discovery: explores (evidence: `README.md`)
- HASHI API → Magazine content: browses (evidence: `README.md`)
- HASHI API → Reservations: books (evidence: `README.md`)
- Reservations → Points: debits and restores (evidence: `README.md`)
- Reservations → Reviews: enables visit reviews (evidence: `README.md`)
- Reviews → Restaurant discovery: updates ratings (evidence: `README.md`)
- HASHI API → Media API: requests image uploads (evidence: `README.md`)
- Media API → S3 object storage: issues direct uploads (evidence: `README.md`)
- S3 object storage → CloudFront delivery: serves images through (evidence: `README.md`)
- Media API → Media assets: tracks asset state
- Image transform worker → S3 object storage: transforms objects
- Restaurant seeker → Admin operations: administers service (evidence: `README.md`)
- Admin operations → Restaurant management: manages restaurants (evidence: `README.md`)
- Admin operations → Magazine management: edits magazines (evidence: `README.md`)
- Admin operations → Reservations: manages reservations (evidence: `README.md`)
- Admin operations → User profiles: manages users (evidence: `README.md`)
- Admin operations → Notices and terms: manages support content
