Files
Vendaweb-portal/.context/docs/architecture.md
Luis Eduardo Estevao 4652fea8fc documentação do sistema
2026-05-05 16:12:52 -03:00

3.1 KiB

type, name, description, category, generated, status, scaffoldVersion
type name description category generated status scaffoldVersion
doc architecture System architecture, layers, patterns, and design decisions architecture 2026-04-29 active 2.0.0

Architecture Notes

System Architecture Overview

The system is a modular frontend web application built using Angular. It follows a modular monolith architecture where features are grouped into specific modules such as Sales, Partners, Financial, and CRM. The application heavily relies on Redux-pattern state management (likely NgRx) to manage global state such as shopping carts, customer sales, and application data flow. Data is fetched via Angular services which communicate with a backend REST API.

Architectural Layers

  • Components: UI elements and pages organized by feature domain (src/app/sales/, src/app/partners/, src/app/crm/).
  • Services: Business logic and API communication layer (src/app/services/, src/app/shared/services/).
  • Store / State Management: Reducers, actions, and models handling complex state management (src/app/sales/store/).
  • Models: TypeScript interfaces and classes defining data structures (src/app/models/).
  • Shared Utils: Common messages, loading indicators, and validators (src/app/shared/).

See codebase-map.json for complete symbol counts and dependency graphs.

Detected Design Patterns

Pattern Confidence Locations Description
Module 100% src/app/*.module.ts Angular feature modules for separation of concerns
Redux / Store 95% src/app/sales/store/ State management using Actions, Reducers, and Store
Dependency Injection 100% src/app/services/ Angular DI for injecting services into components
Observable / Reactive 90% Services & Store Heavy use of RxJS Observables for async data flows

Entry Points

Public API

Symbol Type Location
AppModule Class src/app/app.module.ts
SalesModule Class src/app/sales/sales.module.ts
PartnersModule Class src/app/partners/partners.module.ts
ShoppingReducer Function src/app/sales/store/reducers/shopping.reducer.ts

Internal System Boundaries

The application is clearly separated into bounded contexts:

  • Sales: Core module handling product listings, shopping carts, checkout, and ordering.
  • Partners: Module for managing partner ranges, reports, and payments.
  • CRM: Module handling customer data, editing, and listing.
  • Admin/Auth: Authentication and user permission management.

Top Directories Snapshot

  • src/app/sales/ (~50+ files)
  • src/app/models/ (~40+ files)
  • src/app/shared/ (~30+ files)
  • src/app/partners/ (~20+ files)
  • src/app/components/ (~10+ files)