Skip to content

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Kronos EAM - Consolidated Enterprise Platform

Complete Enterprise Asset Management for Italian Renewable Energy

License Version Python TypeScript


🌟 Overview

Kronos EAM is a comprehensive, enterprise-grade SaaS platform for managing renewable energy assets in Italy. This consolidated version combines:

  • βœ… Complete Compliance Management (from Kronos EAM)
  • βœ… CER (Renewable Energy Communities) support (from Sentrics)
  • βœ… Advanced Asset Management (from Sentrics)
  • βœ… Workflow Automation (from Kronos EAM)
  • βœ… Government Portal Integration (from Kronos EAM)
  • βœ… Geographic Intelligence (PostGIS from Sentrics)

Key Features

🏭 Plant & Asset Management

  • Complete Plant Registry: Multi-tenant plant database with full lifecycle management
  • Advanced Asset Tracking: Detailed equipment management (panels, inverters, batteries)
  • Asset Monitoring: Real-time performance tracking
  • Maintenance Management: Preventive and corrective maintenance scheduling

πŸ”„ Workflow & Compliance

  • Automated Workflows: Pre-built templates for all regulatory processes
  • Annual Compliance Automation: Never miss critical deadlines
  • Smart Deadline Calculator: Intelligent deadline prediction
  • Penalty Prevention: Cost analysis and risk mitigation
  • Document Management: Centralized repository with versioning

πŸ‘₯ CER (Renewable Energy Communities)

  • CER Setup & Management: Complete lifecycle management
  • Member Management: POD tracking, load profiles, billing
  • PNRR Funding Support: 40% grant application workflows
  • Energy Sharing: Production allocation and billing
  • Geographic Boundaries: PostGIS-powered boundary management

πŸ”— Government Portal Integration

  • GSE Integration: RID activation, Fuel Mix, Anti-Mafia declarations
  • Terna GAUDÌ: Plant registration and technical data
  • DSO Integration: Connection management, TICA workflows
  • Agenzia Dogane: UTF license management, EDI file generation

πŸ“Š Analytics & Reporting

  • Compliance Scoring: Real-time compliance percentage
  • Portfolio Analytics: Multi-plant dashboard
  • Cost Tracking: Fees, penalties, and administrative costs
  • Performance Monitoring: Energy production/consumption tracking

πŸ—οΈ Architecture

Technology Stack

Backend:

  • Framework: FastAPI (Python 3.11+)
  • Database: PostgreSQL 15 with PostGIS extension
  • ORM: SQLAlchemy 2.0
  • Migrations: Alembic
  • Authentication: JWT with OAuth2
  • Caching: Redis
  • Task Queue: Celery

Frontend:

  • Framework: React 18 with TypeScript
  • Build Tool: Vite
  • State Management: React Query + Zustand
  • UI Library: Tailwind CSS + shadcn/ui
  • Maps: Leaflet + React Leaflet
  • Forms: React Hook Form + Zod

Infrastructure:

  • Cloud: Google Cloud Platform
  • Containers: Docker + Kubernetes
  • CI/CD: GitHub Actions
  • Monitoring: Prometheus + Grafana

Multi-Tenant Architecture

  • Database: Row-level security with tenant_id
  • API: Automatic tenant filtering
  • Frontend: Tenant-aware routing
  • Isolation: Complete data segregation

πŸš€ Quick Start

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • PostgreSQL 15+ with PostGIS extension
  • Container Runtime: Docker or Podman (see Container Setup)
  • Redis (optional, for caching)

Container Setup

The project supports both Docker and Podman. Choose your preferred runtime:

Option 1: Podman (Recommended for rootless containers)

# Install Podman and Podman Compose
# Ubuntu/Debian:
sudo apt-get install podman podman-compose

# Fedora/RHEL:
sudo dnf install podman podman-compose

# macOS:
brew install podman podman-compose

Option 2: Docker

# Install Docker and Docker Compose
# See: https://docs.docker.com/get-docker/

Installation

# Clone repository
git clone https://github.com/Bloom79/kronos-eam.git
cd kronos-eam

# Start PostgreSQL with PostGIS
cd backend

# Option 1: Auto-detect (uses Podman if available, otherwise Docker)
./compose.sh up -d

# Option 2: Explicitly use Podman
./compose-podman.sh up -d

# Option 3: Explicitly use Docker
./compose-docker.sh up -d

# Option 4: Traditional Docker Compose (still works)
docker-compose up -d

# Setup backend
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt
alembic upgrade head

# Setup frontend
cd ../frontend
npm install

# Start development servers
# Terminal 1 (Backend)
cd backend
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

# Terminal 2 (Frontend)
cd frontend
npm run dev

Access:

Default Credentials:

  • Email: admin@kronos-eam.local
  • Password: Demo2024!

πŸ“ Project Structure

