📚 StoneJS Developer Guide

Complete reference for building modern web applications with the StoneJS Framework

🎯 Overview

StoneJS is a modern, component-based web framework for Node.js that combines the simplicity of traditional server-side rendering with the power of modern JavaScript.

What Makes StoneJS Different?

📄 Component-Based

Build reusable components with hierarchical layouts using autohandlers and includes

🚀 Zero Build Step

No webpack, no bundlers. Just write code and see it run instantly

🔄 Auto-Reload

Changes are reflected immediately in development mode

🗄️ Database Ready

Built-in PostgreSQL/MySQL support with connection pooling and RLS

⚡ Built-in Caching

Simple, powerful caching with remember pattern

🔐 Session Management

In-memory or database-backed sessions out of the box

Core Concepts

  • Pages: HTML files in pages/ directory become routes automatically
  • Autohandlers: Wrap pages with layouts and shared HTML (like master pages)
  • Dhandlers: Dynamic route handlers for REST APIs and custom routing
  • Components: Reusable template fragments included with <%- await include() %>
  • Global Context: Access request, session, database, cache via $context
  • Section Tags: Special tags for initialization, cleanup, and documentation

When to Use StoneJS?

✅ Great For:

  • Server-side rendered web applications
  • REST APIs and microservices
  • Admin panels and dashboards
  • Content management systems
  • Multi-tenant SaaS applications (with RLS)
  • Rapid prototyping and MVPs

⚠️ Consider Alternatives If:

  • You need a single-page application (SPA) framework
  • You require heavy client-side interactivity (use Next.js, Nuxt, etc.)
  • You're building a static site (use Astro, Gatsby, etc.)

Quick Links

Get Started → See Features Installation

Need more help?

View All Demos Getting Started GitHub Repository