Skip to content

SilverdawnSoftware/Invoice-MicroService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Invoice MicroService

An Invoice MicroService using Asp.net core, EF Core, Angular(for web clients) and Xamarin Forms(for mobiles).

The following features have been implemented:

  • Invoice (Add-Delete-Update)
  • Invoice Lines
  • Invoice Email Template engine
  • Email Invoices
  • Store Invoices for multiple locations
  • REST API
  • Invoice Management Screens (Mobile and Web) Coming soon.
  • CRUD Data screens (Mobile and Web)
  • CRUD REST API (if lower level access is required)

The goal for this project is to create all the code for an Invoicing via Model First Design and Code Automation.

This application is designed using SilverModel, but SilverModel is not required to use this code.

To learn more about code generation download SilverModel and open the Model(Invoicing-MicroService.gen) to update the model and generate the code.

Introduction to the Invoice MicroService

This is a quick introduction to the Invoice MicroService.

Going forward we will also use this application to demonstrate more advanced techniques and other technologies of SilverModel.

Invoice MicroService Architecture

In this section, I will explain the architecture used to create the Invoice MicroService. As much as possible the application has been written with open source technologies such as Microsoft's. Net Core Framework.

Firstly let us look at a diagram of the Invoice MicroService Architecture and all the software layers within it.

Application Layers

Now I will explain the different layers in the application and how the code generators work together.

Database Layer

In the Invoice MicroService, the project "Invoice.Database" holds all the database code. This code uses the "Entity Framework Core" code generator and generates the code for the Microsoft Entity Framework Core. All the classes that EF needs to define and use the database are in this project.

Update and View Models

This layer holds all the view models and the models for adding, updating and delete the database entities.

Also, the code that updates the database and creates the views is in this layer also.

The code for the Views is in the "Views" folder.

The code for the adding, updating and delete is in the "Transactions" folder.

The code for this is generated by the "Entity Framework Core" code generator and the code is in the "Invoice MicroService" project

In the future, it will be possible to swap these layers out to access different types of database e.g. MongoDB

REST API

To allow external applications e.g Mobile apps to access the data we need a REST web service. The Rest API uses the "Update and View Models" layer to access the database.

The code for this is generated by the "WebAPI Core" code generator and the code is in the "InvoiceRestAPI" project

REST Access API

This layer manages the communications between the Mobile App and the REST API.

It also has all the view models and transaction models defined as well.

The code for this is generated by the "REST Access" code generator and the code is in the "InvoiceRESTAccess" project

Android/iPhone Layer

This is where all the Xamarin Forms are created that interact with the REST Access API.

All the XAML Forms and View Models for the Mobile Applications are stored in this layer.

The code for this is generated by the "Xamarin Forms" code generator and the code is in the "InvoiceMobile" project.

Angular REST Access Services and Models

For the Angular Forms to communicate with the REST API, they first need all the Models and Services they can use to be defined.

This layer provides all the infrastructure for the above that the Angular forms require. The code for this is generated by the "AngularJS4Material" code generator and the code is in the "InvoiceWebClient" project.

Angular HTML Client

The final piece of the puzzle is the HTML forms for the Angular Application.

This layer is where all the HTML and Typescript code is held to run the application.

The code for this is generated by the "AngularJS4Material" code generator and the code is in the "InvoiceWebClient" project.

Questions

If you have any questions about the application or how the code generators are working please contact us on our support website and we will be happy to help.