January 31
Hi everyone! A lot to talk about today, lots been happening. I wanted to take a bit of time to make a video for this post showing a brief preview of where things are, that's attached to the post.
I think, at this point, the site is about three-quarters done or so. There are still various things to do; I’ll make a list of the biggest tasks remaining at the bottom of this post, just to give an idea. Firstly though, progress.
Financial planning
I’ve updated the financial spreadsheet for estimating site income and costs to account for request costs when using CloudFront. Given that every single request incurs a function execution (to check if an image needs content-disposition headers, so image download buttons can work), the number of file requests and function executions adds up.
I’m also operating on the assumption of using Stripe instead of Patreon now. The spreadsheet still uses the Patreon income figures for the time being - just to be operating on the worst-case financial scenario.
Edit Artwork functionality
Implementing multiple images per submission functionality broke the edit artwork feature, and given the complexity of that (it's far more complex than it might seem, due to how much flexibility the submit artwork form has in it), I put off fixing it for a bit. It is mostly done now; there are a few bugs left to iron out, regarding editing an artwork and both adding new images whilst moving the order of existing images.
Layout improvements, article page improvements
Layout for the article pages, including the TOS/Privacy Policy/etc pages, are improved now. The navigation menu shown on the side can now be minimised and restored, so that reading the pages can be easier.
Login redirections
Login redirections are complete. This means the situation where clicking a link where you need to be logged in to view the page, and then logging in; instead of taking you to the homepage, it now takes you to the page you originally tried to view.
Theme improvements
The dark and light themes have been significantly improved, by changing the various colours so that they are less of a strain on the eyes and are more easily readable. In addition, the main navigation bar now has a pretty moon/sun icon that can be clicked to change theme, instead of a slider in the user’s profile picture dropdown. That's partially to make a nicer interface, but also to allow guest users to switch theme.
Apache httpd.conf changes
I’ve removed the few remaining root-level pages in the webserver directory, which makes the httpd.conf a little nicer to manage (with the exception of one page, the maintenance page. Might change that later, it presented some problems when I tried earlier).
Bookmarks and collections pages
I’ve started implementing the functionality for “collections” pages, alongside bookmarks. Functionally it’s not difficult, but the interface to browse different collection folders efficiently necessitated a refactoring of the artwork gallery code, so I decided it was a good time to properly refactor most of the JavaScript in the codebase.
This is because in order to have a page where a user can browse several different “collections” without having to reload the page every time, the gallery code has to be able to deal with several galleries at once, which wasn’t possible with the existing code. I’ve still got most of the actual bookmark code to do, but refactoring the gallery code was a major part of it.
JavaScript codebase refactoring
The scripts for Deserted Chateau’s frontend were largely written as simple imperative scripts up to this point, without classes or much in the way of encapsulation. As the project continues to grow that lazy approach will make it harder to write new scripts, due to the possibility of global variables being unintentionally overwritten, and due to it not lending itself well to multiple instances of the same variables.
I’ve therefore refactored all the scripts to be modular, which will make it a lot easier going forward, and also means bookmark galleries will be a lot easier to implement and maintain.
Multiple submission uploads
I’ve been refactoring the artwork submission code to make it easier to manage; as stated previously, it's a very complex part of the codebase due to how much flexibility it has. Much of that is done, and now I’ve started implementing multiple submission functionality, i.e. uploading several submissions at once, rather than several images in one submission.
This will definitely be a subscriber only feature with some limits to prevent abuse; I didn’t originally plan to implement it, but it’ll help a lot when testing, as it means I can quickly set up large galleries for testing purposes when needed. It'll also make a good feature for artists as it should save some time for subscribers when uploading their initial portfolio or coming back after a while of inactivity.
The basic functionality is done, but I need to modify some of the existing code to allow each submission’s NSFW status and flags to be appropriately entered, both to make it simpler to use and also to make sure that artists with partial NSFW portfolios don’t find it impossible to use.