Web Kütüphane.
From books to sessions. End to end.
Book lending, membership and authentication built by hand.
Books
◉ Emin AkifDiscover books in the catalog.
One book. One borrower at a time.
Book availability is tracked. Each book can only have one active borrower. Signed-in users can see only their own loan records.
Deniz Karaca
● AvailableCategory: Personal development
Pages: 320
Language: Turkish
Data model.
Members, books and loans. Each loan connects one member to one book. A book can have only one active loan.
My contribution.
Solo development, from data model to interface.
Express REST endpoints
API endpoints for membership, sign-in, books and loans.
MongoDB & Mongoose
Data models, relationships and schema validation.
bcrypt & express-session
Hashed passwords and server-side session management.
Secure session flow.
Password checking with bcrypt and server-side sessions with express-session.
Catalogue, membership, lending and returns.
Book availability, membership and session-based authorisation work together from end to end.
“Learning the decisions a ready-made solution makes for you.”
I learned password hashing costs, session storage, HttpOnly and SameSite by implementing them. In production I would use a mature authentication solution.
Tech stack.
Node.js
Express
EJS
MongoDB
Mongoose
- bcrypt
Technical notes and project scope
The problem and my role
A library’s needs look simple: books, members, loan records. The difficulty is preventing the same book from being lent twice and ensuring each user sees only their own records.
A solo project; everything from data model to interface is mine.
Implementation decisions
- REST endpoints on Node.js and Express, with EJS for server-side templates.
- Data in MongoDB, schemas and relations defined through Mongoose.
- I built authentication myself with bcrypt and express-session rather than an off-the-shelf identity package: password hashing, session storage and cookie settings all under my control.
Outcome and learning
Membership, catalogue, lending and return flows plus session-based authorisation all work.
Writing authentication by hand surfaces the decisions a ready-made solution quietly makes for you: what the password hashing cost should be, where sessions live, what HttpOnly and SameSite actually do. In production I would use a library — but now I would use it knowing what it does.