PhoenixKitProjects

A PhoenixKit plugin for project + task management: a reusable task library, projects that pull tasks in as assignments, per-project and per-template dependencies, schedule math with weekday/calendar awareness, and assignees sourced from phoenix_kit_staff.

Features

Installation

Add to your parent PhoenixKit app's mix.exs:

{:phoenix_kit_projects, "~> 0.33"}

(For local development inside the PhoenixKit workspace, use the path-dep form instead: {:phoenix_kit_projects, path: "../phoenix_kit_projects"}.)

phoenix_kit_staff and phoenix_kit_entities come with it as dependencies: this module's migrations reference their tables, so their migrations run first. This module maps its own read-only shadow schemas over staff's tables for the polymorphic assignee.

Also add the apps to extra_applications so PhoenixKit.ModuleDiscovery finds them:

def application do
  [extra_applications: [:logger, :phoenix_kit, :phoenix_kit_projects]]
end

Run mix deps.get, then toggle the module on from Admin > Modules.

Database

Tables are created by this module's own versioned chain, PhoenixKitProjects.Migrations.Schema, which runs staff's and entities' chains first. Run via mix phoenix_kit.install / mix phoenix_kit.update in the parent app.

The core tables are phoenix_kit_projects, phoenix_kit_project_tasks (the reusable library), phoenix_kit_project_assignments (a task in a project), phoenix_kit_project_dependencies and phoenix_kit_project_task_dependencies; around them the chain adds members, group grants, extensions, the work ledger, labels, whiteboards, events, the portal, API keys, task files and the assignee sets — the full list is in AGENTS.md → "Data model". All tables use UUIDv7 primary keys.

Public API

See PhoenixKitProjects.Projects — the single context module covers tasks, projects, templates, assignments, dependencies, and schedule/summary computation. Highlights:

# Projects
Projects.list_projects/1          # :archived, :include_templates, :viewer
Projects.create_project/2         # a key suggested from the name; presets
Projects.project_summaries/1      # batch query — no N+1
Projects.recompute_project_completion/1

# Tasks (the library)
Projects.list_tasks/1
Projects.create_task/1

# Assignments (form-facing vs. server-trusted split)
Projects.create_assignment/2
Projects.update_assignment_form/3    # safe: mass-assignment guard
Projects.update_assignment_status/3  # server-trusted: completion fields; `expect:`
Projects.complete_assignment/2
Projects.reopen_assignment/1

# Dependencies
Projects.add_dependency/3   # refuses cycles and cross-project pairs
Projects.available_dependencies/2

# Templates
Projects.list_templates/1
Projects.create_project_from_template/3  # atomic clone

Development

See AGENTS.md for development conventions, test setup, and the pre-commit workflow.

License

MIT