sails-indexer

Build event-driven Postgres read models with GraphQL APIs for Sails apps.

17|23|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/gear-foundation/vara-skills --skill sails-indexer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sails-indexer
Source: https://github.com/gear-foundation/vara-skills/tree/main/skills/sails-indexer
Command: npx skills add https://github.com/gear-foundation/vara-skills --skill sails-indexer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

This Skill solves the core problem of slow, costly direct chain queries for Sails app frontend and integration data needs by providing a structured, production-grade workflow to build event-driven read-side indexers with projected data models and GraphQL APIs.

Core Features & Use Cases

  • IDL-Driven Event Decoding: Automatically decode Sails program events using .idl files for consistent, type-safe data extraction without manual SCALE parsing.
  • Event-Driven Projection Pipeline: Build scalable Postgres read models from chain events, with support for enrichment, aggregates, and idempotent replay for production workloads.
  • Thin GraphQL API: Expose a browser-safe GraphQL endpoint for frontend consumption, with built-in guidance for CORS configuration and dev proxy setup. Use Case: For a Sails app with activity feeds, portfolio pages, and aggregated metrics, use this Skill to build an indexer that processes chain events into a Postgres read model, cutting frontend data load times by eliminating repeated expensive direct chain queries.

Quick Start

Use the sails-indexer skill to design and implement a production-ready read-side indexer with a GraphQL API for your Gear/Vara Sails app's frontend data requirements.

Frequently Asked Questions about sails-indexer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a read-side indexer for Gear/Vara Sails applications?

Build a read-side indexer for Gear/Vara Sails applications by using event-driven projection pipelines to process chain events into Postgres read models, replacing expensive direct chain queries with fast, scalable data access.

Why are direct chain queries slow for Sails app frontends and how does an indexer help?

Direct chain queries are slow and costly for Sails app frontends because they repeatedly fetch heavy historical data. An event-driven indexer solves this by projecting chain events into Postgres read models, enabling fast GraphQL queries for activity feeds and paginated lists.

How do I decode Sails program events using IDL files without manual SCALE parsing?

Decode Sails program events automatically using IDL-driven event decoding, which leverages .idl files to provide consistent, type-safe data extraction without requiring manual SCALE parsing in your indexer pipeline.

Can I expose a GraphQL API from a Postgres read model for my Gear/Vara app?

Yes, you can expose a browser-safe thin GraphQL API from your projected Postgres read models for Gear/Vara apps, including built-in guidance for CORS configuration and dev proxy setup for frontend consumption.

Does the Sails indexer pipeline support idempotent replay for production workloads?

The Sails indexer pipeline supports production-grade idempotency, replay, and restart safety for indexer workloads, ensuring reliable event-driven projection to Postgres read models during restarts or reprocessing.

What's the best way to handle historical views and aggregated metrics for Sails apps?

The best way to handle historical views, activity feeds, and aggregated metrics for Sails apps is building an event-driven indexer that projects chain events into Postgres read models, enabling fast, scalable frontend data access via GraphQL.