Skip to main content
create-frogbot-app asks which template to start from, or takes it from --template:
Every template works with SQLite, PostgreSQL and MongoDB, and with every AI provider. With --ai none, the template’s agents, AI config and AI-only plugins are left out; its collections and sample data stay.

Loading the sample data

The crm and projects templates load their sample data differently.

crm

In development, the dashboard shows a Load sample data panel. Its button calls POST /api/seed, which adds eight fictional companies with logos, their contacts and deals, a week of activities around today, and a few tasks, all assigned to you. It is safe to leave in place:
  • It only adds. When companies, contacts, deals, activities or tasks already has a record, it answers 409 and changes nothing.
  • It creates no login and deletes nothing.
  • With NODE_ENV=production, as under npm run start and the Dockerfile, the panel renders nothing and the endpoint answers 404.
Its seed({ frogbot, req, today }) takes the date the sample is arranged around, so a test can pass a fixed date and get the same records every run.

projects

While the app has none of the template’s records, the dashboard shows a Seed your database panel at the top. Its button calls POST /api/seed, which adds the sample records for whoever is signed in: three projects with tasks, every task assigned to you. The seed creates no user and deletes nothing, so it is safe on a deployed app, including one on Dojo. Once the template’s records exist, the panel hides and the endpoint answers 409 without changing anything. To start over locally, delete the database.

How a seed is built

The seed is plain code in your app, in three files you can change or delete: The seed passes overrideAccess: true and the request to each call, so it can write fields people can’t, such as autonumber numbers. It doesn’t import anything from src/agents, so it keeps working when the app has no AI. The endpoint refuses a request with no signed-in user with 403, and an app that already has the records with 409. If the seed throws, it logs the error and answers 500; otherwise it answers { "success": true }:
Register both in the config: