- Elixir/Phoenix application
- Event sourcing architecture with Commanded and EventStore
- Integrates with {fill this out}
- Phoenix LiveView for real-time interfaces
- Oban for background jobs
… Enter what your business does, and how your app contributes to that business …
- Always run
bin/verify
before submitting changes - Pay attention to all warnings as they indicate potential issues
- Fix each issue before proceeding to ensure code quality
- This runs all of our deterministic checks so you don't have to run them individually
- Use standard pattern: subscribe in mount, handle_info for PubSub messages
- Consider extracting complex component logic into reusable view functions
- Query data for display at the LiveView level, not in components
- For remote data (like Notion guides), fetch in the LiveView and pass to components
- Squash merge commits
- Each commit in main = complete feature
- Reference similar previous commits when implementing new features
… your arch here …
- Never perform database queries within function components
- Components receive data structures; LiveViews fetch data
- Create dedicated structs for component inputs
- Extract shared view code into reusable component modules
- Transform raw DB entities into presentable data structures in LiveView
- Prefer parameters with defaults over duplicate functions
- Functions order: render → mount → callbacks → private helpers
- Derive UI state from data models, not UI-only state
- Use PubSub for real-time updates
- Keep data access in projection modules, not LiveViews
- Split complex UIs into logical sections with separate component functions
- Handle different states of data (pending/completed) in mount by filtering data appropriately
- Use consistent PubSub message handling for real-time UI updates
- Use function components over embedded content
- Prefer
:if
and:for
over<%= %>
syntax - Account pages: gradient header + card pattern with negative transform
- Toast notifications instead of traditional flash messages
- Separate completed vs. pending items with distinct visual treatments
- Use consistent color schemes: Forest green for active items, gray for completed items
- Display completed items in condensed format with completion status indicators
- LiveView uploads with
allow_upload/3
and PubSub notifications - Store in CloudFlare R2 with presigned URLs
- Audio: RecordRTC.js with MP3 format and LiveView hooks
- Use specialized functions for specific file operations (e.g.,
delete_audio_file
vs genericdelete_file
) - Handle file operations through dedicated notifiers to keep LiveViews focused on UI concerns
- Pattern matching over case statements
- Boolean functions end with question mark
- Sort aliases alphabetically
- Prefer simple functions over complex abstractions
- Derived values over redundant storage (timestamps vs booleans)
- Pass sort direction as parameter with default rather than duplicate functions
- Prefer async tests with unique module names
- No
Mox
- use Adapter pattern or nothing - LiveView: use
Phoenix.LiveViewTest
,has_element?
,render_click/submit
- Events: use
Cove.DataCase
, sequence events with consistent metadata - For schema changes:
MIX_ENV=test mix ecto.drop
instead of migrations/rollbacks
- Test components with meaningful HTML elements/IDs, not "data-testid"
- Test toast messages with
Phoenix.Flash.get(conn.assigns.flash, :info)
- Handle PubSub by manually sending test messages to LiveView process
… existing stuff you have in your app, ask Claude to catalogue it …
- Break large features into multiple logical phases
- Create a detailed PLAN.md or thinking.md document before implementation
- Document each phase with clear milestones and checklists
- Mark completed items with a checkmark (✅) to track progress
- Include implementation details and code snippets in planning documents
- Plan for future phases while implementing current phase
- Problem Description: Context, Problem Statement, Target Outcome
- Implementation Options: Compare approaches with pros/cons
- Recommendation: Select and justify the chosen approach
- Milestones: Break work into logical chunks with checklists
- Implementation Details: Code structures, patterns, and examples
- Testing Strategy: How to verify the implementation works correctly
- Future Enhancements: Ideas for subsequent phases