# trap-jp/hackathon26spring_05 architecture

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

- Interactive diagram: https://gitdiagram.com/trap-jp/hackathon26spring_05
- Repository: https://github.com/trap-jp/hackathon26spring_05

## Overview

Qpid is a profile-based social matching application: users sign in, maintain a profile, receive suggestions, and act on other users with likes or nopes. Its Vue interface routes users through profile, matching, and likes views; the Go API authenticates requests, handles domain operations, and uses repository interfaces with production database and local mock implementations. Profile, icon, suggestion, and traQ-related capabilities are represented where supported by routes or source-index references. Several feature implementations were not excerpted, so uncertain internal calls are omitted.

Main entry points: [`Qpid/handler`](https://github.com/trap-jp/hackathon26spring_05/tree/main/Qpid/handler) (HTTP route handlers), [`Qpid-UI/src/router/index.ts`](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/router/index.ts) (Page routing), [`Qpid/repository/repository.go`](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/repository/repository.go) (Repository contracts), [`Qpid-UI/src/api.ts`](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/api.ts) (API fetch helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_app["Vue app shell<br/>[App.vue]"]
  node_router["Page routing<br/>[index.ts]"]
  node_profileview["Profile editor<br/>[Myself.vue]"]
  node_matchingview["Matching views<br/>[Matching.vue]"]
  node_mobileview["Mobile matching"]
  node_likesview["Likes view<br/>[Likes.vue]"]
  node_loginview["Login view<br/>[Login.vue]"]
  node_header["Navigation header<br/>[Header.vue]"]
  node_fetch["API fetch helper<br/>[api.ts]"]
  node_updates["Update checker<br/>[update-checker.ts]"]
end

subgraph group_api["API and identity"]
  node_handlers["HTTP route handlers"]
  node_auth["Authentication middleware<br/>[auth.go]"]
  node_traq["traQ integration<br/>[traq.go]"]
  node_main["Backend startup<br/>[main.go]"]
end

subgraph group_domain["Matching domain"]
  node_userdomain["User profiles<br/>[user.go]"]
  node_suggestions["Suggestions<br/>[suggestion.go]"]
  node_actions["Like and nope actions"]
end

subgraph group_storage["Persistence"]
  node_repoapi["Repository contracts<br/>[repository.go]"]
  node_sqlrepo["SQL repositories"]
  node_mockrepo["Local mock repository"]
  node_database[("Application database<br/>[db.go]")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_header
node_app -.->|"displays routed view"| node_router
node_router -->|"routes to"| node_profileview
node_router -->|"routes to"| node_likesview
node_router -->|"routes to"| node_loginview
node_router -.->|"routes to"| node_matchingview
node_matchingview -.->|"uses"| node_mobileview
node_profileview -->|"calls"| node_fetch
node_matchingview -->|"calls"| node_fetch
node_mobileview -->|"calls"| node_fetch
node_fetch -.->|"requests API"| node_handlers
node_main -->|"starts"| node_handlers
node_handlers -->|"registers middleware"| node_auth
node_handlers -->|"uses"| node_repoapi
node_handlers -->|"uses client"| node_traq
node_auth -->|"checks user"| node_repoapi
node_handlers -->|"handles profile"| node_userdomain
node_handlers -.->|"serves suggestions"| node_suggestions
node_handlers -.->|"serves likes"| node_actions
node_repoapi -->|"implemented by"| node_sqlrepo
node_repoapi -.->|"implemented by"| node_mockrepo
node_sqlrepo -->|"reads and writes"| node_database
node_updates -.->|"notifies"| node_user

click node_app "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/App.vue"
click node_router "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/router/index.ts"
click node_profileview "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/components/Myself.vue"
click node_matchingview "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/components/Matching.vue"
click node_mobileview "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/components/Matching_Mobile.vue"
click node_likesview "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/components/Likes.vue"
click node_loginview "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/components/Login.vue"
click node_header "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/components/Header.vue"
click node_fetch "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/api.ts"
click node_handlers "https://github.com/trap-jp/hackathon26spring_05/tree/main/Qpid/handler"
click node_auth "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/handler/middleware/auth.go"
click node_traq "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/handler/traq.go"
click node_userdomain "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/domain/user.go"
click node_suggestions "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/domain/suggestion.go"
click node_actions "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/repository/action_repository.go"
click node_repoapi "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/repository/repository.go"
click node_sqlrepo "https://github.com/trap-jp/hackathon26spring_05/tree/main/Qpid/infrastructure"
click node_mockrepo "https://github.com/trap-jp/hackathon26spring_05/tree/main/Qpid/repository"
click node_database "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/infrastructure/db.go"
click node_main "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/main.go"
click node_updates "https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/update-checker.ts"

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_app,node_router,node_profileview,node_matchingview,node_mobileview,node_likesview,node_loginview,node_header,node_fetch,node_updates,node_user toneBlue
class node_handlers,node_auth,node_traq,node_main toneAmber
class node_userdomain,node_suggestions,node_actions toneMint
class node_repoapi,node_sqlrepo,node_mockrepo,node_database toneRose
```

## Components

### User interface

- [Vue app shell](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/App.vue): `Qpid-UI/src/App.vue`
- [Page routing](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/router/index.ts): `Qpid-UI/src/router/index.ts`
- [Profile editor](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/components/Myself.vue): `Qpid-UI/src/components/Myself.vue`
- [Matching views](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/components/Matching.vue): `Qpid-UI/src/components/Matching.vue`
- [Mobile matching](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/components/Matching_Mobile.vue): `Qpid-UI/src/components/Matching_Mobile.vue`
- [Likes view](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/components/Likes.vue): `Qpid-UI/src/components/Likes.vue`
- [Login view](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/components/Login.vue): `Qpid-UI/src/components/Login.vue`
- [Navigation header](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/components/Header.vue): `Qpid-UI/src/components/Header.vue`
- [API fetch helper](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/api.ts): `Qpid-UI/src/api.ts`
- [Update checker](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid-UI/src/update-checker.ts): `Qpid-UI/src/update-checker.ts`

### API and identity

- [HTTP route handlers](https://github.com/trap-jp/hackathon26spring_05/tree/main/Qpid/handler): `Qpid/handler`
- [Authentication middleware](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/handler/middleware/auth.go): `Qpid/handler/middleware/auth.go`
- [traQ integration](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/handler/traq.go): `Qpid/handler/traq.go`
- [Backend startup](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/main.go): `Qpid/main.go`

### Matching domain

- [User profiles](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/domain/user.go): `Qpid/domain/user.go`
- [Suggestions](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/domain/suggestion.go): `Qpid/domain/suggestion.go`
- [Like and nope actions](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/repository/action_repository.go): `Qpid/repository/action_repository.go`

### Persistence

- [Repository contracts](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/repository/repository.go): `Qpid/repository/repository.go`
- [SQL repositories](https://github.com/trap-jp/hackathon26spring_05/tree/main/Qpid/infrastructure): `Qpid/infrastructure`
- [Local mock repository](https://github.com/trap-jp/hackathon26spring_05/tree/main/Qpid/repository): `Qpid/repository`
- [Application database](https://github.com/trap-jp/hackathon26spring_05/blob/main/Qpid/infrastructure/db.go): `Qpid/infrastructure/db.go`

### Other components

- **User**

## Connections

- User → Vue app shell: uses (evidence: `Qpid-UI/src/App.vue`)
- Vue app shell → Navigation header: renders (evidence: `Qpid-UI/src/App.vue`)
- Vue app shell → Page routing: displays routed view
- Page routing → Profile editor: routes to (evidence: `Qpid-UI/src/router/index.ts`)
- Page routing → Likes view: routes to (evidence: `Qpid-UI/src/router/index.ts`)
- Page routing → Login view: routes to (evidence: `Qpid-UI/src/router/index.ts`)
- Page routing → Matching views: routes to
- Matching views → Mobile matching: uses
- Profile editor → API fetch helper: calls (evidence: `Qpid-UI/src/components/Myself.vue`)
- Matching views → API fetch helper: calls (evidence: `Qpid-UI/src/components/Matching.vue`)
- Mobile matching → API fetch helper: calls (evidence: `Qpid-UI/src/components/Matching_Mobile.vue`)
- API fetch helper → HTTP route handlers: requests API
- Backend startup → HTTP route handlers: starts (evidence: `Qpid/main.go`)
- HTTP route handlers → Authentication middleware: registers middleware (evidence: `Qpid/handler/handler.go`)
- HTTP route handlers → Repository contracts: uses (evidence: `Qpid/handler/handler.go`)
- HTTP route handlers → traQ integration: uses client (evidence: `Qpid/handler/handler.go`)
- Authentication middleware → Repository contracts: checks user (evidence: `Qpid/handler/middleware/auth.go`)
- HTTP route handlers → User profiles: handles profile (evidence: `Qpid/handler/me.go`)
- HTTP route handlers → Suggestions: serves suggestions
- HTTP route handlers → Like and nope actions: serves likes
- Repository contracts → SQL repositories: implemented by (evidence: `Qpid/infrastructure/repository.go`)
- Repository contracts → Local mock repository: implemented by
- SQL repositories → Application database: reads and writes (evidence: `Qpid/infrastructure/user_repository.go`)
- Update checker → User: notifies
