Project Structure
Top Level
Section titled “Top Level”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)Source Tree
Section titled “Source Tree”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 integrationModule Convention
Section titled “Module Convention”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.
UI Layer
Section titled “UI Layer”10 primitive components, each self-contained:
| Component | File |
|---|---|
Button | button_ui.rs |
Card, CardContent, CardHeader | card_ui.rs |
Input | input_ui.rs |
Label | label_ui.rs |
Textarea | text_area_ui.rs |
Select, SelectOption, SelectTrigger, etc. | select_ui.rs |
Checkbox | checkbox_ui.rs |
Badge | badge_ui.rs |
Spinner | spinner_ui.rs |
ScrollArea | scroll_area_ui.rs |
Shared Layer
Section titled “Shared Layer”| Directory | Contents |
|---|---|
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 |