Back to Projects

Telar

A declarative programming language for the web with Spanish syntax. It compiles into HTML, CSS and JS from human-readable code, with state, dynamic routes and automatic SEO — no configuration required.

TypeScript Node.js Compilers Open Source

🧠 The Idea

Telar was born out of frustration with modern web development.

To build a simple app today, you need to choose from dozens of frameworks, configure webpack, write JSX, manage dependencies… all before you’ve solved the real problem.

The hypothesis: what if you could describe what you want in Spanish, and the compiler made all the technical decisions for you?


🚀 What It Does

aplicación MiTienda
  dominio "https://mitienda.com"

diseño principal
  navbar
    título "MiTienda"

página inicio en "/"
  título "Bienvenido"
  mostrar Producto recientes
    máximo 8
    ordenados por precio
    si falla
      mostrar "Sin conexión"
      reintentar en 5 segundos

página producto en "/producto/(id)"
  diseño principal
  mostrar Producto filtrados por id = parametro.id

  variable cantidad = 1
  texto cantidad
  botón "+" hacer sumar cantidad
  botón "Añadir al carrito" hacer añadirAlCarrito

It automatically compiles into semantic HTML, responsive CSS and optimised JavaScript. The quantity selector on the second page is interactive — it increments right in the browser on click — without writing a single line of JS.


🏗️ Compiler Architecture

Telar implements a full three-phase compiler:

Each phase has its own error system with messages in Spanish and specific suggestions on how to resolve them, including visual context from the lines in the file.


📦 Ecosystem

Telar has its own package manager based on GitHub:

telar nuevo mi-proyecto
telar añadir navbar
telar añadir formulario
telar añadir lista
telar servir app.telar

Packages are GitHub repositories prefixed with telar-. Anyone can create and publish packages for the community.


📊 What’s Interesting About the Project

The most challenging part wasn’t generating the HTML, but rather:

The main challenge was finding the balance between human readability and compiler precision — too free and the compiler is ambiguous, too strict and it loses the naturalness of Spanish.

An equally important part has been testing discipline: every new feature gets actually compiled and verified before it’s considered done, which has surfaced several real bugs that had been sitting silently unnoticed for a while.


🎯 Current Status

Telar is at v0.15, with a complete compiler, CLI, package manager, VS Code extension, reusable layouts and components, dynamic routes, variables and local state, form validation, visual themes, automatic SEO, and a fully automated release pipeline — a single git tag triggers tests, build, npm publish and a GitHub release. 181 automated tests cover the compiler and the CLI.

v1.0 will be the public launch, with the syntax already stable.


📦 Installation

npm install -g @davidbc01/telar
telar nuevo mi-proyecto
cd mi-proyecto
telar servir app.telar