# plastikaweb/plastikspace architecture

> Architecture diagram of the GitHub repository plastikaweb/plastikspace, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/plastikaweb/plastikspace
- Repository: https://github.com/plastikaweb/plastikspace

## Overview

##### Project type and purpose
- This is an Nx-based monorepo hosting multiple Angular front-end applications (nasa-images, experimental, llecoop, plastikaweb, etc.), end-to-end test apps (Cypress), Firebase backends (hosting + Firestore, Cloud Functions triggers), and a large suite of reusable libraries (core and shared domains).
- Purpose: provide a playground for experiments and production-grade apps in Angular, TailwindCSS, Redux (NgRx), Firebase, GraphQL, with CI/CD via GitHub Actions.

##### File structure
- Top-level “apps” directory:
- Angular SPAs under apps/ (each with its own environment, routing, components, assets, styles).
- E2E test runners under apps/*-e2e (Cypress configurations).
- Firebase hosting under apps/llecoop-firebase (public folder, firestore rules).
- Cloud Functions under apps/llecoop-triggers (TypeScript functions for Firestore triggers).
- Top-level “libs” directory:
- “core” scoped libraries for layout, guards, NgRx data-access, routing, styles, utilities.
- “shared” scoped libraries for Authentication, Forms, Buttons, Tables, Notification, Storage, Signal-State, reusable UI, and utilities.
- Domain-specific libs under libs/llecoop, libs/nasa-images, libs/plastikaweb, etc.
- Tools and config: nx.json, tsconfig.base.json, GitHub workflows, Lerna/Yarn Workspaces, husky, ESLint, Prettier, Verdaccio (private NPM registry).

##### README for additional insights
- Architectural guidelines in documentation/nx-architecture.md.
- Emphasis on Nx generators, affected graph, dependency graph.
- CI/CD pipelines defined in .github/workflows for build, test, deploy (staging/production).

## Diagram (Mermaid)

```mermaid
flowchart TB
    monorepo["Monorepo Controller (Nx CLI & Workspace)"]:::control
    ci["GitHub Actions CI/CD"]:::ci
    nxcli["Nx CLI"]:::ci

    subgraph "Nx Workspace"
        subgraph "Apps"
            nasa["NASA Images Front-end"]:::app
            exp["Experimental App"]:::app
            lle["LLECoop App"]:::app
            plast["Plastikaweb App"]:::app

            subgraph "E2E Tests"
                nasa_e2e["NASA Images E2E"]:::e2e
                exp_e2e["Experimental E2E"]:::e2e
                lle_e2e["LLECoop E2E"]:::e2e
                plast_e2e["Plastikaweb E2E"]:::e2e
            end

            firebase_host["LLECoop Firebase Hosting"]:::backend
            triggers["LLECoop Cloud Functions"]:::backend
        end

        subgraph "Libraries"
            core["Core Libraries"]:::lib
            shared["Shared Libraries"]:::lib

            subgraph "Domain-Specific Libs"
                lle_lib["LLECoop Domain Libs"]:::lib
                nasa_lib["NASA Images Domain Libs"]:::lib
                plast_lib["Plastikaweb Domain Libs"]:::lib
                plast_gql["GraphQL Models"]:::lib
            end
        end
    end

    firestore["Firestore"]:::db
    storage["Storage"]:::db
    auth["Auth"]:::db

    nasaapi["NASA REST API"]:::ext
    gqlapi["GraphQL Endpoint"]:::ext

    monorepo -->|orchestrates| nxcli
    ci -->|triggers builds/tests| nxcli
    nxcli -->|builds| nasa & exp & lle & plast & core & shared & lle_lib & nasa_lib & plast_lib & plast_gql
    nasa -->|"imports"| core & shared & nasa_lib
    exp -->|"imports"| core & shared
    lle -->|"imports"| core & shared & lle_lib
    plast -->|"imports"| core & shared & plast_lib & plast_gql

    nasa --->|calls| firestore & storage & auth
    exp --->|calls| firestore & storage & auth
    lle --->|calls| firestore & storage & auth
    plast --->|calls| firestore & storage & auth

    nasaapi --->|data| nasa
    gqlapi --->|data| plast

    triggers --->|writes| firestore
    firestore --->|triggers| triggers

    nasa_e2e --->|tests| nasa
    exp_e2e --->|tests| exp
    lle_e2e --->|tests| lle
    plast_e2e --->|tests| plast

    ci -->|deploys| firebase_host
    ci -->|deploys| triggers

    classDef app fill:#E0F7FA,stroke:#006064
    classDef lib fill:#E8F5E9,stroke:#1B5E20
    classDef backend fill:#FFE0B2,stroke:#EF6C00
    classDef db fill:#FFEBEE,stroke:#B71C1C
    classDef ext fill:#EDE7F6,stroke:#5E35B1
    classDef ci fill:#F3E5F5,stroke:#6A1B9A
    classDef e2e fill:#E1F5FE,stroke:#0277BD
    classDef control fill:#FFF3E0,stroke:#FF6F00

    click monorepo "https://github.com/plastikaweb/plastikspace/blob/develop//nx.json"
    click nasa "https://github.com/plastikaweb/plastikspace/tree/develop//apps/nasa-images"
    click exp "https://github.com/plastikaweb/plastikspace/tree/develop//apps/experimental"
    click lle "https://github.com/plastikaweb/plastikspace/tree/develop//apps/llecoop"
    click plast "https://github.com/plastikaweb/plastikspace/tree/develop//apps/plastikaweb"
    click nasa_e2e "https://github.com/plastikaweb/plastikspace/tree/develop//apps/nasa-images-e2e"
    click exp_e2e "https://github.com/plastikaweb/plastikspace/tree/develop//apps/experimental-e2e"
    click lle_e2e "https://github.com/plastikaweb/plastikspace/tree/develop//apps/llecoop-e2e"
    click plast_e2e "https://github.com/plastikaweb/plastikspace/tree/develop//apps/plastikaweb-e2e"
    click firebase_host "https://github.com/plastikaweb/plastikspace/tree/develop//apps/llecoop-firebase"
    click triggers "https://github.com/plastikaweb/plastikspace/tree/develop//apps/llecoop-triggers"
    click core "https://github.com/plastikaweb/plastikspace/tree/develop//libs/core"
    click shared "https://github.com/plastikaweb/plastikspace/tree/develop//libs/shared"
    click lle_lib "https://github.com/plastikaweb/plastikspace/tree/develop//libs/llecoop"
    click nasa_lib "https://github.com/plastikaweb/plastikspace/tree/develop//libs/nasa-images"
    click plast_lib "https://github.com/plastikaweb/plastikspace/tree/develop//libs/plastikaweb"
    click plast_gql "https://github.com/plastikaweb/plastikspace/tree/develop//libs/plastikaweb/graphql-models"
```
