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 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
andEmbodiedCarbonCalculator
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.
- 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.