105 lines
1.8 KiB
Markdown
105 lines
1.8 KiB
Markdown
|
|
# 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
|
||
|
|
|
||
|
|
```bash
|
||
|
|
git clone https://github.com/your-org/CurrenciCombo.git
|
||
|
|
cd CurrenciCombo
|
||
|
|
```
|
||
|
|
|
||
|
|
### 2. Frontend Setup
|
||
|
|
|
||
|
|
```bash
|
||
|
|
cd webapp
|
||
|
|
npm install
|
||
|
|
cp .env.example .env.local
|
||
|
|
# Edit .env.local with your configuration
|
||
|
|
npm run dev
|
||
|
|
```
|
||
|
|
|
||
|
|
### 3. Backend Setup
|
||
|
|
|
||
|
|
```bash
|
||
|
|
cd orchestrator
|
||
|
|
npm install
|
||
|
|
cp .env.example .env
|
||
|
|
# Edit .env with your configuration
|
||
|
|
npm run migrate
|
||
|
|
npm run dev
|
||
|
|
```
|
||
|
|
|
||
|
|
### 4. Smart Contracts Setup
|
||
|
|
|
||
|
|
```bash
|
||
|
|
cd contracts
|
||
|
|
npm install
|
||
|
|
npm run compile
|
||
|
|
npm run test
|
||
|
|
```
|
||
|
|
|
||
|
|
## Development Workflow
|
||
|
|
|
||
|
|
### Making Changes
|
||
|
|
|
||
|
|
1. Create a feature branch: `git checkout -b feature/your-feature`
|
||
|
|
2. Make changes
|
||
|
|
3. Run tests: `npm test`
|
||
|
|
4. Lint code: `npm run lint`
|
||
|
|
5. Commit: `git commit -m "feat: your feature"`
|
||
|
|
6. Push: `git push origin feature/your-feature`
|
||
|
|
7. 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
|
||
|
|
|