- 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.
5.3 KiB
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 startSTATUS.md- Current implementation statusDEPLOYMENT.md- Deployment instructionsAPI_DOCUMENTATION.md- Complete API referenceTESTING.md- Testing proceduresdocker-compose.yml- Docker services configuration
Contracts
contracts/src/core/- Core Diamond contract and facetscontracts/src/interfaces/- All contract interfacescontracts/src/libraries/- Shared librariescontracts/script/- Deployment scriptscontracts/test/- Test suites
Backend
backend/src/api/- REST API route handlersbackend/src/services/- Business logic servicesbackend/src/graphql/- GraphQL implementationbackend/src/middleware/- Express middlewarebackend/prisma/- Database schema and migrations
Frontend
frontend/app/- Next.js pages (App Router)frontend/components/- Reusable React componentsfrontend/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 configurationpackage.json- Node.js dependencies (backend/frontend)docker-compose.yml- Docker servicesprisma/schema.prisma- Database schema.gitignore- Git ignore rules.env.example- Environment variable templates
Entry Points
- Backend:
backend/src/index.ts - Frontend:
frontend/app/layout.tsxandfrontend/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