This project implements an intelligent book management system using Python, FastAPI, PostgreSQL, and the Llama 3 generative AI model provided by Groq.
- Book management (CRUD operations)
- Review system
- AI-generated book summaries
- Book recommendations based on user preferences
- Asynchronous database operations
-
Make sure you have Docker and Docker Compose installed on your system.
-
Clone this repository:
git clone https://github.com/yourusername/book-management-system.git cd book-management-system -
Set up your environment variables as described in the "Environment Variables" section below.
-
Build and run the Docker containers:
docker-compose up --buildThis will create the necessary database tables and start the application.
-
The application will be available at
http://localhost:8000 -
Access the API documentation at
http://localhost:8000/docs
To run this project, you need to set up the following environment variables:
-
Copy the
.env.examplefile to a new file named.env:cp .env.example .env -
Open the
.envfile and update the values:DATABASE_URL: This should match the URL in yourdocker-compose.ymlfile. The default value should work if you haven't changed the database configuration.GROQ_API_KEY: Replaceyour_groq_api_key_herewith your actual Groq API key.
-
Make sure not to commit your
.envfile to version control. It should be listed in your.gitignorefile.
Use the API endpoints to manage books, add reviews, generate summaries, and get recommendations.