From 92e3e50d49f1a3066564236ed503d33e3e95f6ef Mon Sep 17 00:00:00 2001 From: Moritz Date: Mon, 10 Nov 2025 15:49:55 +0100 Subject: [PATCH] docs: add feature roadmap --- docs/feature-roadmap.md | 743 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 743 insertions(+) create mode 100644 docs/feature-roadmap.md diff --git a/docs/feature-roadmap.md b/docs/feature-roadmap.md new file mode 100644 index 0000000..4768089 --- /dev/null +++ b/docs/feature-roadmap.md @@ -0,0 +1,743 @@ +# Feature Roadmap & Implementation Plan + +**Project:** Mila - Membership Management System +**Last Updated:** 2025-11-10 +**Status:** Planning Phase + +--- + +## Table of Contents + +1. [Phase 1: Feature Area Breakdown](#phase-1-feature-area-breakdown) +2. [Phase 2: API Endpoint Definition](#phase-2-api-endpoint-definition) +3. [Phase 3: Implementation Task Creation](#phase-3-implementation-task-creation) +4. [Phase 4: Task Organization and Prioritization](#phase-4-task-organization-and-prioritization) + +--- + +## Phase 1: Feature Area Breakdown + +### Feature Areas + +#### 1. **Authentication & Authorization** ๐Ÿ” + +**Current State:** +- โœ… OIDC authentication (Rauthy) +- โœ… Password-based authentication +- โœ… User sessions and tokens +- โœ… Basic authentication flows + +**Open Issues:** +- [#171](https://git.local-it.org/local-it/mitgliederverwaltung/issues/171) - Ensure correct handling of Password login vs OIDC login (M) +- [#146](https://git.local-it.org/local-it/mitgliederverwaltung/issues/146) - Translate "or" in the login screen (Low) +- [#144](https://git.local-it.org/local-it/mitgliederverwaltung/issues/144) - Add language switch dropdown to login screen (Low) + +**Missing Features:** +- โŒ Role-based access control (RBAC) +- โŒ Permission system +- โŒ Password reset flow +- โŒ Email verification +- โŒ Two-factor authentication (future) + +**Related Issues:** +- [#191](https://git.local-it.org/local-it/mitgliederverwaltung/issues/191) - Implement Roles in Ash (M) +- [#190](https://git.local-it.org/local-it/mitgliederverwaltung/issues/190) - Implement Permissions in Ash (M) +- [#151](https://git.local-it.org/local-it/mitgliederverwaltung/issues/151) - Define implementation plan for roles and permissions (M) [3/7 tasks done] + +--- + +#### 2. **Member Management** ๐Ÿ‘ฅ + +**Current State:** +- โœ… Member CRUD operations +- โœ… Member profile with personal data +- โœ… Address management +- โœ… Membership status tracking +- โœ… Full-text search (PostgreSQL tsvector) +- โœ… Sorting by basic fields +- โœ… User-Member linking (optional 1:1) +- โœ… Email synchronization between User and Member + +**Open Issues:** +- [#169](https://git.local-it.org/local-it/mitgliederverwaltung/issues/169) - Allow combined creation of Users/Members (M, Low priority) +- [#168](https://git.local-it.org/local-it/mitgliederverwaltung/issues/168) - Allow user-member association in edit/create views (M, High priority) +- [#165](https://git.local-it.org/local-it/mitgliederverwaltung/issues/165) - Pagination for list of members (S, Low priority) +- [#162](https://git.local-it.org/local-it/mitgliederverwaltung/issues/162) - Implement fuzzy and substring search (M, Medium priority) +- [#160](https://git.local-it.org/local-it/mitgliederverwaltung/issues/160) - Implement clear icon in searchbar (S, Low priority) +- [#154](https://git.local-it.org/local-it/mitgliederverwaltung/issues/154) - Concept advanced search (Low priority, needs refinement) + +**Missing Features:** +- โŒ Fuzzy search +- โŒ Advanced filters (date ranges, multiple criteria) +- โŒ Pagination (currently all members loaded) +- โŒ Bulk operations (bulk delete, bulk update) +- โŒ Member import/export (CSV, Excel) +- โŒ Member profile photos/avatars +- โŒ Member history/audit log +- โŒ Duplicate detection + +--- + +#### 3. **Custom Fields (Property System)** ๐Ÿ”ง + +**Current State:** +- โœ… Property types (string, integer, boolean, date, email) +- โœ… Property type management +- โœ… Dynamic property assignment to members +- โœ… Union type storage (JSONB) + +**Open Issues:** +- [#194](https://git.local-it.org/local-it/mitgliederverwaltung/issues/194) - Custom Fields: Harden implementation (S) [0/3 tasks] +- [#157](https://git.local-it.org/local-it/mitgliederverwaltung/issues/157) - Concept how custom fields are handled (M, High priority) [0/4 tasks] +- [#161](https://git.local-it.org/local-it/mitgliederverwaltung/issues/161) - Don't show birthday field for default configurations (S, Low priority) +- [#153](https://git.local-it.org/local-it/mitgliederverwaltung/issues/153) - Sorting functionalities for custom fields (M, Low priority) + +**Missing Features:** +- โŒ Default field visibility configuration +- โŒ Field groups/categories +- โŒ Conditional fields (show field X if field Y = value) +- โŒ Field validation rules (min/max, regex patterns) +- โŒ Required custom fields +- โŒ Multi-select fields +- โŒ File upload fields +- โŒ Sorting by custom fields +- โŒ Searching by custom fields + +--- + +#### 4. **User Management** ๐Ÿ‘ค + +**Current State:** +- โœ… User CRUD operations +- โœ… User list view +- โœ… User profile view +- โœ… Admin password setting +- โœ… User-Member relationship + +**Missing Features:** +- โŒ User roles assignment UI +- โŒ User permissions management +- โŒ User activity log +- โŒ User invitation system +- โŒ User onboarding flow +- โŒ Self-service profile editing +- โŒ Password change flow + +--- + +#### 5. **Navigation & UX** ๐Ÿงญ + +**Current State:** +- โœ… Basic navigation structure +- โœ… Navbar with profile button +- โœ… Member list as landing page +- โœ… Breadcrumbs (basic) + +**Open Issues:** +- [#188](https://git.local-it.org/local-it/mitgliederverwaltung/issues/188) - Check if searching just on typing is accessible (S, Low priority) +- [#174](https://git.local-it.org/local-it/mitgliederverwaltung/issues/174) - Accessibility - aria-sort in tables (S, Low priority) + +**Missing Features:** +- โŒ Dashboard/Home page +- โŒ Quick actions menu +- โŒ Recent activity widget +- โŒ Keyboard shortcuts +- โŒ Mobile navigation +- โŒ Context-sensitive help +- โŒ Onboarding tooltips + +--- + +#### 6. **Internationalization (i18n)** ๐ŸŒ + +**Current State:** +- โœ… Gettext integration +- โœ… German translations +- โœ… English translations +- โœ… Translation files for auth, errors, default + +**Open Issues:** +- [#146](https://git.local-it.org/local-it/mitgliederverwaltung/issues/146) - Translate "or" in the login screen (Low) +- [#144](https://git.local-it.org/local-it/mitgliederverwaltung/issues/144) - Add language switch dropdown to login screen (Low) + +**Missing Features:** +- โŒ Language switcher UI +- โŒ User-specific language preferences +- โŒ Date/time localization +- โŒ Number formatting (currency, decimals) +- โŒ Complete translation coverage +- โŒ RTL support (future) + +--- + +#### 7. **Payment & Fees Management** ๐Ÿ’ฐ + +**Current State:** +- โœ… Basic "paid" boolean field on members +- โš ๏ธ No payment tracking + +**Open Issues:** +- [#156](https://git.local-it.org/local-it/mitgliederverwaltung/issues/156) - Set up & document testing environment for vereinfacht.digital (L, Low priority) + +**Missing Features:** +- โŒ Membership fee configuration +- โŒ Payment records/transactions +- โŒ Payment history per member +- โŒ Payment reminders +- โŒ Payment status tracking (pending, paid, overdue) +- โŒ Invoice generation +- โŒ vereinfacht.digital API integration +- โŒ SEPA direct debit support +- โŒ Payment reports + +**Related Milestones:** +- Import transactions via vereinfacht API + +--- + +#### 8. **Admin Panel & Configuration** โš™๏ธ + +**Current State:** +- โœ… AshAdmin integration (basic) +- โš ๏ธ No user-facing admin UI + +**Open Issues:** +- [#186](https://git.local-it.org/local-it/mitgliederverwaltung/issues/186) - Create Architecture docs in Repo (S, Low priority) + +**Missing Features:** +- โŒ Global settings management +- โŒ Club/Organization profile +- โŒ Email templates configuration +- โŒ Property type management UI (user-facing) +- โŒ Role and permission management UI +- โŒ System health dashboard +- โŒ Audit log viewer +- โŒ Backup/restore functionality + +**Related Milestones:** +- As Admin I can configure settings globally + +--- + +#### 9. **Communication & Notifications** ๐Ÿ“ง + +**Current State:** +- โœ… Swoosh mailer integration +- โœ… Email confirmation (via AshAuthentication) +- โœ… Password reset emails (via AshAuthentication) +- โš ๏ธ No member communication features + +**Missing Features:** +- โŒ Email broadcast to members +- โŒ Email templates (customizable) +- โŒ Email to member groups/filters + +--- + +#### 10. **Reporting & Analytics** ๐Ÿ“Š + +**Current State:** +- โŒ No reporting features + +**Missing Features:** +- โŒ Member statistics dashboard +- โŒ Membership growth charts +- โŒ Payment reports +- โŒ Custom report builder +- โŒ Export to PDF/CSV/Excel +- โŒ Scheduled reports +- โŒ Data visualization + +--- + +#### 11. **Data Import/Export** ๐Ÿ“ฅ๐Ÿ“ค + +**Current State:** +- โœ… Seed data script +- โš ๏ธ No user-facing import/export + +**Missing Features:** +- โŒ CSV import for members +- โŒ Excel import for members +- โŒ Import validation and preview +- โŒ Import error handling +- โŒ Bulk data export +- โŒ Backup export +- โŒ Data migration tools + +--- + +#### 12. **Testing & Quality Assurance** ๐Ÿงช + +**Current State:** +- โœ… ExUnit test suite +- โœ… Unit tests for resources +- โœ… Integration tests for email sync +- โœ… LiveView tests +- โœ… Component tests +- โœ… CI/CD pipeline (Drone) + +**Missing Features:** +- โŒ E2E tests (browser automation) +- โŒ Performance testing +- โŒ Load testing +- โŒ Security penetration testing +- โŒ Accessibility testing automation +- โŒ Visual regression testing +- โŒ Test coverage reporting + +--- + +#### 13. **Infrastructure & DevOps** ๐Ÿš€ + +**Current State:** +- โœ… Docker Compose for development +- โœ… Production Dockerfile +- โœ… Drone CI/CD pipeline +- โœ… Renovate for dependency updates +- โš ๏ธ No staging environment + +**Open Issues:** +- [#186](https://git.local-it.org/local-it/mitgliederverwaltung/issues/186) - Create Architecture docs in Repo (S, Low priority) + +**Missing Features:** +- โŒ Staging environment +- โŒ Automated deployment +- โŒ Database backup automation +- โŒ Monitoring and alerting +- โŒ Error tracking (Sentry, etc.) +- โŒ Log aggregation +- โŒ Health checks and uptime monitoring + +**Related Milestones:** +- We have a staging environment +- We implement security measures + +--- + +#### 14. **Security & Compliance** ๐Ÿ”’ + +**Current State:** +- โœ… OIDC authentication +- โœ… Password hashing (bcrypt) +- โœ… CSRF protection +- โœ… SQL injection prevention (Ecto) +- โœ… Sobelow security scans +- โœ… Dependency auditing + +**Missing Features:** +- โŒ Role-based access control (see #1) +- โŒ Audit logging +- โŒ GDPR compliance features (data export, deletion) +- โŒ Session management (timeout, concurrent sessions) +- โŒ Rate limiting +- โŒ IP whitelisting/blacklisting +- โŒ Security headers configuration +- โŒ Data retention policies + +**Related Milestones:** +- We implement security measures + +--- + +#### 15. **Accessibility & Usability** โ™ฟ + +**Current State:** +- โœ… Semantic HTML +- โœ… Basic ARIA labels +- โš ๏ธ Needs comprehensive audit + +**Open Issues:** +- [#188](https://git.local-it.org/local-it/mitgliederverwaltung/issues/188) - Check if searching just on typing is accessible (S, Low priority) +- [#174](https://git.local-it.org/local-it/mitgliederverwaltung/issues/174) - Accessibility - aria-sort in tables (S, Low priority) + +**Missing Features:** +- โŒ Comprehensive accessibility audit (WCAG 2.1 Level AA) +- โŒ Keyboard navigation improvements +- โŒ Screen reader optimization +- โŒ High contrast mode +- โŒ Font size adjustments +- โŒ Focus management +- โŒ Skip links +- โŒ Error announcements + +--- + +### Feature Area Summary + +| Feature Area | Current Status | Priority | Complexity | +|--------------|----------------|----------|------------| +| **Authentication & Authorization** | 40% complete | **High** | Medium | +| **Member Management** | 70% complete | **High** | Low-Medium | +| **Custom Fields** | 50% complete | **High** | Medium | +| **User Management** | 60% complete | Medium | Low | +| **Navigation & UX** | 50% complete | Medium | Low | +| **Internationalization** | 70% complete | Low | Low | +| **Payment & Fees** | 5% complete | **High** | High | +| **Admin Panel** | 20% complete | Medium | Medium | +| **Communication** | 30% complete | Medium | Medium | +| **Reporting** | 0% complete | Medium | Medium-High | +| **Import/Export** | 10% complete | Low | Medium | +| **Testing & QA** | 60% complete | Medium | Low-Medium | +| **Infrastructure** | 70% complete | Medium | Medium | +| **Security** | 50% complete | **High** | Medium-High | +| **Accessibility** | 40% complete | Medium | Medium | + +--- + +### Open Milestones (From Issues) + +1. โœ… **Ich kann einen neuen Kontakt anlegen** (Closed) +2. ๐Ÿ”„ **I can search through the list of members - fulltext** (Open) - Related: #162, #154 +3. ๐Ÿ”„ **I can sort the list of members for specific fields** (Open) - Related: #153 +4. ๐Ÿ”„ **We have a intuitive navigation structure** (Open) +5. ๐Ÿ”„ **We have different roles and permissions** (Open) - Related: #191, #190, #151 +6. ๐Ÿ”„ **As Admin I can configure settings globally** (Open) +7. ๐Ÿ”„ **Accounts & Logins** (Open) - Related: #171, #169, #168 +8. ๐Ÿ”„ **I can add custom fields** (Open) - Related: #194, #157, #161 +9. ๐Ÿ”„ **Import transactions via vereinfacht API** (Open) - Related: #156 +10. ๐Ÿ”„ **We have a staging environment** (Open) +11. ๐Ÿ”„ **We implement security measures** (Open) + +--- + +--- + +## Phase 2: API Endpoint Definition + +### Endpoint Types + +Since this is a **Phoenix LiveView** application with **Ash Framework**, we have three types of endpoints: + +1. **LiveView Endpoints** - Mount points and event handlers +2. **HTTP Controller Endpoints** - Traditional REST-style endpoints +3. **Ash Resource Actions** - Backend data layer API + +### Authentication Requirements Legend + +- ๐Ÿ”“ **Public** - No authentication required +- ๐Ÿ” **Authenticated** - Requires valid user session +- ๐Ÿ‘ค **User Role** - Requires specific user role +- ๐Ÿ›ก๏ธ **Admin Only** - Requires admin privileges + +--- + +### 1. Authentication & Authorization Endpoints + +#### HTTP Controller Endpoints + +| Method | Route | Purpose | Auth | Request | Response | +|--------|-------|---------|------|---------|----------| +| `GET` | `/auth/user/password/sign_in` | Show password login form | ๐Ÿ”“ | - | HTML form | +| `POST` | `/auth/user/password/sign_in` | Submit password login | ๐Ÿ”“ | `{email, password}` | Redirect + session cookie | +| `GET` | `/auth/user/rauthy` | Initiate OIDC flow | ๐Ÿ”“ | - | Redirect to Rauthy | +| `GET` | `/auth/user/rauthy/callback` | Handle OIDC callback | ๐Ÿ”“ | `{code, state}` | Redirect + session cookie | +| `POST` | `/auth/user/sign_out` | Sign out user | ๐Ÿ” | - | Redirect to login | +| `GET` | `/auth/user/password/reset` | Show password reset form | ๐Ÿ”“ | - | HTML form | +| `POST` | `/auth/user/password/reset` | Request password reset | ๐Ÿ”“ | `{email}` | Success message + email sent | +| `GET` | `/auth/user/password/reset/:token` | Show reset password form | ๐Ÿ”“ | - | HTML form | +| `POST` | `/auth/user/password/reset/:token` | Submit new password | ๐Ÿ”“ | `{password, password_confirmation}` | Redirect to login | + +#### Ash Resource Actions + +| Resource | Action | Purpose | Auth | Input | Output | +|----------|--------|---------|------|-------|--------| +| `User` | `:sign_in_with_password` | Password authentication | ๐Ÿ”“ | `{email, password}` | `{:ok, user}` or `{:error, reason}` | +| `User` | `:sign_in_with_rauthy` | OIDC authentication | ๐Ÿ”“ | `{oidc_id, email, user_info}` | `{:ok, user}` or `{:error, reason}` | +| `User` | `:register_with_password` | Create user with password | ๐Ÿ”“ | `{email, password}` | `{:ok, user}` | +| `User` | `:register_with_rauthy` | Create user via OIDC | ๐Ÿ”“ | `{oidc_id, email}` | `{:ok, user}` | +| `User` | `:request_password_reset` | Generate reset token | ๐Ÿ”“ | `{email}` | `{:ok, token}` | +| `User` | `:reset_password` | Reset password with token | ๐Ÿ”“ | `{token, password}` | `{:ok, user}` | +| `Token` | `:revoke` | Revoke authentication token | ๐Ÿ” | `{jti}` | `{:ok, token}` | + +#### **NEW: Role & Permission Actions** (Issue #191, #190, #151) + +| Resource | Action | Purpose | Auth | Input | Output | +|----------|--------|---------|------|-------|--------| +| `Role` | `:create` | Create new role | ๐Ÿ›ก๏ธ | `{name, description, permissions}` | `{:ok, role}` | +| `Role` | `:list` | List all roles | ๐Ÿ” | - | `[%Role{}]` | +| `Role` | `:update` | Update role | ๐Ÿ›ก๏ธ | `{id, name, permissions}` | `{:ok, role}` | +| `Role` | `:delete` | Delete role | ๐Ÿ›ก๏ธ | `{id}` | `{:ok, role}` | +| `User` | `:assign_role` | Assign role to user | ๐Ÿ›ก๏ธ | `{user_id, role_id}` | `{:ok, user}` | +| `User` | `:remove_role` | Remove role from user | ๐Ÿ›ก๏ธ | `{user_id, role_id}` | `{:ok, user}` | +| `Permission` | `:list` | List all permissions | ๐Ÿ” | - | `[%Permission{}]` | +| `Permission` | `:check` | Check user permission | ๐Ÿ” | `{user_id, resource, action}` | `{:ok, boolean}` | + +--- + +### 2. Member Management Endpoints + +#### LiveView Endpoints + +| Mount | Purpose | Auth | Query Params | Events | +|-------|---------|------|--------------|--------| +| `/members` | Member list with search/sort | ๐Ÿ” | `?search=&sort_by=&sort_dir=` | `search`, `sort`, `delete`, `select` | +| `/members/new` | Create new member form | ๐Ÿ” | - | `save`, `cancel`, `add_property` | +| `/members/:id` | Member detail view | ๐Ÿ” | - | `edit`, `delete`, `link_user` | +| `/members/:id/edit` | Edit member form | ๐Ÿ” | - | `save`, `cancel`, `add_property`, `remove_property` | + +#### LiveView Event Handlers + +| Event | Purpose | Params | Response | +|-------|---------|--------|----------| +| `search` | Trigger search | `%{"search" => query}` | Update member list | +| `sort` | Sort member list | `%{"field" => field}` | Update sorted list | +| `delete` | Delete member | `%{"id" => id}` | Redirect to list | +| `save` | Create/update member | `%{"member" => attrs}` | Redirect or show errors | +| `link_user` | Link user to member | `%{"user_id" => id}` | Update member view | +| `unlink_user` | Unlink user from member | - | Update member view | +| `add_property` | Add custom property | `%{"property_type_id" => id, "value" => val}` | Update form | +| `remove_property` | Remove custom property | `%{"property_id" => id}` | Update form | + +#### Ash Resource Actions + +| Resource | Action | Purpose | Auth | Input | Output | +|----------|--------|---------|------|-------|--------| +| `Member` | `:create_member` | Create member | ๐Ÿ” | `{first_name, last_name, email, ...}` | `{:ok, member}` | +| `Member` | `:read` | List/search members | ๐Ÿ” | `{search, sort_by, limit, offset}` | `[%Member{}]` | +| `Member` | `:update_member` | Update member | ๐Ÿ” | `{id, attrs}` | `{:ok, member}` | +| `Member` | `:destroy` | Delete member | ๐Ÿ” | `{id}` | `{:ok, member}` | +| `Member` | `:search_fulltext` | Full-text search | ๐Ÿ” | `{query}` | `[%Member{}]` | +| `Member` | `:link_to_user` | Link member to user | ๐Ÿ” | `{member_id, user_id}` | `{:ok, member}` | +| `Member` | `:unlink_from_user` | Unlink from user | ๐Ÿ” | `{member_id}` | `{:ok, member}` | + +#### **NEW: Enhanced Search & Filter Actions** (Issue #162, #154, #165) + +| Resource | Action | Purpose | Auth | Input | Output | +|----------|--------|---------|------|-------|--------| +| `Member` | `:fuzzy_search` | Fuzzy text search | ๐Ÿ” | `{query, threshold}` | `[%Member{}]` | +| `Member` | `:advanced_search` | Multi-criteria search | ๐Ÿ” | `{filters: [{field, op, value}]}` | `[%Member{}]` | +| `Member` | `:paginate` | Paginated member list | ๐Ÿ” | `{page, per_page, filters}` | `{members, total, page_info}` | +| `Member` | `:sort_by_custom_field` | Sort by property | ๐Ÿ” | `{property_type_id, direction}` | `[%Member{}]` | +| `Member` | `:bulk_delete` | Delete multiple members | ๐Ÿ›ก๏ธ | `{ids: [id1, id2, ...]}` | `{:ok, count}` | +| `Member` | `:bulk_update` | Update multiple members | ๐Ÿ›ก๏ธ | `{ids, attrs}` | `{:ok, count}` | +| `Member` | `:export` | Export to CSV/Excel | ๐Ÿ” | `{format, filters}` | File download | +| `Member` | `:import` | Import from CSV | ๐Ÿ›ก๏ธ | `{file, mapping}` | `{:ok, imported_count, errors}` | + +--- + +### 3. Custom Fields (Property System) Endpoints + +#### LiveView Endpoints + +| Mount | Purpose | Auth | Events | +|-------|---------|------|--------| +| `/property-types` | List property types | ๐Ÿ›ก๏ธ | `new`, `edit`, `delete` | +| `/property-types/new` | Create property type | ๐Ÿ›ก๏ธ | `save`, `cancel` | +| `/property-types/:id/edit` | Edit property type | ๐Ÿ›ก๏ธ | `save`, `cancel`, `delete` | + +#### Ash Resource Actions + +| Resource | Action | Purpose | Auth | Input | Output | +|----------|--------|---------|------|-------|--------| +| `PropertyType` | `:create` | Create property type | ๐Ÿ›ก๏ธ | `{name, value_type, description, ...}` | `{:ok, property_type}` | +| `PropertyType` | `:read` | List property types | ๐Ÿ” | - | `[%PropertyType{}]` | +| `PropertyType` | `:update` | Update property type | ๐Ÿ›ก๏ธ | `{id, attrs}` | `{:ok, property_type}` | +| `PropertyType` | `:destroy` | Delete property type | ๐Ÿ›ก๏ธ | `{id}` | `{:ok, property_type}` | +| `Property` | `:create` | Add property to member | ๐Ÿ” | `{member_id, property_type_id, value}` | `{:ok, property}` | +| `Property` | `:update` | Update property value | ๐Ÿ” | `{id, value}` | `{:ok, property}` | +| `Property` | `:destroy` | Remove property | ๐Ÿ” | `{id}` | `{:ok, property}` | + +#### **NEW: Enhanced Custom Fields** (Issue #194, #157, #161, #153) + +| Resource | Action | Purpose | Auth | Input | Output | +|----------|--------|---------|------|-------|--------| +| `PropertyType` | `:set_default_visibility` | Show/hide by default | ๐Ÿ›ก๏ธ | `{id, visible}` | `{:ok, property_type}` | +| `PropertyType` | `:set_required` | Mark as required | ๐Ÿ›ก๏ธ | `{id, required}` | `{:ok, property_type}` | +| `PropertyType` | `:add_validation` | Add validation rule | ๐Ÿ›ก๏ธ | `{id, rule_type, params}` | `{:ok, property_type}` | +| `PropertyType` | `:create_group` | Create field group | ๐Ÿ›ก๏ธ | `{name, property_type_ids}` | `{:ok, group}` | +| `Property` | `:validate_value` | Validate property value | ๐Ÿ” | `{property_type_id, value}` | `{:ok, valid}` or `{:error, reason}` | + +--- + +### 4. User Management Endpoints + +#### LiveView Endpoints + +| Mount | Purpose | Auth | Events | +|-------|---------|------|--------| +| `/users` | User list | ๐Ÿ›ก๏ธ | `new`, `edit`, `delete`, `assign_role` | +| `/users/new` | Create user form | ๐Ÿ›ก๏ธ | `save`, `cancel` | +| `/users/:id` | User detail view | ๐Ÿ” | `edit`, `delete`, `change_password` | +| `/users/:id/edit` | Edit user form | ๐Ÿ” | `save`, `cancel`, `link_member` | +| `/profile` | Current user profile | ๐Ÿ” | `edit`, `change_password` | + +#### Ash Resource Actions + +| Resource | Action | Purpose | Auth | Input | Output | +|----------|--------|---------|------|-------|--------| +| `User` | `:create_user` | Create user (admin) | ๐Ÿ›ก๏ธ | `{email, member_id?}` | `{:ok, user}` | +| `User` | `:read` | List users | ๐Ÿ›ก๏ธ | - | `[%User{}]` | +| `User` | `:update_user` | Update user | ๐Ÿ” | `{id, email, member_id?}` | `{:ok, user}` | +| `User` | `:destroy` | Delete user | ๐Ÿ›ก๏ธ | `{id}` | `{:ok, user}` | +| `User` | `:admin_set_password` | Set password (admin) | ๐Ÿ›ก๏ธ | `{id, password}` | `{:ok, user}` | +| `User` | `:change_password` | Change own password | ๐Ÿ” | `{current_password, new_password}` | `{:ok, user}` | + +#### **NEW: Combined User/Member Management** (Issue #169, #168) + +| Resource | Action | Purpose | Auth | Input | Output | +|----------|--------|---------|------|-------|--------| +| `User` | `:create_with_member` | Create user + member together | ๐Ÿ›ก๏ธ | `{user: {...}, member: {...}}` | `{:ok, %{user, member}}` | +| `User` | `:invite_user` | Send invitation email | ๐Ÿ›ก๏ธ | `{email, role_id, member_id?}` | `{:ok, invitation}` | +| `User` | `:accept_invitation` | Accept invitation | ๐Ÿ”“ | `{token, password}` | `{:ok, user}` | + +--- + +### 5. Navigation & UX Endpoints + +#### LiveView Endpoints + +| Mount | Purpose | Auth | Events | +|-------|---------|------|--------| +| `/` | Dashboard/Home | ๐Ÿ” | - | +| `/dashboard` | Dashboard view | ๐Ÿ” | Contextual based on role | + +#### HTTP Controller Endpoints + +| Method | Route | Purpose | Auth | Request | Response | +|--------|-------|---------|------|---------|----------| +| `GET` | `/health` | Health check | ๐Ÿ”“ | - | `{"status": "ok"}` | +| `GET` | `/` | Root redirect | - | - | Redirect to dashboard or login | + +--- + +### 6. Internationalization Endpoints + +#### HTTP Controller Endpoints + +| Method | Route | Purpose | Auth | Request | Response | +|--------|-------|---------|------|---------|----------| +| `POST` | `/locale` | Set user locale | ๐Ÿ” | `{locale: "de"}` | Redirect with cookie | +| `GET` | `/locales` | List available locales | ๐Ÿ”“ | - | `["de", "en"]` | + +--- + +### 7. Payment & Fees Management Endpoints + +#### LiveView Endpoints (NEW - Issue #156) + +| Mount | Purpose | Auth | Events | +|-------|---------|------|--------| +| `/payments` | Payment list | ๐Ÿ” | `new`, `record_payment`, `send_reminder` | +| `/payments/:id` | Payment detail | ๐Ÿ” | `edit`, `delete`, `mark_paid` | +| `/fees` | Fee configuration | ๐Ÿ›ก๏ธ | `create`, `edit`, `delete` | +| `/invoices` | Invoice list | ๐Ÿ” | `generate`, `download`, `send` | + +#### Ash Resource Actions (NEW) + +| Resource | Action | Purpose | Auth | Input | Output | +|----------|--------|---------|------|-------|--------| +| `Fee` | `:create` | Create fee type | ๐Ÿ›ก๏ธ | `{name, amount, frequency}` | `{:ok, fee}` | +| `Fee` | `:read` | List fees | ๐Ÿ” | - | `[%Fee{}]` | +| `Payment` | `:create` | Record payment | ๐Ÿ” | `{member_id, fee_id, amount, date}` | `{:ok, payment}` | +| `Payment` | `:list_by_member` | Member payment history | ๐Ÿ” | `{member_id}` | `[%Payment{}]` | +| `Payment` | `:mark_paid` | Mark as paid | ๐Ÿ” | `{id}` | `{:ok, payment}` | +| `Invoice` | `:generate` | Generate invoice | ๐Ÿ” | `{member_id, fee_id, period}` | `{:ok, invoice}` | +| `Invoice` | `:send` | Send invoice via email | ๐Ÿ” | `{id}` | `{:ok, sent}` | +| `Payment` | `:import_vereinfacht` | Import from vereinfacht.digital | ๐Ÿ›ก๏ธ | `{transactions}` | `{:ok, count}` | + +--- + +### 8. Admin Panel & Configuration Endpoints + +#### LiveView Endpoints (NEW) + +| Mount | Purpose | Auth | Events | +|-------|---------|------|--------| +| `/admin` | Admin dashboard | ๐Ÿ›ก๏ธ | - | +| `/admin/settings` | Global settings | ๐Ÿ›ก๏ธ | `save` | +| `/admin/organization` | Organization profile | ๐Ÿ›ก๏ธ | `save` | +| `/admin/email-templates` | Email template editor | ๐Ÿ›ก๏ธ | `create`, `edit`, `preview` | +| `/admin/audit-log` | System audit log | ๐Ÿ›ก๏ธ | `filter`, `export` | + +#### Ash Resource Actions (NEW) + +| Resource | Action | Purpose | Auth | Input | Output | +|----------|--------|---------|------|-------|--------| +| `Setting` | `:get` | Get setting value | ๐Ÿ” | `{key}` | `value` | +| `Setting` | `:set` | Set setting value | ๐Ÿ›ก๏ธ | `{key, value}` | `{:ok, setting}` | +| `Setting` | `:list` | List all settings | ๐Ÿ›ก๏ธ | - | `[%Setting{}]` | +| `Organization` | `:read` | Get organization info | ๐Ÿ” | - | `%Organization{}` | +| `Organization` | `:update` | Update organization | ๐Ÿ›ก๏ธ | `{name, logo, ...}` | `{:ok, org}` | +| `AuditLog` | `:list` | List audit entries | ๐Ÿ›ก๏ธ | `{filters, pagination}` | `[%AuditLog{}]` | + +--- + +### 9. Communication & Notifications Endpoints + +#### LiveView Endpoints (NEW) + +| Mount | Purpose | Auth | Events | +|-------|---------|------|--------| +| `/communications` | Communication history | ๐Ÿ” | `new`, `view` | +| `/communications/new` | Create email broadcast | ๐Ÿ” | `select_recipients`, `preview`, `send` | +| `/notifications` | User notifications | ๐Ÿ” | `mark_read`, `mark_all_read` | + +#### Ash Resource Actions (NEW) + +| Resource | Action | Purpose | Auth | Input | Output | +|----------|--------|---------|------|-------|--------| +| `EmailBroadcast` | `:create` | Create broadcast | ๐Ÿ” | `{subject, body, recipient_filter}` | `{:ok, broadcast}` | +| `EmailBroadcast` | `:send` | Send broadcast | ๐Ÿ” | `{id}` | `{:ok, sent_count}` | +| `EmailTemplate` | `:create` | Create template | ๐Ÿ›ก๏ธ | `{name, subject, body}` | `{:ok, template}` | +| `EmailTemplate` | `:render` | Render template | ๐Ÿ” | `{id, variables}` | `rendered_html` | +| `Notification` | `:create` | Create notification | System | `{user_id, type, message}` | `{:ok, notification}` | +| `Notification` | `:list_for_user` | Get user notifications | ๐Ÿ” | `{user_id}` | `[%Notification{}]` | +| `Notification` | `:mark_read` | Mark as read | ๐Ÿ” | `{id}` | `{:ok, notification}` | + +--- + +### 10. Reporting & Analytics Endpoints + +#### LiveView Endpoints (NEW) + +| Mount | Purpose | Auth | Events | +|-------|---------|------|--------| +| `/reports` | Reports dashboard | ๐Ÿ” | `generate`, `schedule` | +| `/reports/members` | Member statistics | ๐Ÿ” | `filter`, `export` | +| `/reports/payments` | Payment reports | ๐Ÿ” | `filter`, `export` | +| `/reports/custom` | Custom report builder | ๐Ÿ›ก๏ธ | `build`, `save`, `run` | + +#### Ash Resource Actions (NEW) + +| Resource | Action | Purpose | Auth | Input | Output | +|----------|--------|---------|------|-------|--------| +| `Report` | `:generate_member_stats` | Member statistics | ๐Ÿ” | `{date_range, filters}` | Statistics object | +| `Report` | `:generate_payment_stats` | Payment statistics | ๐Ÿ” | `{date_range}` | Statistics object | +| `Report` | `:export_to_csv` | Export report to CSV | ๐Ÿ” | `{report_type, filters}` | CSV file | +| `Report` | `:export_to_pdf` | Export report to PDF | ๐Ÿ” | `{report_type, filters}` | PDF file | +| `Report` | `:schedule` | Schedule recurring report | ๐Ÿ›ก๏ธ | `{report_type, frequency, recipients}` | `{:ok, schedule}` | + +--- + +### 11. Data Import/Export Endpoints + +#### LiveView Endpoints (NEW) + +| Mount | Purpose | Auth | Events | +|-------|---------|------|--------| +| `/import` | Data import wizard | ๐Ÿ›ก๏ธ | `upload`, `map_fields`, `preview`, `import` | +| `/export` | Data export tool | ๐Ÿ” | `select_data`, `configure`, `export` | + +#### Ash Resource Actions (NEW) + +| Resource | Action | Purpose | Auth | Input | Output | +|----------|--------|---------|------|-------|--------| +| `Member` | `:import_csv` | Import members from CSV | ๐Ÿ›ก๏ธ | `{file, field_mapping}` | `{:ok, imported, errors}` | +| `Member` | `:validate_import` | Validate import data | ๐Ÿ›ก๏ธ | `{file, field_mapping}` | `{:ok, validation_results}` | +| `Member` | `:export_csv` | Export members to CSV | ๐Ÿ” | `{filters}` | CSV file | +| `Member` | `:export_excel` | Export members to Excel | ๐Ÿ” | `{filters}` | Excel file | +| `Database` | `:export_backup` | Full database backup | ๐Ÿ›ก๏ธ | - | Backup file | +| `Database` | `:import_backup` | Restore from backup | ๐Ÿ›ก๏ธ | `{file}` | `{:ok, restored}` | + +--- + + +--- + +**References:** +- Open Issues: https://git.local-it.org/local-it/mitgliederverwaltung/issues +- Project Board: Sprint 8 (23.10 - 13.11) +- Architecture: See [`CODE_GUIDELINES.md`](../CODE_GUIDELINES.md) +- Database Schema: See [`database-schema-readme.md`](database-schema-readme.md) +