Developer Docs


A technical description of how Ecologic works under the hood and an API guide for fellow ecohackers

Technology Description

The Ecologic software platform comprises five components:

  • the clients (either web or mobile), which provides a user interface with the web platform
  • the web servers, which receive and process external requests, while updating the state of the various internal processes.
  • the databases and datastores, which store the current state of the application
  • the analytics queues, which provide a record of all outstanding simulation tasks
  • the analytics servers, which pull simulation jobs off the analytics queue, perform a range of geometrical, physical and financial algorithms, and then return a set of results to the datastore for subsequent processing and storage

The server infrastructure is hosted on Amazon Web Services, using a scalable application architecture. There are at least two web servers available at all times, with incoming requests distributed using a load balancer. The web servers support autoscaling, which means they may be automatically replicated to meet large amounts of user traffic. Similarly, there are several analytics server instances available at all times, each with multiple cores, allowing a large number of simulations to be performed concurrently. The number of available analytics servers available at a given time is autoscaled to meet incoming simulation requests. The load on the web server and analytics server resources is monitored at all times, with automated notifications sent to our team in the event that the servers are overloaded.

The clients, web servers and analytics servers all have automated error monitoring and reporting in place. This means that if an error is raised by the client or by any of the application servers, an error report is automatically sent to an independent web service, which forwards the error report to the relevant staff member responsible for that code. The web platform is also monitored by an independent service monitoring availability at all times, with alerts sent to our team in the event of an unscheduled downtime.

The web client, web server and analytics server code is all deployed using a continuous integration process. When source code revisions are pushed to the source control system, images are automatically built within the source control system and a full test suite is performed to ensure the new build performs as expected. When desired, these images may be directly deployed to our platform, which subsequently rotates the images. This deployment system allows for rapid continuous integration of software improvements throughout the day while maintaining availability. The system also allows us to minimise the attack surface of the web platform, providing a high level of security to incursion.

Database backups are captured and stored on an independent storage service on a daily basis, allowing the complete application to be rebuilt in a matter of minutes in the unlikely event of a catastrophic failure.

    API Reference

      Supplier API

      The Supplier API is applied to automatically notify suppliers and/or delivery partners when quotes or products have been requested, including the offer details, customer contact details, customer comments, and any technical details required (e.g. recommended specifications, number of storeys etc).

      The Supplier API provides a webhook interface to provide maximum flexibility to suppliers and partners. After specifying the quote notification type as 'webhook' and providing a webhook URI, the platform will send the following data as JSON.

      field description
      action action code e.g. 'solar_pv'
      supplier_name supplier name e.g. 'ACME products'
      offer_title offer code e.g. '3 kW Standard Solar Package'
      offer_description offer description
      offer_price price listed against the product or service requested by the customer
      first_name customer first name as string
      last_name customer last name as string
      street customer street address as a combined string
      postcode customer address postcode component
      state customer address state component
      country customer address country component
      reply_email reply email address provided by the customer
      reply_phone reply phone number provided by the customer
      comments comments provided by the customer
      quote_params relevant customer details for quoting or supplying that product e.g. number of storeys for the building, ceiling area etc

      For a library of easily configurable webhook integrations to, for instance, automatically generate leads within your favourite CRM tool, we recommend Zapier. For high volume partners and suppliers we recommend either developing the integration yourself on AWS Lambda or commissioning us to help you.

        Simulation API

        Coming soon...