Consolidate webapp structure by merging nested components into the main repository

This commit is contained in:
defiQUG
2025-11-05 16:12:53 -08:00
parent 09c5a1fd5e
commit 3b09c35c47
55 changed files with 10240 additions and 0 deletions

32
.github/CODE_OF_CONDUCT.md vendored Normal file
View File

@@ -0,0 +1,32 @@
# Code of Conduct
## Our Pledge
We pledge to make participation in our project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to a positive environment:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior:
- The use of sexualized language or imagery
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information without permission
- Other conduct which could reasonably be considered inappropriate
## Enforcement
Project maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate action in response to any instances of unacceptable behavior.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org).

69
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,69 @@
# Contributing to CurrenciCombo
Thank you for your interest in contributing to CurrenciCombo! This document provides guidelines and instructions for contributing.
## Code of Conduct
This project adheres to a code of conduct. By participating, you are expected to uphold this code.
## Getting Started
1. Fork the repository
2. Clone your fork: `git clone https://github.com/your-username/CurrenciCombo.git`
3. Create a branch: `git checkout -b feature/your-feature-name`
4. Make your changes
5. Test your changes
6. Commit: `git commit -m "Add your feature"`
7. Push: `git push origin feature/your-feature-name`
8. Open a Pull Request
## Development Setup
See the main [README.md](../README.md) for installation and setup instructions.
## Coding Standards
### TypeScript/JavaScript
- Use TypeScript for all new code
- Follow ESLint configuration
- Use meaningful variable and function names
- Add JSDoc comments for public APIs
### Solidity
- Follow Solidity style guide
- Use OpenZeppelin contracts where applicable
- Add NatSpec comments for all functions
- Write comprehensive tests
### Git Commit Messages
- Use clear, descriptive messages
- Reference issue numbers when applicable
- Format: `type(scope): description`
Types:
- `feat`: New feature
- `fix`: Bug fix
- `docs`: Documentation
- `test`: Tests
- `refactor`: Code refactoring
- `chore`: Maintenance
## Testing
- Write tests for all new features
- Run existing tests before submitting PR
- Ensure E2E tests pass
- Maintain test coverage above 80%
## Pull Request Process
1. Update documentation if needed
2. Add tests for new functionality
3. Ensure all tests pass
4. Update CHANGELOG.md if applicable
5. Request review from maintainers
## Questions?
Feel free to open an issue for questions or discussions.

35
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,35 @@
---
name: Bug Report
about: Create a report to help us improve
title: '[BUG] '
labels: bug
assignees: ''
---
## Description
A clear and concise description of what the bug is.
## Steps to Reproduce
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
## Expected Behavior
A clear description of what you expected to happen.
## Actual Behavior
A clear description of what actually happened.
## Screenshots
If applicable, add screenshots to help explain your problem.
## Environment
- OS: [e.g. Windows 10, macOS 13, Ubuntu 22.04]
- Browser: [e.g. Chrome 120, Firefox 121]
- Node Version: [e.g. 18.17.0]
- Version: [e.g. 1.0.0]
## Additional Context
Add any other context about the problem here.

6
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
blank_issues_enabled: true
contact_links:
- name: Questions & Discussions
url: https://github.com/your-org/CurrenciCombo/discussions
about: Ask questions and discuss ideas

View File

@@ -0,0 +1,26 @@
---
name: Feature Request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: enhancement
assignees: ''
---
## Description
A clear description of the feature you'd like to see.
## Problem Statement
What problem does this feature solve? Who would benefit from it?
## Proposed Solution
Describe how you envision this feature working.
## Alternatives Considered
Describe any alternative solutions or features you've considered.
## Additional Context
Add any other context, mockups, or examples about the feature request here.
## Implementation Notes (Optional)
If you have ideas about how this could be implemented, share them here.

41
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
version: 2
updates:
# Frontend dependencies
- package-ecosystem: "npm"
directory: "/webapp"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "frontend"
# Orchestrator dependencies
- package-ecosystem: "npm"
directory: "/orchestrator"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "orchestrator"
# Contract dependencies
- package-ecosystem: "npm"
directory: "/contracts"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "contracts"
# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
- "github-actions"

33
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,33 @@
## Description
Brief description of changes in this PR.
## Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Refactoring (no functional changes)
## Related Issues
Closes #(issue number)
## Testing
- [ ] Unit tests added/updated
- [ ] E2E tests added/updated
- [ ] Manual testing completed
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Comments added for complex code
- [ ] Documentation updated
- [ ] No new warnings generated
- [ ] Tests pass locally
- [ ] Changes tested on multiple browsers (if applicable)
## Screenshots (if applicable)
Add screenshots to help explain your changes.
## Additional Notes
Any additional information that reviewers should know.

145
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,145 @@
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
# Frontend CI
frontend-lint:
name: Frontend Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
cache-dependency-path: webapp/package-lock.json
- name: Install dependencies
working-directory: webapp
run: npm ci
- name: Lint
working-directory: webapp
run: npm run lint
frontend-type-check:
name: Frontend Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
cache-dependency-path: webapp/package-lock.json
- name: Install dependencies
working-directory: webapp
run: npm ci
- name: Type check
working-directory: webapp
run: npx tsc --noEmit
frontend-build:
name: Frontend Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
cache-dependency-path: webapp/package-lock.json
- name: Install dependencies
working-directory: webapp
run: npm ci
- name: Build
working-directory: webapp
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: frontend-build
path: webapp/.next
frontend-e2e:
name: Frontend E2E Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
cache-dependency-path: webapp/package-lock.json
- name: Install dependencies
working-directory: webapp
run: npm ci
- name: Install Playwright
working-directory: webapp
run: npx playwright install --with-deps
- name: Run E2E tests
working-directory: webapp
run: npm run test:e2e
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: webapp/playwright-report/
# Orchestrator CI
orchestrator-build:
name: Orchestrator Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
cache-dependency-path: orchestrator/package-lock.json
- name: Install dependencies
working-directory: orchestrator
run: npm ci
- name: Build
working-directory: orchestrator
run: npm run build
# Smart Contracts CI
contracts-compile:
name: Contracts Compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
cache-dependency-path: contracts/package-lock.json
- name: Install dependencies
working-directory: contracts
run: npm ci
- name: Compile contracts
working-directory: contracts
run: npm run compile
contracts-test:
name: Contracts Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
cache-dependency-path: contracts/package-lock.json
- name: Install dependencies
working-directory: contracts
run: npm ci
- name: Run tests
working-directory: contracts
run: npm run test

48
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Build Frontend
working-directory: webapp
run: |
npm ci
npm run build
- name: Build Orchestrator
working-directory: orchestrator
run: |
npm ci
npm run build
- name: Compile Contracts
working-directory: contracts
run: |
npm ci
npm run compile
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
webapp/.next/**
orchestrator/dist/**
contracts/artifacts/**
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}