Root Directory Overview
Monorepo Structure: The kit combines mobile app, backend server, and documentation in a single repository for easier development and maintenance
Mobile App Structure (src/
)
The mobile application is organized into several key directories, each serving a specific purpose:
src/core/
- Essential app functionality used across multiple screensChat
AI chat integration with Solana blockchain interactions
Dev Mode
Development tools for debugging and testing
Profile
User profile management and account settings
Shared UI
Reusable components used throughout the application
Thread
Social feed and threading for community features
Backend Server Structure (server/
)
The backend server provides essential API endpoints and services:
Platform-Specific Directories
ios/
- iOS-specific configuration and native codeiOS Development: Requires macOS and Xcode for building and testing on iOS devices
Configuration Files
Key configuration files in the root directory:App.tsx
Main React Native component and app initialization entry point
package.json
Project dependencies, scripts, and metadata configuration
app.config.js
Expo configuration for builds, deployment, and app settings
babel.config.js
JavaScript compilation configuration and plugin setup
metro.config.js
Metro bundler configuration for React Native builds
tsconfig.json
TypeScript compiler configuration and type checking rules
.env.local
Environment variables (not in repo, created during setup)
mint.json
Documentation configuration for this documentation site
Module Architecture Pattern
Each module follows a consistent, well-defined structure:Consistency
Similar organization across all modules makes navigation predictable
Encapsulation
Module internals are contained with clean public interfaces
Reusability
Clean public APIs make modules easy to integrate and reuse
Maintainability
Easy to understand and modify with clear separation of concerns
Data Flow Architecture
Understanding how components connect and data flows through the application:1
Component Hierarchy
Screens import and use Components from modules for UI composition
2
State Management
Components use Hooks for state management and business logic
3
External Operations
Hooks call Services for API interactions and blockchain operations
4
Utility Functions
Services use Utils for common operations and data processing
5
Type Safety
Everything uses Types for TypeScript type safety and IntelliSense
Data Flow Diagram
Development Workflow
Understanding the structure helps with common development tasks:Best Practices
Module Independence
Keep modules loosely coupled to maintain modularity and testability
Shared Code
Put common functionality in
src/shared/
for reusability across modulesType Safety
Define interfaces in module
types/
directories for better developer experienceExport Consistency
Use
index.ts
files for clean public APIs and easier importsDocumentation
Update module READMEs when making changes to keep docs current
Testing
Write tests for critical business logic in services and hooks