# theeduazizjon-cell/nestar architecture

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

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

## Overview

Nestar is a real-estate and community backend, with an API for members, property listings, articles, comments, likes, follows, and views, plus a scheduled batch application. The principal user workflow is an API request to browse or manage property listings; sampled property logic also records views and coordinates member statistics. The tree indicates GraphQL resolvers and a WebSocket gateway, but their wiring and notification behavior were not sampled, so those links are left unspecified. Batch scheduling is visible, but batch job internals are not.

Main entry points: [`apps/nestar-api/src/components/member/member.service.ts`](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/member/member.service.ts) (Member service), [`apps/nestar-api/src/database/database.module.ts`](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/database/database.module.ts) (MongoDB), [`apps/nestar-api/src/components/property/property.service.ts`](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/property/property.service.ts) (Property service), [`apps/nestar-api/src/components/board-article/board-article.service.ts`](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/board-article/board-article.service.ts) (Article service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API access"]
  node_graphql["GraphQL app<br/>[app.module.ts]"]
end

subgraph group_domain["Product domains"]
  node_property["Property service"]
  node_member["Member service<br/>[member.service.ts]"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_article["Article service"]
  node_comment["Comment service<br/>[comment.service.ts]"]
  node_follow["Follow service<br/>[follow.service.ts]"]
  node_like["Like service<br/>[like.service.ts]"]
  node_view["View service<br/>[view.service.ts]"]
end

subgraph group_state["Persistence"]
  node_propertydb[("Properties<br/>[Property.model.ts]")]
  node_memberdb[("Members<br/>[Member.model.ts]")]
  node_articledb[("Articles")]
  node_commentdb[("Comments<br/>[Comment.model.ts]")]
  node_followdb[("Follows<br/>[Follow.model.ts]")]
  node_likedb[("Likes<br/>[Like.model.ts]")]
  node_viewdb[("Views<br/>[View.model.ts]")]
  node_mongodb[("MongoDB<br/>[database.module.ts]")]
end

subgraph group_batch["Batch and realtime"]
  node_scheduler["Batch scheduler"]
  node_batchservice["Batch jobs<br/>[batch.service.ts]"]
  node_socket["WebSocket gateway<br/>[socket.gateway.ts]"]
end

node_client(("API client"))

node_client -->|"sends requests"| node_graphql
node_property -->|"reads and writes"| node_propertydb
node_property -->|"updates statistics"| node_member
node_property -->|"records views"| node_view
node_property -->|"gets favorites"| node_like
node_propertydb -->|"persists in"| node_mongodb
node_member -->|"reads and writes"| node_memberdb
node_member -->|"hashes and signs"| node_auth
node_member -->|"records views"| node_view
node_member -->|"checks likes"| node_like
node_memberdb -->|"persists in"| node_mongodb
node_article -->|"reads and writes"| node_articledb
node_article -->|"loads member data"| node_member
node_article -->|"records views"| node_view
node_article -->|"toggles likes"| node_like
node_articledb -->|"persists in"| node_mongodb
node_comment -->|"reads and writes"| node_commentdb
node_comment -->|"updates property stats"| node_property
node_comment -->|"updates article stats"| node_article
node_comment -->|"updates member stats"| node_member
node_commentdb -->|"persists in"| node_mongodb
node_follow -->|"reads and writes"| node_followdb
node_follow -->|"checks members; updates stats"| node_member
node_followdb -->|"persists in"| node_mongodb
node_like -->|"reads and writes"| node_likedb
node_likedb -->|"persists in"| node_mongodb
node_view -->|"reads and writes"| node_viewdb
node_viewdb -->|"persists in"| node_mongodb
node_scheduler -->|"runs jobs"| node_batchservice

click node_graphql "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/app.module.ts"
click node_property "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/property/property.service.ts"
click node_member "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/member/member.service.ts"
click node_auth "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/auth/auth/auth.service.ts"
click node_article "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/board-article/board-article.service.ts"
click node_comment "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/comment/comment.service.ts"
click node_follow "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/follow/follow.service.ts"
click node_like "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/like/like.service.ts"
click node_view "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/view/view.service.ts"
click node_propertydb "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/Property.model.ts"
click node_memberdb "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/Member.model.ts"
click node_articledb "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/BoardArticle.model.ts"
click node_commentdb "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/Comment.model.ts"
click node_followdb "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/Follow.model.ts"
click node_likedb "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/Like.model.ts"
click node_viewdb "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/View.model.ts"
click node_mongodb "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/database/database.module.ts"
click node_scheduler "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-batch/src/batch.controller.ts"
click node_batchservice "https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-batch/src/batch.service.ts"
click node_socket "https://github.com/theeduazizjon-cell/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_client toneBlue
class node_property,node_member,node_auth,node_article,node_comment,node_follow,node_like,node_view toneAmber
class node_propertydb,node_memberdb,node_articledb,node_commentdb,node_followdb,node_likedb,node_viewdb,node_mongodb toneMint
class node_scheduler,node_batchservice,node_socket toneRose
```

## Components

### API access

- [GraphQL app](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/app.module.ts): `apps/nestar-api/src/app.module.ts`

### Product domains

- [Property service](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/property/property.service.ts): `apps/nestar-api/src/components/property/property.service.ts`
- [Member service](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/member/member.service.ts): `apps/nestar-api/src/components/member/member.service.ts`
- [Authentication](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/auth/auth/auth.service.ts): `apps/nestar-api/src/components/auth/auth/auth.service.ts`
- [Article service](https://github.com/theeduazizjon-cell/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`
- [Comment service](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/comment/comment.service.ts): `apps/nestar-api/src/components/comment/comment.service.ts`
- [Follow service](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/follow/follow.service.ts): `apps/nestar-api/src/components/follow/follow.service.ts`
- [Like service](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/like/like.service.ts): `apps/nestar-api/src/components/like/like.service.ts`
- [View service](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/components/view/view.service.ts): `apps/nestar-api/src/components/view/view.service.ts`

### Persistence

- [Properties](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/Property.model.ts): `apps/nestar-api/src/schemas/Property.model.ts`
- [Members](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/Member.model.ts): `apps/nestar-api/src/schemas/Member.model.ts`
- [Articles](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/BoardArticle.model.ts): `apps/nestar-api/src/schemas/BoardArticle.model.ts`
- [Comments](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/Comment.model.ts): `apps/nestar-api/src/schemas/Comment.model.ts`
- [Follows](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/Follow.model.ts): `apps/nestar-api/src/schemas/Follow.model.ts`
- [Likes](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/Like.model.ts): `apps/nestar-api/src/schemas/Like.model.ts`
- [Views](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/schemas/View.model.ts): `apps/nestar-api/src/schemas/View.model.ts`
- [MongoDB](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/database/database.module.ts): `apps/nestar-api/src/database/database.module.ts`

### Batch and realtime

- [Batch scheduler](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-batch/src/batch.controller.ts): `apps/nestar-batch/src/batch.controller.ts`
- [Batch jobs](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-batch/src/batch.service.ts): `apps/nestar-batch/src/batch.service.ts`
- [WebSocket gateway](https://github.com/theeduazizjon-cell/nestar/blob/master/apps/nestar-api/src/socket/socket.gateway.ts): `apps/nestar-api/src/socket/socket.gateway.ts`

### Other components

- **API client**

## Connections

- API client → GraphQL app: sends requests
- Property service → Properties: reads and writes
- Property service → Member service: updates statistics
- Property service → View service: records views
- Property service → Like service: gets favorites
- Properties → MongoDB: persists in
- Member service → Members: reads and writes
- Member service → Authentication: hashes and signs
- Member service → View service: records views
- Member service → Like service: checks likes
- Members → MongoDB: persists in
- Article service → Articles: reads and writes
- Article service → Member service: loads member data
- Article service → View service: records views
- Article service → Like service: toggles likes
- Articles → MongoDB: persists in
- Comment service → Comments: reads and writes
- Comment service → Property service: updates property stats
- Comment service → Article service: updates article stats
- Comment service → Member service: updates member stats
- Comments → MongoDB: persists in
- Follow service → Follows: reads and writes
- Follow service → Member service: checks members; updates stats
- Follows → MongoDB: persists in
- Like service → Likes: reads and writes
- Likes → MongoDB: persists in
- View service → Views: reads and writes
- Views → MongoDB: persists in
- Batch scheduler → Batch jobs: runs jobs
