by ~ Roni Bhakta
The Problem: The End of Digital Ownership
Have you ever "bought" an ebook on a major platform and wondered if you truly own it? The publishing industry is rapidly shifting from ownable physical books to digital content that we can only rent. This trend eliminates the fundamental rights of ownership that allow libraries to build and preserve diverse collections for the future. It affects us all. In 2019, when Microsoft closed its ebook store, millions of readers lost access to the books they had purchased. This raises a critical question: what is a library that doesn't own any books?
My name is Roni Bhakta, and I'm a full-stack developer from Maharashtra, India. In my hometown, finding technical mentorship can be a challenge. That's why being selected for Google Summer of Code 2025 with the Internet Archive was a transformative opportunity. It connected me with a global community dedicated to a mission I deeply believe in: universal access to knowledge. Inspired by pioneers like Aaron Swartz, I was excited to contribute to the future of digital libraries.
Our Contribution: The Lenny Prototype
During GSoC, I had the privilege of working with Michael E. Karpeles (Mek) and the Open Library team to build a project from scratch called Lenny.
Lenny is our answer to the problem of digital ownership. It's an open-source, self-hosted bookshelf that empowers libraries and individuals to securely store and lend the digital books they own. Think of it like a personal sidewalk library, but for your online books.
Our Technical Approach and Strategy
Building a project with such long-term potential required sharp focus. Instead of trying to build a massive, two-sided marketplace from day one, we defined our minimum viable prototype by asking five key questions:
- Who is our audience, and what are they trying to do?
- Which of their problems are we positioned to solve?
- What missing feature would cause the project to fail?
- What components would have the biggest impact on the broader BookServer ecosystem?
- How will our audience actually use this system?
This process led us to a critical realization: before a marketplace can thrive, libraries need an affordable, easy-to-use system for managing the digital books they already have access to, like the thousands of high-quality open-access books available online.
Challenge 1: Storing Books Without Cloud Dependencies
Our goal was for Lenny to run anywhere—from a Raspberry Pi to a personal computer—without requiring deep knowledge of cloud services. To achieve this, we built a containerized system using a carefully selected open-source stack:
- Containerization:
Docker
to run multiple services in a virtual environment. - Backend:
Python
withFastAPI
for APIs,SQLAlchemy
as the ORM, andPostgreSQL
for the database. - Storage:
MinIO
for S3-compatible object storage for EPUBs and PDFs. - Networking:
Nginx
to secure internal endpoints and manage public-facing APIs.
Challenge 2: Making Installation Effortless
A great tool that's difficult to install will never be used. The initial setup required manual configuration, which was a significant barrier. Our solution was to create a one-step installation script that handles everything:
- Auto-generates dynamic environment secrets.
- Installs all missing dependencies automatically.
- Preloads the instance with over 500 ready-to-read ebooks from sources like
standardebooks.org
.
You can try it yourself with a single command:
curl -fsSL [https://raw.githubusercontent.com/ArchiveLabs/lenny/refs/heads/main/install.sh](https://raw.githubusercontent.com/ArchiveLabs/lenny/refs/heads/main/install.sh) | sudo sh
Enhancing the User Experience With the core infrastructure in place, we focused on the reading experience. We integrated Thorium Web, an in-browser EPUB reader, allowing users to read books directly without separate apps. We also built a modern front-end, Lenny-app, using Next.js, Tailwind CSS, and TypeScript to provide a simple interface for browsing and borrowing.
Results and Impact Throughout GSoC, I made contributions across the entire ecosystem:
-
Lenny (Core Backend): I built the foundational database schemas, implemented file upload handling, developed the borrowing and OTP-based authentication logic, and integrated the Readium reader services. I also added critical infrastructure improvements like structured logging and Cloudflare Tunnel support for easy public access.
-
Lenny-app (Frontend): I initialized the project's monorepo, created Docker configurations for easy development and deployment, and set up the Nginx reverse proxy.
-
lennyforlibraries.org: I completely redesigned the project's landing page to improve navigation and visual appeal. I also created a demo video to explain the project's vision i.e available on the website.
One of the most exciting outcomes was an unexpected "extra win." By prototyping with Thorium Web for Lenny, we were able to launch a new service on Archive.org called the Public Readium Service, which makes open-access EPUBs readable directly in the browser for everyone.
Key Lessons Learned This journey was an immense learning experience. My key takeaways include:
-
The power of scoping: How to tackle a large, open-ended project by focusing on a "prototype-first" approach while still planning for long-term ecosystem growth.
-
Modular architecture: The importance of designing atomic functions and containerized microservices for better maintainability and collaboration.
-
Navigating ambiguity: How to work effectively with evolving, sparsely-documented third-party code and fill in the gaps to achieve project goals.
-
Designing for adoption: Recognizing that features like developer documentation and admin tools are what shift a project from merely "usable" to "adoptable" by a wider community.
-
Ecosystem thinking: Understanding how each component contributes to the network effects that will make Lenny valuable in the long run.
What's Next? The GSoC period may be over, but the work on Lenny continues. We are now focused on finalizing lending configuration tools, exploring purchase integrations, and working towards the grand vision of allowing Lenny instances to register directly with the Open Library catalog.
This project has been an opportunity to not only build software but to contribute to a model for the library of the future. My sincere gratitude goes to my mentor, Mek, and the entire Internet Archive community for their guidance.
If you're a developer, librarian, or anyone who believes in open access to knowledge, I invite you to join us.
Explore the project at the Lenny for Libraries website Here.
Check out our progress on GitHub.
To learn more about my work, visit my portfolio, connect with me on LinkedIn, or explore my contributions on GitHub.