Lubook
A self-hosted full stack application of a (1-member) community of comic artists and readers. Made out of spite as a project for the course of Introduction to Software Engineering.
Links
Description
This is not a production commercial application. This was created just because I hate my group’s version of this project. When they suggested building a website where you can read mangas, I envisioned it to be akin to other sharing communities like Archive of Our Own, Wattpad, etc., but their idea is more about a pirating, stealing and reposting mangas, which I do not support.
I don’t have any problems with piracy for personal usage, but this situation is within an educational environment, as a project for a Software Engineering course, which is the reason why I find it to be wrong. I have brought up this issues with the group, as an (very bad) artist myself, I would not be comfortable working on such a project, it is mind boggling how completely normal they feel about stealing works, so I gave up on persuading them and created my own version of said project. I made this project to prove that this can be done, without the need to steal other people’s works.
There’s also a chance if you’re reading this after I stop paying for hosting, and there would be no proof of concept. I would try to put as much data here as possible, depending on how the project is going. Check if this link works.
Tech choices
The backend was originally designed by the group leader to follow the MERN stack (namely MongoDB, ExpressJS, ReactJS, and NodeJS). I was also going to go with the same thing, but that wouldn’t be very educational (I lied, I just wanted to try SQL). The roadblocks on the way to setup a SQL server is crazy difficult for a first-timer.
Eventually, I think it’s OK to settle on PostgreSQL, ExpressJS, VueJS and NodeJS. Which is mainly, still similar enough, even though I use TypeScript instead of JavaScript. The biggest change here is that Postgres isn’t that straightforward to setup tests with, since memory pg servers are too limited and drizzle has problems working with them.
Problems
What about setting up automated tests?
It seems that due to how complicated SQL is over MongoDB, there isn’t a very good implementation of memory Postgres. I did try
pg-mem
, but it felt like it broke too quickly. The best and most straightforward idea would probably be having a Postgres Docker container to test on.
What about testing data?
When I started testing frontend side of the project, I quickly ran into a problem I don’t know how I haven’t thought of before. Because I’m not taking anyone’s artworks or writings, that means I have to do everything, including the writing and painting myself.
I have a few ideas and renditions for a few short mangas, but drawing it would be another story (haha, pun). As much as I would like to add my own original stories since I also love writing, that would take too much time, so I’ll find a way to compensate for it without outright infringing on peoples’ copyright.
Backend (Express API Routes + PostgreSQL)
In the case that you’re reading this while the project is still live, here’s a link.
The backend has documentations on all routes. But I was kinda deep in SCP lore, the comments do reflect that.
Clearance Level (access permissions):
- 0 (Unclassified): Everyone can access this endpoint.
- 1 (Confidential): Logged in users can access this endpoint.
- 2 (Restricted): Approved users can access this endpoint. Approved users are users who have proven themselves to be good within the community.
- 3 (Secret): Site moderators can access this endpoint. They are doing most of content moderation work.
- 4 (Top Secret): Site administrators can access this endpoint. This involves promoting and demoting moderators.
- 5 (Executive): Only those who have access to the console should have access to this endpoint. I have no clue what this is used for.
Object Class (how contained is the action? is it within small regions of collection, or disrupt multiple at once?):
- Safe: This involves just looking up, and nothing in the database is changed.
- Euclid: Some fields of the database are changed.
- Keter: Multiple collections were affected deeply.
- Apollyon: The entire database was affected deeply.
Frontend (VueJS)
The frontend uses a simple Astro + Vue server, hosted on Vercel (free plan, of course) with server-side rendering features.