Logo Lanfrica

othmane469/knet-derms-morocco

Domain:

environment and energydigital infrastructure

Record type:

software
Creator:
oth
Host:
K-NET: Distributed Energy Resource Management System (DERMS) with Green Fintech for the Moroccan market. Solar PV monitoring, battery storage, EV charging, billing, and carbon tracking. Microservices architecture with Python/FastAPI, TimescaleDB, and Modbus integration. # K-NET Platform A distributed Energy Resource Management System (DERMS) combined with Green Fintech for the Moroccan market. ## πŸ—οΈ Architecture K-NET is built as **microservices from day one**: - **User Service** - Authentication, authorization, user management - **Energy Service** - Site/device management, Modbus integration, measurements - **Fintech Service** - Contracts, billing engine, invoice generation - **API Gateway** - Kong/Envoy for routing and rate limiting Services communicate via: - **gRPC** (synchronous service-to-service calls) - **Kafka** (asynchronous events and data streaming) ## πŸ“ Project Structure ``` knet/ β”œβ”€β”€ services/ # Microservices β”‚ β”œβ”€β”€ user-service/ # Authentication & users β”‚ β”œβ”€β”€ energy-service/ # Sites, devices, measurements β”‚ β”œβ”€β”€ fintech-service/ # Contracts, billing, invoices β”‚ └── api-gateway/ # Gateway configuration β”œβ”€β”€ shared/ # Shared code β”‚ β”œβ”€β”€ proto/ # gRPC definitions β”‚ └── python/knet_common/ # Common utilities β”œβ”€β”€ infrastructure/ # Infrastructure as code β”‚ β”œβ”€β”€ docker/ # Docker Compose β”‚ β”œβ”€β”€ kubernetes/ # K8s manifests β”‚ └── terraform/ # AWS infrastructure β”œβ”€β”€ docs/ # Technical documentation β”œβ”€β”€ scripts/ # Utility scripts └── docker-compose.yml # Local development ``` ## πŸš€ Quick Start ### Prerequisites - Python 3.11+ - Node.js 18+ - Docker & Docker Compose - PostgreSQL 15+ (local or via Docker) ### Local Development ```bash # Clone and navigate cd knet # Start infrastructure (PostgreSQL, Redis, Kafka) docker-compose up postgres redis zookeeper kafka -d # Start User Service (first terminal) cd services/user-service pip install -e ".[dev]" cp .env.example .env alembic upgrade head uvicorn app.main:app --reload # Or use Docker Compose for everything docker-compose up ``` ### Access Points - **User Servi …