This is a big build, but the last one! Lots of validation is done and
most of the inputs are completed. What remains are the complex elements:
tags, ingredients and instructions. Once those are done, we can start
working on the backend and making sure everything is wired together
properly.
This is found in the components domain. Make sure only HTMX routes call
it. Although, I think I put this into the page handlers WHICH IS WRONG.
However, it does work, ish. But it does not load into the DOM properly.
But it seems to display just fine.
Still having the stupid ass nil dereferences, I think I might need to
migrate to using success returns instead of pointers. Because they're
fucked. And even more so now.
The application can now be built, tailwind is built, AND templ
components are generated! Which means, we can no longer push the
tailwind generated CSS file OR the templ generated go files!
Plus, this is the first step towards deployment and CI/CD!
This includes backend updates as well as frontend changes! The backend
also includes a new repository to get a list of jobs via their IDs,
which does respect order!
The list displays for users that are logged in and a small message when
the user is not logged in. The last piece is the recipe of the week
segment, which can be as simple as a DB cron-job. But that will require
stored procedures. Need to learn those next.
Though I want to deploy the application soon, so I need to begin working
on that.
This means we need to pass the user id into the various methods that
call it. But, since it is a pointer, we can use nil if we don't have a
user to check with (this is noted in the service).
The make button is pretty much done, just need to finish up by
rate limiting it. That will take place in the engagement repository.
Sharing works as well, just a UI change, there is no backend yet, maybe
there should be an engagement type for sharing recipes. But not totally
sure.
The viewing is also in a semi-working state. It does not create requests
for users that aren't signed in, which needs to come. With that update
there is a need to update HOW the requests come in, we don't need it
every time we load the page. Maybe just when we click to it, from
somewhere else?
Finally, the favoriting does not totally work. The entry into the
engagement table is complete, but the actual favorites table, favorite
creation, button toggling AND button rendering is not implemented yet.
The other sections not working yet were marked as under construction.
There still needs to be a page for "see all..." for the recipes, but
that will be a task for another time.