Family organiser app for Eagraí Clainne (eagraiclainne.ie).
  • Go 41.4%
  • Kotlin 39%
  • TypeScript 16.3%
  • CSS 2.1%
  • CUE 0.4%
  • Other 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Luke Mallon 81448742a6
Some checks are pending
release / docs (push) Waiting to run
release / release (push) Blocked by required conditions
release / android (push) Waiting to run
release / module (push) Blocked by required conditions
release / manifests (push) Blocked by required conditions
release / image (push) Waiting to run
check / go (push) Has started running
check / web (push) Has started running
tag / tag (push) Successful in 30m27s
release / binaries (push) Has started running
fix: update the cosign public key
2026-08-11 19:47:28 +01:00
.dagger feat!: rename famorgasy to Eagraí Clainne 2026-08-11 15:47:15 +01:00
.gitea/workflows feat!: rename famorgasy to Eagraí Clainne 2026-08-11 15:47:15 +01:00
.github feat!: rename FAM_ env prefix to EAG_ 2026-08-11 16:23:19 +01:00
android refactor: purge residual fam- prefixes from icons and dashboards 2026-08-11 16:23:19 +01:00
cmd feat!: rename FAM_ env prefix to EAG_ 2026-08-11 16:23:19 +01:00
deploy refactor: purge residual fam- prefixes from icons and dashboards 2026-08-11 16:23:19 +01:00
docs refactor: purge residual fam- prefixes from icons and dashboards 2026-08-11 16:23:19 +01:00
docsite feat!: rename famorgasy to Eagraí Clainne 2026-08-11 15:47:15 +01:00
gen feat!: rename FAM_ env prefix to EAG_ 2026-08-11 16:23:19 +01:00
internal feat!: rename FAM_ env prefix to EAG_ 2026-08-11 16:23:19 +01:00
pkg feat!: rename FAM_ env prefix to EAG_ 2026-08-11 16:23:19 +01:00
proto/api/core/v1 feat!: rename FAM_ env prefix to EAG_ 2026-08-11 16:23:19 +01:00
tools feat!: rename famorgasy to Eagraí Clainne 2026-08-11 15:47:15 +01:00
web feat!: rename FAM_ env prefix to EAG_ 2026-08-11 16:23:19 +01:00
.dockerignore feat(web): frontend foundation, sign-in profile picker, and Today board 2026-08-07 19:29:41 +01:00
.env.example feat!: rename FAM_ env prefix to EAG_ 2026-08-11 16:23:19 +01:00
.gitignore feat!: rename famorgasy to Eagraí Clainne 2026-08-11 15:47:15 +01:00
AGENTS.md feat!: rename FAM_ env prefix to EAG_ 2026-08-11 16:23:19 +01:00
buf.gen.android.yaml feat!: rename famorgasy to Eagraí Clainne 2026-08-11 15:47:15 +01:00
buf.gen.yaml feat!: rename famorgasy to Eagraí Clainne 2026-08-11 15:47:15 +01:00
buf.yaml feat!: rename famorgasy to Eagraí Clainne 2026-08-11 15:47:15 +01:00
CLAUDE.md feat!: rename FAM_ env prefix to EAG_ 2026-08-11 16:23:19 +01:00
cosign.pub fix: update the cosign public key 2026-08-11 19:47:28 +01:00
dagger.json feat!: rename famorgasy to Eagraí Clainne 2026-08-11 15:47:15 +01:00
devbox.json chore: everything states its version 2026-08-07 19:29:41 +01:00
devbox.lock chore: refresh devbox.lock after a devbox update 2026-08-07 19:29:41 +01:00
Dockerfile feat!: rename FAM_ env prefix to EAG_ 2026-08-11 16:23:19 +01:00
go.mod feat!: rename famorgasy to Eagraí Clainne 2026-08-11 15:47:15 +01:00
go.sum feat(docs): generated docs site via cmd/docsgen 2026-08-08 21:53:18 +01:00
LICENSE chore: add gitignore, license and readme 2026-08-07 19:19:27 +01:00
LOCAL_DEVELOPMENT.md feat!: rename FAM_ env prefix to EAG_ 2026-08-11 16:23:19 +01:00
Makefile feat!: rename FAM_ env prefix to EAG_ 2026-08-11 16:23:19 +01:00
README.md feat!: rename famorgasy to Eagraí Clainne 2026-08-11 15:47:15 +01:00

Eagraí Clainne

Family Organization System - A gRPC-based application for organizing family activities, events, items, and rewards.

Overview

Eagraí Clainne is a Go-based backend service that provides APIs for managing family organization tasks including:

  • User Management: Create and manage family member accounts with authentication
  • Events: Schedule and coordinate family events with participant tracking
  • Items: Track family items and assign them to users with deadlines
  • Rewards: Create reward systems and allow users to claim rewards

