# finditem/fi-fe architecture

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

- Interactive diagram: https://gitdiagram.com/finditem/fi-fe
- Repository: https://github.com/finditem/fi-fe

## Overview

찾아줘! is a map-centered lost-and-found community web app. Its main user workflow is to find nearby or searchable lost/found items, inspect details, and contact other users through real-time chat; public police Lost112 data broadens discovery. The app also provides account, community, notification, and PWA capabilities. The tree and README establish the product branches; sampled query hooks show how public-data listing reaches the shared query and Axios layers. Other implementation links are included only where the README documents the capability or the source index shows the relationship.

Main entry points: [`src/app/[locale]/(route)/public-data/_hooks/usePublicDataListQuery/usePublicDataListQuery.ts`](https://github.com/finditem/fi-fe/blob/develop/src/app/%5Blocale%5D/(route)/public-data/_hooks/usePublicDataListQuery/usePublicDataListQuery.ts) (Police data), [`src/app/[locale]/(home)/page.tsx`](https://github.com/finditem/fi-fe/blob/develop/src/app/%5Blocale%5D/(home)/page.tsx) (Map home), [`src/app/[locale]/(route)/chat/[postId]/page.tsx`](https://github.com/finditem/fi-fe/blob/develop/src/app/%5Blocale%5D/(route)/chat/%5BpostId%5D/page.tsx) (Real-time chat), [`src/api/_base/query/useAppInfiniteQuery.ts`](https://github.com/finditem/fi-fe/blob/develop/src/api/_base/query/useAppInfiniteQuery.ts) (Query layer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Item discovery"]
  node_home["Map home<br/>[page.tsx]"]
  node_map_ui["Map and filters<br/>[MainNaverMap.tsx]"]
  node_post_search["Post search<br/>[useGetPosts.ts]"]
  node_post_detail["Post details"]
  node_public_data["Police data"]
end

subgraph group_community["Community and contact"]
  node_chat["Real-time chat<br/>[page.tsx]"]
  node_chat_api["Chat transport<br/>[useChatSocket.ts]"]
  node_comments["Comments"]
end

subgraph group_account["Accounts and alerts"]
  node_auth["Authentication"]
  node_user_profile["User profiles<br/>[useGetUsersMe.ts]"]
  node_notifications["Live notifications"]
  node_push["Web push"]
end

subgraph group_platform["App platform"]
  node_query_layer["Query layer"]
  node_axios["HTTP clients<br/>[useAxios.ts]"]
  node_recent_search[("Recent searches")]
  node_pwa["PWA workers<br/>[sw.js]"]
end

node_user(("User"))
node_public_service["Public data service"]

node_user -->|"browses"| node_home
node_home -->|"shows map"| node_map_ui
node_user -->|"searches items"| node_post_search
node_user -->|"browses public data"| node_public_data
node_public_data -->|"fetches records"| node_public_service
node_public_data -->|"uses infinite query"| node_query_layer
node_query_layer -->|"gets HTTP client"| node_axios
node_user -->|"views details"| node_post_detail
node_user -->|"starts conversation"| node_chat
node_chat -->|"uses real-time transport"| node_chat_api
node_user -->|"comments on posts"| node_comments
node_user -->|"signs in"| node_auth
node_user -->|"manages account"| node_user_profile
node_user -->|"receives alerts"| node_notifications
node_user -.->|"enables push"| node_push
node_user -->|"keeps search history"| node_recent_search
node_user -->|"uses installed app"| node_pwa

click node_home "https://github.com/finditem/fi-fe/blob/develop/src/app/%5Blocale%5D/(home)/page.tsx"
click node_map_ui "https://github.com/finditem/fi-fe/blob/develop/src/app/%5Blocale%5D/(home)/_components/MainNaverMap/MainNaverMap.tsx"
click node_post_search "https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/post/api/useGetPosts.ts"
click node_post_detail "https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/post/api/useGetDetailPost.ts"
click node_public_data "https://github.com/finditem/fi-fe/blob/develop/src/app/%5Blocale%5D/(route)/public-data/_hooks/usePublicDataListQuery/usePublicDataListQuery.ts"
click node_chat "https://github.com/finditem/fi-fe/blob/develop/src/app/%5Blocale%5D/(route)/chat/%5BpostId%5D/page.tsx"
click node_chat_api "https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/chatRoom/api/useChatSocket.ts"
click node_comments "https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/comment/api/useGetPostsComments.ts"
click node_auth "https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/auth/api/useApiEmailLogin.ts"
click node_user_profile "https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/user/api/useGetUsersMe.ts"
click node_notifications "https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/notification/api/useNotificationSSE.ts"
click node_push "https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/webPush/api/usePostPushSubscribe.ts"
click node_query_layer "https://github.com/finditem/fi-fe/blob/develop/src/api/_base/query/useAppInfiniteQuery.ts"
click node_axios "https://github.com/finditem/fi-fe/blob/develop/src/api/_base/axios/useAxios.ts"
click node_recent_search "https://github.com/finditem/fi-fe/blob/develop/src/store/useMainRecentSearch/useMainRecentSearch.ts"
click node_pwa "https://github.com/finditem/fi-fe/blob/develop/public/sw.js"

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_home,node_map_ui,node_post_search,node_post_detail,node_public_data,node_user toneBlue
class node_chat,node_chat_api,node_comments toneAmber
class node_auth,node_user_profile,node_notifications,node_push toneMint
class node_query_layer,node_axios,node_recent_search,node_pwa toneRose
class node_public_service toneIndigo
```

## Components

### Item discovery

- [Map home](https://github.com/finditem/fi-fe/blob/develop/src/app/%5Blocale%5D/(home)/page.tsx): `src/app/[locale]/(home)/page.tsx`
- [Map and filters](https://github.com/finditem/fi-fe/blob/develop/src/app/%5Blocale%5D/(home)/_components/MainNaverMap/MainNaverMap.tsx): `src/app/[locale]/(home)/_components/MainNaverMap/MainNaverMap.tsx`
- [Post search](https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/post/api/useGetPosts.ts): `src/api/fetch/post/api/useGetPosts.ts`
- [Post details](https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/post/api/useGetDetailPost.ts): `src/api/fetch/post/api/useGetDetailPost.ts`
- [Police data](https://github.com/finditem/fi-fe/blob/develop/src/app/%5Blocale%5D/(route)/public-data/_hooks/usePublicDataListQuery/usePublicDataListQuery.ts): `src/app/[locale]/(route)/public-data/_hooks/usePublicDataListQuery/usePublicDataListQuery.ts`

### Community and contact

- [Real-time chat](https://github.com/finditem/fi-fe/blob/develop/src/app/%5Blocale%5D/(route)/chat/%5BpostId%5D/page.tsx): `src/app/[locale]/(route)/chat/[postId]/page.tsx`
- [Chat transport](https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/chatRoom/api/useChatSocket.ts): `src/api/fetch/chatRoom/api/useChatSocket.ts`
- [Comments](https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/comment/api/useGetPostsComments.ts): `src/api/fetch/comment/api/useGetPostsComments.ts`

### Accounts and alerts

- [Authentication](https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/auth/api/useApiEmailLogin.ts): `src/api/fetch/auth/api/useApiEmailLogin.ts`
- [User profiles](https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/user/api/useGetUsersMe.ts): `src/api/fetch/user/api/useGetUsersMe.ts`
- [Live notifications](https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/notification/api/useNotificationSSE.ts): `src/api/fetch/notification/api/useNotificationSSE.ts`
- [Web push](https://github.com/finditem/fi-fe/blob/develop/src/api/fetch/webPush/api/usePostPushSubscribe.ts): `src/api/fetch/webPush/api/usePostPushSubscribe.ts`

### App platform

- [Query layer](https://github.com/finditem/fi-fe/blob/develop/src/api/_base/query/useAppInfiniteQuery.ts): `src/api/_base/query/useAppInfiniteQuery.ts`
- [HTTP clients](https://github.com/finditem/fi-fe/blob/develop/src/api/_base/axios/useAxios.ts): `src/api/_base/axios/useAxios.ts`
- [Recent searches](https://github.com/finditem/fi-fe/blob/develop/src/store/useMainRecentSearch/useMainRecentSearch.ts): `src/store/useMainRecentSearch/useMainRecentSearch.ts`
- [PWA workers](https://github.com/finditem/fi-fe/blob/develop/public/sw.js): `public/sw.js`

### Other components

- **User**
- **Public data service**

## Connections

- User → Map home: browses (evidence: `README.md`)
- Map home → Map and filters: shows map (evidence: `README.md`)
- User → Post search: searches items (evidence: `README.md`)
- User → Police data: browses public data (evidence: `README.md`)
- Police data → Public data service: fetches records (evidence: `README.md`)
- Police data → Query layer: uses infinite query (evidence: `src/app/[locale]/(route)/public-data/_hooks/usePublicDataListQuery/usePublicDataListQuery.ts`)
- Query layer → HTTP clients: gets HTTP client (evidence: `src/api/_base/query/useAppInfiniteQuery.ts`)
- User → Post details: views details (evidence: `README.md`)
- User → Real-time chat: starts conversation (evidence: `README.md`)
- Real-time chat → Chat transport: uses real-time transport (evidence: `README.md`)
- User → Comments: comments on posts (evidence: `README.md`)
- User → Authentication: signs in (evidence: `README.md`)
- User → User profiles: manages account
- User → Live notifications: receives alerts (evidence: `README.md`)
- User → Web push: enables push
- User → Recent searches: keeps search history (evidence: `src/store/useMainRecentSearch/useMainRecentSearch.ts`)
- User → PWA workers: uses installed app (evidence: `README.md`)
