Aqualogs: One man's fight with software to make pretty graphs

Dr.T

New member
Tl;dr Built a web site for keeping track of aquarium parameters, https://aqualogs.com. Used a lot of diverse technologies as an excuse to play with them.

Hello all, I'm a long-time lurker on ReefCentral. I've been lurking for more than 10 years around here (and then forgot my password for my old account). In particular, I've always been a fan of the DIY board. One of my favorite aspects of this hobby is the engineering aspect. Designing systems to mimic the ocean is no trivial task and the projects I see people take on in this board always amaze me.
I'm a software engineer by trade and I've always wanted to find some projects that merge my two hobbies: building beautiful software and reef systems. I settled on building a tool to help keep track of the various parameters in my aquarium over time. I've tried paper logs in the past but I always seem to lose them (or drown them with spillage"¦). Consistency is key to a healthy reef and you can't keep something stable if you aren't tracking it over time. And so, aqualogs.com was born.

There are a few key things I wanted to be able to do with Aqualogs
1. Have a central cloud based storage system for all my tank parameters
2. Visualize how the parameters are changing over time
3. Compare my parameters to some target range visually
4. Share what I've created with other people

With those goals in mind, I began my build. The first trick was choosing a mechanism for storing the parameters and the times at which they were taken. This was the easiest decision I had to make. I went with PostgreSQL. PostgreSQL is a relational database that is open source and free to use. Plus, it has a lot of supporting tooling that makes it easy to use. It's highly performant and can easily manage a significant amount of data provided the server you're running it on is big enough.
Next, I needed a tool for serving and structuring the data from the database. I needed a way to safely retrieve results from the database, ensuring that multiple users with multiple tanks could use Aqualogs. I was choosing between Flask and Django which are web frameworks written in Python and Go's built in web framework. I've done a lot of work in Python and I'm much more comfortable with the language but Go is a fairly new language that's pretty fast and fun to write code in. In the end, I decided to go with Flask+Python. I have a lot of tooling I've built over the years to get Flask projects off the ground quickly.
So now I had a my backend servers up and running I needed a tool for actually visualizing the results. In this case, I went with the framework that I'm less familiar with. ReactJS is a front end framework (basically everything that makes a website pretty). Their development philosophy has always gelled with me. It's simple and relatively light-weight. Plus I needed a single page application if I wanted to keep the application usable without having to wait for the page to reload after every time somebody added a parameter reading.
Okay, so I have an application that stores results in PostgreSQL, it serves those results using Flask, and I'm using ReactJS to make things pretty. Now I just needed a way to host this application so that other people could use it. This is probably where I went a little overboard. I've launched a lot of web applications using cloud providers like Amazon Web Services and Google Cloud but I wanted to learn more while doing this project. So I decided to go all out. I provisioned a Kubernetes cluster on a series of bare Linux servers. Kubernetes is a technology Google developed for running applications at Google Scale. It's designed to easily run many different applications across many different servers. In my case, I'm running one application on one cluster. Like I said, it was overkill. However, I wanted something set up so that I could launch other applications easily in the future. Mostly, I wanted to play with Kubernetes if I'm being honest.

So to summarize I went with the following technologies:
1. PostgreSQL as the database
2. Flask + Python for the backend server
3. ReactJS for the frontend
4. Kubernetes set up from scratch

And"¦ after many hours of fighting software I finally had something I was happy with. Some screenshots are attached to this post.

So there you have it. An application that took me more time to build than I'll save but hopefully other people can get some benefit from it as well. There's still a lot I want to do. I want to be able to add arbitrary events to the graphs like a vertical line that indicates when I've added a new fish or performed a water change. Also, once I clean up the source code I'm going to open up the source code so that everyone can take a look at how I built it. Finally, I want to get into some hardware and build something using RasberryPi to automatically upload temperature and pH readings to the server.
Let me know what you guys think. There is an option for a subscription. By no means do I intend to make money on this application. I'm just hoping to pay for my server costs. If nobody subscribes I'd be 100% fine with that. I just like to build stuff and honestly, I just hope it helps people maintain the beautiful aquariums I ogle at on these forums.
 

Attachments

  • Screen Shot 2017-01-29 at 5.59.06 PM.jpg
    Screen Shot 2017-01-29 at 5.59.06 PM.jpg
    31 KB · Views: 1
  • Screen Shot 2017-01-29 at 5.59.32 PM.jpg
    Screen Shot 2017-01-29 at 5.59.32 PM.jpg
    31.9 KB · Views: 0
  • Screen Shot 2017-01-29 at 5.59.42 PM.jpg
    Screen Shot 2017-01-29 at 5.59.42 PM.jpg
    29.5 KB · Views: 0
Very cool!

When I get my tank back up and running I will definitely be looking into using this! I kept a paper journal on my last tank and this would be a fresh start for my fresh start.
 
Aqualogs: One man's fight with software to make pretty graphs

I've been wanting to get around to this same thing - but my skills would have limited me to MySQL and PHP for the web front end and only single user.

How about the ability to pull directly from an Apex log?

I'll check it out more when I'm not on my phone.

You've stepped it up - great job.


Sent from my iPhone using Tapatalk
 
Got a strange message saying sites not safe...and it might be a phishing site.

Sent from my SAMSUNG-SM-G891A using Tapatalk
 
Cobraz, that's a bit strange. Could you let me know what browser you got that message on?
 
Back
Top