kronos-eam/
β”œβ”€β”€ backend/                    # FastAPI backend
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ api/               # API endpoints
β”‚   β”‚   β”‚   └── v1/
β”‚   β”‚   β”‚       β”œβ”€β”€ endpoints/
β”‚   β”‚   β”‚       β”‚   β”œβ”€β”€ plants.py
β”‚   β”‚   β”‚       β”‚   β”œβ”€β”€ cer.py          # NEW: CER endpoints
β”‚   β”‚   β”‚       β”‚   β”œβ”€β”€ assets.py       # NEW: Asset endpoints
β”‚   β”‚   β”‚       β”‚   β”œβ”€β”€ workflows.py
β”‚   β”‚   β”‚       β”‚   β”œβ”€β”€ documents.py
β”‚   β”‚   β”‚       β”‚   └── compliance.py
β”‚   β”‚   β”œβ”€β”€ models/            # SQLAlchemy models
β”‚   β”‚   β”‚   β”œβ”€β”€ plant.py
β”‚   β”‚   β”‚   β”œβ”€β”€ cer.py         # NEW: CER model
β”‚   β”‚   β”‚   β”œβ”€β”€ cer_member.py  # NEW: Member model
β”‚   β”‚   β”‚   β”œβ”€β”€ asset.py        # NEW: Asset model
β”‚   β”‚   β”‚   β”œβ”€β”€ workflow.py
β”‚   β”‚   β”‚   └── document.py
β”‚   β”‚   β”œβ”€β”€ services/          # Business logic
β”‚   β”‚   β”‚   β”œβ”€β”€ plant_service.py
β”‚   β”‚   β”‚   β”œβ”€β”€ cer_service.py # NEW: CER service
β”‚   β”‚   β”‚   β”œβ”€β”€ asset_service.py # NEW: Asset service
β”‚   β”‚   β”‚   β”œβ”€β”€ workflow_service.py
β”‚   β”‚   β”‚   └── compliance_service.py
β”‚   β”‚   β”œβ”€β”€ core/              # Core functionality
β”‚   β”‚   β”‚   β”œβ”€β”€ database.py
β”‚   β”‚   β”‚   β”œβ”€β”€ security.py
β”‚   β”‚   β”‚   β”œβ”€β”€ geography.py   # NEW: PostGIS helpers
β”‚   β”‚   β”‚   └── config.py
β”‚   β”‚   └── schemas/           # Pydantic schemas
β”‚   β”œβ”€β”€ alembic/               # Database migrations
β”‚   β”œβ”€β”€ tests/                 # Test suite
β”‚   └── requirements.txt
β”‚
β”œβ”€β”€ frontend/                  # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ Plants/        # Plant management
β”‚   β”‚   β”‚   β”œβ”€β”€ CER/          # NEW: CER management
β”‚   β”‚   β”‚   β”œβ”€β”€ Workflows/    # Workflow management
β”‚   β”‚   β”‚   β”œβ”€β”€ Compliance/   # Compliance tracking
β”‚   β”‚   β”‚   └── Dashboard/   # Analytics dashboard
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ plants/       # Plant components
β”‚   β”‚   β”‚   β”œβ”€β”€ cer/         # NEW: CER components
β”‚   β”‚   β”‚   β”œβ”€β”€ assets/      # NEW: Asset components
β”‚   β”‚   β”‚   └── common/      # Shared components
β”‚   β”‚   β”œβ”€β”€ services/         # API clients
β”‚   β”‚   β”œβ”€β”€ hooks/           # React hooks
β”‚   β”‚   └── utils/           # Utilities
β”‚   └── package.json
β”‚
β”œβ”€β”€ docs/                      # Documentation
β”‚   β”œβ”€β”€ architecture.md
β”‚   β”œβ”€β”€ api-reference.md
β”‚   └── deployment.md
β”‚
β”œβ”€β”€ deploy/                    # Deployment scripts
β”‚   └── gcp/                  # GCP deployment configs
β”‚
└── scripts/                   # Utility scripts
    └── setup.sh

πŸ”‘ Key Modules

1. Plant Management

Complete lifecycle management for renewable energy plants:

  • Plant registry with technical specifications
  • Multi-dimensional organization (type, power, location, status)
  • Integration status tracking (DSO, Terna, GSE, ADM)
  • Compliance scoring
  • Deadline management

2. CER (Renewable Energy Communities)

Full support for Italian energy communities:

  • CER constitution and legal setup
  • Member management with POD tracking
  • PNRR funding application (40% grant)
  • Energy sharing and billing
  • Geographic boundary management
  • GSE compliance tracking

3. Asset Management

Detailed equipment tracking:

  • Asset type system (flexible attributes)
  • Asset instances (panels, inverters, batteries)
  • Hierarchical organization (parent-child relationships)
  • Monitoring integration
  • Maintenance tracking

4. Workflow Automation

Intelligent workflow management:

  • Pre-built templates (activation, compliance, fiscal)
  • Phase-based execution
  • Task assignment and tracking
  • Document generation
  • Portal integration

5. Compliance Management

Automated compliance tracking:

  • Annual recurring obligations
  • Smart deadline calculation
  • Penalty prevention
  • Compliance scoring
  • Document expiration tracking

6. Government Portal Integration

Smart integration with Italian authorities:

  • GSE portal (RID, Fuel Mix, Anti-Mafia)
  • Terna GAUDÌ (plant registration)
  • DSO portals (connection management)
  • Agenzia Dogane (UTF license, EDI files)

πŸ“š Documentation


πŸ§ͺ Testing

# Backend tests
cd backend
pytest --cov=app tests/

# Frontend tests
cd frontend
npm test

# E2E tests
npm run test:e2e

🚒 Deployment

Production Deployment

# GCP Deployment
cd deploy/gcp
./deploy.sh

See deployment guide for detailed instructions.


🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘₯ Team

Built with ❀️ for the Italian renewable energy sector


Β© 2025 Kronos EAM. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages