This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
EctoIRS is an Elixir library that provides easy auditing capabilities for Ecto schemas and migrations. The library allows developers to automatically track who created or modified database records.
The library consists of two main modules:
- EctoIRS.Schema (
lib/ecto_irs/schema.ex): Provides macros for adding audit fields to Ecto schemas, includingaudits/2macro that generates:inserted_byand:updated_byfields with automatic population - EctoIRS.Migration (
lib/ecto_irs/migration.ex): Provides migration helpers for adding audit columns to database tables via theaudits/2function
mix testmix credo # Run static code analysis
mix dialyzer # Run type checking (first run will take longer)mix deps.get # Install dependencies
mix deps.compile # Compile dependenciesmix docs # Generate documentationmix compile # Compile the project- Ecto: Core database library (~> 3.10)
- Ecto SQL: SQL adapter for Ecto (~> 3.10)
- Nimble Options: Schema validation for options
- Credo: Static code analysis (dev/test only)
- Dialyxir: Type checking with Dialyzer (dev/test only)
- ExDoc: Documentation generation (dev only)