# azizbekreimbaev/nestar architecture

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

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

## Overview

Nestar appears to be a real-estate community API, with a separate batch application that recalculates property and agent rankings. The principal workflow is an API request entering through NestJS/GraphQL, being handled by a domain service, and reading or updating MongoDB; listings and articles can also record views and likes. The tree shows member, follow, comment, and notification capabilities, though their full request paths were not sampled. Edges without direct source evidence are marked dashed with no evidence path.

Main entry points: [`apps/nestar-api/src/components/member/member.service.ts`](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/member/member.service.ts) (Member accounts), [`apps/nestar-api/src/app.module.ts`](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/app.module.ts) (GraphQL API), [`apps/nestar-api/src/components/property/property.service.ts`](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/property/property.service.ts) (Property listings), [`apps/nestar-api/src/components/board-article/board-article.service.ts`](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/board-article/board-article.service.ts) (Board articles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API entry"]
  node_graphql["GraphQL API<br/>[app.module.ts]"]
  node_socket["Realtime socket<br/>[socket.gateway.ts]"]
end

subgraph group_identity["Members and social"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_members["Member accounts<br/>[member.service.ts]"]
  node_follows["Follow relationships<br/>[follow.service.ts]"]
end

subgraph group_market["Listings and content"]
  node_properties["Property listings"]
  node_articles["Board articles"]
  node_comments["Comments<br/>[comment.service.ts]"]
end

subgraph group_engagement["Engagement and rankings"]
  node_likes["Likes and favorites<br/>[like.service.ts]"]
  node_views["View history<br/>[view.service.ts]"]
  node_batch["Ranking jobs<br/>[batch.service.ts]"]
  node_notifications["Notifications"]
end

node_user(("API client"))
node_mongo[("MongoDB")]

node_user -.->|"sends requests"| node_graphql
node_graphql -.->|"authenticates"| node_auth
node_graphql -.->|"routes requests"| node_members
node_graphql -.->|"routes requests"| node_properties
node_graphql -.->|"routes requests"| node_articles
node_graphql -.->|"routes requests"| node_follows
node_graphql -.->|"routes requests"| node_comments
node_members -->|"hashes passwords"| node_auth
node_properties -->|"records views"| node_views
node_properties -.->|"toggles likes"| node_likes
node_articles -->|"updates stats"| node_members
node_articles -.->|"records views"| node_views
node_articles -.->|"toggles likes"| node_likes
node_members -.->|"uses history"| node_views
node_members -.->|"uses likes"| node_likes
node_members -.->|"uses follow data"| node_follows
node_comments -->|"uses member service"| node_members
node_comments -->|"uses property service"| node_properties
node_batch -->|"updates rankings"| node_mongo
node_members -->|"reads and writes"| node_mongo
node_properties -->|"reads and writes"| node_mongo
node_likes -->|"reads and writes"| node_mongo
node_views -->|"reads and writes"| node_mongo
node_follows -.->|"reads and writes"| node_mongo
node_socket -.->|"sends updates"| node_user

click node_graphql "https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/app.module.ts"
click node_auth "https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/auth/auth.service.ts"
click node_members "https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/member/member.service.ts"
click node_follows "https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/follow/follow.service.ts"
click node_properties "https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/property/property.service.ts"
click node_articles "https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/board-article/board-article.service.ts"
click node_comments "https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/comment/comment.service.ts"
click node_likes "https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/like/like.service.ts"
click node_views "https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/view/view.service.ts"
click node_batch "https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-batch/src/batch.service.ts"
click node_notifications "https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/schemas/Notification.model.ts"
click node_socket "https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/socket/socket.gateway.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_graphql,node_socket,node_user toneBlue
class node_auth,node_members,node_follows,node_mongo toneAmber
class node_properties,node_articles,node_comments toneMint
class node_likes,node_views,node_batch,node_notifications toneRose
```

## Components

### API entry

- [GraphQL API](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/app.module.ts): `apps/nestar-api/src/app.module.ts`
- [Realtime socket](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/socket/socket.gateway.ts): `apps/nestar-api/src/socket/socket.gateway.ts`

### Members and social

- [Authentication](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/auth/auth.service.ts): `apps/nestar-api/src/components/auth/auth.service.ts`
- [Member accounts](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/member/member.service.ts): `apps/nestar-api/src/components/member/member.service.ts`
- [Follow relationships](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/follow/follow.service.ts): `apps/nestar-api/src/components/follow/follow.service.ts`

### Listings and content

- [Property listings](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/property/property.service.ts): `apps/nestar-api/src/components/property/property.service.ts`
- [Board articles](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/board-article/board-article.service.ts): `apps/nestar-api/src/components/board-article/board-article.service.ts`
- [Comments](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/comment/comment.service.ts): `apps/nestar-api/src/components/comment/comment.service.ts`

### Engagement and rankings

- [Likes and favorites](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/like/like.service.ts): `apps/nestar-api/src/components/like/like.service.ts`
- [View history](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/components/view/view.service.ts): `apps/nestar-api/src/components/view/view.service.ts`
- [Ranking jobs](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-batch/src/batch.service.ts): `apps/nestar-batch/src/batch.service.ts`
- [Notifications](https://github.com/azizbekreimbaev/nestar/blob/master/apps/nestar-api/src/schemas/Notification.model.ts): `apps/nestar-api/src/schemas/Notification.model.ts`

### Other components

- **API client**
- **MongoDB**

## Connections

- API client → GraphQL API: sends requests
- GraphQL API → Authentication: authenticates
- GraphQL API → Member accounts: routes requests
- GraphQL API → Property listings: routes requests
- GraphQL API → Board articles: routes requests
- GraphQL API → Follow relationships: routes requests
- GraphQL API → Comments: routes requests
- Member accounts → Authentication: hashes passwords (evidence: `apps/nestar-api/src/components/member/member.service.ts`)
- Property listings → View history: records views (evidence: `apps/nestar-api/src/components/property/property.service.ts`)
- Property listings → Likes and favorites: toggles likes (evidence: `apps/nestar-api/src/components/property/property.service.ts`)
- Board articles → Member accounts: updates stats (evidence: `apps/nestar-api/src/components/board-article/board-article.service.ts`)
- Board articles → View history: records views (evidence: `apps/nestar-api/src/components/board-article/board-article.service.ts`)
- Board articles → Likes and favorites: toggles likes (evidence: `apps/nestar-api/src/components/board-article/board-article.service.ts`)
- Member accounts → View history: uses history (evidence: `apps/nestar-api/src/components/member/member.service.ts`)
- Member accounts → Likes and favorites: uses likes (evidence: `apps/nestar-api/src/components/member/member.service.ts`)
- Member accounts → Follow relationships: uses follow data (evidence: `apps/nestar-api/src/components/follow/follow.service.ts`)
- Comments → Member accounts: uses member service (evidence: `apps/nestar-api/src/components/comment/comment.service.ts`)
- Comments → Property listings: uses property service (evidence: `apps/nestar-api/src/components/comment/comment.service.ts`)
- Ranking jobs → MongoDB: updates rankings (evidence: `apps/nestar-batch/src/batch.service.ts`)
- Member accounts → MongoDB: reads and writes (evidence: `apps/nestar-api/src/components/member/member.service.ts`)
- Property listings → MongoDB: reads and writes (evidence: `apps/nestar-api/src/components/property/property.service.ts`)
- Likes and favorites → MongoDB: reads and writes (evidence: `apps/nestar-api/src/components/like/like.service.ts`)
- View history → MongoDB: reads and writes (evidence: `apps/nestar-api/src/components/view/view.service.ts`)
- Follow relationships → MongoDB: reads and writes
- Realtime socket → API client: sends updates
