Metadata Schema
Reference for the SolidX metadata schema and how it drives runtime behavior.
Metadata Overview
Mental Model
In SolidX, metadata is the declarative layer that defines the application the platform will materialize at runtime.
- Models and fields define data structure.
- Views, actions, and menus define application behavior and navigation.
- Roles, permissions, rules, templates, and settings define platform policy and runtime behavior.
Editing metadata changes full-stack platform behavior, not only isolated configuration values.
The metadata schema in SolidX defines the structure and behavior of platform components through declarative configuration rather than direct framework-level rewrites.
SolidX allows configuring both backend and frontend functionality using metadata configuration.
The metadata can either be defined in JSON files or through the admin interface. When any metadata is created or updated through the admin interface, it is stored in the database as well as in the JSON file for the corresponding module. This allows for easy version control and migration of metadata changes across different environments.
Every module needs its own metadata file, which is then seeded into the database.
Seeding Metadata
Seeding is the process that initializes the database with the metadata and platform records required for SolidX to function correctly.
Note
The result of the seeding step is a working SolidX environment, not only a populated database.
Seeding Mental Model
In SolidX, metadata in JSON is only part of the story. The platform becomes usable when that metadata is seeded into the database so the runtime can discover modules, views, roles, menus, templates, and other platform records.
- A plain database is only persistence.
- A seeded database is a functioning SolidX environment.
- That is why seeding is a bootstrap step, not only sample-data insertion.
The key idea is that seeding is how declarative metadata becomes active platform state.
Why Seeding Matters
Seeding gives you a few immediate benefits:
- Bootstraps the platform: a new database becomes a usable SolidX instance rather than an empty persistence layer.
- Keeps environments consistent: local, test, and deployed environments can all be brought to the same metadata baseline.
- Activates metadata changes: when metadata changes in JSON or in the platform workflow, seeding is how those changes become active in the database.
- Reduces manual setup: key platform configuration does not need to be recreated by hand in every environment.
To apply metadata changes made in the JSON file directly, you must sync the database with the updated metadata files.
- Seed metadata into the database:
solidctl seedThis command reads all metadata files and updates the SolidX database.
By default, this triggers the ModuleMetadataSeederService, provided by the @solidxai/core package.
It is responsible for populating the platform metadata needed by SolidX.
- (Only for code generation changes) Refresh the generated code:
# If your metadata changes involve code generation, prefer regenerating the module:
solidctl generate module
# If you want a smaller, targeted refresh, generate a single model:
solidctl generate modelThis step ensures the generated code reflects the latest metadata. Typical cases where this extra step is required:
- Adding a new module
- Adding fields to a model
Tip
Just running the solidctl seed command is sufficient for most cases, except the ones mentioned above, since the platform reads the metadata directly from the database at runtime.
What Gets Seeded
Seeding does not only load modules and models. It also initializes several platform concerns that SolidX expects to exist at runtime.
- Permissions: permission names are derived from controller and controller method names, for example
UserController.findMany. - Media storage providers: storage backends such as
default-filesystemare initialized. - System fields metadata: core system models and fields from the platform metadata are seeded.
- Functional module metadata: module JSON files are read and stored in the database.
- Roles: default roles such as
AdminandInternal Userare created, alongside any custom roles defined in metadata. - Users: default users defined in metadata are seeded.
- Views: generated UI definitions are created from metadata.
- Actions: view-level actions are linked into the generated experience.
- Menus: navigation structure is initialized.
- Email templates: default email notification templates are seeded.
- SMS templates: SMS notification templates are seeded.
- Settings: application-level configuration records are initialized.
- Security rules: record-level access policies are seeded.
- List of values: reusable enumerations and dropdown value sets are seeded.
- Dashboards: dashboard configuration and summaries are initialized.
Operational Notes
- If you change metadata only,
seedis usually enough. - If your metadata change affects generated backend code, run
generate moduleorgenerate modelafter seeding. - After seeding, verify seeded users and review permissions for any custom roles so the environment behaves as expected.
Key Components
Below are the key components of the metadata schema. All the functionality concerning the below components is driven by the metadata schema.
Module Metadata
Model Metadata
Field Metadata
View Metadata
Action Metadata
Menu Item Metadata
Roles & Permissions
Users
Email Templates
SMS Templates
Media Storage Providers
Scheduled Jobs
Security Rules
List of Values
Dashboard Metadata
Best Practices
Naming Conventions
- Use kebab-case for internal names such as
fees-portalandinstitute-list-view. - Use PascalCase for display names shown in the UI such as
Fees PortalandInstitute List View - Use camelCase for field names such as
instituteNameandfeeAmount.
Security First
- Configure roles and permission sets early instead of widening access later.
- Add security rules wherever role access alone is not enough to protect records.
- Apply least-privilege access to sensitive models and workflows.
Performance Optimization
- Add indexes deliberately for fields that are frequently searched, filtered, joined, or sorted.
- Be deliberate about schema growth as models and generated views expand over time.
User Experience
- Group related fields logically in generated forms and views.
- Choose field types that match both the data shape and the authoring experience.
- Add descriptions where they improve editor clarity or reduce configuration mistakes.
Maintainability
- Keep field configuration patterns consistent across modules.
- Version metadata changes carefully and review them like application code.
- Test security-sensitive metadata after seeding so runtime behavior matches intent.
Data Integrity
- Configure field validations deliberately rather than relying on UI behavior alone.
- Choose stable and unique user keys that remain meaningful over time.
- Use appropriate data types and relation cascading rules for the lifecycle of the data.
Worked Tutorials
If you want to see these metadata surfaces applied in a working build flow before reading the individual reference pages, start with one of these tutorials.
Todo App with SolidX
A smaller end-to-end example that shows how module, model, field, view, and action metadata fit together in a simple build flow.
School Fees Portal Tutorial
A larger multi-module implementation that uses metadata across onboarding, permissions, views, payment workflows, and operational configuration.

