Laurcons

Laurentiu Pricop

"Physical Mail Manager" - High School Certificate Project

In Romania, at the end of high school (mathematics-informatics specialization) you are required to create some sort of computer project, Web or otherwise, and present it to a committee, which will evaluate it. This is the project that I created, called "Physical Mail Manager" (original Manager Poștă Fizică).


Published: 2021-05-20
Versions and Links
Online: Visit / GitHub / Docs (RO)(2021-05-20)

The project's language is Romanian, even if the not-user-facing parts are English.

Conception

So, I am a person who likes to send mail. Not sure where this came from, but I find it kind of magical that I can write whatever I want on a piece of paper, place it in an envelope, stick a stamp on it, and drop it in the postal box, only for it to arrive in the other side of the country in a couple of days, or the other side of Europe in 2 weeks. I'm also a fan of keeping track of things, in tables and all that jazz, so since I started sending mail I have had at least some way of keeping track of what goes in and what goes out: firstly a simple note in my phone's Notes app, then an Excel spreadsheet.

I initially had big plans for this certificate thing. I knew it's not really worth anything, but I wanted to have fun while doing it, so I thought I could make some sort of mini social network, called HiSix (because Hi5 already exists), and maybe even add some kind of live chat to it. I thought it wasn't that hard, and I still think it's not really (at the scale of a demo project, no scalability in mind), but I underestimated the sheer amount of work that it needed, and I didn't really want to take any (security or other) shortcuts, so after a while I dropped it.

Then I put two and two together and figured I could make an interface for my postmaster requirements. I have been wanting to make one for a while anyway, so I went for it.

Data model

The project keeps track of two kinds of structures: letters and destinations, and provides ways to visualize and edit them.

A destination is a person. It represents either the destination of a letter, or the sender (but it's referred to as "destination" regardless). A destination contains the person's name, their address, and whatever user-added observations.

A letter contains information about a letter, such as its destination, and type (incoming/outgoing). It also contains relevant dates (when it was written, dropped in the postal box, and received), price, and whatever user-added observations.

Most of these fields have no enforced type or value, and are not required, to give the user the freedom to write whatever data they need in the fields. For example, a user might not know the exact date a letter was sent, but does know what it was sent, so they can type "yes" into the field.

Architecture

One of the "requirements" of the project was that, if I make a web app, it needs to be easily drag-and-dropped into the /htdocs folder of XAMPP, and it should work, no additional configuration. This pretty much ruled out any live or WebSocket capabilities (which would require spinning up an additional server), and I had to hack my way around the folders using .htaccess files. It works tho.

The project uses PHP as a backend, with SleekDB as a database (it uses the filesystem and JSON files, which was perfect for me), and a React app, with TypeScript, as frontend.