# easystep2/opensource-base-app architecture

> Architecture diagram of the GitHub repository easystep2/opensource-base-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/easystep2/opensource-base-app
- Repository: https://github.com/easystep2/opensource-base-app

## Overview

##### Project type and purpose
- This is a Microsoft Dynamics 365 Business Central AL extension (an “open-source base app”) that adds manufacturing/location planning features on top of the Base Application.
- The purpose is to provide modules—especially Location and Planning Management—by extending standard tables and pages and adding codeunits and enums for new business logic.

##### File structure
- Top‐level files:
- app.json – the AL extension manifest (defines name, version, dependencies).
- ES2BASEADMIN.permissionset.al – defines a new permission set for the extension.
- README.md, LICENSE files, .gitignore, code‐workspace.
- Modules under src/modules:
- Location: contains a table extension (ES2Location.TableExt.al), a page extension (ES2LocationCard.PageExt.al), two codeunits (ES2PlanningManagement.Codeunit.al and ES2PlanningManagementImpl.Codeunit.al), and a new enum (ES2WarehouseTypes.Enum.al).
- resources/img holds artwork (e.g. logo).
- translations folder holds XLIFF files for multiple languages.

##### README
- Minimal info (“Project Manufacturing”) but implies this app is focused on manufacturing/location management.

##### Detail orientation
1. Development layer (VS Code, Git)
2. Build/deploy (AL compiler, .app)
3. Runtime layer (BC Platform + Base App)
4. Extension layer (your modules, translations, resources)
- Interfaces (events/subscriptions) and dependencies (app.json dependencies on Base App).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Development Layer
    subgraph "Development Layer"
        VSCode["VS Code + AL Language"]:::external
        Git["Git Repository"]:::external
        Workspace["Workspace Configuration"]:::external
    end

    %% Build/Deploy Layer
    subgraph "Build/Deploy Layer"
        Compiler["AL Compiler"]:::external
        AppFile[".app Package"]:::external
    end

    %% Runtime Layer
    subgraph "Runtime Layer"
        BC["Business Central Platform"]:::external
        BaseApp["Base Application"]:::external
    end

    %% Extension Package Layer
    subgraph "Extension Package"
        Manifest["app.json"]:::external
        Permissions["ES2BASEADMIN.permissionset.al"]:::alobject
        Resources["resources/img"]:::resource
        Translations["translations/*.xlf"]:::resource
        subgraph "Modules"
            ModulesRoot["src/modules"]:::external
            subgraph "Location Module"
                TableExt["ES2Location.TableExt"]:::alobject
                PageExt["ES2LocationCard.PageExt"]:::alobject
                CodeInt["ES2PlanningManagement.Codeunit"]:::alobject
                CodeImpl["ES2PlanningManagementImpl.Codeunit"]:::alobject
                Enum["ES2WarehouseTypes.Enum"]:::alobject
            end
        end
    end

    %% Connections
    VSCode -->|develops| Workspace
    Git -->|version control| Workspace
    VSCode -->|compile| Compiler
    Workspace -->|compile| Compiler
    Compiler -->|outputs| AppFile
    AppFile -->|deploys to| BC
    BC -->|hosts| BaseApp

    %% Extension integration
    Manifest -->|defines dependencies| Compiler
    AppFile -->|includes| Manifest
    AppFile -->|includes| Permissions
    AppFile -->|includes| Resources
    AppFile -->|includes| Translations
    AppFile -->|includes| ModulesRoot

    ModulesRoot --> LocationDir["src/modules/Location"]:::external

    TableExt -->|extends| BaseApp
    PageExt -->|extends| BaseApp
    PageExt -->|invokes| CodeInt
    CodeInt -->|implements interface| CodeImpl
    CodeImpl -->|reads/writes| TableExt
    Enum -->|provides values| PageExt
    Permissions -->|grants access to| TableExt
    Permissions -->|grants access to| PageExt
    Translations -->|localizes| TableExt
    Translations -->|localizes| PageExt
    Resources -->|assets for| PageExt

    BC -->|runs extension| TableExt
    BC -->|runs extension| PageExt

    %% Click Events
    click Manifest "https://github.com/easystep2/opensource-base-app/blob/main/app.json"
    click Permissions "https://github.com/easystep2/opensource-base-app/blob/main/ES2BASEADMIN.permissionset.al"
    click Workspace "https://github.com/easystep2/opensource-base-app/blob/main/opensource-base-app.code-workspace"
    click Resources "https://github.com/easystep2/opensource-base-app/tree/main/resources/img"
    click Translations "https://github.com/easystep2/opensource-base-app/blob/main/translations/Open Source Base App*.xlf"
    click ModulesRoot "https://github.com/easystep2/opensource-base-app/tree/main/src/modules"
    click LocationDir "https://github.com/easystep2/opensource-base-app/tree/main/src/modules/Location"
    click TableExt "https://github.com/easystep2/opensource-base-app/blob/main/src/modules/Location/ES2Location.TableExt.al"
    click PageExt "https://github.com/easystep2/opensource-base-app/blob/main/src/modules/Location/ES2LocationCard.PageExt.al"
    click CodeInt "https://github.com/easystep2/opensource-base-app/blob/main/src/modules/Location/ES2PlanningManagement.Codeunit.al"
    click CodeImpl "https://github.com/easystep2/opensource-base-app/blob/main/src/modules/Location/ES2PlanningManagementImpl.Codeunit.al"
    click Enum "https://github.com/easystep2/opensource-base-app/blob/main/src/modules/Location/ES2WarehouseTypes.Enum.al"

    %% Styles
    classDef alobject fill:#cfe2f3,stroke:#2a4d69,color:#0b1d47
    classDef resource fill:#d9ead3,stroke:#38761d,color:#274e13
    classDef external fill:#f2f2f2,stroke:#888888,color:#333333
```
