How sirojali/nestar works
Main Components
• A Node.js runtime representing the NestJS ecosystem.
• Two main applications:
• Nestar API (GraphQL-based API server)
• Nestar Batch (a background/batch processing service)
• Within the Nestar API, include key feature modules:
• Core/Global modules: App, database module, configuration libraries, DTO definitions, enums, and interceptors.
• Feature modules: Auth (with decorators and guards), Board Article, Comment, Follow, Like, Member, Property, and View.
• A persistence layer:
• Database module showing connectivity (with references to models/schemas such as BoardArticle.model.ts, Comment.model.ts, etc.)
• External Services/Deployment Platforms:
• Integrations (for example, AWS/Mau deployment as mentioned in the README) and any build/test pipelines.
Relationships and Interactions
• That the Nestar API acts as a request entry point where incoming GraphQL requests hit the resolvers. The controllers (like app.resolver.ts) delegate to underlying service logic.
• That each feature module (Auth, Board Article, etc.) has its own module encapsulating its resolvers, services, and related DTOs, following the Domain-Driven Design separation.
• For the Auth module, emphasize decorators and guards (e.g., roles.guard.ts, auth.guard.ts) that control access to various endpoints.
Architectural Patterns and Design Principles
• Modular architecture – each feature resides in its own module and is then integrated into a root module.
• Dependency Injection, a core pattern in Nest, showing how services are utilized by resolvers and controllers.
• Layered architecture: presentation (GraphQL resolvers), business logic (services, guards, interceptors), and data layer (database module and schemas).
• If applicable, note any middleware or interceptors (like Logging.interceptor.ts) that provide cross-cutting concerns.
Relevant Technologies and Frameworks/Libraries
• NestJS as the Node.js framework.
• TypeScript for language features and strong typing.
• GraphQL (inferred from the numerous .resolver.ts files) as the API query language.
• Testing frameworks (as seen in test/app.e2e-spec.ts and jest-e2e.json).
• Deployment tools indicated in the README (Mau for AWS deployments).