Overview of CitrineOS architecture and features
mainCitrineOS is a modular server runtime for managing Electric Vehicle (EV) charging infrastructure. It is built with TypeScript and runs on NodeJS using fastify and ws.
Key Features
- OCPP Support: Dynamic schema validation for OCPP 1.6 and 2.0.1 using
AJV. - API Surface:
- Generates OpenAPIv3 specifications.
- Uses
@AsRequestHandlerand@AsResponseHandlerdecorators to declare message handlers. - Provides an
Apimodule withAbstractMessageEndpoint(for/ocpp/<version>/...routes to stations) andAbstractEndpoint(for/commandsadmin operations).
- Infrastructure:
- Message Broker: Supports RabbitMQ for inter-module communication.
- Caching: Supports In Memory and Redis.
- Persistence: Uses PostgreSQL with the PostGIS extension.
- Storage: Supports Amazon S3, Google Cloud Storage (GCS), and MinIO (for local development). Note that local development does not support GCS-compatible backends.
- Operator UI: A web interface built with Next.js and Refine for managing locations, stations, transactions, and authorizations.