/  Words written by me / Diary of a solo dev building a web app / Day 11: upload file to local fs  edit

This is a dev diary of implementing Filerion, a web-based file manager for online storage (Dropbox, OneDrive, Google Drive, s3 and more).
  • implemented uploading a file to local file system
  • refactoring file system abstraction
    • file system entry can be either a directory or a file. Therefore I have FSEntry class that can represent both. I also added Dir class to represent a directory in a different context but that is redundant with FSEntry representing a directory. Therefore I removed Dir class.
      • lesson: you’ll see this lesson over and over again: software is never perfect and is never done. The code I had before worked. I refactored it because I think the new version is slightly better.
  • refactor Account and adding more type information
    • JavaScript is dynamically typed. Static types help to spot coding mistakes early, which is good. One option to get static types in JavaScript is to use TypeScript. Another one is to use JSDoc and add type information in comments. I went with JSDoc. This is the first time using JSDoc. It’s too early to say if the effort of adding types is worth it
  • experimenting with Telegram bot
    • I got a Telegram account and it turns out that it’s very easy to create bots to send myself notifications. I’ve added a notification to know when someone uses the app.
    • lesson: it’s good to know if and how people are using your software. I’m a fan of very targeted analytics. By targeted I mean: not just using a service like Google Analytics. They tend to evolve into providing firehose of data: lots of data you don’t want and missing the exact thing you do want. Targeted analytics measure only very small number of things and you actually pay attention to it.
I’ve added a way to count lines of code. Here’s what it is today:
Per extension:
62 .html
768 .go
1882 .js
2072 .svelte

total: 4784
So far it’s 434 lines per day. I’m sure this will drop when the app gets bigger.

Feedback about page:

Optional: your email if you want me to get back to you: