There was no reason to define separate Systems in Metucat due to the relatively small size of project.
The following 4 applications were introduced into Metucat: FreewaiterMain (main application used by the restaurant), FreewaiterAdmin (application for the instances administration and monitoring), FreewaiterPartner (application used by the partner company, where partner can see the list of its instances, administer ones and create new instances for the new restaurants) and FreewaiterInstanceCreator (self-service module for the new restaurant registration and launching of the new instance)
FreewaiterMain application has 45 MySQL tables and some 30 configuration files containing minor sets of serialized data. Tables store restaurants clients’ data, orders and menus. Configuration files contain specific restaurant parameters such as open hours, design elements, payment processors data, premium guest features.
Prior to Metucat the structure of the configuration files was not specified and the only program code did exist.
We've built compact converter for exporting of the metadata from MySQL to Metucat which allowed to generate datasets JSON description in the Metucat format accordingly. Only tables structure was exported and conversion of the limited subset of the data types was provided. Keys were introduced to Metucat manually.
Converter allowed to minimize time of the metadata transfer.
The structure for the configuration files was defined from the scratch as no formal description did exist.
{
"identity": {
"name": "discounts"
},
"structure": {
"fields": [
{
"identity": {
"name": "id_discount"
},
"usage": "Column",
"type": "Integer",
"size": "11"
},
{
"identity": {
"name": "name"
},
"usage": "Column",
"type": "String",
"size": "256"
},
{
"identity": {
"name": "total"
},
"usage": "Column",
"type": "Integer",
"size": "11"
},
{
"identity": {
"name": "discount_value"
},
"usage": "Column",
"type": "Float",
"size": null
}
]
}
}
Freewaiter main application publishes 2 datasets specifying: 1) restaurants applications configuration and 2) accounts of the restaurant applications admins. These datasets are used by other Freewaiter applications.
FreewaiterAdmin application publishes the instances table with restaurants applications data. This table is used by FreewaiterPartner and FreewaiterInstanceCreator applications.
There is a strong applications dependency and general tables structure can’t be changed without impacting all Freewaiter applications.
FreewaiterMain application supports the ability of the external applications to address its functions via REST API.
FreewaiterMain\AdminInterface specifies functions for receiving of the orders list and orders handling. It enables third party developer to create his own version of Order Manager application responsible for actual orders administration.
FreewaiterMain\GuestInterface specifies functions for receiving of the restaurant menu and restaurant properties (open hours, address, delivery fees, etc.) and order submission. It enables third party developer to create his own version of the guest application instead of Freewaiter native application or sending orders from the external systems.
Interface specification in Metucat can use internal structures and standard enums defined in the organization. Interface specification uses the most current version of these objects.
Interfaces can be published in Swagger format.
Metadata specs in Metucat will help new developers to get familiar with the existing code and architecture. It will also simplify and streamline all further development. Interfaces specs will be used by developers of the external applications which will be integrated with Freewaiter.
We have got clear understanding of what architecture improvements and advancements are needed.
We also discovered redundant database tables and configuration files which can be removed.