AskLit is a web-based project I built to make it easier to find books that actually relate to a question someone is asking, rather than just returning generic search results.
The goal of the project is to reduce the gap between asking a question in plain language and discovering credible, long-form sources that help answer it. Asklit serves as a balance between having an AI tool spit out an answer, limiting your understanding of the concept itself, and spending hours searching through books yourself.
It allows you to find relevant information quickly and read around it to develop a broader understanding of the topic.
The project is split into a frontend and backend to keep user interaction separate from data processing and API communication.
The frontend is a simple, single-page interface built with HTML, JavaScript, and Bootstrap, and is hosted on Vercel.
Users enter a question, and results are displayed as a list of books with short preview snippets, publication information, and links to Google Books previews.
The backend is built using Flask and is hosted on Render.
It receives the user’s question and uses the OpenAI API to extract a short keyword-based search query from the input.
This allows users to ask questions naturally while still producing consistent and effective search terms for finding books.
The generated query is then used to search the Google Books API for previewable books that contain relevant text snippets.
Only books with accessible previews are returned, and results are filtered and formatted before being sent back to the frontend.
The backend returns structured data so the frontend can reliably render each book as a consistent result card.
Since the backend uses private OpenAI and Google Books API accounts, steps are taken to make sure the API keys can’t be exposed or abused.
The keys are kept on the server only and never sent to the frontend, and requests are limited so someone can’t spam the site and run up costs on the API accounts.
Access to the backend is also restricted to the actual AskLit website, which prevents other sites from using it as a free API.
AskLit is intended to be a lightweight research starting point rather than a full academic search engine.
It works best as a way to surface relevant books quickly and encourage users to explore longer-form sources on their own.