[Dev log] Getting Things Done (GTD) app with React and Redux

During some public holidays, I decided to rewrite BruceTodo – a GTD/Task management application I wrote in 2019, because BTD was written using multiple libraries that have had drastic changes since 2019, I couldn’t even build the old project anymore.

BTD was written as a way for me to learn React and Redux, I was new to the uni directional data flow design of React back then, so the code has some design decisions that make it less robust and more buggy.

I have not been very satisfied with many of the task management apps in the market as they are not tailored exactly to my needs, and work and life has been very chaotic with many things to keep track of. Some of the apps can provide 70% of the features, the rest requires more manual work to maintain.

Rewriting BTD will be useful to me to manage my work and life, it’s created to fit exactly my needs and I can also enhance it as needed.

Some decisions were made to improve the app and simplify maintenance:

  1. Instead of using a UI libraries/framework, use only plain HTML and Bootstrap.
    • Antd was changed drastically in later version, so it would be really troublesome for me to maintain and keep updating the app so it does not become unusable.
  2. Data are stored in a single JSON document instead of few tables in relational DB.
    • This drastically reduces the amount of backend code, and makes data updates much much simpler.
    • Data backup is also a matter of copying the JSON document from the server and store somewhere.
  3. The application is containerized in a single container with a volume to persist user data, similar to the cooking plan project.
    • This allows quick deployment by just pulling the latest Docker image and recreate the container.

The UI is very similar to the old one, it is designed for me so it’s most efficient and effective for me to allow me to quickly organize my tasks and projects. It’s for power users so no need to be super user friendly.

You have three separate views for tasks, projects and tags.

You can easily filter projects and tasks by the completion status, or whether the tasks and projects are current or to be done later. Tasks can also be filtered based on tags or projects. Since it’s React and everything is loaded into memory, filtering is super fast.

It’s also just a single click to mark a task as completed, or convert it to later or current task, you can also quickly set the project the task belongs to.

Each task can have multiple tags, so if a task can be done both at work and at home, you can add both tags to the same tag, and filter by the appropriate tag based on your current context.

Both projects and tasks can be quickly marked as Later, or make current by unchecking later. This allows me to quickly reorganize my current work depending on prioritization and workload.

The application has been deployed for personal use and so far it’s great, I will blog more about it in future posts on technical aspects.

Dev log [DotNetCookingPlan]: Deployment to personal server with Docker and Cloudflare tunnel

Today I worked on this little project for one hour and the main goal is to make it relatively easy to deploy the Cooking Plan application to my personal server for usage easily. For the first iteration I decided to use a simple method with Docker Compose. The goal is to make deployment to the server relatively easy so that changes can be updated and used quickly. I find that this simple project can help with applying some knowledge I gained from work, and it’s also quite fun.

The tools used to achieve this goal are

  1. Docker and Docker compose, and personal DockerHub registry.
  2. A personal server, I bought a second hand Intel NUC computer below for cheap, and installed Ubuntu server to it.

An Intel NUC, cheap and does not take much electricity.

3. Cloudflare tunnels: https://www.cloudflare.com/en-gb/products/tunnel/

4. Some cheap domain name bought from Namecheap

The application is containerized into two simple containers, just one DotNet WebApp container and one MySQL container, the database is stored in a separate volume so data is not gone when container is down.

In order to access the application from the Internet, I use a cheap domain name I bought for personal use. Then install Cloudflare tunnel daemon to the Intel NUC, then log in to Cloudflare and configure traffic to the domain to forward to the Intel NUC on HTTP port 8001, Cloudflare automatically enable TLS for the domain.

Port 8001 of the server is mapped to port 80 of the WebApp container, the WebApp container is configured to connect to the MySQL database instance in another container.

The cycle to build, update and deploy is manual but is fairly easy, all is accomplished using a docker-compose.yml file.

The process is like this

  • In development machine, run docker compose build to build local images.
  • Run docker compose push to push the images to personal DockerHub registry.
  • Use the same docker-compose.yml file in the NUC and just run
    • docker compose down
    • docker compose pull
    • docker compose up -d

And Docker will pull the latest images and start the containers, and they are available right away on Internet through Cloudflare tunnel.

It’s a good start for quick deployments/dogfooding and development.

Simple under-development home cooking planner.

Dev log [DotNetCookingPlan]: Revisiting meal planner

Recently I have been trying to study new technologies after changing to a new job and was quite tired. I tried to study “properly” by taking notes while reading books or watching course videos. It was not quite fun and not really the approach I used when I was a kid exploring the world of computer programming.

I decided to throw away my to do list, kanban board, etc and just jump into building something that I would actually use. I remember fondly of experimenting and using programming knowledge to build something either “cool” or useful, and it was very effective in learning new programming languages and frameworks.

I remember it was really boring attending lectures at University, and studying was not very effective. I guess the human brain needs rewards and feeling little successes to carry on doing or studying anything.

It’s the same story with learning to play an instrument, it’s very boring to follow some music sheet that the instructor gives you, but if you try to play some music that you actually like, it’s much easier to motivate yourself to continue practicing and learning.

I decided to rewrite the Meal planner application, this time as a full ASP.NET Core application using Razor pages. I took notes and studied ASP.NET Core before but the knowledge went away after long time.

The simple application will be improved incrementally and eventually be deployed inside a Kubernetes “cluster” hosted in a small personal server. Making this small application will allow me to

  • Have some practice in using Razor pages.
  • Revisit using Entity Framework Core with Code first migration, using MySQL database engine.
  • Containerize the application in a few containers using Docker and docker-compose, with volume mounts.
  • Repackage and deploy the application to a Kubernetes cluster, perhaps first by creating K8s manifests, and then by writing Helm charts.
  • Maybe eventually setup some CI/CD.

And the bonus is that I will use this project to plan my weekly cooking and grocery shopping, which is useful.

After this is done, I may improve on this project by converting it to ASP.NET Core web project with React.js. To revisit my React programming knowledge. However, to be more focused, I may not invest too much into frontend programming anymore.