Skip to content

Project Structure

loquent-app/
├── src/ # Application source code
├── migration/ # SeaORM database migrations (52 files)
├── justfile # Command runner tasks
├── Cargo.toml # Dependencies and build config
├── .env.example # Runtime env template (APP_HOST, DATABASE_URL)
└── seed.env.example # Migration seed template (API keys, credentials)
src/
├── main.rs # Entry point — boots Axum + Dioxus + cron scheduler
├── routes.rs # All page routes (Dioxus Router)
├── app/
│ └── jobs/ # Job registration (aggregates report + todo jobs)
├── ui/ # UI primitive components
├── shared/ # Cross-cutting types, layouts, context
├── bases/ # Infrastructure layer
│ ├── auth/ # Authentication & sessions
│ │ ├── api/ # Login, logout, session endpoints
│ │ ├── constants/# Cookie names and values
│ │ ├── services/ # Auth state resolution
│ │ └── types/ # User, Organization, Session, AuthState
│ ├── client/ # Dioxus app client entry point
│ ├── conf/ # CoreConf trait + get_core_conf service
│ │ └── core/
│ │ ├── services/
│ │ └── traits/
│ ├── db/ # Database connection (db_client)
│ │ ├── schemas/ # SeaORM entities (GENERATED, gitignored)
│ │ └── services/
│ ├── email/ # Email sending via Resend
│ │ ├── conf/core/
│ │ └── services/
│ └── job/ # JobTrait for scheduled background work
│ └── traits/
└── mods/ # Feature modules
├── agent/ # AI agent management
├── analyzer/ # Post-call analysis configuration
├── call/ # Call records & history
├── contact/ # Contact management
├── dashboard/ # Dashboard view
├── gemini/ # Gemini Live API provider
├── knowledge/ # Knowledge bases & documents
├── openai/ # OpenAI Realtime & transcription
├── phone/ # Phone number management
├── report/ # Email reports + scheduled jobs
├── signup/ # User onboarding
├── store/ # File storage utilities
├── template/ # Email/report templates
├── todo/ # To-do extraction + scheduled jobs
└── twilio/ # Twilio telephony integration

Each feature module in mods/ follows the same vertical slice pattern:

mods/<module>/
├── api/ # Dioxus server functions (#[get], #[post], etc.)
├── components/ # Dioxus UI components
├── services/ # Business logic (server-only)
├── types/ # Shared data types (compiled for both targets)
├── views/ # Page-level components (routed from routes.rs)
├── traits/ # Trait definitions (when needed)
├── constants/ # Module-specific constants
├── conf/ # CoreConf implementations (when needed)
├── utils/ # Utility functions (server-only)
└── jobs/ # Scheduled jobs (when needed)

Not every module has all directories. The pattern scales — add only what you need.

10 primitive components, each self-contained:

ComponentFile
Buttonbutton_ui.rs
Card, CardContent, CardHeadercard_ui.rs
Inputinput_ui.rs
Labellabel_ui.rs
Textareatext_area_ui.rs
Select, SelectOption, SelectTrigger, etc.select_ui.rs
Checkboxcheckbox_ui.rs
Badgebadge_ui.rs
Spinnerspinner_ui.rs
ScrollAreascroll_area_ui.rs
DirectoryContents
types/LoginResponse, SignupResponse, ClientSession, shared enums
layouts/AppLayout (nav shell), PrivateLayout (auth gate)
components/ViewContainer, BackButtonConfig, reusable wrappers
constants/APP_HOST and other shared constants
context/Dioxus context providers
views/Shared view components