This commit is contained in:
parent
55401eda3a
commit
6a9229c54f
12 changed files with 325 additions and 3679 deletions
|
|
@ -68,7 +68,7 @@ mix phx.new mv --no-ecto --no-mailer
|
|||
**Key decisions:**
|
||||
- **Elixir 1.18.3 + OTP 27**: Latest stable versions for performance
|
||||
- **Ash Framework 3.0**: Declarative resource layer, reduces boilerplate
|
||||
- **Phoenix LiveView 1.1**: Real-time UI without JavaScript complexity
|
||||
- **Phoenix LiveView 1.1.0-rc.3**: Real-time UI without JavaScript complexity
|
||||
- **Tailwind CSS 4.0**: Utility-first styling with custom build
|
||||
- **PostgreSQL 17**: Advanced features (full-text search, JSONB, citext)
|
||||
- **Bandit**: Modern HTTP server, better than Cowboy for LiveView
|
||||
|
|
@ -80,14 +80,15 @@ mix phx.new mv --no-ecto --no-mailer
|
|||
**Versions pinned in `.tool-versions`:**
|
||||
- Elixir 1.18.3-otp-27
|
||||
- Erlang 27.3.4
|
||||
- Just 1.43.0
|
||||
- Just 1.46.0
|
||||
|
||||
#### 4. Database Setup
|
||||
|
||||
**PostgreSQL Extensions:**
|
||||
```sql
|
||||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- UUID generation
|
||||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- UUID generation (via uuid_generate_v7 function)
|
||||
CREATE EXTENSION IF NOT EXISTS "citext"; -- Case-insensitive text
|
||||
CREATE EXTENSION IF NOT EXISTS "pg_trgm"; -- Trigram-based fuzzy search
|
||||
```
|
||||
|
||||
**Migration Strategy:**
|
||||
|
|
@ -468,7 +469,7 @@ end
|
|||
- **Tailwind:** Utility-first, no custom CSS
|
||||
- **DaisyUI:** Pre-built components, consistent design
|
||||
- **Heroicons:** Icon library, inline SVG
|
||||
- **Phoenix LiveView:** Server-rendered, minimal JavaScript
|
||||
- **Phoenix LiveView 1.1.0-rc.3:** Server-rendered, minimal JavaScript
|
||||
|
||||
**Trade-offs:**
|
||||
- Larger HTML (utility classes)
|
||||
|
|
@ -598,14 +599,33 @@ end
|
|||
|
||||
#### Database Migrations
|
||||
|
||||
**Key migrations in chronological order:**
|
||||
1. `20250528163901_initial_migration.exs` - Core tables (members, custom_field_values, custom_fields)
|
||||
2. `20250617090641_member_fields.exs` - Member attributes expansion
|
||||
3. `20250620110850_add_accounts_domain.exs` - Users & tokens tables
|
||||
4. `20250912085235_AddSearchVectorToMembers.exs` - Full-text search (tsvector + GIN index)
|
||||
5. `20250926164519_member_relation.exs` - User-Member link (optional 1:1)
|
||||
6. `20251001141005_add_trigram_to_members.exs` - Fuzzy search (pg_trgm + 6 GIN trigram indexes)
|
||||
7. `20251016130855_add_constraints_for_user_member_and_property.exs` - Email sync constraints
|
||||
**Key migrations in chronological order (26 total):**
|
||||
1. `20250421101957_initialize_extensions_1.exs` - PostgreSQL extensions (uuid-ossp, citext, pg_trgm)
|
||||
2. `20250528163901_initial_migration.exs` - Core tables (members, custom_field_values, custom_fields - originally property_types/properties)
|
||||
3. `20250617090641_member_fields.exs` - Member attributes expansion
|
||||
4. `20250617132424_member_delete.exs` - Member deletion constraints
|
||||
5. `20250620110849_add_accounts_domain_extensions.exs` - Accounts domain extensions
|
||||
6. `20250620110850_add_accounts_domain.exs` - Users & tokens tables
|
||||
7. `20250912085235_AddSearchVectorToMembers.exs` - Full-text search (tsvector + GIN index)
|
||||
8. `20250926164519_member_relation.exs` - User-Member link (optional 1:1)
|
||||
9. `20250926180341_add_unique_email_to_members.exs` - Unique email constraint on members
|
||||
10. `20251001141005_add_trigram_to_members.exs` - Fuzzy search (pg_trgm + 6 GIN trigram indexes)
|
||||
11. `20251016130855_add_constraints_for_user_member_and_property.exs` - Email sync constraints
|
||||
12. `20251113163600_rename_properties_to_custom_fields_extensions_1.exs` - Rename properties extensions
|
||||
13. `20251113163602_rename_properties_to_custom_fields.exs` - Rename property_types → custom_fields, properties → custom_field_values
|
||||
14. `20251113180429_add_slug_to_custom_fields.exs` - Add slug to custom fields
|
||||
15. `20251113183538_change_custom_field_delete_cascade.exs` - Change delete cascade behavior
|
||||
16. `20251119160509_add_show_in_overview_to_custom_fields.exs` - Add show_in_overview flag
|
||||
17. `20251127134451_add_settings_table.exs` - Create settings table (singleton)
|
||||
18. `20251201115939_add_member_field_visibility_to_settings.exs` - Add member_field_visibility JSONB to settings
|
||||
19. `20251202145404_remove_birth_date_from_members.exs` - Remove birth_date field
|
||||
20. `20251204123714_add_custom_field_values_to_search_vector.exs` - Include custom field values in search vector
|
||||
21. `20251211151449_add_membership_fees_tables.exs` - Create membership_fee_types and membership_fee_cycles tables
|
||||
22. `20251211172549_remove_immutable_from_custom_fields.exs` - Remove immutable flag from custom fields
|
||||
23. `20251211195058_add_membership_fee_settings.exs` - Add membership fee settings to settings table
|
||||
24. `20251218113900_remove_paid_from_members.exs` - Remove paid boolean from members (replaced by cycle status)
|
||||
25. `20260102155350_remove_phone_number_and_make_fields_optional.exs` - Remove phone_number, make first_name/last_name optional
|
||||
26. `20260106161215_add_authorization_domain.exs` - Create roles table and add role_id to users
|
||||
|
||||
**Learning:** Ash's code generation from resources ensures schema always matches code.
|
||||
|
||||
|
|
@ -1562,7 +1582,7 @@ Effective workflow:
|
|||
|
||||
This project demonstrates a modern Phoenix application built with:
|
||||
- ✅ **Ash Framework** for declarative resources and policies
|
||||
- ✅ **Phoenix LiveView** for real-time, server-rendered UI
|
||||
- ✅ **Phoenix LiveView 1.1.0-rc.3** for real-time, server-rendered UI
|
||||
- ✅ **Tailwind CSS + DaisyUI** for rapid UI development
|
||||
- ✅ **PostgreSQL** with advanced features (full-text search, UUIDv7)
|
||||
- ✅ **Multi-strategy authentication** (Password + OIDC)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue