AutoFolio keeps each car's costs, maintenance, documents and photos for life, shows an honest net worth, closes a sale with the deal result and the economic result apart, and shares a privacy-safe passport with a buyer. It ships in Portuguese (Brazil), English and German. An Expo app holds the garage; one Cloudflare Worker serves the site, the buyer passport at /p/:token, authentication, the typed API and scheduled jobs. Postgres stores the household's records under row-level security; R2 stores private photos and documents.
The product, screens and business rules come from the read-only handoff in handoff/. The code is built on a full-stack template whose auth, tenancy, uploads and jobs it reuses; ADR-0014 maps one onto the other and ADR-0015 records the data model.
Quickstart
git clone https://github.com/CarlosZiegler/autofolio.git
cd autofolio
pnpm install
pnpm run setup
pnpm run db:migrate
DEV_SEED_LOGIN=true pnpm dev:webpnpm 11 has built-in setup and doctor commands, so the repository's scripts need pnpm run. The web runs at http://localhost:3005; DEV_SEED_LOGIN=true lets the dev links sign into a demo garage loaded from handoff/data/seed.json. The project runs locally for now: use a local or Docker Postgres, apply reviewed migrations and never push the schema. Local setup covers the database, the Expo dev client, the autofolio://dev/<board> links and the end-to-end flows.
What is in the app
The mobile app has four tabs, Garage, Finances, Service and Profile. It covers adding cars from the catalog, purchase, trade-in and financing, expenses with duplicate warnings and an offline queue, recurring expenses, spreadsheet import, services, maintenance plans and alerts, documents, photos, history, net worth, insights, closing a sale, passports, history transfer, data export and account deletion. The family garage (with invite links and QR), the cost assistant and partner shops are later releases already built behind their boards.
Built on top, behind flags that are off by default:
- AI (AI foundation): the document scanner and shoebox, the Cinematic Studio, copilot cards, proactive insights with the monthly summary and the dashboard photo, and the AI extras. A model only fills a draft the person confirms, and every figure it shows comes from the records.
- Social: Moments and share cards made on the phone, showcase links at
/g/:token, and the shared garage by link or QR with its activity line. - Appearance: Monochrome (the default), Car colour and Warm, in the app and the signed-in web.
The web has the marketing site (/), the privacy page (/privacy), the buyer passport (/p/:token, live or revoked), the public showcase (/g/:token), the invite page (/i/:token), the partner portal (/partners, v2 vision), these docs, and the template's account and admin pages in the AutoFolio style.
The product rules of the AI and social boards are in docs/specs/ai-features.md and docs/specs/social-sharing.md, each with what is built and what is deferred. The domain words are in CONTEXT.md.
Stack at a glance
| Layer | Choice |
|---|---|
| Web | TanStack Start 1.0, React, Vite, Tailwind CSS and shadcn/Base UI |
| Native | Expo, Expo Router and React Native |
| API and contracts | oRPC, Zod and TanStack Query |
| Identity | Better Auth with Organizations, passkeys and two-factor |
| Data | Drizzle, Postgres/Neon and Cloudflare Hyperdrive |
| Background work | Stable Effect APIs and durable Drizzle leases |
| Agents | Shared tool catalog, TanStack AI and MCP OAuth |
| Documentation | Headless Fumadocs MDX/core, static highlighting and server-rendered articles |
The library reference records pinned versions and upgrade policy.
Platform from the template
Authentication and account security, Organizations (an AutoFolio household), files, imports, admin management, audit records, feature flags, three-language app chrome, transactional email, provider-gated payments, AI approvals, MCP tools, OG images and agent-readable pages. Native purchases, widgets and ads have explicit activation paths; installed code does not imply configured providers.
How these docs are organized
The pages are arranged by altitude, from the map down to templates. Read only as far down as you need.
| Altitude | Question | Where |
|---|---|---|
| Map | Where do I look? | This page |
| Principles | Why is it shaped this way? | Architecture |
| Conventions | What is the exact rule? | Backend conventions, Conventions, Features |
| Reference | What exists, and what checks it? | Packages, Review checklist, Enforcement |
| Templates | Give me the files. | The domain-feature skill in .agents/skills/ |
| Process | How do these evolve? | Decisions, Changelog, Runbooks |
Repository map
Docs articles are written in English. Navigation controls follow the app language (Portuguese, English or German). Architectural decisions are rendered from their original files, so there is one source of truth.