Files
asle/PROJECT_STRUCTURE.md
defiQUG 507d9a35b1 Add initial project structure and documentation files
- Created .gitignore to exclude sensitive files and directories.
- Added API documentation in API_DOCUMENTATION.md.
- Included deployment instructions in DEPLOYMENT.md.
- Established project structure documentation in PROJECT_STRUCTURE.md.
- Updated README.md with project status and team information.
- Added recommendations and status tracking documents.
- Introduced testing guidelines in TESTING.md.
- Set up CI workflow in .github/workflows/ci.yml.
- Created Dockerfile for backend and frontend setups.
- Added various service and utility files for backend functionality.
- Implemented frontend components and pages for user interface.
- Included mobile app structure and services.
- Established scripts for deployment across multiple chains.
2025-12-03 21:22:31 -08:00

5.3 KiB

ASLE Project Structure

Overview

This document describes the organization and structure of the ASLE project.

Directory Structure

asle/
├── contracts/              # Smart contracts (Foundry)
│   ├── src/
│   │   ├── core/
│   │   │   ├── Diamond.sol
│   │   │   ├── DiamondInit.sol
│   │   │   └── facets/        # All 8 facets
│   │   ├── interfaces/        # Contract interfaces
│   │   └── libraries/         # Shared libraries
│   ├── script/               # Deployment scripts
│   ├── test/                 # Contract tests
│   ├── foundry.toml          # Foundry configuration
│   └── FOUNDRY_SETUP.md      # Foundry setup guide
│
├── backend/                 # Node.js API server
│   ├── src/
│   │   ├── api/              # REST API routes
│   │   ├── services/         # Business logic services
│   │   ├── graphql/          # GraphQL schema & resolvers
│   │   ├── middleware/       # Express middleware
│   │   └── index.ts          # Entry point
│   ├── prisma/
│   │   └── schema.prisma     # Database schema
│   ├── package.json
│   └── Dockerfile
│
├── frontend/                # Next.js application
│   ├── app/                  # Next.js app router
│   │   ├── page.tsx          # Dashboard
│   │   ├── pools/            # Pools pages
│   │   ├── vaults/           # Vaults pages
│   │   ├── compliance/       # Compliance pages
│   │   ├── governance/       # Governance pages
│   │   ├── institutional/    # Institutional pages
│   │   ├── monitoring/       # Monitoring pages
│   │   └── layout.tsx
│   ├── components/           # React components
│   ├── lib/                  # Utilities and configs
│   ├── package.json
│   └── Dockerfile
│
├── docs/                    # Documentation
│   ├── ARCHITECTURE.md       # System architecture
│   ├── PHASES.md            # Phase implementation
│   ├── ASLE_Whitepaper.md   # Whitepaper
│   ├── ASLE_Executive_Summary.md
│   └── ...                  # Additional docs
│
├── scripts/                 # Utility scripts
│   └── deploy-multichain.ts
│
├── .github/
│   └── workflows/
│       └── ci.yml           # CI/CD pipeline
│
├── docker-compose.yml       # Docker orchestration
├── .gitignore              # Git ignore rules
│
├── README.md               # Main project README
├── STATUS.md               # Project status
├── DEPLOYMENT.md           # Deployment guide
├── API_DOCUMENTATION.md    # API reference
├── TESTING.md              # Testing guide
└── PROJECT_STRUCTURE.md    # This file

Key Files

Root Level

  • README.md - Project overview and quick start
  • STATUS.md - Current implementation status
  • DEPLOYMENT.md - Deployment instructions
  • API_DOCUMENTATION.md - Complete API reference
  • TESTING.md - Testing procedures
  • docker-compose.yml - Docker services configuration

Contracts

  • contracts/src/core/ - Core Diamond contract and facets
  • contracts/src/interfaces/ - All contract interfaces
  • contracts/src/libraries/ - Shared libraries
  • contracts/script/ - Deployment scripts
  • contracts/test/ - Test suites

Backend

  • backend/src/api/ - REST API route handlers
  • backend/src/services/ - Business logic services
  • backend/src/graphql/ - GraphQL implementation
  • backend/src/middleware/ - Express middleware
  • backend/prisma/ - Database schema and migrations

Frontend

  • frontend/app/ - Next.js pages (App Router)
  • frontend/components/ - Reusable React components
  • frontend/lib/ - Utilities and configurations

Documentation

  • docs/ - Comprehensive documentation suite
    • Business documents (whitepaper, pitch deck)
    • Technical documentation (architecture, phases)
    • Design documents (wireframes, diagrams)

File Naming Conventions

  • Smart Contracts: PascalCase (e.g., LiquidityFacet.sol)
  • Interfaces: Start with I (e.g., ILiquidityFacet.sol)
  • Libraries: Start with Lib (e.g., LibDiamond.sol)
  • Backend: kebab-case (e.g., compliance.ts)
  • Frontend Components: PascalCase (e.g., PoolCreator.tsx)
  • Frontend Pages: lowercase (e.g., page.tsx)
  • Documentation: UPPERCASE with underscores or kebab-case (e.g., DEPLOYMENT.md, api-docs.md)

Configuration Files

  • foundry.toml - Foundry/Solidity configuration
  • package.json - Node.js dependencies (backend/frontend)
  • docker-compose.yml - Docker services
  • prisma/schema.prisma - Database schema
  • .gitignore - Git ignore rules
  • .env.example - Environment variable templates

Entry Points

  • Backend: backend/src/index.ts
  • Frontend: frontend/app/layout.tsx and frontend/app/page.tsx
  • Contracts: contracts/src/core/Diamond.sol
  • Deployment: contracts/script/Deploy.s.sol

Dependencies

Smart Contracts

  • OpenZeppelin Contracts
  • Chainlink CCIP (when integrated)
  • Foundry testing framework

Backend

  • Express.js
  • Apollo Server (GraphQL)
  • Prisma ORM
  • PostgreSQL
  • Redis

Frontend

  • Next.js 16
  • React 19
  • Wagmi/Viem
  • Tailwind CSS