- Added AccessControl to ComboHandler for role-based access management. - Implemented gas estimation for plan execution and improved gas limit checks. - Updated execution and preparation methods to enforce step count limits and role restrictions. - Enhanced error handling in orchestrator API endpoints with AppError for better validation feedback. - Integrated request timeout middleware for improved request management. - Updated Swagger documentation to reflect new API structure and parameters.
1.8 KiB
1.8 KiB
Developer Onboarding Guide
Prerequisites
- Node.js 18+
- npm or yarn
- Git
- Docker (optional)
- PostgreSQL (for local development)
- Redis (optional, for caching)
Setup
1. Clone Repository
git clone https://github.com/your-org/CurrenciCombo.git
cd CurrenciCombo
2. Frontend Setup
cd webapp
npm install
cp .env.example .env.local
# Edit .env.local with your configuration
npm run dev
3. Backend Setup
cd orchestrator
npm install
cp .env.example .env
# Edit .env with your configuration
npm run migrate
npm run dev
4. Smart Contracts Setup
cd contracts
npm install
npm run compile
npm run test
Development Workflow
Making Changes
- Create a feature branch:
git checkout -b feature/your-feature - Make changes
- Run tests:
npm test - Lint code:
npm run lint - Commit:
git commit -m "feat: your feature" - Push:
git push origin feature/your-feature - Create Pull Request
Code Style
- TypeScript for all new code
- Follow ESLint configuration
- Use Prettier for formatting
- Write JSDoc comments for public APIs
Testing
- Write unit tests for utilities
- Write integration tests for API endpoints
- Write E2E tests for user flows
- Maintain >80% code coverage
Project Structure
CurrenciCombo/
├── webapp/ # Next.js frontend
├── orchestrator/ # Express backend
├── contracts/ # Smart contracts
└── docs/ # Documentation
Key Concepts
- Plans: Multi-step financial workflows
- Steps: Individual operations (borrow, swap, repay, pay)
- 2PC: Two-phase commit for atomic execution
- Compliance: LEI/DID/KYC/AML requirements
Getting Help
- Check documentation in
docs/ - Review code comments
- Ask questions in team chat
- File issues for bugs
Last Updated: 2025-01-15