Repository Structure
Understanding the organization of Solana App Kit
Solana App Kit is organized into a modular structure that makes it easy to find and use the components, hooks, and services you need. This guide will help you understand how the codebase is organized.
Directory Structure
Key Directories
Components
The components
directory contains all reusable UI components, organized by feature or functionality:
thread/
- Social feed componentswallet/
- Wallet and transaction componentstokenMill/
- Token creation and management componentspumpfun/
- Token trading components- And many more specialized components
Each component typically includes:
- The main component file
- Style definitions
- Types and interfaces
- Utility functions specific to that component
Hooks
The hooks
directory contains custom React hooks that provide reusable logic:
useAuth
- Authentication and user managementuseFetchNFTs
- NFT data fetchingusePumpFun
- Token trading functionalityuseTradeTransaction
- Transaction handlinguseAppNavigation
- Navigation utilities- And more specialized hooks
Services
The services
directory contains modules for interacting with external APIs and blockchain:
pumpfun/
- Services for token tradingtokenMill/
- Services for token creation and managementwalletProviders/
- Wallet connection services (Privy, Dynamic, Turnkey)
Screens
The screens
directory contains full application screens that combine components:
Common/
- Shared screens like login, search, etc.SampleUI/
- Example UI implementationsChat/
- Messaging UIThreads/
- Social feed UI
State
The state
directory contains Redux state management:
auth/
- Authentication statethread/
- Social feed statetransaction/
- Transaction statestore.ts
- Redux store configuration
Usage Patterns
Importing Components
Using Hooks
Using Services
Customization Points
Solana App Kit is designed to be customizable at various levels:
- Theme Customization - Through the
CustomizationProvider
- Component Props - Most components accept customization props
- Redux Integration - You can extend or replace the Redux store
- Service Overrides - You can provide custom service implementations
For more details on each section of the codebase, refer to the specific documentation pages for Assets, Components, Hooks, etc.
Was this page helpful?