manifest yaml
via PatrickJS/awesome-cursorrules
YAML-based backend scaffolding for Manifest demo apps with structured entity and property definitions.
What is manifest yaml?
This rule guides creation of lightweight Manifest backend applications using YAML configuration. It provides a structured approach to defining entities, properties, relationships, and policies while enforcing constraints like entity limits and property type variety to keep demos focused and maintainable.
- Set up Manifest npm package with watch and seed scripts in package.json
- Create and configure manifest/backend.yml with entities, properties, and relationships following Manifest JSON Schema
- Define multiple property types (text, date, number, richText, image, choice) within single demo app
- Configure YAML schema validation via redhat.vscode-yaml extension with Manifest-specific schema
- Add entity relationships (belongsTo) and public read/create policies for appropriate entities
- Enforce demo constraints: max 2-3 entities, max 4 properties per entity, no special characters or middlewares
Applies to
File patterns this rule matches.
Rule definition (reference)
Source of truth, from the repository.
Prompt for Expert Manifest Developer
You are an assistant for app creation. You are going to use the backend Manifest. The apps you generate are light and for demo purposes: you not aim to provide all the data structure but instead showcase a variety of property types.
Code structure When asked to create a backend, execute the following actions:
- Install the
manifestnpm package - Add the following scripts to
pacakge.json: "manifest": "node node_modules/manifest/scripts/watch/watch.js" and "manifest:seed": "node node_modules/manifest/dist/manifest/src/seed/scripts/seed.js" - Create the
manifest/backend.ymlfile and add the manifest code to it. - Add the
redhat.vscode-yamlas recommendation in.vscode/extensions.json - Configure
yaml.schemasonly with a schema URL or local schema file verified for the Manifest backend version used by the project.
Backend file
On the manifest/backend.yml, follow those rules:
- Strictly follow the Manifest JSON Schema shipped with the project or verified from the current Manifest backend documentation.
- Start by addind a quick name to the app
- Limit to 2 or 3 entities maximum
- Limit to 4 properties maximum per entity
- Try to showcase different property types
- Only use validation properties once or twice
- No entity should be called admin
- Do not use authenticable entities
- Add an emoji after each entity name, but do not use the emoji it on relationships references
- Add a linebreak before each entity object
- Each entity only appears once. Relationships goes just below the properties, do not repeat the entity name.
- Do not use special characters. . Do not use middlewares, endpoints or hooks.
- Use YAML abbreviated form for objects, with spaces. Example: { name: issueDate, type: date }
- Do not add relationships to single entities
- For relationships, use the short form. Ex: ' belongsTo: - Author'
- Add policies. Most projects only have "read" public policies. Some projects have "create" public policies when anyone can post (contact forms submissions, comments, etc.)
- If using the "choice" property type, use "options.values" property to list choices. Example:
{ name: type, type: choice, options: { values: ["Fire", "Water", "Grass"] } } - Do not add "seedCount" and "mainProp" to entities
Documentation Refer to the Manifest backend documentation that matches the project's installed version.
Example
This is an example of the content of a backend.yml file:
name: My pet app 🐾
entities:
Owner:
properties:
- name
- { name: birthdate, type: date }
Cat: properties: - name - { name: age, type: number } - { name: birthdate, type: date } belongsTo: - Owner
Homepage: nameSingular: Home content single: true properties: - title - { name: description, type: richText } - { name: cover, type: image }
Related rules
Senior full-stack TypeScript, React, Node.js guidance with clean architecture, testing, and WHY-oriented reasoning.
Quantitative factor research skills for designing, evaluating, and mining alpha factors in equities markets.
Android development with Jetpack Compose, clean architecture, and Material Design 3.
Angular development with Novo Elements UI library using standalone components.
Expert Angular 18 + TypeScript development with Jest, emphasizing clean code and performance.
Manage Kubernetes clusters, add-ons, stacks, and credentials via the Ankra CLI platform.