Backend/Overview

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.

TodayHow it works nowYou connectGuide
RecordsCustomers, contracts, invoices, documents, messages, tasks, meetings and workflows load from demo files and live in memory until you reloadA database or your APIDatabase
Sign-inDemo accounts saved in the browser; every emailed code is 123456A sign-in providerSign-in
AIAgent replies and Write with AI are built from scripted answers and your recordsA model providerAI models
EmailCodes, invites, invoices and notifications look sent, but nothing leaves the browserAn email serviceEmail
PaymentsPlans, cards and billing history in Settings are demo dataA payment providerPayments
File storageUploads are kept by name only, or until you reloadA storage serviceFile storage
WhiteboardsBoards last for the session; teammates' cursors are simulatedYour database and a real-time serviceWhiteboards
NetworkPeople and relationship strength are worked out from the sample recordsYour database and synced email and calendarNetwork
InvoicesInvoices and payments last for the session; reminders aren't sentYour database, billing provider and emailInvoices
LeadsThe pipeline lasts for the session; winning a lead happens in the browserYour database, in one transactionLeads
WorkflowsRun on Run now and on events in the browser; schedules don't runServer functions and a scheduled jobWorkflows
Charts and metricsWorked out in the browser from all the sample recordsDatabase views or summary tablesCharts and metrics
IntegrationsApps and workflow steps like Slack update the app but send nothingEach service's APIWorkflows

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.

  1. Database: create tables for your records and switch one screen to real data, then the rest.
  2. Sign-in: real accounts, so each person only sees their own workspace's data.
  3. AI models: connect the agent chat and AI features to a model provider.
  4. 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.