Project Gutenberg Explorer is a web application that allows users to explore and analyze books from Project Gutenberg. This application provides features to fetch book content, display it, and perform various text analyses using Large Language Models (LLMs).
- Fetch and display books from Project Gutenberg by ID
- Save and list previously accessed books
- Perform text analysis on book content:
- Generate summaries
- Analyze sentiment
- Identify key characters
- Detect language
- Next.js (App Router)
- React
- TypeScript
- Tailwind CSS
- shadcn/ui for component library
- OpenAI API for text analysis
- Zod for input validation
- React Query for data fetching and caching
- Jest for testing
- Node.js (v14 or later)
- npm or yarn
- OpenAI API key
-
Clone the repository:
git clone https://github.com/metinferatii/project-gutenberg-explorer.git cd project-gutenberg-explorer
-
Install dependencies:
npm install
or
yarn install
-
Create a
.env.local
file in the root directory and add your OpenAI API key:OPENAI_API_KEY=your_api_key_here
-
Run the development server:
npm run dev
or
yarn dev
-
Open https://localhost:3000 in your browser to see the application.
- Enter a Project Gutenberg book ID in the input field on the homepage.
- Click "Explore" to fetch and display the book content.
- Use the tabs to perform different types of analysis on the book content.
- Previously accessed books will be listed for quick access.
Run the test suite with:
npm test
or
yarn test
This project is set up to be easily deployed on Vercel. Connect your GitHub repository to Vercel and it will automatically deploy your main branch.
Make sure to set up the OPENAI_API_KEY
environment variable in your Vercel project settings.
- Project Gutenberg for providing free access to a vast library of books
- OpenAI for their powerful language models
- The Next.js team for their excellent framework
- The creators and maintainers of all the libraries used in this project