Backend overview
Accordee is the complete front end, running on demo data. This section shows what's demo today, what you replace it with, and a sensible order to do it in.
What's real and what's demo
The whole interface is real: every screen, menu, form, table and animation, the state behind them and the navigation between them. Preferences, favorites, workspace settings and table layouts are saved in the browser. What isn't connected yet is anything that would need a server: the app doesn't call any backend for data.
| Today | How it works now | You connect | Guide |
|---|---|---|---|
| Records | Customers, contracts, invoices, documents, messages, tasks, meetings and workflows load from demo files and live in memory until you reload | A database or your API | Database |
| Sign-in | Demo accounts saved in the browser; every emailed code is 123456 | A sign-in provider | Sign-in |
| AI | Agent replies and Write with AI are built from scripted answers and your records | A model provider | AI models |
| Codes, invites, invoices and notifications look sent, but nothing leaves the browser | An email service | ||
| Payments | Plans, cards and billing history in Settings are demo data | A payment provider | Payments |
| File storage | Uploads are kept by name only, or until you reload | A storage service | File storage |
| Whiteboards | Boards last for the session; teammates' cursors are simulated | Your database and a real-time service | Whiteboards |
| Network | People and relationship strength are worked out from the sample records | Your database and synced email and calendar | Network |
| Invoices | Invoices and payments last for the session; reminders aren't sent | Your database, billing provider and email | Invoices |
| Leads | The pipeline lasts for the session; winning a lead happens in the browser | Your database, in one transaction | Leads |
| Workflows | Run on Run now and on events in the browser; schedules don't run | Server functions and a scheduled job | Workflows |
| Charts and metrics | Worked out in the browser from all the sample records | Database views or summary tables | Charts and metrics |
| Integrations | Apps and workflow steps like Slack update the app but send nothing | Each service's API | Workflows |
How the demo data works
Demo content lives in src/lib/data. Each module has a provider in src/components/providers that starts from those files, keeps the records in memory and offers actions such as adding a customer or updating a contract. All providers are set up once, in the layout that wraps every app screen.
Most screens get their records from providers and change them through the providers' actions. So to go live, you mostly change the providers, not the screens: each one loads its records from your backend and sends its changes there. You can do this one module at a time, while the rest keeps running on demo data.
A recommended order
- Database: create tables for your records and switch one screen to real data, then the rest.
- Sign-in: real accounts, so each person only sees their own workspace's data.
- AI models: connect the agent chat and AI features to a model provider.
- The rest, as your product needs them: Email, Payments, File storage, Whiteboards, Network, Invoices, Leads, Workflows and Charts and metrics. Before launch, take out the Sample data.
An AI coding tool can do much of this work with you. Accordee's AGENTS.md explains the providers and data files to it. See AI coding tools.
Before real customers arrive
- Keep secrets on the server. API keys and database passwords go in environment variables and are only read in Server Components, Route Handlers or Server Actions. Never give a secret the
NEXT_PUBLIC_prefix: those reach the browser. - Check access on the server. Hiding a button doesn't protect data. Every request that reads or changes records should check who's signed in.
- Remove the demo parts you replace: the demo account, the 123456 code and the demo people and companies.
Have someone technical review your backend, sign-in, payments and anything that handles customer data before real customers use it.