Skip to main content

Crate peisear_core

Crate peisear_core 

Source
Expand description

Pure domain types shared across the workspace.

This crate intentionally depends only on serde, chrono, and thiserror; it has no knowledge of axum, sqlx, jsonwebtoken, or any other runtime concern. Consumers include:

  • peisear-storage: constructs values of these types from DB rows
  • peisear-web: receives them from storage and feeds them to handlers / Leptos components
  • future peisear-cli or admin tools that will speak the same domain vocabulary without pulling in the web stack

Modules§

notifications
Notification subsystem types.
personal_metrics
Per-user metrics scoped to a single user, intended for that user’s personal dashboard. By design this is not exposed to other users — see the brief in peisear-プロジェクトヘルス最適化とヒューマンバーンダウン防止機能向け拡張開発指示書.md (V2.1) §0.2 and §2.5: “個人活動の詳細は必要最小限だけ共有する”.
project_health
Project-level health indicators.
sprints
Sprint: a team-scoped, time-boxed unit of planning (0.15.0).
teams
Team / membership / role types (0.14.0).
user_burnout
Per-user fatigue / burnout signals.

Structs§

AssigneeOption
One entry in the assignee <select> on the issue form.
CurrentUser
Compact view of the authenticated user attached to requests.
Issue
Project
User
UserLoad
One row of the per-project workload report: how much in-flight effort a user is currently carrying versus their stated capacity.

Enums§

HealthIndicator
Coarse-grained classification used across the health / burnout indicator family. The same three-step palette applies whether the subject is a project, a user, or (in the future) a team — callers reuse this enum and its HealthIndicator::badge_class method instead of inventing parallel ones.
IssueStatus
Priority
WorkloadState
Coarse-grained workload classification, used for badge colouring and warning surfaces. Computed from a UserLoad via workload_state.

Constants§

EFFORT_PRESETS
Effort estimate presets shown in the UI.

Functions§

projected_workload_state
Project the post-save workload for a “what if” preview on the issue form. Adds delta story points to the existing in-flight, then re-classifies.
workload_state
Classify a workload snapshot. Pure function; no DB access.