- Private CRM: an AI CRM where Claude does the data entry and you make the calls · part 1 of 12
- Laravel
- Rust
- Web Application
- React
- CRM
I built a CRM on Laravel for Rust: what day one looked like
Private CRM runs on Laravel for Rust 0.1.4 with Inertia, React and shadcn. Here is how the first day went, from empty skeleton to pipeline, MCP and tests.
5 min read
The first real commit of Private CRM touched 123 files and added 11,346 lines. It landed the same morning as the empty skeleton, and it already had a deal pipeline, an activity timeline, API tokens and an MCP endpoint for AI agents.
This series walks through how the CRM got built, one story per post. This first one covers the stack, the layout rules that kept the code small, and what the first day produced.
The stack, and why a Rust backend
Private CRM is a small CRM and shop back office. The backend is Rust on Laravel for Rust 0.1.4. The frontend is Inertia with React, TypeScript, Tailwind v4 and shadcn/ui.
Laravel for Rust gives you Laravel's shape in Rust: routes, handlers, models with factories and policies, forward-only migrations, queued jobs, a scheduler and a laravel CLI (laravel migrate, laravel route:list). If you know Laravel PHP, the folder names feel familiar. The APIs are not the same, though. The repo's AGENTS.md says it plainly: check the installed framework docs first and never guess an API from Laravel PHP. I followed that rule the whole way.
I wrote about why Microsoft moved Copilot to Rust a while back. A CRM is a less dramatic case, but the payoff is similar. One binary, typed queries, and a compiler that refuses most of the mistakes I'd otherwise find in production.
What the first commit shipped
The commit message lists it: customers, products, orders, tasks, plus a dashboard; an opportunity pipeline with stage moves and an activity timeline; API tokens; and a JSON-RPC MCP endpoint at /api/mcp. Feature tests covered each resource.
That's a lot for one commit. It worked because the starter kit already had auth, Inertia wiring and a Vite setup, so the first commit was all domain code.
Four minutes later the next commit removed the GitHub Actions workflow. Checks run locally instead: every pull request description lists cargo test, cargo clippy --all-targets and the frontend type check with their results.
Layout rules that kept it small
The project follows a few rules from AGENTS.md, and they shaped every later post in this series:
- Handlers live in
src/http/handlers/, one module per resource, using the standard verbs:index,show,create,store,edit,update,destroy. - When an action doesn't fit those verbs, it gets its own small module instead of a custom function. Moving a deal to another stage is
opportunity_stages::update, notopportunities::move_stage. - A model, its factory and its policy sit in one file.
- No repositories or wrapper layers. Comments only for a non-obvious why.
Routes read almost like a table of contents. Here's a slice of src/routes/web.rs today:
resource!(contacts).except([Action::Destroy]);
resource!(companies).except([Action::Destroy]);
resource!(opportunities).except([Action::Destroy]);
route.put("/opportunities/{opportunity}/stage", opportunity_stages::update);
route.post("/opportunities/{opportunity}/activities", opportunity_activities::store);
Notice every .except([Action::Destroy]). Nothing in Private CRM gets deleted any more. That's its own story, covered in part 3.
Tests from the first commit
Every resource had a feature test file from day one. A test boots the app, builds records with factories and sends real requests:
#[laravel::test]
async fn no_tool_can_delete_or_archive(app: Application) -> laravel::Result<()> {
let user = User::factory().allowed(Permission::UseApi).create().await?;
let token = token(&user).await?;
let tools = app
.post("/api/mcp")
.token(&token)
.json(json!({ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }))
.await
.json();
// ...asserts no tool name contains delete, remove, archive or destroy
Ok(())
}
That test came later, but it shows the style. No mocks of the framework, just HTTP in and JSON out. The suite grew from a handful of files to 158 passing tests by the fourth pull request.
Locally the app runs on SQLite. Production runs PostgreSQL. The suite passes on both, after one fix I'll get to in part 2.
The rest of day one
Within the same day the app got a name and a lot of plumbing:
- Renamed to Private CRM in the app, page titles, the MCP server info and the README.
- Breadcrumbs on every page, company favicons, and a logo that collapses cleanly with the sidebar.
- Every table sorts by its column headers. Paginated lists sort on the server; short tables sort in the browser.
- Filter drawers on contacts, companies, orders, products. Search, filters and sort all live in the URL, so a filtered list can be bookmarked or pasted into a chat.
Keeping state in the URL is a cheap choice that pays off later. When the pipeline got a list view, view=list just became one more query parameter.
The timeline, in numbers
The first commit is from the morning of 2 December 2026. The services catalog pull request merged on 4 December. In between:
- 89 commits
- 4 merged pull requests
- 41 migrations
- 37 MCP tools, up from 12 in the first README
- about 690 translated Arabic strings
The next posts go through it in order: roles and permissions, archive-instead-of-delete, money in mills, the MCP server, the requests that came from the CRM's own bots, search and imports, Arabic, push notifications, the UI pass, deployment, then the code review.
If you want to try Laravel for Rust
Start with one resource and its test, and keep the handler on the standard verbs. Read the docs that ship with your installed version, not a blog post (including this one) about a version you don't have. If you're new to the PHP side of the family, my tour of the Laravel ecosystem explains where the names come from.
Next up, part 2: how one owner and one member turned into editable roles and team hierarchies, and the PostgreSQL sequence bug that came with them.
Last updated 4 Dec 2026 · filed under Laravel, rust, web application, react, crm