A modern two-portal platform for Hive blockchain delegation and curation rewards management. Built with Astro, TypeScript, and Tailwind CSS.
Aliento Pay is a comprehensive platform that serves two distinct user groups:
- Delegator Portal 🟠 - Public-facing portal where users can delegate Hive Power to @aliento and earn rewards
- Curator Dashboard 🔵 - Administrative dashboard for managing delegations and distributing curation rewards
- Real-time Earnings Calculator - Calculate daily, weekly, monthly, and yearly earnings based on HP delegation (8.5% APR)
- Payment Preferences - Choose how you receive rewards:
- 💰 HIVE - Liquid HIVE tokens
- 💵 HBD - Hive Backed Dollars (stablecoin)
- ⚡ HP - Automatic power-up to Hive Power
- ❤️ DONATE - Donate earnings to support Aliento
- On-Chain Preference Storage - Preferences saved to Hive blockchain via custom_json operations
- Direct Delegation - Delegate HP to @aliento directly through Hive Keychain
- Transparent APR - Current 8.5% annual percentage rate with real-time calculations
- Delegation Management - View and manage all delegators to @aliento
- Curation Stats - Real-time curation reward statistics (24h, 7d, 30d)
- Distribution Calculator - Calculate reward distribution based on delegation percentages
- Batch Payments - Send rewards to multiple delegators efficiently
- Custom Memos - Personalized payment memos with template support
- Payment History - Track all payment transactions
- 🌐 Internationalization - Full support for English and Spanish
- 🔐 Hive Keychain Integration - Secure authentication and transactions
- 🌙 Dark Mode - Automatic theme switching
- 📱 Responsive Design - Mobile-first approach
- ⚡ Performance Optimized - Built with Astro for lightning-fast page loads
- 🎨 Anakiwa Branding - Consistent color scheme matching Aliento's brand
- Framework: Astro v5.11.0 - Modern static site generator with SSR
- Language: TypeScript - Type-safe JavaScript
- Styling: Tailwind CSS - Utility-first CSS framework
- Blockchain: Hive - Decentralized social blockchain
- Wallet Integration: Hive Keychain - Secure wallet for signing transactions
- API Client: @hiveio/wax - Hive blockchain API wrapper
- Build Tool: Vite - Next-generation frontend tooling
- Node.js 18+
- npm or yarn
- Hive Keychain browser extension (for testing wallet features)
-
Clone the repository
git clone https://github.com/yourusername/aliento-pay.git cd aliento-pay-eddiespino -
Install dependencies
npm install
-
Start development server
npm run dev
The app will be available at
http://localhost:4321
src/
├── pages/ # Astro pages and routes
│ ├── index.astro # Landing page with dual portal cards
│ ├── delegate.astro # Delegator portal (calculator & preferences)
│ ├── login.astro # Curator login page
│ ├── dashboard.astro # Curator dashboard
│ ├── calculate.astro # Distribution calculator
│ └── payments.astro # Batch payment processor
├── layouts/ # Page layouts
│ └── Layout.astro # Base layout with theme support
├── ui/ # UI components
│ ├── base/ # Base components (BrandCard, BrandNav, etc.)
│ └── components/ # Feature components (header, tables, etc.)
├── lib/ # Core business logic
│ ├── earnings-calculator.ts # APR calculations
│ ├── preference-storage.ts # On-chain preference management
│ ├── get-delegations.ts # Delegation data fetching
│ └── api-curation-rewards.ts # Curation reward calculations
├── i18n/ # Internationalization
│ ├── index.ts # i18n utilities
│ ├── en.json # English translations
│ └── es.json # Spanish translations
└── middleware.ts # Authentication & routing middleware
npm run dev- Start development server with hot reloadnpm run build- Build for productionnpm run preview- Preview production build locallynpm run astro- Run Astro CLI commands
- Hero section with animated background
- Two portal cards (Delegator & Curator)
- Language switcher (EN/ES)
- How it works section
- FAQ section
- Earnings calculator with HP input
- Payment preference selector
- Current delegation display
- Hive Keychain connection
- Save preferences to blockchain
- Protected route (authentication required)
- Real-time curation statistics
- Quick action cards
- Navigation to calculate and payments
- Filter delegators by HP range and time period
- Calculate distribution percentages
- Export to payments page
- Review and edit payment list
- Batch processing (customize batch size)
- Custom memo templates
- Real-time payment status
The platform uses Hive Keychain for secure authentication:
-
Delegators - Can view calculator without login, but need Keychain to:
- Save payment preferences to blockchain
- Delegate HP to @aliento
-
Curators - Must authenticate with Keychain to access:
- Dashboard
- Distribution calculator
- Payment processor
The platform supports English and Spanish with real-time language switching:
// Translation files
src/i18n/en.json // English translations
src/i18n/es.json // Spanish translations
// Usage in components
const t = (key: string) => getTranslation(currentLocale, key);- Anakiwa Blue (
#09b1ee) - Primary brand color, used for Curator features - Orange (
#f97316) - Secondary color, used for Delegator features - Dark Mode - Automatic theme switching with CSS variables
- Cards:
BrandCard.astro- Consistent card component with Anakiwa accents - Navigation:
BrandNav.astro- Responsive navigation with active state - Buttons: Gradient effects with hover animations
- Shadows: Colored shadows matching button/card themes
Delegator preferences are stored on-chain using custom_json operations:
// Custom JSON ID
const ALIENTO_PREFERENCE_ID = 'aliento_pay_preference';
// Preference structure
interface DelegatorPreference {
username: string;
paymentType: 'HIVE' | 'HBD' | 'HP' | 'DONATE';
delegatedHP: number;
updatedAt: string;
}// Get current delegation to @aliento
const delegation = await getCurrentDelegation(username);
// Get account history for preferences
const preference = await fetchPreferenceFromChain(username);The platform uses the Hive account history API to calculate curation rewards:
// Time periods
- 24 hours (daily)
- 7 days (weekly)
- 30 days (monthly)
// Calculates from curation_reward operations
- Converts VESTS to HP
- Aggregates by time period
- Caches results for performance-
Connect GitHub repository to Vercel
-
Configure build settings:
- Build Command:
npm run build - Output Directory:
dist - Install Command:
npm install
- Build Command:
-
Environment Variables:
NODE_ENV=production
-
Deploy - Automatic deployments on push to main branch
# Build the project
npm run build
# The built files will be in dist/
# Deploy dist/ to your hosting provider- Authentication Middleware - Protected routes for curator dashboard
- Client-Side Keychain - No private keys stored on server
- LocalStorage Caching - Preferences cached locally for performance
- On-Chain Verification - All preferences verifiable on Hive blockchain
- Type Safety - Full TypeScript coverage
- VESTS to HP Conversion - Uses approximate ratio (1 HP ≈ 2000 VESTS). For exact conversion, query
get_dynamic_global_properties - APR Updates - APR is currently hardcoded at 8.5%, may change with Hive hardforks
- Keychain Required - Users must have Hive Keychain installed for wallet operations
# No environment variables required for basic functionality
# All configuration is in code or fetched from Hive blockchain- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- TypeScript for type safety
- Prettier for code formatting
- Tailwind CSS for styling (no custom CSS unless necessary)
- Astro components for pages
- Inline scripts for client-side interactivity (no external TS imports in
<script>tags)
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Hive: @aliento
- GitHub Issues: Create an issue
- Documentation: Check the
/docsfolder
- Aliento Community - For supporting content creators on Hive
- Hive Blockchain - For providing the infrastructure
- Astro Team - For the amazing framework
- Hive Keychain - For secure wallet integration
- Add support for multiple delegation targets
- Implement payment history dashboard
- Add analytics and charts
- Support for recurring automatic payments
- Mobile app (React Native)
- Integration with HiveSigner as alternative to Keychain
Built with ❤️ for the Hive community
Powered by Aliento • Hive Blockchain
