We can now use environment values to dictate which values are used for
the DB and the domain. This is a simple solution, but for now, it works!
This will merge into master and we can then see it live in action!
This is not perfect, and def not set in stone. But for now, it will
return a JSON page, and not crash. I want this to log the user out,
clear the cookies, and then direct home with a message saying something
went wrong.
I also want it to send me an email with the details, but one step at a
time for now, that is not 100% necessary, I just need to fix the bugs.
I also need to fix the environments.
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 basically marks the favorites page completed. Updating the recipe
repository to allow the search function to accept a userId and favorites
flag. This flag will toggle a "favorites only" search. Which can be used
to replicate the same functionality from the search page in the
favorites page. This later can serve as a baseline for updating to also
work for activity search.
I am starting to think an ORM is a good idea...I heard Gorm is good, but
for now, there is a bit too much tech debt.
The frontend is half wired up, just need to update the button. I also
want to update the recipe methods to return the favorite status. This
will follow very similar to the way I updated the tags. Another method
which can be called to attach the favorite state.
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 database requirements have been added, as well as the service/repo
architecture. A few small functions have been created, but the system is
not complete by any means. More work is required to mark this task
complete.
The profile list will now properly display the users recipes! The
favorites list does not exist yet, since there is no backend support for
favoriting/saving recipes. So the list displays the same content as the
user recipe list. Same goes for the activity list, not yet implemented.
This loads whenever a page that does not exist is loaded. I would also
like to add some "coming soon" dialog to the few pages that don't exist
yet. Before deploying to the server.
Missing some context storage and better passing of data to allow
between the home page to the search page. Need a way to store the search
results in state so they can be retrieved when the page is reloaded,
etc.
Furthermore, not sure how we are going to handle the searching. Maybe a
full-text search index? For now, it has been ignored, but the filters
seem to be working properly.
Most everything is implemented, included a state handler and a pretty
simple (but workable) system for managing state in HTML. Nice and simple
for now.
There is still much work to be done, but the rest is simple backend
creation and error handling. And then input validation...a nightmare.
This works very well, just need to determine what routes will be
protected and such. For now, a simple system is setup, with more to
come. For now, this is a WIP and needs some light work. But auth is
almost complete.
The system allows services and repositories to be created in the main
server definition and then store them in the context. They can then be
retrieved and mapped onto the injection type and accessed in the
handlers. The handlers can then use the deps to call services. Each
service is initialized with the required repositories so they can be
accessed directly.