Feature Creep 2026, 12 - Bookle (Title WIP) - Selector
The data-backend stuff is obviously pretty easy to do. Because of the custom list upload, this is going to be a littl unorthodox, but I would like for the selection process to fully happen in the front-end. The server is going to provide very little, once the site is loaded.
In the server, I would place a few arrays with "recommended" options that will be sent to the client upon application load, perhaps in a structure like this:
"rec_data" : {
"genre" : [
"horror",
"biography",
"fairy tale", ....
],
"release_year" : [
"1910s",
"1920s",
...
],
"custom" : []
}
Then we check which options are enabled and pick from the ones that are enabled. Picking one option will be 2-tiered process with refreshes when required. In essence, the selection will return an array of array names from the rec_data structure.
The trick, I suppose, is that we'll label the fields as
a1 | a2 | a3 b1 | b2 | b3 c1 | c2 | c3
and fix those in a structure. We should just fix the property category first. Then, when populating any field, we check if any field with either the same letter or number already has the randomly chosen property category, and if it does, we reroll (perhaps there's some intelligent slicing we can do also to avoid the reroll). Then, when all categories are set, we iterate to land on the actual property, perhaps through a string processor so that the reader immediately gets what the application means.
def grid_populate(rec_data, grid):
nums = ["1", "2", "3"]
lets = ["a", "b", "c"]
for n in nums:
toadd = False
reckeys = rec_data.keys
for l in lets:
tmp = None
while toadd == False:
toadd = True
if (reckeys.length == 0):
tmp = "Free"
break
tmp = random(reckeys)
for l2 in lets:
if tmp == grid[f'{l2}{n}']:
toadd = False
grid['f{l}{n}'] = tmp
reckeys.pop(tmp)
To avoid sending the application into a deadlock during the selection process, we let it place a "Joker" value in each field it can't populate, i.e. when in the first step of the process we can't find a category to apply.
All of those are relatively easy to do in the browser, so I'm not concerned about the structure being so front-end heavy.