Project Structure
High-level overview of the QsnDEX monorepo layout.
GRANT_DEX/
├── contracts/ # Solidity smart contracts (Foundry)
│ ├── src/
│ │ ├── core/ # AMM core (Factory, Router, Pair)
│ │ ├── periphery/ # Periphery contracts (Multicall, WETH helper)
│ │ ├── token/ # QSN token contract
│ │ ├── staking/ # Staking and staking factory
│ │ ├── launchpad/ # Token sale contracts
│ │ ├── utils/ # Utility libraries
│ │ └── interfaces/ # Contract interfaces
│ ├── test/ # Foundry tests
│ ├── script/ # Deployment scripts
│ └── foundry.toml # Foundry configuration
│
├── backend/ # Rust API server
│ ├── src/
│ │ ├── main.rs # Application entry point
│ │ ├── routes/ # 25+ HTTP handlers
│ │ ├── services/ # 15+ business logic modules
│ │ ├── models/ # Database and API models
│ │ └── config/ # Configuration and environment
│ ├── migrations/ # PostgreSQL migrations
│ └── Cargo.toml # Rust dependencies
│
├── frontend/ # Next.js web application
│ ├── src/
│ │ ├── app/ # 11 route pages (App Router)
│ │ ├── components/ # 140+ React components
│ │ ├── hooks/ # 22 custom React hooks
│ │ ├── store/ # State management
│ │ ├── config/ # Chain and contract configuration
│ │ ├── i18n/ # Internationalization (600+ keys)
│ │ └── lib/ # Shared utilities
│ ├── public/ # Static assets
│ ├── next.config.ts # Next.js configuration
│ └── package.json # Node dependencies
│
├── docs/ # Docusaurus documentation site
├── backend.sh # Backend management script
└── .env # Environment variables
Project Statistics
| Metric | Count |
|---|---|
| Solidity contracts | 25 files |
| API endpoints | 50+ |
| Backend services | 15+ modules |
| Frontend routes | 22 pages |
| React components | 140+ |
| Custom hooks | 22 |
| Mobile views | 22 |
| i18n keys | 600+ |
| Supported chains | 4 |
| AI models | 3 |