Ctrl + K
DocumentationLog inGet started

tessl-labs/quickstart-express-api-standards

tessl install tessl-labs/quickstart-express-api-standards@1.0.5

Quickstart example: Express.js API coding standards (rules)

README.md

quickstart-express-api-standards

Express.js API coding standards for the Tessl quickstart guide.

⚠️ Quickstart Example Only

This tile is a demonstration example for the Quick Start: Skills, Docs, and Rules guide. It is not intended for production use.

For production, create your own tile with your team's specific standards. See Creating tiles for guidance.

Overview

This tile provides coding standards (rules) for building Express.js REST APIs. When installed, these standards are automatically applied to every interaction with your coding agent.

Type: Rules Name: tessl-labs/quickstart-express-api-standards Version: 1.0.0

What's Included

Rules: API Coding Standards

Located in rules/standards.md, this tile enforces:

  • Error Handling

    • Try-catch blocks in async handlers
    • Consistent error response format
    • Appropriate HTTP status codes
    • No exposed internal errors in production
  • Validation

    • Input validation with express-validator
    • Sanitization of user input
    • Clear validation error messages
    • Type and format checking
  • Response Format

    • Consistent JSON structure
    • success boolean field
    • Pagination standards (50 items default)
    • Metadata in list responses
  • Security

    • helmet.js security headers
    • CORS configuration
    • Rate limiting
    • Input sanitization
    • No logging of sensitive data

Installation

From Tessl Registry

tessl install tessl-labs/quickstart-express-api-standards

From Local Path

tessl install file:./tiles/tessl-demo/quickstart-express-api-standards

How It Works

Rules are eager push - they're always loaded and applied automatically:

  1. Install the tile
  2. Rules are loaded into .tessl/RULES.md
  3. Your agent follows these standards in every request
  4. No need to specify standards each time

Example Usage

After installing this tile, your agent will automatically:

// Generate error handling following the standards
app.post('/api/posts', async (req, res) => {
  try {
    // Your logic here
    res.status(201).json({
      success: true,
      data: post
    });
  } catch (error) {
    res.status(500).json({
      success: false,
      error: 'Failed to create post',
      code: 'POST_CREATE_FAILED'
    });
  }
});

Used In

This tile is referenced in:

Related Tiles

Version

Workspace
tessl-labs
Visibility
Public
Created
Last updated
README.mdtile.json