No description
  • Go 71.3%
  • TypeScript 24.8%
  • HTML 3.9%
Find a file
Snider 1033a332af chore(repo): refresh submodules + go.work hygiene (Phase 2 cascade unblock)
- git submodule update on external/* to current dev tips
- go.work paths fixed for Phase 1 /go/ subtree layout where stale
- go.work go-version bumped 1.26.0 → 1.26.2 to match submodule floor

Workspace-mode build (`go build ./...`) is the verification path. Some
repos may surface transitive dep issues (api/go.sum checksum drift, etc.)
which are separate cascade tickets — not blocking this metadata refresh.

Co-Authored-By: Cladius Maximus <cladius@lethean.io>
2026-05-01 09:38:38 +01:00
.core feat: modernise template with core/go-api provider pattern 2026-03-14 09:49:41 +00:00
.github/workflows feat: Create template for custom HTML elements 2025-11-10 02:59:45 +00:00
docs refactor(go): restructure to /go/ subtree + audit COMPLIANT (Mantis #1280) 2026-05-01 05:39:07 +01:00
external chore(repo): refresh submodules + go.work hygiene (Phase 2 cascade unblock) 2026-05-01 09:38:38 +01:00
go refactor(go): restructure to /go/ subtree + audit COMPLIANT (Mantis #1280) 2026-05-01 05:39:07 +01:00
ui feat: modernise template with core/go-api provider pattern 2026-03-14 09:49:41 +00:00
.gitignore chore: add .core/ and .idea/ to .gitignore 2026-03-15 15:39:08 +00:00
.gitmodules refactor(go): restructure to /go/ subtree + audit COMPLIANT (Mantis #1280) 2026-05-01 05:39:07 +01:00
.goreleaser.yaml feat: Create template for custom HTML elements 2025-11-10 02:59:45 +00:00
.woodpecker.yml ci: woodpecker pipeline (Go) — golangci-lint/eslint/phpstan + sonar.lthn.sh 2026-04-29 00:02:56 +01:00
AGENTS.md refactor(go): restructure to /go/ subtree + audit COMPLIANT (Mantis #1280) 2026-05-01 05:39:07 +01:00
CLAUDE.md feat: modernise template with core/go-api provider pattern 2026-03-14 09:49:41 +00:00
go.work chore(repo): refresh submodules + go.work hygiene (Phase 2 cascade unblock) 2026-05-01 09:38:38 +01:00
LICENCE chore: add EUPL-1.2 LICENCE file (UK English canonical) 2026-05-01 08:33:24 +01:00
LICENSE Revise EUPL text for clarity and consistency 2025-11-12 14:19:20 +00:00
README.md feat: modernise template with core/go-api provider pattern 2026-03-14 09:49:41 +00:00
sonar-project.properties ci: woodpecker pipeline (Go) — golangci-lint/eslint/phpstan + sonar.lthn.sh 2026-04-28 23:33:12 +01:00

Core Element Template

Starter template for building custom HTML elements backed by a Go API. Part of the Core ecosystem.

Quick Start

# Clone and rename
git clone https://forge.lthn.ai/core/element-template.git my-element
cd my-element

# Install UI dependencies and build
cd ui && npm install && npm run build && cd ..

# Run
go run . --port 8080

Open http://localhost:8080 — you'll see the <core-demo-element> fetching data from the Go API.

What's Included

Component Technology Purpose
Go backend core/go-api (Gin) REST API with CORS, middleware
Custom element Lit 3 Self-contained web component
Build config .core/build.yaml Cross-platform binary builds

Making It Yours

  1. Update go.mod module path
  2. Rename DemoProvider in provider.go — implement your API
  3. Rename CoreDemoElement in ui/src/index.ts — implement your UI
  4. Update the element tag in ui/index.html

Service Provider Pattern

The DemoProvider implements api.RouteGroup:

func (p *DemoProvider) Name() string { return "demo" }
func (p *DemoProvider) BasePath() string { return "/api/v1/demo" }
func (p *DemoProvider) RegisterRoutes(rg *gin.RouterGroup) {
    rg.GET("/hello", p.hello)
}

Register it with engine.Register(&DemoProvider{}) and it gets middleware, CORS, and OpenAPI for free. The same provider can plug into core/ide's registry.

Licence

EUPL-1.2