• TypeScript 67.7%
  • Vue 29.6%
  • CSS 2.2%
  • Dockerfile 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yanick Schraner 456f57c497
Feat/updates (#207)
* Update all non-major dependencies

* chore(deps): update vitest and @vitest/coverage-v8 to v5

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-02 11:13:03 +02:00
.agents/skills/nuxt-ui Features/advisor UI rewrite (#158) 2026-07-26 18:57:25 +02:00
.github/workflows Bump ci-workflows to version-pinned mise setup (#201) 2026-09-08 14:21:18 +02:00
.mise-tasks Features/mise (#167) 2026-08-03 16:19:03 +02:00
.vscode
.zed
_imgs updated the demo video 2026-08-13 21:13:53 +02:00
app feat: save, manage and share custom prompts locally (#206) 2026-10-02 11:01:50 +02:00
docker chore: bump vllm to v0.30.0 (#205) 2026-10-02 09:12:41 +02:00
docs feat: save, manage and share custom prompts locally (#206) 2026-10-02 11:01:50 +02:00
favicon-proposal Feat/einfache sprache (#176) 2026-08-15 17:17:28 +02:00
i18n/locales feat: save, manage and share custom prompts locally (#206) 2026-10-02 11:01:50 +02:00
public Feat/einfache sprache (#176) 2026-08-15 17:17:28 +02:00
server feat: save, manage and share custom prompts locally (#206) 2026-10-02 11:01:50 +02:00
shared Feat/einfache sprache (#176) 2026-08-15 17:17:28 +02:00
tests feat: save, manage and share custom prompts locally (#206) 2026-10-02 11:01:50 +02:00
.dockerignore
.editorconfig
.env.azure.schema Use mise for Docker toolchain management (#190) 2026-08-28 16:52:03 +02:00
.env.buildtime.schema Text/ms teams (#132) 2026-04-14 15:12:10 +02:00
.env.dev.schema Use mise for Docker toolchain management (#190) 2026-08-28 16:52:03 +02:00
.env.runtime.schema Use mise for Docker toolchain management (#190) 2026-08-28 16:52:03 +02:00
.env.schema Text/ms teams (#132) 2026-04-14 15:12:10 +02:00
.gitignore Chore/mise uniform tooling (#173) 2026-08-17 10:40:40 +02:00
AGENTS.md Features/Layers integration 2026-02-02 15:02:22 +01:00
biome.json Chore/mise uniform tooling (#173) 2026-08-17 10:40:40 +02:00
bun.lock Feat/updates (#207) 2026-10-02 11:13:03 +02:00
bunfig.toml Features/advisor UI rewrite (#158) 2026-07-26 18:57:25 +02:00
codecov.yml
Dockerfile Use mise for Docker toolchain management (#190) 2026-08-28 16:52:03 +02:00
LICENSE
mise.toml Feat/updates (#207) 2026-10-02 11:13:03 +02:00
nuxt.config.ts fix: persist selected locale across page refreshes (#191) 2026-09-01 14:51:09 +02:00
package.json Feat/updates (#207) 2026-10-02 11:13:03 +02:00
playwright.config.ts Chore/mise uniform tooling (#173) 2026-08-17 10:40:40 +02:00
publiccode.yml Rename project from 'BS-Übersetzer' to 'TextMate' 2026-07-29 08:17:18 +02:00
README.md Feat/einfache sprache (#176) 2026-08-15 17:17:28 +02:00
renovate.json Update all non-major dependencies (#197) 2026-09-07 17:48:27 +02:00
skills-lock.json Features/advisor UI rewrite (#158) 2026-07-26 18:57:25 +02:00
tsconfig.json Text/ms teams (#132) 2026-04-14 15:12:10 +02:00
vitest.config.ts Feat/einfache sprache (#176) 2026-08-15 17:17:28 +02:00

TextMate (Frontend)

https://github.com/user-attachments/assets/ec0416b2-a3dc-48df-8ec5-554d0f59f391

TextMate is a modern web application for advanced text editing, AI-assisted text transformation, and document validation. Built with Nuxt 4 and TypeScript, it provides a rich set of tools to enhance writing quality, simplify text, and validate against organizational standards.

This repository contains the frontend application; the backend is built with Python FastAPI and available at https://github.com/DCC-BS/text-mate-backend.

GitHub License Checked with Biome


DCC Documentation & Guidelines | DCC Website


Features

Core Capabilities

  • Ribbon Interface: Intuitive ribbon toolbar with dedicated tabs for text transformation and document validation.
  • Text Rewriting: Alternative phrasings with customizable writing styles (Simple, Professional, Casual, Academic, Technical), target audiences, and goals.
  • Simplify / Plain Language: AI-assisted simplification of complex sentences and long words (Einfache Sprache) with interactive range navigation.
  • Document Advisor: Validates text against selected reference documents and guidelines, with side-by-side PDF preview and inline fix suggestions.
  • Interactive Diff Review: Side-by-side diff preview to review, accept, or reject generated changes before applying them.
  • Word Synonyms & Sentence Alternatives: Inline context-aware synonym and phrasing suggestions directly within the editor.
  • Text Statistics & Readability: Real-time word and character counting (with Swiss apostrophe formatting, e.g. 100'000), syllable counts, average sentence length, Flesch score, and CEFR language level visualization.
  • User Dictionary & Custom Actions: Personal dictionary for specialized vocabulary and custom prompt-driven actions.
  • Document Import & Export: File upload (.docx, .txt) and direct export to Microsoft Word (.docx).
  • Multilingual Support: Full German (de-CH) and English interface, with multi-language detection.

Quick Actions & Transformations

Specialized AI-powered text transformations available in the ribbon:

  • Summarize: Generate concise summaries of long texts
  • Bullet Points: Convert paragraphs into structured bullet points
  • Shorten: Condense content while preserving core message
  • Formality: Adjust formality (formal / informal)
  • Medium Length: Adapt text for medium-length output
  • Social Media: Optimize content for social media channels
  • Proofread: Check and correct grammar, spelling, and style
  • Character Speech: Adapt text to character voices and dialogue patterns
  • Custom Actions: Run personalized custom text transformations

Technology Stack


Setup

Prerequisites

We recommend using mise to automatically manage tool versions (Bun, Node.js, Varlock, pass-cli):

mise install

Environment Configuration

Create a .env file in the project root with the basic environment mode:

APP_MODE=dev      # dev, ci, build, prod
AUTH_MODE=none    # none or azure

Environment Variables

Environment variables are validated using Varlock schemas (.env.schema, .env.runtime.schema, .env.buildtime.schema, .env.azure.schema):

Variable Description Default Type
Core Configuration
APP_MODE Application runtime mode (dev, ci, build, prod) dev enum
AUTH_MODE Authentication mode (none, azure) none enum
USE_FEEDBACK Enable feedback widget true (non-CI) boolean
DUMMY Enable mock API mode (no backend required) false boolean
Backend & Services
API_PORT Backend API port 8000 port
NUXT_API_URL Backend API URL http://localhost:8000 (dev) URL
NUXT_FEEDBACK_GITHUB_TOKEN GitHub token for feedback reporting Proton Pass (dev) string (sensitive)
NUXT_PUBLIC_LOGGER_LOG_LEVEL Client log level debug (dev), info (prod) enum
LOG_LEVEL Server log level debug (dev), info (prod) enum
UI & Onboarding Flags
DISABLE_ONBOARDING Disable onboarding tour (e.g. in tests) false boolean
NUXT_PUBLIC_COMMON_UI_DISABLE_CHANGELOG Disable changelog modal false boolean
NUXT_PUBLIC_COMMON_UI_DISABLE_DISCLAIMER Disable disclaimer banner false boolean
NUXT_PUBLIC_COMMON_UI_DISABLE_ONBOARDING Disable onboarding popup false boolean
NUXT_PUBLIC_COMMON_UI_DISABLE_SYSTEM_STATUS Disable backend health indicator false boolean
NUXT_PUBLIC_APP_CONFIG_APP_LIST_URL_TEMPLATE App switcher template URL http://{APP_NAME}.localhost.ch string

Azure AD Configuration (When AUTH_MODE=azure)

Variable Description Default Type
NUXT_AZURE_AUTH_SECRET Session encryption secret (openssl rand -base64 32) - string (sensitive, required)
NUXT_AZURE_AUTH_CLIENT_ID Azure AD client ID Proton Pass (dev) UUID
NUXT_AZURE_AUTH_TENANT_ID Azure AD tenant ID Proton Pass (dev) UUID
NUXT_AZURE_AUTH_CLIENT_SECRET Azure AD client secret Proton Pass (dev) string (sensitive)
NUXT_AZURE_AUTH_API_CLIENT_ID Azure AD API client ID Proton Pass (dev) UUID
NUXT_AZURE_AUTH_ORIGIN Auth callback origin URL http://localhost:3000/api/auth URL

Varlock & Secrets Management

We use varlock for schema-based validation and optional secret retrieval from Proton Pass:

# Validate and load secrets into the environment
mise run env

Development

Start the development server at http://localhost:3000:

# Using mise
mise run dev

# Or using bun directly
bun run dev

Development with Inspector

mise run debug

Dummy Mode (Offline / Mock Data)

Run the frontend with mocked backend responses (no Python backend or LLM required):

mise run dummy

Automation / CI Mode

Start the dev server with popups (changelog, disclaimer, onboarding) disabled:

mise run automation

Backend & Docker Services

For full functionality with AI models and backend API, the backend services can be run via Docker:

Start Backend Services Only

mise run docker:up

Stop Backend Services

mise run docker:down

Full Stack Compose

To run all services (frontend, backend, vLLM, and Nginx reverse proxy):

cd docker
varlock run -- docker compose up

Project Architecture

app/
├── assets/
│   ├── css/                # Main Tailwind CSS styles
│   └── models/             # TypeScript models & command bus definitions
├── components/             # Vue components (PascalCase)
│   ├── advisor/            # Document advisor & PDF preview
│   ├── diff/               # Diff review & comparison
│   ├── editor/             # Tiptap text editor & toolbar
│   ├── rewrite/            # Text rewrite & custom action forms
│   ├── ribbon/             # Ribbon bar navigation & action tabs
│   ├── simplify/           # Plain language / simplify UI
│   └── tool-panel/         # Text stats, readability & dictionary
├── composables/            # Reactive Vue composables (useXxx)
├── pages/                  # Route pages (kebab-case)
├── services/               # API & business logic services
└── utils/                  # Framework-agnostic utilities
server/
├── api/                    # Nitro API endpoints (kebab-case)
└── plugins/                # Server plugins
shared/
└── types/                  # Shared TypeScript types (client & server)
tests/
├── assets/                 # Vitest unit tests (*.test.ts)
└── e2e/                    # Playwright E2E tests (*.spec.ts)

Testing & Quality Assurance

Unit Tests (Vitest)

# Run all unit tests
mise run test

# Run tests in watch mode
mise run test:watch

# Run with coverage report
mise run test:coverage

# Run a single test file
bunx vitest run tests/assets/utils/formatNumber.test.ts

Type Checking & Linting

# TypeScript strict type check
mise run tsc

# Biome code formatting
mise run lint

# Biome check & autofix
mise run check

End-to-End Tests (Playwright)

# Run all E2E tests
mise run test:e2e

# Run with Playwright interactive UI
mise run test:e2e:ui

# Generate tests via Playwright codegen
mise run e2e:codegen

Production Build & Deployment

Build & Preview

# Build production bundle
mise run build

# Preview production build locally
mise run preview

Docker Deployment

Build and run using the multi-stage Dockerfile:

# Build Docker image
docker build -t text-mate-frontend .

# Run container
docker run -p 3000:3000 text-mate-frontend

Dependency Overrides

We maintain strict, minimal overrides in package.json exclusively for Framework Singletons:

  • vue (3.5.41), reka-ui (2.10.1), @vueuse/core (^14.4.0), prosemirror-model (1.25.11), prosemirror-view (1.42.2): Deduplicates runtime instances across transitive dependencies (such as vaul-vue and Tiptap plugins) to prevent dual-instance SSR hydration crashes and broken editor instanceof selections.

Acknowledgements & Credits

Special thanks to the following open-source projects and initiatives that inspired and contributed to TextMate:


License

MIT © Data Competence Center Basel-Stadt

DCC Logo

Datenwissenschaften und KI
Developed with ❤️ by DCC - Data Competence Center