Enterprise-grade token distribution platform powered by Aptos blockchain
Demo β’ Documentation β’ Report Bug
Minto is a comprehensive B2B platform that enables Web3 companies to create, manage, and distribute token airdrops efficiently on the Aptos blockchain. Built with modern technologies and best practices, it provides an enterprise-grade solution for token distribution campaigns.
-
π Multiple Authentication Methods
- Google OAuth (Keyless authentication)
- Wallet connection (Petra, Martian, Pontem)
- Email/password (coming soon)
-
π Campaign Management Dashboard
- Create and configure airdrop campaigns
- Real-time analytics and reporting
- Participant tracking and eligibility management
- Multi-step campaign creation wizard
-
π― Distribution Methods
- First-Come-First-Serve (FCFS)
- Lottery system
- Equal distribution
- Tiered access
- Dutch auction
- Engagement-based rewards
-
β Eligibility Criteria
- Open to all
- Whitelist-based
- NFT holder verification
- Token holder requirements
- Custom criteria
-
π° Cost Advantages
- 100x cheaper gas fees vs Ethereum
- Sub-second transaction finality
- Parallel execution engine
- Minimal infrastructure costs
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β Landing β β Frontend β β Backend β
β (React) β ββββΆ β Dashboard β ββββΆ β (FastAPI) β
β β β (React) β β β
βββββββββββββββ ββββββββ¬ββββββββ ββββββββ¬βββββββ
β β
β β
βΌ βΌ
ββββββββββββββββββββββββββββββββ
β Aptos Blockchain β
β (Smart Contracts - Move) β
ββββββββββββββββββββββββββββββββ
Frontend
- React 18 + TypeScript
- Vite (Build tool)
- Mantine UI v7 (Component library)
- Zustand (State management)
- React Query (Data fetching)
- Aptos TypeScript SDK
- React Router v6
Backend
- FastAPI (Python 3.11+)
- SQLAlchemy + Alembic (ORM & Migrations)
- PostgreSQL (Database)
- Pydantic (Validation)
- python-jose (JWT)
- Aptos Python SDK
Blockchain
- Move language (Smart contracts)
- Aptos blockchain
- Aptos CLI
minto/
βββ backend/ # FastAPI backend API
β βββ app/
β β βββ models/ # SQLAlchemy database models
β β βββ schemas/ # Pydantic schemas
β β βββ routers/ # API endpoints
β β βββ services/ # Business logic
β β βββ main.py # FastAPI app entry
β βββ alembic/ # Database migrations
β βββ requirements.txt
β
βββ frontend/ # React dashboard application
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ hooks/ # Custom React hooks
β β βββ services/ # API & blockchain services
β β βββ store/ # Zustand stores
β β βββ types/ # TypeScript types
β β βββ utils/ # Utility functions
β βββ package.json
β
βββ landing/ # Marketing landing page (TODO)
β βββ ...
β
βββ contracts/ # Move smart contracts (TODO)
β βββ sources/
β β βββ campaign.move
β βββ Move.toml
β βββ scripts/
β
βββ IMPLEMENTATION_GUIDE.md # Detailed implementation guide
- Node.js 18+ and pnpm
- Python 3.11+
- PostgreSQL 14+
- Aptos CLI (Installation guide)
git clone https://github.com/yourusername/minto.git
cd mintocd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Create database
createdb minto
# Run migrations
alembic upgrade head
# Start server
uvicorn app.main:app --reloadBackend runs on http://localhost:8000
API docs available at http://localhost:8000/docs
cd frontend
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Start development server
pnpm devFrontend runs on http://localhost:5173
cd contracts
# Compile contracts
aptos move compile
# Run tests
aptos move test
# Deploy to devnet
aptos move publish --profile devnetDATABASE_URL=postgresql://user:password@localhost:5432/minto
SECRET_KEY=your-secret-key-here
JWT_ALGORITHM=HS256
JWT_EXPIRATION_HOURS=24
APTOS_NETWORK=devnet
APTOS_NODE_URL=https://fullnode.devnet.aptoslabs.com/v1
APTOS_PRIVATE_KEY=0x...
ALLOWED_ORIGINS=http://localhost:5173
DEBUG=TrueVITE_APTOS_NETWORK=devnet
VITE_APTOS_NODE_URL=https://fullnode.devnet.aptoslabs.com/v1
VITE_API_BASE_URL=http://localhost:8000
VITE_CONTRACT_ADDRESS=0x...
VITE_GOOGLE_CLIENT_ID=your-google-oauth-client-idLogin with wallet or Google OAuth
Request (Google Keyless):
{
"provider": "google",
"id_token": "eyJhbGc..."
}Request (Wallet):
{
"provider": "wallet",
"wallet_address": "0x1234...",
"signature": "0xabcd...",
"message": "Sign this message..."
}Response:
{
"user": {
"id": "uuid",
"wallet_address": "0x...",
"email": "user@example.com",
"role": "user"
},
"access_token": "eyJhbGc...",
"refresh_token": "eyJhbGc...",
"expires_in": 3600
}List all campaigns with pagination
Query Parameters:
skip(int): Offset for paginationlimit(int): Number of items (max 100)status(string): Filter by status (draft/live/ended/paused)
Create new campaign (requires company role)
Request:
{
"name": "Summer Token Airdrop",
"token_address": "0x1::aptos_coin::AptosCoin",
"total_supply": 1000000,
"amount_per_claim": 100,
"start_time": "2024-01-01T00:00:00Z",
"end_time": "2024-12-31T23:59:59Z",
"eligibility_type": "open",
"distribution_type": "fixed",
"max_claims_per_wallet": 1
}Check if wallet is eligible to claim
Request:
{
"campaign_id": "uuid",
"wallet_address": "0x..."
}Response:
{
"is_eligible": true,
"max_claimable_amount": 100,
"remaining_claims": 1
}Create new claim
See full API documentation at /docs when running the backend.
- Primary Green:
#10b981 - Accent Emerald:
#059669 - Background:
#ffffff(light) /#000000(dark) - Sidebar:
#0a0a0a(light) /#064e3b(dark)
- Font: Inter (400, 500, 600, 700)
- Scaling: Fluid with
clamp() - Numbers: Tabular numerals for data
- Grid: 8px base unit
- Values: 8, 16, 24, 32, 48, 64px
- Cards: 8px border radius
- Buttons: 6px border radius
- Modals: 12px border radius
- Inputs: 4px border radius
- JWT Authentication with refresh tokens
- Wallet signature verification
- Google OAuth integration
- CORS protection
- SQL injection prevention (SQLAlchemy ORM)
- XSS protection (Input sanitization)
- Rate limiting (TODO)
- HTTPS enforcement (production)
cd backend
pytestcd frontend
pnpm testcd contracts
aptos move testusers (
id UUID PRIMARY KEY,
wallet_address VARCHAR UNIQUE,
email VARCHAR UNIQUE,
display_name VARCHAR,
avatar_url VARCHAR,
role VARCHAR, -- user, company, admin
auth_provider VARCHAR, -- wallet, google, apple, twitter
is_verified BOOLEAN,
created_at TIMESTAMP,
updated_at TIMESTAMP
)campaigns (
id UUID PRIMARY KEY,
creator_id UUID REFERENCES users(id),
name VARCHAR(100),
contract_address VARCHAR,
token_address VARCHAR,
total_supply INTEGER,
claimed_supply INTEGER,
amount_per_claim INTEGER,
start_time TIMESTAMP,
end_time TIMESTAMP,
eligibility_type VARCHAR,
distribution_type VARCHAR,
status VARCHAR, -- draft, live, ended, paused
created_at TIMESTAMP,
updated_at TIMESTAMP
)claims (
id UUID PRIMARY KEY,
campaign_id UUID REFERENCES campaigns(id),
user_wallet VARCHAR,
amount INTEGER,
tx_hash VARCHAR UNIQUE,
status VARCHAR, -- pending, processing, completed, failed
claimed_at TIMESTAMP,
processed_at TIMESTAMP
)- Create PostgreSQL database
- Set environment variables
- Deploy with:
uvicorn app.main:app --host 0.0.0.0 --port $PORT - Run migrations:
alembic upgrade head
- Build command:
pnpm build - Output directory:
dist - Set environment variables (VITE_*)
- Configure SPA fallback routing
- Compile:
aptos move compile - Test:
aptos move test - Deploy:
aptos move publish --profile mainnet
- Backend API with FastAPI
- Google Keyless authentication
- Frontend dashboard with Mantine
- Campaign CRUD operations
- Complete campaign creation wizard
- Smart contract implementation
- Landing page
- NFT-gated airdrops
- Multi-token support
- Analytics dashboard
- Email notifications
- Webhook integrations
- Mobile app
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Aptos Labs for the blockchain infrastructure
- Mantine for the amazing UI components
- FastAPI for the backend framework
- Website: https://minto.xyz
- Twitter: @minto
- Discord: Join our server
- Email: support@minto.xyz
Built with β€οΈ for the Aptos ecosystem