This repository contains a database-backed REST API for a Solana token launchpad platform. It implements user registration, token launch creation, whitelist and referral management, tiered pricing, purchase tracking, and vesting schedules.
- Health check endpoint
- JWT authentication with registration and login
- CRUD for token launches with computed status (UPCOMING, ACTIVE, ENDED, SOLD_OUT)
- Optional tiered pricing and vesting configuration
- Whitelist management per launch
- Referral codes with discounts and usage limits
- Purchase endpoint with sybil protection and total‑supply enforcement
- Vesting calculations by wallet address
- Node.js / TypeScript
- Express.js
- PostgreSQL (via Prisma)
- JWT (
jsonwebtoken) and password hashing (bcryptjs)
- Copy
.env.exampleto.envand setDATABASE_URLandJWT_SECRET. - Run:
npm install npx prisma generate npx prisma db push npm start
- Server listens on port
3000by default.