Ontology
D 58 completedPipeline State
completed| # | Status | Phase | Started | Finished | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Same scanner, your repo: https://repobility.com — Repobility | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #83469 | failed | — | 2026-03-20 21:40:52 | 2026-03-20 21:45:53 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Pipeline Metadata
🧪 Code Distillation
Browse all specs →AI Prompt
Catalog Information
The Propeller Ontology project provides an ontology-first architecture for property management, generating a fully functional REST API from a single CUE schema.
Description
Propeller Ontology is an innovative approach to property management that uses a declarative language called CUE as the single source of truth. This CUE schema generates everything downstream, including database schemas, HTTP handlers, API definitions, event catalogs, authorization policies, and agent tooling. The project includes 15 entities across four domains, with state machines defined for each entity with a status field. Code generators are used to automate the generation of code from the CUE schema.
الوصف
مشروع ontology أولوية مشروع property management هي نهج مبتكر في إدارة العقارات يستخدم لغة تعريفية اسمها CUE ك مصدر حقيقي واحد. يتم إنشاء كل شيء downstream من هذا المصدر الواحد، بما في ذلك قواعد البيانات ، ووكلاء HTTP ، وتحديدات API ، وقوائم الأحداث ، سياسات التأشير ، و أدوات एजنت . يحتوي المشروع على 15 كيانًا عبر أربعة مجالات ، مع وضع آلات الحالة لكل كيان له حقل status. يتم استخدام جيلر الكود لتحويل تلقائيًا إنشاء الكود من المصدر الواحد CUE.
Novelty
9/10Tags
Technologies
Claude Models
Quality Score
Strengths
- CI/CD pipeline configured (github_actions)
- Consistent naming conventions (snake_case)
- Good security practices \u2014 no major issues detected
Weaknesses
- No LICENSE file \u2014 legal ambiguity for contributors
- 31814 duplicate lines detected \u2014 consider DRY refactoring
- 64 'god files' with >500 LOC need decomposition
Recommendations
- Add a linter configuration to enforce code style consistency
- Add a LICENSE file (MIT recommended for open source)
Security & Health
Languages
Frameworks
Symbols
Concepts (11)
| Category | Name | Description | Confidence | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| All rows above produced by Repobility · https://repobility.com | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ai_architecture | Architecture Description | # Architecture Overview: ontology-service ## 1. Executive Summary The **ontology-service** is a Go‑based REST API that exposes an ontology of real‑estate entities (accounts, properties, leases, etc.) to internal business applications. It serves primarily the internal product team and partners that need to query, mutate, and index ontology data. The system follows a **hexagonal (ports & adapters)** style, with a thin presentation layer (HTTP handlers) that delegates to a service layer, which in turn orchestrates domain logic via the Ent ORM. The codebase is mature (auto‑generated entities, migrations, and OpenAPI spec) but still evolving; a key strength is the use of **Ent** for type‑safe persistence, while a key risk is the reliance on in‑memory activity stores that may not scale beyond a single instance. ## 2. System Architecture Diagram ```mermaid graph TD subgraph Presentation HTTP[HTTP Server] -->|JSON| Router[chi Router] end subgraph Application Router -->|Handler| Service[Service Layer] end subgraph Domain Service -->|Ent Client| Ent[Ent ORM] Service -->|Event Bus| EventBus[Event Emitter] end subgraph Infrastructure Ent -->|PostgreSQL| DB[PostgreSQL] EventBus -->|In‑memory| Activity[Activity Indexer] end subgraph CLI CLI -->|Codegen| EntGen[cmd/entgen] CLI -->|OpenAPI| OpenAPIGen[cmd/openapigen] end subgraph DevOps Makefile -->|Build| Docker[Docker] .air.toml -->|Live reload| Air[Air] end ``` ## 3. Architectural Layers | Layer | Responsibility | Key files/directories | Boundary enforcement | Dependencies | |-------|----------------|-----------------------|----------------------|--------------| | **Presentation** | Exposes HTTP endpoints, parses requests, serialises responses, applies middleware. | `cmd/server/main.go`, `cmd/server/*_handler.go` (if any) | Strict – only imports `net/http`, `chi`, `zap`, and the service layer. | `application/service`, `infrastructure/logging` | | **Application / Service** | Orchestrates business use‑cases, validates input, calls domain services, publishes events. | `internal/activity`, `cmd/server/*_handler.go` | Moderate – service functions are exported from `internal/activity` and used by handlers. | `domain`, `infrastructure/database` | | **Domain** | Encapsulates business entities and rules. | `ent/schema/*` (e.g., `ent/schema/account.go`), `ent/*` (generated code). | Loose – generated code is in `ent/` but domain logic is minimal; most rules are expressed via Ent queries. | `application/service` | | **Infrastructure** | Persistence, event bus, logging, migrations. | `ent/migrate/migrations/*`, `ent/tx.go`, `internal/activity/memory_store.go`, `cmd/server/main.go` | Moderate – infrastructure packages are imported by service layer but not vice‑versa. | `domain`, `application/service` | | **CLI / DevOps** | Code generation, OpenAPI spec, migrations, live reload. | `cmd/*`, `Makefile`, `.air.toml`, `buf.gen.yaml`, `codegen/apigen.cue` | Not a runtime layer; used only during development/build. | N/A | ## 4. Component Catalog | Component | Location | Responsibility | Public Interface | Dependencies | Dependents | |-----------|----------|----------------|------------------|--------------|------------| | **HTTP Server** | `cmd/server/main.go` | Starts the HTTP server, registers routes, applies middleware. | `func main()`, `func newRouter(*ent.Client) *chi.Mux` | `ent.Client`, `internal/activity`, `zap.Logger` | N/A | | **Ent ORM** | `ent/` (generated) | Provides CRUD for entities (Account, Property, Lease, etc.). | `ent.Client`, `ent.Account`, `ent.Property` | `database/sql`, `pgx` | HTTP Server, Service Layer | | **Event Bus** | `internal/activity/indexer.go`, `internal/activity/memory_store.go` | Publishes and indexes domain events (Observer pattern). | `func (i *Indexer) Publish(event Event)` | `zap.Logger`, `sync.Mutex` | HTTP Handlers, CLI tools | | **Code Generator** | `cmd/entgen/main.go` | Generates Ent code from schema definitions. | `func main()` | `ent/schema`, `go generate` | N/A | | **OpenAPI Generator** | `cmd/openapigen/main.go` | Generates OpenAPI spec from Ent schema. | `func main()` | `codegen/apigen.cue`, `ent/schema` | Documentation, API clients | | **CLI Tools** | `cmd/agentgen`, `cmd/apigen`, `cmd/agentgen/main.go` | Generates agents, API clients, etc. | `func main()` | `ent/schema`, `codegen` | N/A | | **Activity Store** | `internal/activity/memory_store.go` | In‑memory persistence of activity events. | `func NewMemoryStore() *MemoryStore` | `sync.Map`, `zap.Logger` | Service Layer, Tests | ## 5. Component Interactions The HTTP server receives a request, validates it, creates a domain entity via the Ent client, publishes an event, and returns a JSON response. ```mermaid sequenceDiagram participant Client participant Server as HTTP Server participant Service as Service Layer participant ORM as Ent ORM participant DB as PostgreSQL participant Bus as Event Bus Client->>Server: POST /properties Server->>Service: handleCreateProperty(request) Service->>ORM: client.Property.Create().SetName("Lakeview").Exec(ctx) ORM->>DB: INSERT INTO properties (...) ORM-->>Service: propertyID Service->>Bus: Publish(PropertyCreated{ID: propertyID}) Bus->>Server: (none – async) Server->>Client: 200 OK { "id": propertyID } ``` ### Key Points * **Handlers** (`cmd/server/*_handler.go`) only call exported service functions; they never import domain or infrastructure directly. * The **Event Bus** is used by the service layer to publish events; the bus itself is in‑memory and does not persist across restarts. * **CLI tools** invoke `go generate` or `entgen` during development; they do not interact at runtime. ## 6. Data Flow | Step | Source | Transformation | Destination | |------|--------|----------------|-------------| | 1 | HTTP request (JSON) | `json.Decoder` → Go struct (`CreatePropertyRequest`) | HTTP Handler | | 2 | Handler | Validation (struct tags, custom logic) | Service Layer | | 3 | Service | `ent.Client.Property.Create().SetName(req.Name).Exec(ctx)` | Ent ORM | | 4 | ORM | SQL `INSERT` via `pgx` driver | PostgreSQL | | 5 | Service | `activity.Indexer.Publish(PropertyCreated{ID: id})` | Event Bus | | 6 | Handler | Marshal entity to JSON | HTTP Response | ## 6. Technology Decisions | Decision | Rationale | Evidence | |----------|-----------|----------| | **Go 1.20** | Modern language features, better performance, and long‑term support. | `go.mod` line 1: `go 1.20` | | **Ent ORM** | Type‑safe, auto‑generated persistence layer that reduces boilerplate. | `ent/` directory contains ~200 files; `ent/migrate/migrations/20260225212726_init.sql` defines tables. | | **chi Router** | Minimal, composable router that keeps the presentation layer thin. | `cmd/server/main.go` imports `github.com/go-chi/chi/v5`. | | **zap Logger** | Structured, high‑performance logging. | `cmd/server/main.go` imports `go.uber.org/zap`. | | **PostgreSQL + pgx** | Relational store for ontology data; connection pooling via `pgxpool`. | `ent/migrate/migrations/20260225212726_init.sql` contains `CREATE TABLE` statements. | | **CUE + buf** | Generates OpenAPI spec and ensures schema consistency. | `codegen/apigen.cue` (CUE) + `buf.gen.yaml` (protobuf) | | **Air (live reload)** | Speeds up development by reloading on file changes. | `.air.toml` in root. | ## 7. Scalability & Performance | Concern | Current State | Mitigation | |---------|---------------|------------| | **Database** | PostgreSQL is the single source of truth; connection pooling via `pgxpool` is used. | Increase pool size, add read replicas, consider sharding for large datasets. | | **Activity Indexer** | In‑memory store (`internal/activity/memory_store.go`) is local to the process. | Replace with a distributed cache ( | 85% | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| design_pattern | Middleware/Pipeline | Found middleware-named files | 80% | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| auto_description | Project Description | An ontology-first architecture for property management where a CUE schema is the single source of truth and code generators derive everything downstream: database schemas, HTTP handlers, API definitions, event catalogs, authorization | 80% | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| design_pattern | Observer/Event Emitter | Found event emission/subscription patterns | 70% | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| arch_layer | testing | Detected testing layer | 70% | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| auto_category | Data/ML | data-ml | 70% | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| business_logic | User Management | Detected from 27 related files | 50% | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| business_logic | Database | Detected from 22 related files | 50% | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| business_logic | Logging | Detected from 10 related files | 50% | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| business_logic | Search | Detected from 18 related files | 50% | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| business_logic | Testing | Detected from 8 related files | 50% | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Embed Badge
Add to your README:
