Skip to content

luisoncpp/Trama

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

165 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trama ✍️

A file-first desktop application for writers and worldbuilders, built with Electron, Preact, and Tailwind CSS.

Trama is designed for managing long-form manuscripts and complex lore through a local-first philosophy, using standard Markdown files with YAML frontmatter.

🚀 Features

✅ Currently Implemented

  • File-First Architecture: Your data stays in your folders. Trama works directly with the local file system.
  • Semantic Project Tree: A specialized sidebar designed for writers with distinct sections for Manuscripts, Lore, Characters, Locations, and more.
  • Rich Markdown Editor: A Quill-based editing experience with full Markdown persistence, YAML frontmatter integration, and inline find.
  • Split Pane Workspace: Multi-pane support to keep notes, lore, and manuscript side-by-side.
  • Focus Mode & Fullscreen: Zero-distraction writing environment with native fullscreen and configurable line, sentence, or paragraph focus scope.
  • Document Zoom: Zoom in/out via Ctrl++/Ctrl+- shared across twin panes.
  • Appearance: Support for Light, Dark, and System themes.
  • AI Import / Export: Structured clipboard import and multi-file export flows for working with LLMs without leaving the file-first model.
  • Paste Markdown: Convert Markdown from the clipboard directly into the rich editor.
  • Wiki Tag Navigation: Tag index refreshes after saves so Ctrl/Cmd+Click tag navigation remains reliable.
  • Smart Conflict Resolution: Built-in watcher detects external changes and helps resolve edit conflicts.
  • Folder Operations: Safe rename, delete, and move workflows with subtree tracking and index reconciliation.
  • Drag-and-Drop Reorder: Reorder files and move them between folders with visual drop indicators and corkboard order persistence.
  • Book Export: Multi-format export (Markdown, HTML, DOCX, EPUB, PDF) with layout directives and image support.
  • ZuluPad Import: Import ZuluPad .zulu documents into your project structure.
  • Spellcheck: Configurable spellcheck with language selection and optimistic UI sync.

⏳ Planned / In Progress

  • Project Templates: Pre-defined schemas for characters, locations, and world-building notes.

❌ Cancelled

  • Corkboard View: Drag-and-drop cards for planning and reorganizing scenes or ideas.

🛠️ Tech Stack

  • Backend: Electron 41.x (Node.js for native FS access)
  • Frontend: Preact 10.x + Vite 8.x
  • Styling: Tailwind CSS 4.x
  • Editor: Quill 2.x (Custom Markdown integration)
  • Validation: Zod 3.x for IPC contracts
  • PDF Generation: pdf-lib 1.x
  • DOCX Generation: docx 9.x
  • EPUB Generation: epub-gen 0.1.x
  • YAML Parsing: yaml 2.x

📦 Getting Started

Prerequisites

  • Node.js (Project uses package.json with ESM)
  • npm

Installation

  1. Clone the repository:
    git clone https://github.com/luisoncpp/trama.git
    cd trama
  2. Install dependencies:
    npm install

Development

Run the development server (starts both Vite and Electron):

npm run dev

Testing

Run the test suite (Vitest):

npm run test

In agent or sandboxed environments, prefer the PowerShell runner:

powershell -ExecutionPolicy Bypass -File scripts/run-tests.ps1

For smoke tests (requires build):

npm run test:smoke

Building

To create a production-ready Windows installer:

npm run dist:win

To build without packaging:

npm run pack:win

📂 Project Structure

  • electron/: Main process, IPC handlers, and services (TypeScript).
    • ipc/handlers/: Typed IPC handler modules (project, AI, book export, Zulu).
    • services/: Document repository, index service, watcher, book export pipeline.
  • src/: Preact renderer source code.
    • features/project-editor/: Domain-driven feature modules (Editor, Sidebar, Pane workspace).
    • shared/: Shared IPC types and constants between Main and Renderer.
  • docs/: Design specifications, architecture docs, implementation plans, and lessons learned.
  • tests/: Comprehensive test suite (unit, integration, and smoke tests).

🧭 Developer Documentation Entry

If you are starting a new implementation conversation, begin with:

This entrypoint routes to the mandatory docs that are often missed:

🤝 Contributing

Contributions are welcome. Please read docs/dev-workflow.md for the development workflow, testing requirements, and documentation update protocol.

📄 License

GPL-3.0-or-later - see the LICENSE file for details.

About

An app for creative writing

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages