Coder Social home page Coder Social logo

chagataiduru / ocpp-framework Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 6.27 MB

๐Ÿ”Œ OCPP Framework: A Charge Station Management System built with NestJS, RabbitMQ, and MongoDB, following a Microservices architecture. Manage multiple charge stations, handle WebSocket events, and provide real-time status updates. The frontend, developed in AngularJS, offers an intuitive interface for monitoring and interacting with charge station

TypeScript 54.65% Python 17.54% HTML 21.92% Dockerfile 1.09% EJS 4.66% Shell 0.14%

ocpp-framework's Introduction

OCPP Framework

The OCPP Framework is a robust Charge Station Management System implemented using NestJS on the backend, following a Microservices architecture. It leverages RabbitMQ for communication between microservices and MongoDB for data storage. The frontend, built with AngularJS, interacts with the management system to query information about charge stations and their status.

Microservices

1. Charge Point Node (charge-point-node)

The Charge Point Node is a NestJS application designed to be deployed near real-world locations with multiple charge stations. It handles WebSocket events, responds to charge stations, and saves necessary information to the MongoDB database.

Relevant Code Snippets:

  • ocpp-service.ts: Handles OCPP functionalities such as Boot Notification, Status Notification, Authorize, Start Transaction, Stop Transaction, Meter Values, etc.

2. Management System (management-system)

The Management System microservice processes events generated by charge-station-nodes through RabbitMQ. It has access to the MongoDB database and responds to frontend requests, providing information about charge stations, available connectors, charging status, and more.

Frontend

The frontend consists of several pages, each serving a specific purpose:

  • Dashboard: Overview of the charge station system.
  • Login: Authentication for system access.
  • Map: Visualization of charge stations on a map.
  • Stations: Detailed information about charge stations.
  • Detail: Information about a specific charge point.
  • Transactions: Transaction history.

Getting Started

Running with Docker

Running the Project Locally

To run the project locally, follow these steps:

  1. Clone the repository.
  2. Navigate to the project root directory.

Step 1: Install Dependencies

Frontend Dependencies

# Navigate to frontend directory
cd frontend/ocpp-csms-angular

# Install Angular dependencies
npm install

Backend Dependencies

# Navigate to management system directory
cd backend/management-system

# Install Nest.js dependencies
npm install

Step 2: Run the project

Option 1: Using Script

Run the following script to start the frontend, management system, and charge-point-node on root of the project:

./start.sh

Option 2: Manual Start

cd frontend/ocpp-csms-angular
ng serve
cd backend/management-system
npm run start:dev
cd backend/charge-point-node
npm run start:dev

Step 3: Access to project

The project will be accessible at http://localhost:4200.

  1. Charge Point Node:

    • Deploy the NestJS application in real-world locations near charge stations.
    • Handle WebSocket events, communicate with charge stations, and update the database.
  2. Management System:

    • Deploy the NestJS application for centralized management.
    • Process events from charge-point-nodes via RabbitMQ.
    • Provide APIs for frontend queries and interact with the MongoDB database.
  3. Frontend:

    • Utilize AngularJS for a dynamic and responsive user interface.
    • Make backend requests to the Management System for system information.

Dependencies

  • Backend:

    • NestJS for microservices.
    • RabbitMQ for communication.
    • MongoDB for data storage.
  • Frontend:

    • AngularJS for dynamic web pages.

Contributions

Contributions are welcome! Feel free to open issues, submit pull requests, or provide feedback.

License

This project is licensed under the MIT License.

ocpp-framework's People

Contributors

chagataiduru avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

ocpp-framework's Issues

MongoDB setup ? / running setup

Hi there,

I came across this interesting project and wanted to give it a spin.

After installing lots of next/npm modules manually and running a RabbitMQ on default port in a docker container I have the whole thing running somehow.

What still puzzles me is the MongoDB part. Do we have to setup a db and usernames/passwords?

Would be fantastic if you could point me to the right direction.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.