Comprehensive guide to understanding and navigating the Solana App Kit codebase organization
This document provides a comprehensive overview of how the Solana App Kit codebase is organized. Understanding this structure will help you navigate the project efficiently and know exactly where to make changes for your specific needs.
Monorepo Structure: The kit combines mobile app, backend server, and documentation in a single repository for easier development and maintenance
src/
)The mobile application is organized into several key directories, each serving a specific purpose:
src/core/
- Essential app functionality used across multiple screens
AI chat integration with Solana blockchain interactions
Development tools for debugging and testing
User profile management and account settings
Reusable components used throughout the application
Social feed and threading for community features
Purpose: Core features are central to the app’s functionality and provide shared capabilities across multiple screens and modules.
src/core/
- Essential app functionality used across multiple screens
AI chat integration with Solana blockchain interactions
Development tools for debugging and testing
User profile management and account settings
Reusable components used throughout the application
Social feed and threading for community features
Purpose: Core features are central to the app’s functionality and provide shared capabilities across multiple screens and modules.
src/modules/
- Independent, protocol-specific integrations
Blockchain data fetching and market information
Dynamic Liquidity Markets integration
Fiat on-ramp for purchasing crypto
NFT functionality with Tensor integration
Meme token creation and trading
Professional token launching platform
AI agent integration for automated interactions
Multi-DEX token swapping with optimal routing
Advanced token creation with custom bonding curves
Multi-provider wallet connection and management
Purpose: Each module encapsulates a specific protocol or feature, making the codebase modular, maintainable, and allowing you to use only what you need.
src/screens/
- React Native screens organized by feature area
Shared across features - intro, login, and module selection screens
Example implementations showing how to use core features and modules
Purpose: Screens define the user interface and navigation flow, providing the main entry points for different app features.
src/shared/
- Common utilities and configurations
App settings and environment configuration
React Context providers for global state
Custom React hooks for reusable logic
Navigation setup and routing configuration
Redux store and state management slices
TypeScript definitions for type safety
Purpose: Shared resources provide common functionality and maintain consistency across the entire application.
src/assets/
- Static resources and design system
Static image files for app branding and UI
Scalable vector graphics for icons and illustrations
Color palette definitions for consistent theming
Typography system for consistent text styling
Purpose: Centralized asset management and design system definitions ensure visual consistency.
server/
)The backend server provides essential API endpoints and services:
ios/
- iOS-specific configuration and native code
iOS Development: Requires macOS and Xcode for building and testing on iOS devices
ios/
- iOS-specific configuration and native code
iOS Development: Requires macOS and Xcode for building and testing on iOS devices
android/
- Android-specific configuration and native code
Android Development: Works on any platform with Android Studio and Java/Kotlin support
Key configuration files in the root directory:
Main React Native component and app initialization entry point
Project dependencies, scripts, and metadata configuration
Expo configuration for builds, deployment, and app settings
JavaScript compilation configuration and plugin setup
Metro bundler configuration for React Native builds
TypeScript compiler configuration and type checking rules
Environment variables (not in repo, created during setup)
Documentation configuration for this documentation site
Each module follows a consistent, well-defined structure:
This pattern ensures:
Similar organization across all modules makes navigation predictable
Module internals are contained with clean public interfaces
Clean public APIs make modules easy to integrate and reuse
Easy to understand and modify with clear separation of concerns
Understanding how components connect and data flows through the application:
Component Hierarchy
Screens import and use Components from modules for UI composition
State Management
Components use Hooks for state management and business logic
External Operations
Hooks call Services for API interactions and blockchain operations
Utility Functions
Services use Utils for common operations and data processing
Type Safety
Everything uses Types for TypeScript type safety and IntelliSense
Understanding the structure helps with common development tasks:
Keep modules loosely coupled to maintain modularity and testability
Put common functionality in src/shared/
for reusability across modules
Define interfaces in module types/
directories for better developer experience
Use index.ts
files for clean public APIs and easier imports
Update module READMEs when making changes to keep docs current
Write tests for critical business logic in services and hooks
Now that you understand the repository structure, explore these guides:
Learn about the design system and asset management for consistent UI
Understand component architecture and reusable UI patterns
Configure the app and understand environment settings