Skip to main content

Studio User Guide

Overview

Framework-M Studio is a visual development environment for creating and managing DocTypes.

Starting Studio

# Start Studio server
uv run m studio

# Or with a specific port
uv run m studio --port 9999

Then open http://localhost:9999/studio in your browser.

Studio Dashboard Framework M Studio Dashboard - Visual metadata management at a glance.

Creating a DocType

  1. Navigate to DocTypes - Click "DocTypes" in the sidebar
  2. Click "Create" - Opens the DocType editor
  3. Enter Name - Use PascalCase (e.g., SalesOrder)
  4. Add Fields - Click "Add Field" and configure each field
  5. Save - Click "Save" to generate the Python file

DocType Designer The Studio Designer - A visual canvas for building complex DocType layouts and rules.

Adding Fields

Each field has:

  • Name - Python identifier (snake_case)
  • Type - Select from: Text, Integer, Float, Boolean, Date, etc.
  • Required - Whether the field is mandatory
  • Default - Optional default value
  • Validators - Min/max length, pattern, min/max value

Configuring Permissions

Permissions are defined in the DocType's Meta class:

  • Enable in the Properties panel
  • Set is_submittable = True for workflow-enabled docs

Using Git Mode

Viewing Status:

  1. Click the Git icon in the sidebar
  2. See current branch, modified files, and commit history

Committing Changes:

  1. Make changes to DocTypes
  2. Open Git panel
  3. Enter commit message
  4. Click "Commit"

Pushing to Remote:

  1. Commit your changes first
  2. Click "Push" to upload to GitHub

Designer Capabilities

The Designer tab provides a drag-and-drop canvas for building your form layout.

  • Properties Panel: Click any field to edit its UI metadata (labels, icons, widget choices, and chip modes).
  • Nested Sections: Organize fields using Tabs and Sections.

Migration Verification (Live Sync)

Switch to the Migration tab to perform a dry-run sync against your actual database.

  1. Click "Verify Schema": Compares your local Blueprint with the DB state.
  2. Review Diffs: The engine will flag Safe, Warning, or Breaking changes.
  3. ZDM Support: Breaking changes include links to Zero-Downtime Migration (ZDM) guides.

The Print tab (Beta) allows managing metadata for document printing. This sets the foundation for Jinja/React-based print templates.

Sandbox Mode

Test DocTypes without saving:

  1. Open a DocType
  2. Switch to "Sandbox" tab
  3. Use auto-generated mock data
  4. Test CRUD operations
  5. Verify validation rules

Controller Hooks

Available lifecycle hooks:

  • validate - Before save validation
  • before_save - Pre-persistence logic
  • after_save - Post-save side effects
  • before_delete - Pre-delete cleanup

Edit in the "Controller" tab.