docs: Update domain Public API documentation
This commit is contained in:
parent
926974e2da
commit
d72bb8869f
7 changed files with 26 additions and 5 deletions
|
|
@ -1,6 +1,15 @@
|
||||||
defmodule Mv.Accounts do
|
defmodule Mv.Accounts do
|
||||||
@moduledoc """
|
@moduledoc """
|
||||||
AshAuthentication specific domain to handle Authentication for users.
|
AshAuthentication specific domain to handle Authentication for users.
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
- `User` - User accounts with authentication methods (password, OIDC)
|
||||||
|
- `Token` - Session tokens for authentication
|
||||||
|
|
||||||
|
## Public API
|
||||||
|
The domain exposes these main actions:
|
||||||
|
- User CRUD: `create_user/1`, `list_users/0`, `update_user/2`, `destroy_user/1`
|
||||||
|
- Authentication: `create_register_with_rauthy/1`, `read_sign_in_with_rauthy/1`
|
||||||
"""
|
"""
|
||||||
use Ash.Domain,
|
use Ash.Domain,
|
||||||
extensions: [AshAdmin.Domain, AshPhoenix]
|
extensions: [AshAdmin.Domain, AshPhoenix]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
defmodule Mv.Accounts.Token do
|
defmodule Mv.Accounts.Token do
|
||||||
@moduledoc """
|
@moduledoc """
|
||||||
AshAuthentication specific ressource
|
AshAuthentication Token Resource for session management.
|
||||||
|
|
||||||
|
This resource is used by AshAuthentication to manage authentication tokens
|
||||||
|
for user sessions. Tokens are automatically created and managed by the
|
||||||
|
authentication system.
|
||||||
"""
|
"""
|
||||||
use Ash.Resource,
|
use Ash.Resource,
|
||||||
data_layer: AshPostgres.DataLayer,
|
data_layer: AshPostgres.DataLayer,
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ defmodule Mv.Membership do
|
||||||
The domain exposes these main actions:
|
The domain exposes these main actions:
|
||||||
- Member CRUD: `create_member/1`, `list_members/0`, `update_member/2`, `destroy_member/1`
|
- Member CRUD: `create_member/1`, `list_members/0`, `update_member/2`, `destroy_member/1`
|
||||||
- Custom field value management: `create_custom_field_value/1`, `list_custom_field_values/0`, etc.
|
- Custom field value management: `create_custom_field_value/1`, `list_custom_field_values/0`, etc.
|
||||||
- Custom field management: `create_custom_field/1`, `list_custom_fields/0`, etc.
|
- Custom field management: `create_custom_field/1`, `list_custom_fields/0`, `list_required_custom_fields/0`, etc.
|
||||||
- Settings management: `get_settings/0`, `update_settings/2`
|
- Settings management: `get_settings/0`, `update_settings/2`, `update_member_field_visibility/2`, `update_single_member_field_visibility/3`
|
||||||
|
|
||||||
## Admin Interface
|
## Admin Interface
|
||||||
The domain is configured with AshAdmin for management UI.
|
The domain is configured with AshAdmin for management UI.
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ defmodule Mv.MembershipFees do
|
||||||
- MembershipFeeType CRUD: `create_membership_fee_type/1`, `list_membership_fee_types/0`, `update_membership_fee_type/2`, `destroy_membership_fee_type/1`
|
- MembershipFeeType CRUD: `create_membership_fee_type/1`, `list_membership_fee_types/0`, `update_membership_fee_type/2`, `destroy_membership_fee_type/1`
|
||||||
- MembershipFeeCycle CRUD: `create_membership_fee_cycle/1`, `list_membership_fee_cycles/0`, `update_membership_fee_cycle/2`, `destroy_membership_fee_cycle/1`
|
- MembershipFeeCycle CRUD: `create_membership_fee_cycle/1`, `list_membership_fee_cycles/0`, `update_membership_fee_cycle/2`, `destroy_membership_fee_cycle/1`
|
||||||
|
|
||||||
|
Note: LiveViews may use direct Ash calls instead of these domain functions for performance or flexibility.
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
This domain handles the complete membership fee lifecycle including:
|
This domain handles the complete membership fee lifecycle including:
|
||||||
- Fee type definitions (monthly, quarterly, half-yearly, yearly)
|
- Fee type definitions (monthly, quarterly, half-yearly, yearly)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ defmodule Mv.Authorization do
|
||||||
|
|
||||||
## Public API
|
## Public API
|
||||||
The domain exposes these main actions:
|
The domain exposes these main actions:
|
||||||
- Role CRUD: `create_role/1`, `list_roles/0`, `update_role/2`, `destroy_role/1`
|
- Role CRUD: `create_role/1`, `list_roles/0`, `get_role/1`, `update_role/2`, `destroy_role/1`
|
||||||
|
|
||||||
## Admin Interface
|
## Admin Interface
|
||||||
The domain is configured with AshAdmin for management UI.
|
The domain is configured with AshAdmin for management UI.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
defmodule MvWeb.PageController do
|
defmodule MvWeb.PageController do
|
||||||
|
@moduledoc """
|
||||||
|
Controller for rendering the homepage.
|
||||||
|
|
||||||
|
This controller handles the root route and renders the application's
|
||||||
|
homepage view.
|
||||||
|
"""
|
||||||
use MvWeb, :controller
|
use MvWeb, :controller
|
||||||
|
|
||||||
def home(conn, _params) do
|
def home(conn, _params) do
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ defmodule MvWeb.MemberLive.Form do
|
||||||
## Form Sections
|
## Form Sections
|
||||||
- Personal Data: Name, address, contact information, membership dates, notes
|
- Personal Data: Name, address, contact information, membership dates, notes
|
||||||
- Custom Fields: Dynamic fields in uniform grid layout (displayed sorted by name)
|
- Custom Fields: Dynamic fields in uniform grid layout (displayed sorted by name)
|
||||||
- Payment Data: Mockup section (not editable)
|
- Membership Fee: Selection of membership fee type with interval validation
|
||||||
|
|
||||||
## Events
|
## Events
|
||||||
- `validate` - Real-time form validation
|
- `validate` - Real-time form validation
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue