Skip to content

petervdpas/Formidable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

836 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧾 Formidable β€” The Dynamic Form & Template Designer

Formidable is a modular Electron desktop application for creating, managing, and rendering dynamic forms and Markdown documents from YAML-based templates. It combines a visual form editor with a powerful Handlebars-style rendering engine, a built-in virtual file system (VFS), profile switching, and optional Git integration β€” designed for professionals who need structured content management, versioning, and auditability.

Formidable

πŸ’  Dedicated to Elly β€” who lived with strength, humor and clarity.
"Sleep, don't weep - My sweet love" β€” Damien Rice

🌌 And to Aaron Swartz β€” who refused to back down when it mattered.
"We are all made of stardust, and we are all made of stories." β€” Aaron Swartz


⚠️ Pre-release

This version of Formidable is a pre-release for testing and feedback. Expect missing features or bugs. Use at your own risk. See the release notes for details.

Latest Windows Installer: πŸ‘‰ Formidable Setup.exe (Pre-release)


πŸ“š Documentation

Comprehensive documentation covering all aspects of Formidable's architecture:

Architecture & Core Systems

Form & Template Systems

API Reference

πŸ“– 50,000+ words of documentation with 200+ code examples


✨ Key Features

  • βš™οΈ Dynamic Template & Form System

    • YAML-based templates with 20+ field types
    • Schema validation and sanitization
    • Visual form editor with live preview
    • Full Markdown renderer using Handlebars-style syntax
    • Field GUID system for dynamic updates
  • 🧩 Event-Driven Architecture

    • Centralized EventBus for decoupled communication
    • 30+ domain-specific handler modules
    • Event-driven field operations (CFA.field API)
    • Async request-response patterns
  • πŸ”Œ Extensible Plugin System

    • Backend, frontend, and hybrid plugins
    • Declarative IPC registration
    • Hot-reloadable plugin architecture
    • Plugin SDK with full API access
  • 🎯 Global APIs

    • FGA (Formidable Global API) - Form and field operations
    • CFA (CodeField API) - Dynamic field manipulation from code
    • window.api - Secure IPC bridge (100+ methods)
    • EventBus - Direct event system access
  • πŸ‘₯ Profile Switching

    • Easily switch between multiple user profiles
    • Profiles store their own author name, email, context folder, preferences
    • Supports collaborative and multi-project use
  • πŸ“ Virtual File System (VFS) β†’ Docs

    • Organized storage by context and template
    • Full control over storage folders, paths, and metadata
    • Auto-synced view of the VFS in the sidebar
    • Cache management and event-driven updates
  • πŸ”€ Git Integration (Optional)

    • Commit, push, pull from the UI
    • Git remote info and branch listing
    • Supports Azure DevOps workflows (credential.helper + useHttpPath)
  • πŸ–₯️ Clean, Modern UI β†’ Modal Docs

    • Resizable, ESC-closable modals with backdrop click dismiss
    • Markdown & Preview modal β€” live output with split/closable panes
    • Full light/dark theming, configurable icon or label buttons
    • Split-view for template editing and form data
    • Inert background and disabled state support
  • πŸ”— Internal Linking & Wiki Support

    • Support for internal form links (formIdLink fields)
    • Future-proof architecture for internal wiki server (localhost)
  • πŸ”Ž Designed for Auditability

    • "Auditability by Design" approach: trackable metadata, version control, profile isolation
    • Suitable for regulated environments, audit preparation, compliance

🧠 Template Syntax

Formidable uses a Handlebars-inspired syntax for rendering:

# {{field "title"}}

