Skip to content

karim-daw/carbon-service

Repository files navigation

carbon-service

carbon-service is a lightweight API written in Go, designed to facilitate life cycle assessment (LCA) and carbon calculations for the building industry. It provides endpoints for various operations related to building materials, assemblies, and constructions, allowing users to perform carbon footprint calculations and analyze environmental impacts.

Go for carbon framework

Go as the Language of Choice:

  • Leveraging Go's simplicity and concurrency model for efficient and scalable API development.
  • Domain-Driven Design: Structuring the codebase around domain objects such as buildings, materials, and assemblies, ensuring a clear representation of real-world concepts.
  • Interface Paradigm: Implementing interfaces like CarbonCalculator and EmbodiedCarbonCalculator allows for maximum flexibility in defining behaviors and calculations specific to carbon impact, while keeping the codebase concise and easily extensible.
  • Extensibility and Advanced Functionality: Objects like Building can implement multiple interfaces, enabling advanced functionalities like embodied carbon calculation, thus facilitating future enhancements and adaptations in carbon calculation methodologies and data sources.

Features

  • RESTful API: Easily interact with the service using standard HTTP requests. -Gorm and PostgreSQL: Utilizes Gorm as an ORM library and PostgreSQL as the database backend.
  • Dockerized Environment: Ships with Docker and Docker Compose configurations for easy deployment and development.
  • Test Suite: Includes comprehensive test suites to ensure reliability and stability.

Models