Seeding: the seeder applies a config-as-code file named by Seed:File
- Dominant language
- C#
- Stars
- 6
- Forks
- 7
- Avg merge
- 4h 42m
- Merged PRs (30d)
- 307
Description
The seeder cannot set up an instance. `barakoCMS/Data/DataSeeder.cs:13-46` seeds roles, the initial users and, behind `Seed:DemoContent`, the attendance demo. A tenant, its domains and its first member are curl steps in `docs/delivering-a-client-project.md`. #844 (barista up) and BaryoVM #87 each plan to create secrets and a tenant again in their own way.
### Why it matters
Standing up a clinic's instance should be one reviewed file, not a runbook of curl calls that someone gets slightly different each time. Three tools writing their own setup means three ways for a new instance to start in a different state.
### The general concept
The config-as-code file from #345, named by `Seed:File`, applied by the seeder on first start: tenants, domains, roles, first members, content types and settings. The same apply code path the CLI uses, so the seeder, barista up and a BaryoVM deploy all produce the same instance from the same file.
### Where it lives
Core: the seeder, calling the #345 apply engine.
### Compatibility
Released. With no `Seed:File`, the seeder does what it does today. `DataSeeder` is package surface (CLAUDE.md section 6), so `SeedAsync(IHost)` keeps its signature and reads the setting itself. Relates #884, which trims the seeded roles.
### Done when
- Starting an empty instance with `Seed:File` pointing at a file with one tenant, a domain and a member creates all three, and a test showing that fails today.
- Starting again with the same file changes nothing.
- The delivering-a-client-project doc replaces the curl steps with the file.
Found in the architecture sweep of 15 September 2026.
Contributor guide
Research direction
Start with barakoCMS/Data/DataSeeder.cs:13-46 and the #345 config-as-code apply engine, then inspect how the CLI uses that apply path. Add coverage for an empty instance using Seed:File with one tenant, domain, and member, including a second identical start. Update docs/delivering-a-client-project.md so the curl steps are replaced by the file-based setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100