-
Create public schedule view page (
/app/schedule/[id]/page.tsx)- Display full schedule details
- Show vesting progress visualization
- Display grantor and beneficiary addresses
- Show timeline with key dates
- Status badges (Vesting, Fully Vested, Revoked, Not Started)
- Copy-to-clipboard share link
- Links to Stellar Expert explorer
-
Create API endpoint (
/api/schedules/[id]/route.ts)- Fetch schedule from contract
- Calculate claimable amount
- Include network information
- Proper error handling
- Cache headers for performance
-
Add metadata generation (
/app/schedule/layout.tsx)- Dynamic Open Graph tags
- Twitter card metadata
- SEO-friendly titles and descriptions
-
Update database schema (
indexer/schema.sql)- Add
analytics_cachetable - Add
daily_statstable for trend tracking - Create indexes for performance
- Add
-
Add analytics functions (
indexer/src/db.ts)-
getAnalyticsStats()- Get cached stats -
computeAnalyticsStats()- Calculate real-time stats -
getDailyStats()- Get historical data -
recordDailySnapshot()- Record daily snapshot
-
-
Create API endpoint (
/api/analytics/stats/route.ts)- Calculate total value locked (TVL)
- Sum total claimed tokens
- Count active schedules
- Count unique beneficiaries
- Calculate USD equivalent value
- Proper error handling
- Cache with stale-while-revalidate
-
Build analytics dashboard (
/app/analytics/page.tsx)- Display 6 key metric cards with gradients
- Show TVL in USD
- Calculate derived metrics (avg value, revocation rate, etc.)
- Loading and error states
- Data quality information
- Metric explanations
- Auto-refresh every 2 minutes
-
Create web component (
/public/widget.js)- Define custom element
<vestflow-widget> - Shadow DOM with scoped styles
- Support
schedule-idattribute (required) - Support
minimalattribute for compact mode - Full mode showing all details
- Minimal mode showing essential info only
- Real-time vesting progress calculation
- Auto-detect API origin
- Error handling with user-friendly messages
- Responsive design
- Dark mode styling
- Define custom element
-
Create widget documentation page (
/app/widget/page.tsx)- Real-time preview with iframe
- Interactive configuration panel
- Copy-to-clipboard embed code
- Installation instructions
- Attribute documentation
- Styling guide
- Code examples
- Feature list
-
Create learning hub (
/app/learn/page.tsx)-
Module 1: Introduction to Token Vesting (Beginner, 10 min)
- Vesting basics and concepts
- Real-world use cases
- Key concepts explanation
- Stellar/Soroban intro
-
Module 2: Building Smart Contracts on Soroban (Intermediate, 30 min)
- Soroban fundamentals
- Contract development in Rust
- VestFlow contract architecture
- Core functions and events
- Security considerations
-
Module 3: Frontend Integration (Intermediate, 20 min)
- SDK setup
- Wallet integration
- Data fetching
- Transaction creation
- Best practices
-
Module 4: Architecture Deep Dive (Advanced, 45 min)
- System architecture overview
- Event indexing
- Vesting calculations
- Security architecture
- Scaling considerations
-
Stellar Quest integration
- Links to Stellar Quest challenges
- Quest promotion cards
- Achievement badges
-
-
Learning hub features
- Progressive difficulty levels
- Estimated read times
- Topic tags
- Resource links
- Mobile-friendly navigation
- Sticky sidebar
-
Update database schema (
indexer/schema.sql)- Add
notification_subscriptionstable - Add
notification_eventstable - Add
notification_milestonestable - Create appropriate indexes
- Add
-
Add notification database functions (
indexer/src/db.ts)-
createNotificationSubscription()- Create new subscription -
getNotificationSubscription()- Get subscription by ID -
getSubscriptionsByEmail()- Get user's subscriptions -
getSubscriptionsBySchedule()- Get subscriptions for a schedule -
verifyNotificationSubscription()- Verify email -
unsubscribeNotifications()- Unsubscribe user -
recordNotificationEvent()- Log sent notifications -
hasMilestoneBeenProcessed()- Check for duplicates -
markMilestoneProcessed()- Mark milestone as processed
-
-
Create email notification service (
lib/email.ts)- SendGrid integration
- HTML email templates
- Verification email
- Cliff reached notification
- Claimable notification
- Revoked notification
-
Create notification API endpoints
-
POST /api/notifications/subscribe- Subscribe endpoint -
GET /api/notifications/verify- Email verification -
POST /api/notifications/unsubscribe- Unsubscribe endpoint
-
-
Create notification indexer service (
indexer/src/notifications.ts)-
checkAndSendCliffNotification()- Check and send cliff alerts -
checkAndSendClaimableNotification()- Check and send claimable alerts -
checkAndSendRevokedNotification()- Check and send revoke alerts
-
-
Create notification subscription UI component (
components/NotificationSubscription.tsx)- Email input field
- Notification type selector
- Form validation
- Loading states
- Error/success messages
-
Integrate into public schedule page (
app/schedule/[id]/page.tsx)- Add NotificationSubscription component
- Position before share section
- Pass required props (scheduleId, beneficiaryAddress)
-
Environment configuration
- Update
.env.local.examplewith SendGrid settings - Add SENDGRID_API_KEY
- Add NOTIFICATION_FROM_EMAIL
- Add NEXT_PUBLIC_BASE_URL
- Update
-
Documentation updates (
FEATURES.md)- Add notification feature overview
- How-to guide
- API endpoints documentation
- Email configuration guide
-
Update navbar (
components/Navbar.tsx)- Add Analytics link (desktop)
- Add Widget link (desktop)
- Add Learn link (desktop)
- Add same links to mobile menu
- Maintain responsive design
-
Update landing page (
app/page.tsx)- Add "Explore More" section
- Create feature cards for each new feature
- Add relevant icons and descriptions
- Link to new pages
- Create comprehensive features guide (
FEATURES.md)- Overview of each feature
- How-to guide for each feature
- Route documentation
- API usage examples
- Integration guide
- Performance considerations
- Future enhancements
- Notification feature documentation
-
Manual testing of each feature:
- Public schedule view loads correctly
- Schedule metadata renders in social previews
- Analytics dashboard displays all metrics
- Analytics updates in real-time
- Widget embeds and displays correctly
- Widget minimal mode works
- Widget on different websites/domains
- Learning modules load and display
- Learning module links work
- All navigation links are functional
-
Browser compatibility:
- Chrome/Chromium
- Firefox
- Safari
- Mobile browsers
-
Performance:
- Schedule page load time < 2s
- Analytics page load time < 3s
- Widget load time < 1s
- API response times reasonable
Before deploying to production:
- Run TypeScript compiler to check for type errors
- Test all routes in development environment
- Verify API responses with curl/Postman
- Test widget embedding on external domains
- Update environment variables if needed
- Verify database schema migrations ran
- Set up analytics computation job (if using cron)
- Monitor error logs for issues
- Create backup of database
- Deploy to staging first
- Final testing on staging environment
- Deploy to production
- Schedule view caches for 30 seconds
- Analytics caches for 60 seconds
- Widget data cached by browser
- Bulk queries for multiple schedules
- All endpoints validate input
- No authentication required for public views (by design)
- Widget uses shadow DOM for style encapsulation
- API endpoints have rate limiting (via CDN/server)
- Widget uses standard Web Components API
- Fallbacks for older browsers via public
/widget.js - All pages use modern CSS (grid, flexbox)
- TypeScript ensures type safety
- Semantic HTML structure
- ARIA labels where needed
- Keyboard navigation support
- High contrast dark mode