Overview

This backend server is built with Express.js and TypeScript, offering a robust API for Solana blockchain interactions, social features, and token management. It serves as the backbone for the Solana App Kit, handling all server-side operations and blockchain interactions.

Features

Token Management

  • Token creation via TokenMill
  • Market creation and management
  • Setting bonding curves
  • Token swapping
  • Staking and vesting

Social Features

  • Thread creation and management
  • User profiles
  • Image management
  • Community interactions

Storage Solutions

  • IPFS integration via Pinata
  • Google Cloud Storage integration
  • Metadata management
  • File upload handling

Wallet & Security

  • Turnkey API integration
  • Secure wallet management
  • Transaction signing
  • Authentication systems

Prerequisites

Quick Start

1

Clone and Navigate

git clone https://github.com/SendArcade/solana-app-kit.git
cd solana-app-kit/server
2

Install Dependencies

yarn install
3

Environment Setup

cp .env.example .env

Configure all required environment variables in your .env file. See the Configuration section for details.

4

Start Development Server

yarn dev

The server will start on port 8080 (or the port specified in your environment variables).

Architecture Overview

The server follows a modular architecture with clear separation of concerns:

server/
├── src/
│   ├── controllers/     # Request handling logic
│   ├── routes/         # API endpoint definitions
│   ├── services/       # Business logic implementation
│   ├── db/            # Database configuration
│   ├── types/         # TypeScript definitions
│   └── utils/         # Helper functions

Core Services

Capabilities:

  • Token creation and market management
  • Setting bonding curves for dynamic pricing
  • Token swapping with optimal rates
  • Staking mechanisms for rewards
  • Vesting schedules for token distribution
  • Market funding and liquidity management

Key Features:

  • Integration with Solana programs
  • Real-time price calculations
  • Transaction optimization

API Endpoints Overview

TokenMill Endpoints

EndpointMethodDescription
/api/configPOSTCreate TokenMill configuration
/api/marketsPOSTCreate token market
/api/tokensPOSTCreate new token
/api/swapPOSTExecute token swap
/api/stakePOSTCreate staking position
/api/vestingPOSTCreate vesting schedule

Social Features

EndpointMethodDescription
/api/threadVariousThread management
/api/profileVariousUser profiles
/api/thread/imagesVariousImage handling

Swap Integration

EndpointMethodDescription
/api/jupiterVariousJupiter DEX integration
/api/pump-swapVariousPumpSwap functionality
/api/pumpfunVariousPumpFun launches

For detailed API documentation, see the API Reference section.

Security Measures

Important Security Considerations

  • All transactions require proper signature verification
  • Environment variables store sensitive credentials
  • Database queries use parameterized statements
  • Error messages are sanitized to prevent information leakage

Development Workflow

# Start with auto-reload
yarn dev

# Run with specific port
PORT=3000 yarn dev

Next Steps


Need Help? Check out our support channels or open an issue in the GitHub repository.