Skip to content

Supabase + Solana Indexing Template #154

Description

@GuiBibeau

Background

The Solana Foundation maintains a templates repo with both official and community templates. Developers use these templates with create-solana-dapp to quickly scaffold projects.

Many Solana dApps need efficient ways to index and query on-chain data for performant user experiences. This task proposes adding a Supabase + Solana Indexing template that demonstrates how to index data from a Solana program and make it queryable through Supabase.


Goal

Add a community template at community/supabase-solana-indexing that includes:

  • A Next.js + Tailwind + TypeScript application with Supabase integration
  • Solana program account data indexing
  • Real-time data synchronization from on-chain to Supabase
  • Query examples for common use cases
  • Performance optimization techniques

Deliverables

  1. community/supabase-solana-indexing/ directory with working template code
  2. README.md explaining:
    • Supabase project setup and database schema design
    • Account subscription and data fetching strategies
    • Real-time sync implementation approach
    • Query optimization and indexing best practices
    • Links to Supabase and Solana documentation
  3. Indexing components:
    • Account subscription service for monitoring on-chain changes
    • Data transformation and normalization logic
    • Supabase client configuration
    • Error handling and retry mechanisms
  4. Example queries:
    • Filtering and sorting indexed data
    • Pagination implementation
    • Real-time subscriptions to data changes
  5. Database schema files:
    • SQL migrations for table creation
    • Indexes for query optimization
  6. package.json with a create-solana-dapp block for post-install guidance
  7. Type definitions for indexed data structures
  8. Registration in templates.json so template is discoverable under Community Templates

Acceptance Criteria

  • A new directory community/supabase-solana-indexing exists with a scaffolded Next.js + Tailwind + TypeScript project
  • Supabase is integrated with proper client initialization
  • Example demonstrates indexing data from a Solana program
  • Real-time synchronization is implemented and documented
  • Query examples cover common use cases
  • README.md includes detailed implementation guide
  • Template is registered in templates.json
  • pnpm create solana-dapp --template supabase-solana-indexing works end-to-end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions