Features: - User registration and authentication with email/password - Admin login with username-based authentication (separate from regular users) - Review system for contractors to rate clients - Star rating system with review forms - Client identification with private data protection - Contractor registration with document verification - Admin dashboard for review management - Contact form (demo, non-functional) - Responsive navigation with DaisyUI components - Docker Compose setup for production deployment - PostgreSQL database with Ecto migrations - High Vis color scheme (dark background with safety orange/green) Admin credentials: username: admin, password: admin123 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
38 lines
832 B
Elixir
38 lines
832 B
Elixir
defmodule MyFirstElixirVibeCode.AccountsFixtures do
|
|
@moduledoc """
|
|
This module defines test helpers for creating
|
|
entities via the `MyFirstElixirVibeCode.Accounts` context.
|
|
"""
|
|
|
|
@doc """
|
|
Generate a client.
|
|
"""
|
|
def client_fixture(attrs \\ %{}) do
|
|
{:ok, client} =
|
|
attrs
|
|
|> Enum.into(%{
|
|
company_name: "some company_name",
|
|
email: "some email",
|
|
name: "some name"
|
|
})
|
|
|> MyFirstElixirVibeCode.Accounts.create_client()
|
|
|
|
client
|
|
end
|
|
|
|
@doc """
|
|
Generate a contractor.
|
|
"""
|
|
def contractor_fixture(attrs \\ %{}) do
|
|
{:ok, contractor} =
|
|
attrs
|
|
|> Enum.into(%{
|
|
company_name: "some company_name",
|
|
email: "some email",
|
|
name: "some name"
|
|
})
|
|
|> MyFirstElixirVibeCode.Accounts.create_contractor()
|
|
|
|
contractor
|
|
end
|
|
end
|