Andreas uses Directus in lots of personal projects to improve the efficiency of his household. In this talk, we hear about his pocket money tracker used with his kids.
Speaker 0: I will talk to you, about how I, how I use, directors within, my family for this talk. So basically, I would start with who I am. So my name is Andreas. As already mentioned, I'm father of 3. Actually, I'm working as a Atlassian consultant in a technical way, so, mostly for digitalization, optimization, and so on.
So at work, I do not have any contacts with directors at all, so it's more on a hobby side and, a private interest. Yeah. I'm living in a countryside outside of Berlin, so, quite interesting journey today, and I like directors a lot. At some point, yeah, Kevin asked me, to no. I don't the other way around.
I was, helping out in the Discord and ask questions, answering questions, and so on, and then he just promoted me from, a regular member to a moderator, and just overnight I was not informed about this. Thank you. Yeah. Today, I will talk about one project I'm using directives for. So what where's the problem?
My children, I get 2 children or 3 2 of them get pocket money already. So they get, they get them from different people, from the grandparents, from us, from aunts, auntles, and so and, yeah, they just play around with it. It's dirty. They stick it all over the the the the rooms and so on, and also they try to stole it from each other. So in the end, they lose it.
So yeah. Then we started to write some paper notes with the amount of money, gave it to them, and collect the money for them, but then they lose the paper. And in the end, they don't have the pocket money anymore, and they were sad. So my idea was to, yeah, use just as I do it on work, some digital, assistance, and I came up with directors. In the past, I've already worked with directors several times, so, I've wrote my master thesis with directors as a back end.
There was, a testing environment for automated UI tests, so I know the tool already, and, yeah, started with directors implementing, a pocket money system. So it's very, very easy, but I guess the use case could be interesting because it's not a website or asset store or something like this. Basically, it's just containing, a couple of collections, as you can see. So, these were the actually, yeah, collections where I store the information about the accounts of the children so each each child get one account. Then they have transactions and also, there's the third one which is core transfer.
This is currently not implemented completely, but the idea is there to store all the information, and have an overview about the money, how much, what is the income, what goes out, and so on. So, basically, it's just a couple of selections. Currently, a single flow that is updating all this stuff in the background once a new transaction is placed. And, yeah, in the end, no more struggle. If they want to pay something, they ask us, we pay for it with our money because we have all the money on our personal, bank accounts, and they just have some virtual money they can spend.
So, I guess yesterday, my son came up, want to have a new game on the Switch. I paid for it, reduced his amount on the account, and they can have a look at any time what is the current amount. So yeah basically that's it and I'd like to show you how I was implementing this just indirect this, like this. Yes. I am.
At home, it was working. I swear. So that's the pain of self rusting it, so I really should consider using the cloud. Now it's working. Yeah.
As you can see, I've got a lot of collections just for all the private stuff I did. And today, we will look at the PocketMiner sections. So as mentioned, you see the accounts. This is real data by, mentioned. So my son is currently saving for a personal computer, and my daughter just bought an iPhone.
So that's the result. So the current pocket money goes into this account. And, yeah, there are also 2 testing accounts. I currently using this for, setting up the new flow, because right now, I get only the, transaction implemented. So, currently, you have to, select the transaction, and this will just bring up a new dialogue for you where you can enter all the details about which account, which amount, Is it income?
Is it outgoing? So, yeah, you can just select the account. You can also specify, some date just for the record where you, would like to look this up later on. So you can just use the interface here, from the Data Studio and then you can decide if you would like to have it an in as an income or an outgoing transaction. I used both fields and not a negative value for outgoing just to have some differences because sometimes they gave us, €10 and want to have 20, and I don't want to calculate this by my own, so I just put the numbers in and fine with it.
So as you can see, I can just enter amount, optional, some comments to have the information later on what was this about. And just as I enter it, it will automatically, update the account. So right now, the account was just increased by 10 as expected. And if I go to a new, transaction, I can also reduce it, of course. So let's say we want to buy something for today of the same account, of course.
It's very basic. Yeah. In the end, it's currently just, a single flow that, just uses, very basic information about what is going on. So every time a new transaction was placed, I will look up the account, get the current, information about this account, read out the values, do some calculations. So get the current account at the income at the outgoing and then save the new information within this account.
If something goes wrong, it's locked. And yeah. The next step would be to implement this for the transactions as well. But as mentioned, this is currently not implemented. Just starting about it.
So it goes from one account to another directly. So right now I have to do 2 transactions. 1 was outgoing, 1 was incoming. This should be, much easier so they can transfer sometimes money from one account to another account. Currently, they're not, having the needs for it, but I guess this could be much easier if they have to use this.
Yeah. Basically that's it. Are there any questions or should I talk about some other fancy things I do with my hobby projects? Sorry? Do you charge interest
Speaker 1: to Isabelle and overdraft fee?
Speaker 0: I was thinking about it. So there there is there is actually a flow about about since as we call it in German. So yes, I were thinking about it, but currently it's disabled as you can see. But yeah.
Speaker 1: It's okay. There's a little threat there.
Speaker 0: Yeah. Yeah.
Speaker 1: So how do they interact with it or do they always interact with it through you?
Speaker 0: Currently just with with me directly, as they now have an iPhone of course. I was also starting about, building up an app for this. I've started couple of months ago, but have actually no time to yeah, but I want to keep it simple for a moment. Yeah. Of course, I have some, some insights as well.
For for instance, this this is very basic. So just yes. I'm not the only one using it. I have no benefits, right now. But yeah.
Could be as well used for this. So are you are you using direct as as, like, something for for a lot of stuff I saw there? Yeah. So for instance, another one is, about our newborn. So she has a tracking, fitness tracker, about the the, temperature, the heart rate, the oxygen level, and so on.
And, actually, it's tracking this also by using a flow. So I've kind of injected the app that comes with the tracker, which is not really handy because it sometimes turns off or it could get only connection to one phone and not to my wife, only to my and so on. So I've started to track the data on the network and get the, token they're using to transmit the data. And as you can see, this is now going to bed for 70 minutes since he's sleeping yay and yeah this is all the information I get from from the, from the tracker. And with this, I can just have, some more information using insights for instance.
So it's tracking this every minute as mentioned so you can see there are 30 minutes here. So usually the heart rate should go down further and further as she's sleeping, and the last 12 hours are not working because she's not wearing it over the day. And here's the data with just 2 hours. So we can also see if she gets awake because then the heart rate starts to increase. And for instance, if she's, ill or got fever, we also could see the information that the heart rate, for instance, is much higher.
And also this is, currently implemented that once, some thresholds are broken or overwritten an alert is created so I will not have to use the the app that comes from the vendor. But instead, an Opsgenie is, alert is created. So it fires my Apple Watch, my phone. 10 minutes later, I get a a phone from Opsgenie that are calling and shouting to me that I should have look up what is going on here. Currently also working for the battery level, for instance.
So, yeah, also very special use case I would say. I actually is just, reading the data from the application they offer. So, the the tracker sends the information to website and I just read the website similar to the app that is on the phone. So it's not synchronizing the data actually it's just reading out and saving it indirect. Like periodically?
Yes. Like
Speaker 1: scraping a web page knowing that
Speaker 0: actually, it's an API that I'm calling with the flow. So the flow runs every minute, asking for the data, transform this, into actual fields. So there's coming some JSON payload from the API, and I using a flow to transform this all into actual fields I can then work with. As you can see, the Opsgenie's Opsgenie alerts are here as well so every time, a new record is created it's checking about some variables and if one of them is not okay then, and the node is created with an oxygen, And then all the rest is done by oxygen. But I have to notice, you have to turn off the tracking and logging all of the flow and all the create events within those databases because it started to get really slow on my instance, because every minute so much data is collected and stored.
I have 2,200 30,000 items in this collection, and it's just a single core instance with 2 gigabyte of RAM or so. It's coming to the end, but it's working fine. What else? I've already told, I'm using it for laser cutter. So we have laser cutter for for handmade stuff.
So, my wife is kneeling, and every time she has an idea, I save the material and the settings. And I also have, I guess, some pictures. No. I don't I have one, so I can just see the result or not here it is. So this is the data from my newborn.
So I can see which, sets I using, which material, was it cutting, was it engraving. Yeah. So I store all this information within directors as well. Yeah. Also some invoicing that comes to our, mailbox, but I don't want to show you this.
Also, the the days of sickness of my child are tracked. So I can just have a look and compare this to the school. So I track each day a child is ill and also started to use this as a PDF creation. So it just comes with one click. Currently, it's generating a PDF or it doesn't.
It's We
Speaker 1: will start.
Speaker 0: No. No. No. It's still referring to a wrong URL. I see.
So it's the the old one. That's the problem. It's generating a PDF, but not with the actual data yet. So that's still on my to do list. Anything else?
No. Oh, yeah. One one funny thing. I've tracked the state of the TV power of my son because because it's in HomeKit, and there's an automation that sends the information to directors because he have a smart switch on the wallet and thinks he can trick me and turn it on after I turn it off. So every time he turns it on again, I will see it and can show him he turned it on again.
So Yeah. Yeah. It's just about communicating to each other. It's also possible to call back to HomeKit, but I guess I have to implement this on some Raspberry Pi solution that is able to receive those requests. Yeah.
So basically, it's a problem that I think of and try to find out a solution for this as often, And, yeah, I'm very familiar with with databases in general and with issue issue tracking systems. So I always think of how can I automate things and which information are necessary? And the cool thing is you can just add new fields, remove them, change them, add add a new collection that just combines some information or features. So it's just more iterative. So starting with, the accounts and at the the current, just overall value and do the math manually.
Afterwards, I store the transactions, and then flows come in because in the middle, I was just about to develop an own extension that do this, what flows now offers. But as not a full time developer, I'm not so happy with the solution. It was not working, I guess. So with flows, it's super easy. Yeah.
So it was just, starting with a simple one and then add some more features, change something, add new fields, remove them. Does it answer the question? Or For me, is it it's easy. Yes. To be honest, it's much easier to have some simple automations compared to Jira, for instance.
So I've also had the the the automation to have the, cat litter cleaned by children with an automation in Jira, but it was too complex. It it is you can set it up, but it direct us. It's more easy.