Socket
Book a DemoInstallSign in
Socket

@rettangoli/fe

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rettangoli/fe

Frontend framework for building reactive web components

0.0.7-rc14
latest
Source
npmnpm
Version published
Weekly downloads
73
32.73%
Maintainers
1
Weekly downloads
ย 
Created
Source

Rettangoli Frontend

A modern frontend framework that uses YAML for view definitions, web components for composition, and Immer for state management. Build reactive applications with minimal complexity using just 3 types of files.

Features

  • ๐Ÿ—‚๏ธ Three-File Architecture - .view.yaml, .store.js, .handlers.js files scale from single page to complex applications
  • ๐Ÿ“ YAML Views - Declarative UI definitions that compile to virtual DOM
  • ๐Ÿงฉ Web Components - Standards-based component architecture
  • ๐Ÿ”„ Reactive State - Immer-powered immutable state management
  • โšก Fast Development - Hot reload with Vite integration
  • ๐ŸŽฏ Template System - Jempl templating for dynamic content
  • ๐Ÿงช Testing Ready - Pure functions and dependency injection for easy testing

Quick Start

rtgl fe build     # Build components
rtgl fe watch     # Start dev server

Documentation

  • Developer Quickstart - Complete introduction and examples
  • View System - Complete YAML syntax
  • Store Management - State patterns
  • Event Handlers - Event handling

Architecture

Technology Stack

Runtime:

  • Snabbdom - Virtual DOM
  • Immer - Immutable state management
  • Jempl - Template engine
  • RxJS - Reactive programming

Build & Development:

  • ESBuild - Fast bundling
  • Vite - Development server with hot reload

Browser Native:

  • Web Components - Component encapsulation

Development

Prerequisites

  • Node.js 18+ or Bun
  • A rettangoli.config.yaml file in your project root

Setup

  • Install dependencies:
bun install
  • Create project structure:
# Scaffold a new component
node ../rettangoli-cli/cli.js fe scaffold --category components --name MyButton
  • Start development:
# Build once
node ../rettangoli-cli/cli.js fe build

# Watch for changes (recommended)
node ../rettangoli-cli/cli.js fe watch

Project Structure

src/
โ”œโ”€โ”€ cli/
โ”‚   โ”œโ”€โ”€ build.js       # Build component bundles
โ”‚   โ”œโ”€โ”€ watch.js       # Development server with hot reload
โ”‚   โ”œโ”€โ”€ scaffold.js    # Component scaffolding
โ”‚   โ”œโ”€โ”€ examples.js    # Generate examples for testing
โ”‚   โ””โ”€โ”€ blank/         # Component templates
โ”œโ”€โ”€ createComponent.js # Component factory
โ”œโ”€โ”€ createWebPatch.js  # Virtual DOM patching
โ”œโ”€โ”€ parser.js          # YAML to JSON converter
โ”œโ”€โ”€ common.js          # Shared utilities
โ””โ”€โ”€ index.js           # Main exports

Configuration

Create a rettangoli.config.yaml file in your project root:

fe:
  dirs:
    - "./src/components"
    - "./src/pages"
  setup: "setup.js"
  outfile: "./dist/bundle.js"
  examples:
    outputDir: "./vt/specs/examples"

Testing

View Components

Use visual testing with rtgl vt:

rtgl vt generate
rtgl vt report

Examples

For a complete working example, see the todos app in examples/example1/.

Keywords

frontend

FAQs

Package last updated on 12 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.