The service is built using:

  • Connect RPC (gRPC-compatible protocol)
  • Protocol Buffers for API definitions
  • PostgreSQL for data persistence
  • JWT authentication with role-based access control (RBAC)

Client Library

A Go client library is available in pkg/client/ for building CLI tools and applications:

import "eagraiclainne.ie/pkg/client"

c, _ := client.New("http://localhost:8080", nil)
loginResp, _ := c.Users.Login(ctx, "user@example.com", "password")
c.SetAuthToken(loginResp.Token)
event, _ := c.Events.Create(ctx, &client.CreateEventParams{...})

See pkg/client/README.md for full documentation and examples.

Architecture

The project follows a clean architecture with clear separation of concerns:

cmd/server/          - Server entry point and configuration
internal/
  auth/              - Authentication, JWT handling, RBAC, and interceptors
  database/          - Database abstraction layer with generic table operations
  services/          - Business logic for each domain (user, event, item, reward)
proto/api/core/v1/   - Protocol Buffer API definitions
gen/go/api/core/v1/  - Generated Go code from Protocol Buffers

Development Setup

📖 For detailed local development instructions, see LOCAL_DEVELOPMENT.md

Quick Start

Local development runs on a kind cluster (see deploy/README.md):

# One-time: bootstrap the kind cluster + local registry
make cluster-up

# Build the image and deploy database, observability and app
make deploy

# Fresh database only: seed a family to log in with
make seed-family

The app is then available at http://localhost:8080.

Before committing, run:

make check   # fmt, vet, lint, test

Alternative: Using Devbox

This project also supports devbox for reproducible development environments:

# Install devbox
curl -fsSL https://get.jetpack.io/devbox | bash

# Enter devbox shell
devbox shell

# Follow the Quick Start steps above

Development Commands

Building

go build ./...                                    # Build all packages
go build -o ./bin/server ./cmd/server            # Build server executable

Testing

go test ./...                                     # Run all tests
go test -v ./internal/database/ -run TestName    # Run specific test

Code Quality

go fmt ./...           # Format code
go vet ./...           # Vet code for errors
golangci-lint run      # Run linter

Protocol Buffers

buf generate           # Generate Go code from .proto files
buf lint               # Lint protocol buffer definitions

Environment Variables

Variable Default Description
DB_HOST localhost PostgreSQL host
DB_PORT 5432 PostgreSQL port
DB_USER postgres Database user
DB_PASSWORD (empty) Database password
DB_NAME Eagraí Clainne Database name
DB_SSLMODE disable SSL mode for database connection

API Services

The following Connect RPC services are available:

  • UserService: User registration, login, profile management
  • EventService: Event creation, updates, user participation
  • ItemService: Item tracking, user assignment, deadline management
  • RewardService: Reward creation, claiming, user reward tracking
  • ApiKeyService: Admin-managed machine credentials (API keys)

MCP Endpoint

The server speaks the Model Context Protocol at /mcp (streamable HTTP), so Claude and other MCP clients can work the family data with the tools list_items, add_item, complete_item, list_events and add_event. Authenticate with an API key (mint one in the web Admin → Keys panel, or with eagraiclainne apikey create):

claude mcp add eagraiclainne --transport http http://localhost:8080/mcp \
  --header "Authorization: Bearer <api-key-token>"

A personal key acts as one member. A standalone key (for a shared device such as Home Assistant) names who actually acted per call via acting_user, honoured only against its admin-set allowlist. See ADR-0016.

Authentication & Authorization

The service implements JWT-based authentication with RBAC:

  • Users authenticate via the Login RPC
  • JWT tokens are required for most operations (via Authorization header)
  • Roles determine access permissions (Admin, Member, Guest)
  • Admin-managed API keys serve machine clients; the key record is the authority (per-key revocation, acting-user allowlists) — see ADR-0016
  • See ADR-0007, ADR-0008, and ADR-0009 for details

ADR Process

For significant changes, we record Architecture Decision Records (ADRs). ADRs document design decisions and their rationale for:

  • New authentication/authorization systems
  • Database schema changes
  • New API services or significant endpoint additions
  • Major refactoring affecting multiple packages
  • Changes to core architecture or design patterns

ADRs are stored in docs/adr/<nnnn>-<topic>.md and should include sections for context, decision, consequences, and alternatives considered. Existing ADRs are in docs/adr/.

Database Schema

The database schema is defined in internal/database/schema.sql and includes tables for:

  • Users and authentication
  • Events and event participants
  • Items and item assignments
  • Rewards and reward claims

The database layer provides generic, type-safe operations using Go generics.

Contributing

  1. Follow Go best practices and project conventions
  2. Write tests for new functionality
  3. Record an ADR for significant architectural changes
  4. Ensure all tests pass and linting is clean before submitting

License

See LICENSE file for details.