# owlcs/pizza-ontology architecture

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

- Interactive diagram: https://gitdiagram.com/owlcs/pizza-ontology
- Repository: https://github.com/owlcs/pizza-ontology

## Overview

##### Project type and purpose
- This is not a typical “frontend/backend” app but a semantic‐web ontology project. The sole content is pizza.owl, an OWL ontology describing pizza concepts (classes, properties, individuals). Its purpose is to define a shared vocabulary for pizzas that can be consumed by reasoners, triple stores, and other semantic-web clients.

##### File structure
- Top level only contains:
- README.md (short description)
- pizza.owl (the ontology in OWL/RDF format)
- .gitignore
- There are no code modules, no build scripts, no separate service directories. All the “system” is the ontology file itself.

##### README for additional insights
- The README only reiterates “The pizza ontology.”
- No further architectural clues (no SPARQL endpoints, no documentation of consumers).

a. Main components to show:
- pizza.owl (the core OWL model)
- OWL/RDF Parser & RDF Graph in memory
- Reasoner (e.g., HermiT, Pellet)
- Triple store or RDF database (optional)
- Client applications or tools (e.g., Protégé UI, SPARQL query console, Java/Python semantic-web clients)
b. Relationships & interactions:
- The parser loads pizza.owl into an in-memory graph.
- The reasoner consumes that graph to infer class hierarchies, property domains/ranges, etc.
- An application or SPARQL endpoint queries the graph (pre- or post-reasoning).
- Optionally the graph can be persisted into a triple store for reuse.
c. Architectural patterns / design principles:
- Separation of concerns: ontology model vs. reasoning vs. querying vs. persistence.
- Standard semantic-web stack (OWL/RDF → reasoner → store → client).
d. Relevant technologies:
- OWL 2 DL (ontology language)
- RDF/XML or Turtle (serialization)
- OWL API or Jena (for parsing/loading)
- Reasoner engines (HermiT, Pellet)
- Triple store (e.g., GraphDB, Fuseki)
- UI tools (Protégé) or SPARQL endpoints

##### Detailed yet focused guidance
- Don’t overcomplicate: treat each step in the semantic-web pipeline as its own component.
- Every essential element—from the raw OWL file through to client consumption.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Ontology Artifact"
        OWLFile["pizza.owl"]:::artifact
    end
    click OWLFile "https://github.com/owlcs/pizza-ontology/blob/master/pizza.owl"

    Parser["OWL Parser (OWL API / Jena)"]:::process
    Graph["In-memory RDF Graph"]:::component
    Reasoner["Reasoner (HermiT / Pellet)"]:::process
    EnrichedGraph["Enriched RDF Graph"]:::component
    TripleStore["Triple Store\n(GraphDB / Fuseki)"]:::db
    SPARQLEnd["SPARQL Endpoint"]:::component

    subgraph "Clients"
        Protege["Protégé UI"]:::client
        SPARQLUI["SPARQL Query Console"]:::client
        Apps["Java / Python Clients"]:::client
    end

    OWLFile -->|"load ontology"| Parser
    Parser -->|"build graph"| Graph
    Graph -->|"run reasoning"| Reasoner
    Reasoner -->|"generate inferences"| EnrichedGraph
    EnrichedGraph -->|"persist data"| TripleStore
    TripleStore -->|"expose SPARQL"| SPARQLEnd
    Protege -->|"load / inspect"| SPARQLEnd
    SPARQLUI -->|"execute queries"| SPARQLEnd
    Apps -->|"access via API"| SPARQLEnd

    subgraph "Project Files"
        README["README.md"]:::artifact
        GitIgnore[".gitignore"]:::artifact
    end
    click README "https://github.com/owlcs/pizza-ontology/blob/master/README.md"
    click GitIgnore "https://github.com/owlcs/pizza-ontology/blob/master/.gitignore"

    classDef artifact fill:#FFD580,stroke:#333,stroke-width:1px
    classDef process fill:#C2E7C5,stroke:#333,stroke-width:1px
    classDef component fill:#A0DFFF,stroke:#333,stroke-width:1px
    classDef db fill:#FFB380,stroke:#333,stroke-width:1px
    classDef client fill:#FFCCE5,stroke:#333,stroke-width:1px
```
