Sistema de Checkout ESG Integrado com Ecossistema de TokenizaΓ§Γ£o
Architecture β’ Quick Start β’ Development β’ Deployment
O GuardFlow Ecosystem Γ© um monorepo integrado que combina 3 frentes tΓ©cnicas:
- π CORE - Sistema de Checkout ESG
- π§ SDK - Ecossistema de TokenizaΓ§Γ£o ESG
- π SAAS - Plataforma de ServiΓ§os ESG
- π IntegraΓ§Γ£o Completa - APIs unificadas via Gateway
- π‘ Event Bus - SincronizaΓ§Γ£o em tempo real
- π Monitoring - Observabilidade integrada
- π³ Docker - Deploy simplificado
- βΈοΈ Kubernetes - Escalabilidade automΓ‘tica
GUARDFLOW-ECOSYSTEM/
βββ CORE/ # Sistema de Checkout ESG
β βββ backend/ # API FastAPI
β βββ frontend/ # React Web
β βββ mobile/ # React Native
β
βββ SDK/ # Ecossistema de TokenizaΓ§Γ£o ESG
β βββ blockchain/ # Smart contracts
β βββ defi/ # Liquidity pools
β βββ nft/ # Sistema de NFTs
β βββ monetization/ # CrΓ©ditos fiscais
β
βββ SAAS/ # Plataforma de ServiΓ§os ESG
β βββ analytics/ # Dashboard ESG
β βββ gamification/ # Sistema de badges
β βββ marketplace/ # Marketplace ESG
β βββ admin/ # Painel administrativo
β
βββ SHARED/ # Componentes Compartilhados
β βββ types/ # Tipos TypeScript
β βββ utils/ # UtilitΓ‘rios
β βββ config/ # ConfiguraΓ§Γ΅es
β
βββ INTEGRATION/ # Camada de IntegraΓ§Γ£o
βββ api-gateway/ # Gateway de APIs
βββ event-bus/ # Event Bus
βββ sync/ # SincronizaΓ§Γ£o
βββ monitoring/ # Monitoramento
- Node.js 18+
- Python 3.11+
- Docker & Docker Compose
- Git
-
Clone the repository
git clone https://github.com/SH1W4/guardflow-ecosystem.git cd guardflow-ecosystem -
Install dependencies
npm install
-
Start development environment
# Using Docker Compose npm run docker:up # Or using npm workspaces npm run dev
-
Access the services
- API Gateway: http://localhost:8000
- CORE Frontend: http://localhost:3000
- SAAS Frontend: http://localhost:3001
- Monitoring: http://localhost:3002
# Development
npm run dev # Start all services
npm run dev:core # Start CORE only
npm run dev:sdk # Start SDK only
npm run dev:saas # Start SAAS only
npm run dev:integration # Start integration layer
# Building
npm run build # Build all services
npm run build:core # Build CORE only
npm run build:sdk # Build SDK only
npm run build:saas # Build SAAS only
# Testing
npm run test # Test all services
npm run test:core # Test CORE only
npm run test:sdk # Test SDK only
npm run test:saas # Test SAAS only# CORE Development
cd CORE
npm install
npm run dev
# SDK Development
cd SDK
pip install -r requirements.txt
python -m uvicorn app.main:app --reload
# SAAS Development
cd SAAS
npm install
npm run dev# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down# Build production images
docker-compose -f docker-compose.prod.yml build
# Deploy to production
docker-compose -f docker-compose.prod.yml up -d# Deploy all services
kubectl apply -f k8s/
# Check deployment status
kubectl get pods
kubectl get services
# Delete deployment
kubectl delete -f k8s/# System health
curl http://localhost:8000/health
# Individual services
curl http://localhost:8001/health # CORE
curl http://localhost:8002/health # SDK
curl http://localhost:8003/health # SAAS# System metrics
curl http://localhost:8000/metrics
# Service metrics
curl http://localhost:8001/metrics # CORE
curl http://localhost:8002/metrics # SDK
curl http://localhost:8003/metrics # SAASO API Gateway unifica todas as APIs:
# CORE APIs
GET /api/core/health
POST /api/core/checkout
GET /api/core/products
# SDK APIs
GET /api/sdk/health
POST /api/sdk/esg/tokenize
GET /api/sdk/blockchain/status
# SAAS APIs
GET /api/saas/health
GET /api/saas/analytics
POST /api/saas/gamification/rewardO Event Bus sincroniza eventos entre serviΓ§os:
// CORE β SDK
eventBus.emitCheckoutCompleted({
checkout_id: 'CHK-123',
user_id: 'user-456',
products: [...],
amount: 150.00
});
// SDK β SAAS
eventBus.emitESGTokensCreated({
user_id: 'user-456',
esg_tokens: 25.50,
checkout_id: 'CHK-123'
});- API Gateway: < 50ms response time
- Event Bus: < 10ms event processing
- Database: < 100ms query time
- Blockchain: < 5s transaction time
- Horizontal: Auto-scaling based on CPU/Memory
- Vertical: Resource optimization
- Database: Read replicas and caching
- Blockchain: Multiple node support
- JWT Tokens for API authentication
- OAuth 2.0 for third-party integration
- Rate Limiting for API protection
- CORS configuration
- Encryption at rest and in transit
- LGPD compliance
- Audit logs for all operations
- Backup and recovery
- Development: Local Docker Compose
- Staging: Kubernetes cluster
- Production: Multi-region deployment
- GitHub Actions for automated testing
- Docker for containerization
- Kubernetes for orchestration
- Monitoring for observability
- CORE: docs/CORE/README.md
- SDK: docs/SDK/README.md
- SAAS: docs/SAAS/README.md
- Integration: docs/INTEGRATION/README.md
- OpenAPI/Swagger: http://localhost:8000/docs
- Postman Collection: docs/api/postman.json
- API Examples: docs/api/examples.md
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Code Style: ESLint + Prettier
- Testing: Jest + Pytest
- Documentation: JSDoc + Sphinx
- Commits: Conventional Commits
This project is licensed under the MIT License - see the LICENSE file for details.
- SH1W4 - Initial work - GitHub
- FastAPI community for the excellent framework
- React team for the robust frontend ecosystem
- All contributors and testers
- Brazilian sustainability initiatives
- Documentation: docs.guardflow.com
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@guardflow.com
Made with π± by SH1W4 | Transforming sustainability into value through integrated technology