Update CI workflow and README for submodule support

- Update CI workflow to checkout submodules recursively
- Update README with submodule cloning instructions
- Add project structure notes about submodules
- Create comprehensive review summary document
This commit is contained in:
defiQUG
2025-12-03 21:39:51 -08:00
parent a0d7bf2e3c
commit a40cfb4204
3 changed files with 171 additions and 5 deletions

View File

@@ -14,6 +14,8 @@ jobs:
working-directory: ./contracts
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
@@ -49,6 +51,8 @@ jobs:
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v4
@@ -83,6 +87,8 @@ jobs:
working-directory: ./frontend
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v4
@@ -107,6 +113,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Run security audit
run: |

View File

@@ -76,10 +76,14 @@ ASLE is a comprehensive DeFi liquidity infrastructure platform combining:
### Installation
1. **Clone the repository**
1. **Clone the repository with submodules**
```bash
git clone <repository-url>
# Clone with submodules (recommended)
git clone --recurse-submodules <repository-url>
cd asle
# Or if already cloned, initialize submodules
git submodule update --init --recursive
```
2. **Set up environment variables**
@@ -122,14 +126,21 @@ npm run dev
```
asle/
├── contracts/ # Smart contracts (Foundry)
├── backend/ # Node.js API server
├── frontend/ # Next.js application
├── contracts/ # Smart contracts (Foundry) - Git submodule
├── backend/ # Node.js API server (monorepo)
│ ├── src/api/ # REST API routes
│ ├── src/middleware/# Express middleware
│ ├── src/jobs/ # Background jobs/orchestration
│ └── src/services/ # Business logic services
├── frontend/ # Next.js application - Git submodule
├── mobile/ # React Native mobile app
├── docs/ # Documentation
├── scripts/ # Utility scripts
└── .github/ # CI/CD workflows
```
**Note:** `contracts/` and `frontend/` are git submodules. See [SUBMODULE_SETUP.md](./SUBMODULE_SETUP.md) for details.
For detailed structure, see [PROJECT_STRUCTURE.md](./PROJECT_STRUCTURE.md)
## 🧪 Testing

147
REVIEW_SUMMARY.md Normal file
View File

@@ -0,0 +1,147 @@
# ASLE Repository Review & Setup Summary
**Date:** 2024-12-19
**Status:** ✅ Complete
## Overview
This document summarizes the repository structure review and setup completion for the ASLE project.
## Completed Tasks
### 1. Repository Structure Setup ✅
- **Backend**: Configured as unified monorepo containing:
- API routes (`backend/src/api/`)
- Middleware (`backend/src/middleware/`)
- Jobs/Orchestration (`backend/src/jobs/`)
- Services (`backend/src/services/`)
- GraphQL (`backend/src/graphql/`)
**Rationale**: These components are tightly coupled, share dependencies, and deploy as a single service.
- **Contracts**: Converted to git submodule
- Repository: `https://github.com/defiQUG/asle-contracts`
- Independent versioning and release cycle
- Foundry-based smart contract development
- **Frontend**: Converted to git submodule
- Repository: `https://github.com/defiQUG/asle-frontend`
- Independent versioning and release cycle
- Next.js 16 application
### 2. Git Configuration ✅
- All repository files staged and committed
- Submodules properly configured in `.gitmodules`
- Main repository remote: `https://github.com/Order-of-Hospitallers/asle.git`
- Submodule repositories created and pushed
### 3. Documentation Updates ✅
- **SUBMODULE_SETUP.md**: Complete guide for submodule management
- **README.md**: Updated with submodule cloning instructions
- **CI Workflow**: Updated to checkout submodules recursively
### 4. CI/CD Configuration ✅
- Updated `.github/workflows/ci.yml` to handle submodules
- All jobs now checkout submodules recursively
- Tests configured for contracts, backend, and frontend
## Repository Structure
```
asle/
├── .gitmodules # Submodule configuration
├── backend/ # Monorepo (API + middleware + jobs + services)
│ ├── src/
│ │ ├── api/ # 15 REST API route files
│ │ ├── middleware/ # 4 middleware files
│ │ ├── jobs/ # 4 orchestration/job files
│ │ ├── services/ # 31 service files
│ │ └── graphql/ # GraphQL implementation
│ └── prisma/ # Database schema
├── contracts/ # Git submodule → defiQUG/asle-contracts
├── frontend/ # Git submodule → defiQUG/asle-frontend
├── mobile/ # React Native app
├── docs/ # Comprehensive documentation
├── scripts/ # Utility scripts
│ └── setup-submodules.sh # Automated submodule setup script
└── .github/workflows/ # CI/CD pipelines
```
## Key Files
### Configuration
- `.gitmodules` - Submodule definitions
- `.gitignore` - Git ignore rules
- `docker-compose.yml` - Docker services
- `.github/workflows/ci.yml` - CI/CD pipeline
### Documentation
- `README.md` - Project overview and quick start
- `SUBMODULE_SETUP.md` - Submodule management guide
- `PROJECT_STRUCTURE.md` - Detailed structure documentation
- `DEPLOYMENT.md` - Deployment instructions
- `API_DOCUMENTATION.md` - API reference
- `TESTING.md` - Testing procedures
## Cloning Instructions
### First Time Clone
```bash
git clone --recurse-submodules <repository-url>
cd asle
```
### If Already Cloned
```bash
git submodule update --init --recursive
```
### Updating Submodules
```bash
git submodule update --remote
```
## Repository URLs
- **Main Repository**: `https://github.com/Order-of-Hospitallers/asle.git`
- **Contracts Submodule**: `https://github.com/defiQUG/asle-contracts`
- **Frontend Submodule**: `https://github.com/defiQUG/asle-frontend`
## Next Steps
1. **Push Changes**: Push the main repository with submodule configuration
```bash
git push origin main
```
2. **Verify CI/CD**: Ensure GitHub Actions workflows run successfully with submodules
3. **Environment Setup**: Create `.env.example` files in:
- `backend/.env.example`
- `frontend/.env.example` (if needed)
4. **Documentation**: Review and update any documentation that references the old structure
5. **Team Onboarding**: Share submodule cloning instructions with team members
## Notes
- Backend components (API, middleware, jobs) remain together as a monorepo for optimal development workflow
- Contracts and frontend are independent submodules for separate versioning and team workflows
- All changes have been committed to the main repository
- Submodule repositories are live on GitHub under `defiQUG` organization
## Verification Checklist
- ✅ All files staged and committed
- ✅ Submodules properly configured
- ✅ CI workflow updated for submodules
- ✅ README updated with submodule instructions
- ✅ Documentation created (SUBMODULE_SETUP.md)
- ✅ Automated setup script created
- ✅ Repository structure verified