How zebdayacine/cnr-payment-blockchain works
Project type and purpose
• This is a full-stack, containerized microservices application for “CNR Payment Blockchain System.”
• Frontend: React + TypeScript (Vite, Tailwind).
• Backend: Go (Gin REST API) with Clean/Hexagonal architecture.
• Blockchain: Hyperledger Fabric network & custom chaincode.
• Data: MongoDB for off-chain storage, SFTP for secure document management, SMTP for email/notification.
• Orchestrated via Docker Compose for local development and deployment.
File structure
• Top-level:
• frontend/cnr → React application
• backend/ → Go service
– api/ → HTTP controllers, routers, middleware
– feature/ → domain/usecase/repository per bounded context (auth, dashboard, file, profile, version, notifications)
– pkg/ → shared code (config, MongoDB adapter)
– cmd/ → entry point (main.go)
– fabric/ → Fabric network definitions & chaincode Go file
– sftp/ → Docker Compose + sample upload directories
– util/ → email, token, common utilities
• mongo-init/ → DB seed data JSON scripts
• scripts/ → Fabric bin download, chaincode deploy/upgrade, smartcontract tests
• docker-compose.yml → orchestrates backend, frontend, mongo, sftp, Fabric network
• The presence of “feature → domain/usecase/repository” indicates a Clean/Hexagonal architecture.
README highlights
• Microservices architecture, Dockerized components, CI/CD ready.
• Real-time analytics dashboard, JWT auth, SFTP file handling, notification/email alerts.
Essential elements
• Don’t omit the Clean Architecture layers in backend (controllers, use cases, repos, adapters).
• Microservice boundaries (each containerized service).
• That Docker Compose glues together all containers on a private network.
• Chaincode deployment scripts and CI/CD entry points if discussing DevOps.