Skip to content

πŸ—οΈ Frontend Architecture

This document defines how frontend applications are structured and organized at LOGYCA.

The goal is to ensure: - Low coupling - High cohesion - Functional scalability - Clear responsibilities


πŸ”’ Architectural Principles

  • Components must not contain business logic
  • Business logic lives in services
  • Application state must be predictable
  • Modules represent functional domains
  • Architecture must scale without rewrites

🧩 Separation of Responsibilities

Components

  • Render UI
  • Handle user interaction
  • Delegate logic to services
  • Must remain simple and declarative

Services

  • Contain business logic
  • Orchestrate API calls
  • Manage shared state
  • Must be reusable and testable

πŸ“¦ Modularity

Applications must be organized into functional modules:

Core

  • Singleton services
  • Interceptors
  • Guards
  • Global configuration

Shared

  • Reusable components
  • Pipes
  • Directives
  • Helpers

Features

  • Complete business functionalities

πŸ“Œ Rule
shared modules must never depend on core.


πŸ”„ Architectural Evolution

Frontend architecture must:

  • Allow incremental refactoring
  • Avoid circular dependencies
  • Support lazy loading
  • Facilitate unit testing

If an architectural decision hinders future maintenance, it must be reconsidered.