Inspiration

Looking for a good book can often be overwhelming and daunting. We wanted to create an intelligent tool that could deliver curated book suggestions catered towards a user. The goal was to create an efficient and intuitive method for book-lovers to find new reads that were aligned with their interests.

What it does

Book Recommendation MCP is an AI-powered web application that creates tailored book recommendations based on user-inputted themes. It uses OpenRouter API to access OpenAI's large language models to produce intelligent, context-aware suggestions. It also calls from the Google Books API to provide cover images and metadata for each recommendation. Each result includes direct links to WorldCat, Amazon, and Goodreads for the user to further explore their recommendations. The app also has a recent search history for quick recall of previous queries, a favoriting system, and other QOL features.

How we built it

The project is built with a Node.js backend and JavaScript, HTML and CSS for the frontend to be hosted on Render.

  • Server-Side (Node.js / Express): Handles API routing, request forwarding, and communication with the OpenRouter API for AI-generated recommendations.
  • Client-Side (Vanilla JS): Manages dynamic content rendering, fetch requests, and localStorage for preserving recent searches.

External Integrations:

  • OpenRouter API: Provides the large language model inference layer for generating recommendations.
  • Google Books API: Supplies book metadata and cover images.
  • WorldCat, Amazon, Goodreads: External links for book lookup and purchases

Environment variables were securely stored using .env for API keys and tokens, ensuring a safe deployment through Render.

Challenges we ran into

One major challenge was managing authentication across APIs, especially with the OpenRouter to Render environment. This was a new technology to us and we had issues properly configuring the API setup. Another challenge was handling inconsistent data returned by the Google Books API, and programming an alternative graceful fallback when book images or metadata were unavailable.

Accomplishments that we're proud of

We successfully built a fully functional recommendation engine that merges natural language AI reasoning with real-world data sources. We also successfully deployed a multi-API Node.js project to a production environment on Render while including a clean, responsive front end.

What we learned

We grew our knowledge of integrating multiple REST APIs within Node.js architecture. We also gained practical experience managing API credentials in deployment, optimizing JavaScript functions, and handling edge cases with external data sources. Additionally, we learned how to utilize OpenRouter as an alternate pathway for experimenting with different LLMs.

Built With

Share this project:

Updates

Submission history