MLInvoice
MLInvoice copied to clipboard
Api
What do you think about this approach to making/using api.. this pull request is really dirty(sorry for that) as it is not meant to be merged as it is. Hope you can grasp the idea! I've used this approach to make new (and better IMHO) ui in react and it has worked fine(previous versions). I love the functionality of this program, but ui is quite outdated. Api file here is outdated, but if you think this is viable way to enable external uis (without interfering with basic program) i can clean and update it
Maybe I'm missing something, but I couldn't find much of API code here. It's mostly a version of the Mailgun support as far as I can see. Please advice as to what I should be looking for, thanks!
Oops, sorry, I totally missed out api.php.
So, what I have on radar is more of a REST-style API that could also replace the current API provided by json.php (which your implementation seems to be based on). In the meantime it would be quite fine to extend json.php with login functionality, session management not based on a session cookie, origin handling and OPTIONS requests. As far as I can tell those should allow one to create a UI. But since the idea is to phase out the existing implementation at some point, I can't really recommend building on that. Additionally there's no guarantee that things won't change.
It would be interesting to see a couple of screen captures of how you'd envision a modern UI for MLInvoice to look like.
I agree that api should be REST like: /get/invoice/all /get/invoice/:id which I did plan to do, but I needed this running quickly for my wifes business so I went in path of least resistance :) I have added support for vehicles, travel expense ,purchase invoices and receipts. Currently most of new stuff is saved to google firestore instead of mysql but it should be quite easy to integrate changes back. I'm currently doing toolbox for therapist and small child caring institutions and currently supported invoicing part module is MLInvoice, I do plan to support others too. I'll try to make time to do demo site with mock data to demonstrate ui in near future.