Best practice to create a simple book borrowing system

Hello Kirby community.

I am part of an ongoing project for an educational space with a small book borrowing library.

I say ongoing because we launched the website last year but have more features that I am adding to the site when I have the time.

In the back-end it currently has a “Catalogue” with three subpages, “Books”, “Magazines” & “Art Catalogues”. Within these subpages there are a total of ~450 items hosted as individual pages. I chose to break it up this way to hopefully optimise speed when filtered etc. These pages function as a searchable digital catalogue of the books available for hire.

I have just implemented the ability for members of the public to become users via the front-end. These users will never have panel access.

Front-end (logged-in) users can request to borrow by clicking a button on the individual item page that sends an email to the org with the details of the user and the item.

Because the lending library is not open everyday of the week, and the organisation would still like a degree of manual processes (not everything automated currently), they will then follow up with the member to organise the physical hand over of the item.

My question is, what is the best way for me to link the item borrowed to the borrower’s user account? A process that would be undertaken by a staff member with panel access.

Ideally the implementation of this feature will (in the long run) help in the creation of a way for us to track which users currently have items borrowed, when and for how long they have been for, and a bit further down the roadmap, perhaps automate reminder emails for when items are overdue for return.

  • Should I keep the borrowing record on individual items (and link to users through a user field)?
  • Or should I keep the records on the user blueprints and link to items via pages fields?

Either way I will also need to show on the front-end when an item is “Available” or “Not-Available” and take into account items with multiple copies.

Any suggestions are very much welcomed. Have a good week! :cowboy_hat_face:

Interesting project!

The borrowing record is essentially a “where is this item right now” field, so I would always keep that information with the item. The user blueprint contains information about the user, the item blueprint contains the information about the item.

Same with the due date. The information when the item is due to be returned is meta data of the item, not of the user.

Hi @sebastiangreger, I’m sorry for the late reply.

I like what you’re thinking… I’m going to go down that road and report back if I have any further questions :wink:

Thank you!