Skip to content

Staff 0.1.0: Departments, teams and staff profiles for PhoenixKit

Staff 0.1.0 is the first release of the PhoenixKit staff directory. It adds departments, teams and staff profiles to a Phoenix app, each profile linked to one PhoenixKit user, with an overview of who works where.

Departments, teams and people

The module adds a Staff section to the admin with Overview, Departments, Teams and Staff pages, each with its own create, edit and detail pages under /admin/staff. Teams belong to a department, and deleting a department removes its teams. A person can be on several teams and have a primary department.

A staff profile holds a status, job title, employment type and dates, work location, work and personal phone, personal email, bio, skills, notes, date of birth and an emergency contact.

People without an account yet

You can add someone who has no user account yet. The module creates a placeholder user for them, which links up when the person later registers or signs in with a social login. While nobody has claimed it, the placeholder’s email can still be changed.

The overview

The Overview shows the organisation as a tree: departments, their teams and the people in them, plus people in a department but on no team and Unassigned staff with neither. An Upcoming birthdays list shows who has a birthday soon.

Pages update live when someone else makes a change, and every change is written to the activity log.

Getting started

Add {:phoenix_kit_staff, "~> 0.1"} to your app’s dependencies, with phoenix_kit ~> 1.7, and add :phoenix_kit_staff to extra_applications. The tables come from core’s V100 migration, so run mix phoenix_kit.update. Then turn the module on under Admin > Modules.

Full release notes: Staff 0.1.0

0.1.0 · 20 April 2026

Initial release.

Added

  • Departments context: list/create/update/delete with PubSub broadcasts.
  • Teams context: list/create/update/delete with department scoping and PubSub broadcasts.
  • Staff context: people CRUD (Person schema), team membership management, upcoming_birthdays/1, org_tree/0, and placeholder-user flow with transactional rollback.
  • Activity logging via safe wrapper pattern, called at the LiveView layer.
  • PubSub topic scoping for departments, teams, and people.
  • Integration test suite (auto-excluded when phoenix_kit_staff_test DB is unavailable), including coverage of upcoming_birthdays/1 (window boundaries, today / leap-day / wrap-around DOBs, inactive / nil-DOB exclusion, sort order) and org_tree/0 (team-grouped, dept-only, and fully-unassigned buckets).
  • AGENTS.md with project overview, conventions, testing, and PR policy.

Performance

  • Staff.upcoming_birthdays/1 filters the day window in Postgres via interval arithmetic; only rows inside the window come back.
  • Staff.org_tree/0 loads TeamMembership once and derives both the team-grouped and unassigned shapes in memory.

Staff 0.1.0. Install or update: {:phoenix_kit_staff, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.