-
Notifications
You must be signed in to change notification settings - Fork 61
Description
Problem Statement
Currently, Summit maintains a large portion of application configuration and feature control logic inside the frontend codebase.
This includes decisions related to feature enablement, UI behavior, access policies, defaults, and integration flags.
Keeping such configuration in the frontend introduces architectural and operational challenges and weakens Summit’s core positioning as an eCommerce product.
Why This Is a Problem
Storing configuration in the frontend leads to:
- Tight coupling between business rules and UI code
- Rebuild & redeploy requirements for simple configuration changes
- Higher risk of configuration drift across environments
- Limited backend authority, despite ERPNext being the system of record
- Poor scalability for future backend integrations or extensibility
- Reduced flexibility for operations and non-developer stakeholders
In short, the frontend becomes a configuration owner, which is not its responsibility.
Proposed Direction
All application configuration should be:
- Owned and persisted in the backend (ERPNext)
- Exposed via a dedicated backend API
- Consumed by the frontend at build or runtime
- Treated as data, not code
The frontend should only:
- Define types / schemas for the expected configuration
- Provide fallback defaults where absolutely necessary
- Adapt UI and behavior based on backend-provided settings
Scope of Change
This change applies to (but is not limited to):
- Feature enablement flags
- UI behavior toggles
- Authentication and access policies
- Product and catalog behavior
- Default values (currency, language, pagination, etc.)
- Analytics and integration switches
- Meta and SEO-related configuration
Benefits
- Clear separation of concerns
- Backend becomes the single source of truth
- Reduced frontend complexity and churn
- Predictable operational workflows
- Safer deployments and easier maintenance
- Stronger alignment with Summit’s ERP-first philosophy
Acceptance Criteria
- No application-level configuration is hardcoded in the frontend
- ERPNext exposes a stable configuration API
- Frontend consumes configuration without embedding business logic
- Configuration changes do not require frontend code changes
- Frontend remains backend-agnostic and declarative
Notes
This change is architectural, not cosmetic.
It establishes a long-term foundation for Summit’s scalability, maintainability, and ERP-centric design.
Labels
architectural, very-high-priority