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
community/supabase-solana-indexing/ directory with working template code
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
- Indexing components:
- Account subscription service for monitoring on-chain changes
- Data transformation and normalization logic
- Supabase client configuration
- Error handling and retry mechanisms
- Example queries:
- Filtering and sorting indexed data
- Pagination implementation
- Real-time subscriptions to data changes
- Database schema files:
- SQL migrations for table creation
- Indexes for query optimization
package.json with a create-solana-dapp block for post-install guidance
- Type definitions for indexed data structures
- Registration in
templates.json so template is discoverable under Community Templates
Acceptance Criteria
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-indexingthat includes:Deliverables
community/supabase-solana-indexing/directory with working template codeREADME.mdexplaining:package.jsonwith acreate-solana-dappblock for post-install guidancetemplates.jsonso template is discoverable under Community TemplatesAcceptance Criteria
community/supabase-solana-indexingexists with a scaffolded Next.js + Tailwind + TypeScript projectREADME.mdincludes detailed implementation guidetemplates.jsonpnpm create solana-dapp --template supabase-solana-indexingworks end-to-end