Welcome to the Skatehive API! A comprehensive REST API for the skateboarding community on the Hive blockchain. This application provides access to community data, user profiles, content feeds, social interactions, economic data, and much more for the Skatehive community (hive-173115).
Skatehive is the premier skateboarding community on the Hive blockchain, bringing together skaters from around the world to share content, earn rewards, and build a decentralized skateboarding ecosystem.
- Decentralized Social Network: Built on Hive blockchain for censorship resistance
- Earn While Skating: Content creators earn HBD and HIVE tokens
- NFT Integration: Skatehive NFTs and community tokens
- Global Community: Skaters from every continent sharing their passion
- Multi-chain Support: Hive blockchain + Ethereum integration
- User Profiles & Social: Comprehensive skater profiles with followers, following, and social interactions
- Content Management: Skateboarding posts, videos, comments, and community updates
- SkateSnaps: Short-form skateboarding content (like TikTok for skaters)
- Community Leaderboard: Ranking system based on contributions and engagement
- Economic Data: Token balances, rewards, market data, and wallet information
- Blockchain Integration: Hive and Ethereum wallet data and interactions
- Skatespots: Location-based skateboarding venue and spot information
- User profiles with achievements and statistics
- Followers/following relationships
- Comments and community interactions
- Social reputation and influence metrics
- General community feed with skateboarding content
- SkateSnaps (short-form videos and photos)
- Trending posts and viral content
- User-specific content streams
- Community leaderboard with comprehensive scoring
- Achievement badges and recognition systems
- Contribution tracking and rewards
- Competition rankings and tournaments
- Hive wallet balances (HIVE, HBD, HP)
- Resource credits and voting power
- Token rewards and earnings tracking
- Market data and price information
- Skateboarding spots and locations worldwide
- Venue information and community ratings
- Geographic content discovery
- Local community connections
- Hive blockchain operations (posts, votes, transfers)
- Ethereum wallet integration and NFT tracking
- Multi-chain asset management
- Donation tracking and philanthropy features
- Enhanced Features: Advanced functionality with optimized performance
- Comprehensive Data: Rich response formats with detailed metadata
- Modern Standards: RESTful design with consistent patterns
- Real-time Integration: Live blockchain data with smart caching
- Backward Compatibility: Maintained for existing integrations
- Stable Interface: Proven endpoints with reliable performance
- Migration Path: Clear upgrade path to V2 features
- Ethereum Integration: Multi-chain asset and NFT tracking
- Maintenance Operations: Cron jobs and data synchronization
- Developer Tools: Testing and debugging utilities
- π Interactive API Docs: http://localhost:3000/docs (Swagger UI)
- π― API Overview: http://localhost:3000/api/v2
- π API Routes Documentation: src/app/api/README.md
- π§ͺ Testing Suite: tests/README.md
- Production API: https://api.skatehive.app
- Community Data: https://api.skatehive.app/api/skatehive
- Skatehive Website: https://skatehive.app
- Hive Community: https://peakd.com/c/hive-173115
.
βββ README.md
βββ eslint.config.mjs
βββ example.env
βββ next-env.d.ts
βββ next.config.ts
βββ package.json
βββ pnpm-lock.yaml
βββ public
βΒ Β βββ file.svg
βΒ Β βββ globe.svg
βΒ Β βββ next.svg
βΒ Β βββ vercel.svg
βΒ Β βββ window.svg
βββ src
βΒ Β βββ app
βΒ Β βΒ Β βββ api
βΒ Β βΒ Β βΒ Β βββ README.md
βΒ Β βΒ Β βΒ Β βββ cron
βΒ Β βΒ Β βΒ Β βΒ Β βββ update
βΒ Β βΒ Β βΒ Β βΒ Β βββ route.ts
βΒ Β βΒ Β βΒ Β βββ ethHelpers
βΒ Β βΒ Β βΒ Β βΒ Β βββ route.ts
βΒ Β βΒ Β βΒ Β βββ leaderboard
βΒ Β βΒ Β βΒ Β βΒ Β βββ route.ts
βΒ Β βΒ Β βΒ Β βββ skatehive
βΒ Β βΒ Β βΒ Β βββ route.ts
βΒ Β βΒ Β βββ favicon.ico
βΒ Β βΒ Β βββ globals.css
βΒ Β βΒ Β βββ layout.tsx
βΒ Β βΒ Β βββ page.module.css
βΒ Β βΒ Β βββ page.tsx
βΒ Β βΒ Β βββ utils
βΒ Β βΒ Β βββ README.md
βΒ Β βΒ Β βββ dataManager.ts
βΒ Β βΒ Β βββ ethereum
βΒ Β βΒ Β βΒ Β βββ ethereumUtils.ts
βΒ Β βΒ Β βΒ Β βββ giveth.ts
βΒ Β βΒ Β βΒ Β βββ tokenAbi.ts
βΒ Β βΒ Β βββ hive
βΒ Β βΒ Β βΒ Β βββ fetchSubscribers.ts
βΒ Β βΒ Β βΒ Β βββ hiveUtils.ts
βΒ Β βΒ Β βββ supabase
βΒ Β βΒ Β βΒ Β βββ getLeaderboard.ts
βΒ Β βΒ Β βΒ Β βββ supabaseClient.ts
βΒ Β βΒ Β βββ types.ts
βΒ Β βββ models
βββ tsconfig.json
βββ vercel.json
- Node.js
- pnpm (or npm/yarn)
- Supabase account
- Clone the repository:
git clone https://github.com/sktbrd/skatehive-api.git
cd skatehive-api- Install dependencies:
pnpm install- Set up environment variables:
Copy the example.env file to .env and fill in the required values.
cp example.env .envStart the development server:
pnpm devOpen http://localhost:3000 with your browser to see the result.
Access the comprehensive API documentation with interactive Swagger UI:
- Documentation: http://localhost:3000/docs
- API Overview: http://localhost:3000/api/v2
The project includes a comprehensive testing suite in the /tests directory:
# Run full API test suite
bash tests/live-test.sh
# Quick health check
bash tests/quick-status-check.sh
# Individual endpoint testing
bash tests/test-api-endpoints.shSee /tests/README.md for detailed testing documentation.
- V2 API: Modern endpoints at
/api/v2/*(recommended) - V1 API: Legacy endpoints at
/api/v1/*(maintained for compatibility)
- Create a new project on Supabase.
- Create a table named
leaderboardwith the following schema:
create table public.leaderboard (
id serial not null,
hive_author text not null,
hive_balance double precision null,
hp_balance double precision null,
hbd_balance double precision null,
hbd_savings_balance double precision null,
has_voted_in_witness boolean null,
eth_address character varying null,
gnars_balance double precision null,
gnars_votes double precision null,
skatehive_nft_balance double precision null,
max_voting_power_usd double precision null,
last_updated timestamp without time zone null,
last_post timestamp without time zone null,
post_count integer null,
points double precision null,
giveth_donations_usd numeric null default 0,
giveth_donations_amount numeric null default 0,
constraint leaderboard_pkey primary key (id),
constraint leaderboard_hive_author_key unique (hive_author)
) TABLESPACE pg_default;- Add your Supabase URL and Anon Key to the
.envfile:
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-keyThe Skatehive API aims to:
- Empower the Community: Provide comprehensive tools for skateboarding community interaction and growth
- Blockchain Integration: Seamlessly connect Hive and Ethereum blockchain data for multi-chain experiences
- Content Discovery: Enable easy discovery of skateboarding content, creators, and communities
- Economic Transparency: Track contributions, rewards, and economic activity within the ecosystem
- Social Connections: Foster relationships between skaters worldwide through profiles and social features
- Innovation Platform: Serve as the foundation for skateboarding dApps and community tools
- Transparency: Easily track and verify all community contributions and activities
- Recognition: Highlight top contributors, content creators, and community leaders
- Engagement: Foster competitive and collaborative environment through gamification
- Accessibility: Provide easy-to-use API for developers building skateboarding applications
- Decentralization: Leverage blockchain technology for censorship-resistant community building
- Innovation: Enable new use cases and applications for the skateboarding community
The leaderboard system ranks users based on comprehensive contributions to the Skatehive ecosystem. See the Leaderboard Documentation for detailed scoring information.
Short-form skateboarding content system designed for quick sharing and discovery of skateboarding moments, tricks, and community highlights.
Location-based system for discovering and sharing information about skateboarding locations, parks, and spots worldwide.
Comprehensive tracking of Hive and Ethereum assets, including tokens, NFTs, donations, and reward distributions.
Comprehensive tracking of Hive and Ethereum assets, including tokens, NFTs, donations, and reward distributions.
- HAFSQL: Primary database for Hive blockchain data
- HiveSQL: Alternative Hive data access for complex queries
- Supabase: Legacy data storage and real-time features
- Hive Blockchain: Social features, content, and rewards
- Ethereum Network: NFTs, tokens, and donation tracking
- Multi-chain Support: Cross-chain asset and activity tracking
- Market Data: Real-time price feeds and market information
- IPFS: Decentralized media storage and delivery
- Analytics: Community growth and engagement metrics
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.