Domain: Goal entity, UserSettings (federation toggle), RemoteGoalEntry.
Ports: GoalRepository, UserSettingsRepository, RemoteGoalRepository.
Adapters: sqlite + postgres repos, migrations, AP content query extensions.
Application: CRUD use cases (create/update/delete/get/list), settings use cases.
API: 7 endpoints (/goals CRUD, /users/{id}/goals, /settings) with utoipa docs.
Federation: GoalObject (Note + goal discriminator), outbound broadcast with
per-user toggle, inbound GoalObjectHandler in CompositeObjectHandler.
SPA: API client + hooks, GoalCard (shadcn Card+Progress+DropdownMenu),
GoalSheet (Drawer), profile integration (editable own, read-only others),
federation toggle in settings (Switch).
Classic HTML: glassmorphic goal card on profile, Frutiger Aero styling.
Progress computed from existing reviews — backwards compatible.
12 lines
245 B
Rust
12 lines
245 B
Rust
use chrono::{DateTime, Utc};
|
|
|
|
#[derive(Clone, Debug)]
|
|
pub struct RemoteGoalEntry {
|
|
pub ap_id: String,
|
|
pub actor_url: String,
|
|
pub year: u16,
|
|
pub target_count: u32,
|
|
pub current_count: u32,
|
|
pub received_at: DateTime<Utc>,
|
|
}
|