# mirzayv/nestar-next architecture

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

- Interactive diagram: https://gitdiagram.com/mirzayv/nestar-next
- Repository: https://github.com/mirzayv/nestar-next

## Overview

Nestar is a real-estate portal frontend: visitors discover properties and agents, members can manage listings and engage with community content, and administrators manage site records. The main discovery flow starts at the homepage or a search page, retrieves GraphQL data, and renders listings or agent cards; detail pages provide the next stage. Member and admin workflows form separate branches. The README is only the default Next.js template, so product capabilities are inferred from the route and component tree; unsampled page wiring is not assumed.

Main entry points: [`libs/auth/index.ts`](https://github.com/mirzayv/nestar-next/blob/develop/libs/auth/index.ts) (Authentication), [`apollo/client.ts`](https://github.com/mirzayv/nestar-next/blob/develop/apollo/client.ts) (Apollo Client), [`pages/property/index.tsx`](https://github.com/mirzayv/nestar-next/blob/develop/pages/property/index.tsx) (Property Search), [`pages/agent/index.tsx`](https://github.com/mirzayv/nestar-next/blob/develop/pages/agent/index.tsx) (Agent Search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Property Discovery"]
  node_home["Home<br/>[index.tsx]"]
  node_property_search["Property Search<br/>[index.tsx]"]
  node_property_detail["Property Detail<br/>[detail.tsx]"]
  node_agent_search["Agent Search<br/>[index.tsx]"]
  node_agent_detail["Agent Detail<br/>[detail.tsx]"]
  node_about["About<br/>[index.tsx]"]
end

subgraph group_community["Community and Support"]
  node_community_page["Community<br/>[index.tsx]"]
  node_community_detail["Article Detail<br/>[detail.tsx]"]
  node_support["Help Center<br/>[index.tsx]"]
  node_admin["Admin Console<br/>[index.tsx]"]
end

subgraph group_members["Member Workspace"]
  node_mypage["My Page<br/>[index.tsx]"]
  node_member_page["Member Profile<br/>[index.tsx]"]
  node_account["Join Account<br/>[join.tsx]"]
  node_auth["Authentication<br/>[index.ts]"]
end

subgraph group_platform["App and Data Access"]
  node_user_state["User State<br/>[store.ts]"]
  node_apollo_client["Apollo Client<br/>[client.ts]"]
  node_user_ops["User Operations<br/>[query.ts]"]
  node_user_mutations["User Mutations<br/>[mutation.ts]"]
  node_admin_ops["Admin Operations<br/>[query.ts]"]
  node_admin_mutations["Admin Mutations<br/>[mutation.ts]"]
end

node_visitor(("Visitor"))
node_graphql_service{{"GraphQL API"}}
node_subscription_service{{"Subscription API"}}

node_visitor -->|"opens"| node_home
node_visitor -->|"searches"| node_property_search
node_visitor -->|"searches"| node_agent_search
node_visitor -->|"browses"| node_community_page
node_visitor -->|"seeks help"| node_support
node_visitor -->|"views"| node_about
node_home -->|"opens listings"| node_property_search
node_home -->|"opens agents"| node_agent_search
node_property_search -->|"opens listing"| node_property_detail
node_agent_search -->|"opens profile"| node_agent_detail
node_visitor -->|"joins"| node_account
node_account -->|"registers"| node_auth
node_mypage -->|"reads"| node_user_state
node_auth -->|"executes"| node_user_mutations
node_auth -->|"initializes"| node_apollo_client
node_auth -->|"updates"| node_user_state
node_apollo_client -->|"gets token"| node_auth
node_community_page -->|"queries articles"| node_user_ops
node_property_search -->|"queries listings"| node_user_ops
node_agent_search -->|"queries agents"| node_user_ops
node_member_page -->|"queries member"| node_user_ops
node_admin -->|"queries records"| node_admin_ops
node_admin -->|"changes records"| node_admin_mutations
node_apollo_client -->|"sends requests"| node_graphql_service
node_apollo_client -.->|"opens subscriptions"| node_subscription_service

click node_home "https://github.com/mirzayv/nestar-next/blob/develop/pages/index.tsx"
click node_property_search "https://github.com/mirzayv/nestar-next/blob/develop/pages/property/index.tsx"
click node_property_detail "https://github.com/mirzayv/nestar-next/blob/develop/pages/property/detail.tsx"
click node_agent_search "https://github.com/mirzayv/nestar-next/blob/develop/pages/agent/index.tsx"
click node_agent_detail "https://github.com/mirzayv/nestar-next/blob/develop/pages/agent/detail.tsx"
click node_about "https://github.com/mirzayv/nestar-next/blob/develop/pages/about/index.tsx"
click node_community_page "https://github.com/mirzayv/nestar-next/blob/develop/pages/community/index.tsx"
click node_community_detail "https://github.com/mirzayv/nestar-next/blob/develop/pages/community/detail.tsx"
click node_support "https://github.com/mirzayv/nestar-next/blob/develop/pages/cs/index.tsx"
click node_admin "https://github.com/mirzayv/nestar-next/blob/develop/pages/_admin/index.tsx"
click node_mypage "https://github.com/mirzayv/nestar-next/blob/develop/pages/mypage/index.tsx"
click node_member_page "https://github.com/mirzayv/nestar-next/blob/develop/pages/member/index.tsx"
click node_account "https://github.com/mirzayv/nestar-next/blob/develop/pages/account/join.tsx"
click node_auth "https://github.com/mirzayv/nestar-next/blob/develop/libs/auth/index.ts"
click node_user_state "https://github.com/mirzayv/nestar-next/blob/develop/apollo/store.ts"
click node_apollo_client "https://github.com/mirzayv/nestar-next/blob/develop/apollo/client.ts"
click node_user_ops "https://github.com/mirzayv/nestar-next/blob/develop/apollo/user/query.ts"
click node_user_mutations "https://github.com/mirzayv/nestar-next/blob/develop/apollo/user/mutation.ts"
click node_admin_ops "https://github.com/mirzayv/nestar-next/blob/develop/apollo/admin/query.ts"
click node_admin_mutations "https://github.com/mirzayv/nestar-next/blob/develop/apollo/admin/mutation.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_home,node_property_search,node_property_detail,node_agent_search,node_agent_detail,node_about toneBlue
class node_community_page,node_community_detail,node_support,node_admin toneAmber
class node_mypage,node_member_page,node_account,node_auth,node_graphql_service,node_subscription_service toneMint
class node_user_state,node_apollo_client,node_user_ops,node_user_mutations,node_admin_ops,node_admin_mutations toneRose
class node_visitor toneIndigo
```

## Components

### Property Discovery

- [Home](https://github.com/mirzayv/nestar-next/blob/develop/pages/index.tsx): `pages/index.tsx`
- [Property Search](https://github.com/mirzayv/nestar-next/blob/develop/pages/property/index.tsx): `pages/property/index.tsx`
- [Property Detail](https://github.com/mirzayv/nestar-next/blob/develop/pages/property/detail.tsx): `pages/property/detail.tsx`
- [Agent Search](https://github.com/mirzayv/nestar-next/blob/develop/pages/agent/index.tsx): `pages/agent/index.tsx`
- [Agent Detail](https://github.com/mirzayv/nestar-next/blob/develop/pages/agent/detail.tsx): `pages/agent/detail.tsx`
- [About](https://github.com/mirzayv/nestar-next/blob/develop/pages/about/index.tsx): `pages/about/index.tsx`

### Community and Support

- [Community](https://github.com/mirzayv/nestar-next/blob/develop/pages/community/index.tsx): `pages/community/index.tsx`
- [Article Detail](https://github.com/mirzayv/nestar-next/blob/develop/pages/community/detail.tsx): `pages/community/detail.tsx`
- [Help Center](https://github.com/mirzayv/nestar-next/blob/develop/pages/cs/index.tsx): `pages/cs/index.tsx`
- [Admin Console](https://github.com/mirzayv/nestar-next/blob/develop/pages/_admin/index.tsx): `pages/_admin/index.tsx`

### Member Workspace

- [My Page](https://github.com/mirzayv/nestar-next/blob/develop/pages/mypage/index.tsx): `pages/mypage/index.tsx`
- [Member Profile](https://github.com/mirzayv/nestar-next/blob/develop/pages/member/index.tsx): `pages/member/index.tsx`
- [Join Account](https://github.com/mirzayv/nestar-next/blob/develop/pages/account/join.tsx): `pages/account/join.tsx`
- [Authentication](https://github.com/mirzayv/nestar-next/blob/develop/libs/auth/index.ts): `libs/auth/index.ts`

### App and Data Access

- [User State](https://github.com/mirzayv/nestar-next/blob/develop/apollo/store.ts): `apollo/store.ts`
- [Apollo Client](https://github.com/mirzayv/nestar-next/blob/develop/apollo/client.ts): `apollo/client.ts`
- [User Operations](https://github.com/mirzayv/nestar-next/blob/develop/apollo/user/query.ts): `apollo/user/query.ts`
- [User Mutations](https://github.com/mirzayv/nestar-next/blob/develop/apollo/user/mutation.ts): `apollo/user/mutation.ts`
- [Admin Operations](https://github.com/mirzayv/nestar-next/blob/develop/apollo/admin/query.ts): `apollo/admin/query.ts`
- [Admin Mutations](https://github.com/mirzayv/nestar-next/blob/develop/apollo/admin/mutation.ts): `apollo/admin/mutation.ts`

### Other components

- **Visitor**
- **GraphQL API**
- **Subscription API**

## Connections

- Visitor → Home: opens
- Visitor → Property Search: searches
- Visitor → Agent Search: searches
- Visitor → Community: browses
- Visitor → Help Center: seeks help
- Visitor → About: views
- Home → Property Search: opens listings
- Home → Agent Search: opens agents
- Property Search → Property Detail: opens listing
- Agent Search → Agent Detail: opens profile
- Visitor → Join Account: joins
- Join Account → Authentication: registers
- My Page → User State: reads
- Authentication → User Mutations: executes
- Authentication → Apollo Client: initializes
- Authentication → User State: updates
- Apollo Client → Authentication: gets token
- Community → User Operations: queries articles
- Property Search → User Operations: queries listings
- Agent Search → User Operations: queries agents
- Member Profile → User Operations: queries member
- Admin Console → Admin Operations: queries records
- Admin Console → Admin Mutations: changes records
- Apollo Client → GraphQL API: sends requests
- Apollo Client → Subscription API: opens subscriptions