{{#if (fieldRaw "check")}}
βœ… Enabled
{{else}}
❌ Disabled
{{/if}}

## List
{{#each (fieldRaw "tags")}}
- {{this}}
{{/each}}

## Table
{{#if (fieldRaw "rows")}}
| Col1 | Col2 |
|------|------|
{{#each (fieldRaw "rows")}}
|{{this.0}}|{{this.1}}|
{{/each}}
{{/if}}

Reference helpers:

  • {{field "key"}} β†’ formatted value
  • {{fieldRaw "key"}} β†’ raw JS value
  • {{fieldMeta "key" "property"}} β†’ field metadata access

πŸ“‹ Supported Field Types

Formidable supports 20+ field types with full schema validation:

Type Description Documentation
text Single-line input Docs
textarea Multi-line text block (Markdown/Plain) Docs
boolean Checkbox toggle Docs
dropdown Select from list Docs
multioption Multiple choice (checkbox group) Docs
radio Radio button group Docs
number Numeric input Docs
range Range slider Docs
date ISO-style date picker Docs
list Dynamic list input Docs
table Editable table grid (JSON) Docs
image Upload & preview image Docs
link Text input for URL or link Docs
tags Tag input field Docs
latex LaTeX editor with preview Docs
code Code editor with execution Docs
api API-linked field with mapping Docs
loopstart / loopstop Define repeating sections Docs

See Template & Schema System for complete field documentation.


βš™οΈ Configuration (user.json)

Saved to: ./config/user.json

{
  "theme": "dark",
  "font_size": 14,
  "logging_enabled": true,
  "context_mode": "storage",
  "context_folder": "./",
  "selected_template": "my-template.yaml",
  "selected_data_file": "example.meta.json",
  "author_name": "Regular User",
  "author_email": "regular@example.com",
  "use_git": true,
  "git_root": "./",
  "show_icon_buttons": true,
  "window_bounds": {
    "width": 1280,
    "height": 900,
    "x": 100,
    "y": 80
  }
}
  • Values are validated and auto-repaired on load.
  • UI updates are event-driven (config:update).

πŸš€ Getting Started

Quick Start

git clone https://github.com/petervdpas/formidable.git
cd formidable
npm install
npm start

Building

To build the Windows executable:

npm run build

Note: Current packaging targets Windows. Linux and Mac packaging will be added in future.

Learn More


πŸ§‘β€πŸ’» Development Notes

Quick Tips

  • CTRL+ENTER β†’ toggle fullscreen on template editor
  • Templates = .yaml, Data = .meta.json, Images = .jpg/.png
  • VFS auto-updates on create/save/delete
  • Profile switching triggers full config refresh and context rehydration
  • Markdown & Preview modal: supports split view and pane closing
  • Modals: resizable, ESC-closable, backdrop click dismiss
  • Git config per repo is cached

Architecture Highlights

  • Event-Driven: All operations flow through EventBus
  • Handler Pattern: 30+ domain-specific handler modules
  • IPC Bridge: Secure main ↔ renderer communication via contextBridge
  • Plugin System: Hot-reloadable with declarative IPC
  • Field GUIDs: Every field has a unique identifier for dynamic updates
  • Schema Validation: All data validated and sanitized on load

API Examples

Field Manipulation (from code fields):

// Get field value
const price = await CFA.field.getValue({ key: "price" });

// Set field value
await CFA.field.setValue({ key: "total", value: price * 1.2 });

// Update field options
await CFA.field.updateOptions({ 
  key: "status", 
  options: ["New", "Active", "Completed"] 
});

Event-Driven Operations:

// Save form
await EventBus.emit("form:save", { 
  template: "my-template", 
  data: formData 
});

// Listen to events
EventBus.on("form:saved", (data) => {
  console.log("Form saved:", data);
});

Plugin Development:

// plugin.json
{
  "name": "MyPlugin",
  "ipc": { "process": "handleProcess" }
}

// plugin.js
module.exports = {
  async run(context) {
    // Plugin logic
    return { success: true };
  },
  async handleProcess(event, payload) {
    // IPC handler
    return { result: "done" };
  }
};

See Documentation for complete guides and examples.


πŸ“œ License

MIT Β© 2025 Peter van de Pas


πŸ™ Acknowledgments

Built with:

Special thanks to the open-source community.


πŸ”— Links

About

Formidable is a dual-context Electron app for editing structured Markdown content using YAML-based form templates.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors