Automart
A dealership operations platform with a streaming AI assistant, a DB-backed 65-permission authorization engine, and a resilient Redis caching layer.
🚧Internal Services Demo Coming Soon!
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
PHOTO
Overview
Automart handles the operational data model behind an automotive dealership: staff, sessions, customers, vehicles, messages, announcements, inventory, notes, permissions, and reports. Built with Next.js 16 and React 19, it uses a hybrid authorization model instead of rigid role-only gates, keeps Redis optional through racing timeouts and PostgreSQL fallbacks, and protects multi-step writes with isolated database transactions.
Technical Stack
Next.js 16 (App Router)
React 19
TypeScript
PostgreSQL (Neon) & Drizzle ORM
Key Features
- Server-defined tools for staff, inventory, customer, message, notification, web-search, code-execution, and reporting queries via AI SDK 7 with Gemini, Vertex AI, and DeepSeek provider routing.
- Dynamic SQL report builder with validated joins, aggregations, permission checks, and field-level redaction for sensitive data.
- Queries execute through tightly-scoped server tools with sandboxed database access, keeping model output away from direct database execution.
- Streams markdown tokens, live tool outputs, and structured source references with full stop-generation capability.
Architectural Highlights
- Designed a resilient cache-first architecture utilizing Upstash Redis with 250ms racing timeouts, a 60s circuit breaker, and PostgreSQL fallbacks.
- Engineered a tool-based streaming AI architecture leveraging sandboxed server tools and field-level permission redaction for safe data access.
- Developed a custom hybrid authorization system handling a 65-permission catalog, role defaults, and per-user allow/deny overrides.
- Expanded the Vitest coverage to 662 cases across 168 files covering permissions, routes, caching, table flows, AI tools, and auth behavior.
- Built a unified, high-performance data table engine that drives 9 application views with normalized URL paging and debounced filtering.
Project Status
- Robust hybrid authorization engine and matrix-view security control panel.
- Tool-based AI conversational companion with sandboxed server-tool database access.
- Resilient circuit-breaking cache architecture protecting stateful session layers.
- Bilingual announcement workflows, CRM customer registries, and VIN-decoding vehicle engines.
- Current Vitest suite tracks 662 tests across 168 test files alongside strict no-emit TypeScript checks.