Project Structure

circle-info

Understanding the project structure helps you navigate and contribute to Sand Framework effectively.

Directory Layout

sand-framework/
├── api_gateway/          # FastAPI application
│   ├── routes/          # API endpoints
│   ├── middleware/      # Request middleware
│   └── core/           # Core configurations

├── agents/              # AI and Analytics agents
│   ├── ai_service/     # AI development assistant
│   ├── analytics/      # Price and sentiment analysis
│   └── contract/       # Smart contract analysis

├── bot/                # Discord bot integration
│   ├── cogs/          # Bot commands
│   └── handlers/      # Event handlers

├── common/             # Shared utilities
│   ├── database/      # Database models
│   ├── cache/         # Caching utilities
│   └── security/      # Security utilities

├── tests/             # Test suite
│   ├── unit/         # Unit tests
│   └── integration/  # Integration tests

├── docs/              # Documentation
├── scripts/           # Utility scripts
└── docker/           # Docker configurations

Key Components

  • routes/ - API endpoint definitions

  • middleware/ - Request processing

  • core/ - Configuration and startup

Configuration Files

Module Dependencies

Adding New Features

  1. Create new module:

  1. Update API routes:

  1. Add tests:

Code Style

We follow these conventions:

  • PEP 8 for Python code

  • Black for code formatting

  • Type hints for function signatures

  • Docstrings for all public APIs

circle-info

Use pre-commit hooks to maintain code quality:

Last updated