Skip to content

Feat/token vesting UI generator#852

Open
akinboyewaSamson wants to merge 2 commits into
StellarDevHub:mainfrom
akinboyewaSamson:feat/token-vesting-ui-generator
Open

Feat/token vesting UI generator#852
akinboyewaSamson wants to merge 2 commits into
StellarDevHub:mainfrom
akinboyewaSamson:feat/token-vesting-ui-generator

Conversation

@akinboyewaSamson

Copy link
Copy Markdown

closes #797

PR: Implement Token Vesting UI and Claim Simulator
Description
This PR introduces the Token Vesting Gateway and simulation dashboard to the Hackathon Project Idea Generator module. It enables students/users to define vesting schedules (cliff, duration, amount, and beneficiary address), visualize the vesting progression curve interactively using a dynamic SVG graph, and simulate time progression to claim unlocked tokens in a secure sandboxed environment.

Key Changes

  1. Database & Persistence Layer
    Added VestingSchedule model to the Prisma schema (schema.prisma).
    Configured multi-tenant workspace isolation for VestingSchedule in the DB router.
  2. Backend Routes & Validation
    Created request validation schemas using Zod (vesting.validation.ts) including a simulated elapsed time parameter for testing.
    Implemented /api/v1/generator/vesting endpoints:
    POST / - Create a vesting schedule.
    GET / - List all vesting schedules.
    GET /:projectId - Retrieve vesting details for a specific idea.
    POST /:projectId/claim - Claim unlocked tokens.
    Fixed a named import mismatch for startWebhookWorker in backend/src/index.ts.
  3. Frontend Client & Offline Fallbacks
    Added vestingAPI definitions to frontend/src/lib/api.ts.
    Integrated a localStorage fallback wrapper on all API calls, ensuring the simulator works fully in local-only / offline environments without needing active PostgreSQL/Redis setups.
  4. Interactive Vesting Dashboard
    Created VestingDashboard component under components/idea-generator/:
    Configuration form with quick-presets (Standard, Founder, Advisor).
    Clean card deck showing stats: Allocation, Cliff, Duration, and Claimed.
    Interactive SVG graphing the linear vesting curve and cliff line.
    Timeline Simulation Scrubber to scrub time and dynamically calculate vested vs remaining locked vs claimable tokens.
    Simulation Claim form updating state on execution.
    Integrated the dashboard toggler button directly into IdeaGeneratorPanel.tsx.
    Verification & Testing
    Automated Test Coverage
    Backend Endpoints: All database models, multi-tenant workspace queries, route parameters, validation edge-cases, and mock claims are verified via 12 tests in backend/tests/vesting.test.ts (12/12 passing).
    Frontend Components: Rendering, presets, interactive timeline scrubber, math calculations, and claim handlers are covered by 6 unit tests in frontend/src/components/idea-generator/tests/VestingDashboard.test.tsx (6/6 passing).
    Manual QA
    Verified the entire flow in the browser:

Generated a mock project.
Configured and deployed a vesting schedule.
Scrubbed time forward and successfully simulated claims.

@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

@TobyKing007 is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@akinboyewaSamson Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] Design Token Vesting UI for Hackathon Project Idea Generator

2 participants