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:
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -14,6 +14,8 @@ jobs:
|
|||||||
working-directory: ./contracts
|
working-directory: ./contracts
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Install Foundry
|
- name: Install Foundry
|
||||||
uses: foundry-rs/foundry-toolchain@v1
|
uses: foundry-rs/foundry-toolchain@v1
|
||||||
@@ -49,6 +51,8 @@ jobs:
|
|||||||
--health-retries 5
|
--health-retries 5
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@@ -83,6 +87,8 @@ jobs:
|
|||||||
working-directory: ./frontend
|
working-directory: ./frontend
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@@ -107,6 +113,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Run security audit
|
- name: Run security audit
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
21
README.md
21
README.md
@@ -76,10 +76,14 @@ ASLE is a comprehensive DeFi liquidity infrastructure platform combining:
|
|||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
1. **Clone the repository**
|
1. **Clone the repository with submodules**
|
||||||
```bash
|
```bash
|
||||||
git clone <repository-url>
|
# Clone with submodules (recommended)
|
||||||
|
git clone --recurse-submodules <repository-url>
|
||||||
cd asle
|
cd asle
|
||||||
|
|
||||||
|
# Or if already cloned, initialize submodules
|
||||||
|
git submodule update --init --recursive
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Set up environment variables**
|
2. **Set up environment variables**
|
||||||
@@ -122,14 +126,21 @@ npm run dev
|
|||||||
|
|
||||||
```
|
```
|
||||||
asle/
|
asle/
|
||||||
├── contracts/ # Smart contracts (Foundry)
|
├── contracts/ # Smart contracts (Foundry) - Git submodule
|
||||||
├── backend/ # Node.js API server
|
├── backend/ # Node.js API server (monorepo)
|
||||||
├── frontend/ # Next.js application
|
│ ├── 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
|
├── docs/ # Documentation
|
||||||
├── scripts/ # Utility scripts
|
├── scripts/ # Utility scripts
|
||||||
└── .github/ # CI/CD workflows
|
└── .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)
|
For detailed structure, see [PROJECT_STRUCTURE.md](./PROJECT_STRUCTURE.md)
|
||||||
|
|
||||||
## 🧪 Testing
|
## 🧪 Testing
|
||||||
|
|||||||
147
REVIEW_SUMMARY.md
Normal file
147
REVIEW_SUMMARY.md
Normal 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
|
||||||
|
|
||||||
Reference in New Issue
Block a user