I am very busy recently. There is not much time left for me to sleep and also so not much time to do something creative in my free time cause I am to tired looking at the computer. But here it is some story from today and from the past.
Day before I started working as sole trader I was looking for some simple open source software for invoice generation. There wasn’t any so I took excel template from my friend but then I realised I don’t have excel but I can create invoice software on my own, cause software is what I do and I am software developer, and I did it. It was very crazy idea, one of many crazy ideas I got in my head.
It took me couple of hours, or days I don’t remember it was more then three years ago, but it was working. It is still working, and I am using it for almost three years. At that time it was using alpha version of Apache PDFBox. And this library was amazing at this time and probably now is more amazing, but I didn’t do more with it except updating my maven dependencies to some of the latest versions.
Going back to the story every time I was generating invoices I had to modify source code, it was not so painful since number of invoices I make is low, but I always need to calculate days by hand and so on.
Time passed, new technologies appeared like graphql, vuejs, docker so why don’t I use it as a base and make some modern shit around this to learn something new.
So recently I revived this project, and I put it on gitlab so you can check it out. Don’t worry it’s not so scary now. Also at the end of this writeup you can click on online demo - currently only in polish, cause I am from Poland and invoicing polish customers.
Well so what’s so special about it now ?
I added some more services to it, while continuous learning I tried to use some recent technologies.
- There is this java application but now it has simple http endpoint that receive json and output pdf in response
- Since I do mostly python and never had chance to use graphql I created backend application that in future might be some sort of accounting app using graphene-django
- Recently I also started to like vue insted of react and especially nuxtjs because everthing works there out of the box. I created some simple frontend in nuxt.
microserviceflow is like this: nuxt -> django -> java -> pdf -> django -> nuxt And we got pdf as an output. Of course it would be a big deal to run this shit and configure it. Fortunately we got docker these days so I created next project that use docker-compose to run all of those apps in single command like.
- python, django, graphql, graphene https://gitlab.com/pragle/invoice_backend
- java, pdfbox, pdf https://gitlab.com/pragle/invoice_pdf
- docker-compose to run them all https://gitlab.com/pragle/invoice_runner
Probably this is to much for generating from one to three invoices per month but what I done can be easily scaled to millions of invoices, so feel free to use and modify it ^^. Also it was fun to see how graphql works by doing something useful for myself.
The demo I also use on my daily basics to make invoices is here: http://invoice.vane.pl
Since it is now easy to develop and run I would probably add some more functionalities to it, and also some more documentation. What I definitely would do is make it international not only one language specific. But first I need some more time and some rest.
Cheers, have fun.