- 📌 Project Goals
- 🏠 App Overview
- 📐 Clean Architecture Overview
- 📋 Features
- 📡 API Routes Overview
- 🛠️ Technologies Used
- 🚀 Getting Started
This is the backend of bookLibraryProject.
🔗 Live deployment: ReadSphere
The project aims to build a full-stack Book Library and personalized Short Stories application, enabling users to:
- Manage a collection of books with genres and user opinions
- Read descriptions of books
- Rate and review books
- Read and contribute opinions
- Generate creative stories based on user settings using OpenAI
- Access book data through a clean, structured, and well-documented API
The application consists of a frontend in React (TypeScript) and a .NET backend following Clean Architecture principles.
- Backend: CRUD operations for books, genres, and opinions
- Frontend: View books, view/create opinions, and interact with the AI Story feature
🔧 Swagger is enabled for API documentation
🛠️ Backend hosted on Heroku
🗄️ Database hosted on Eons
The solution is split into the following layers:
- 🧠 BookLibrary.Core — domain entities, DTOs, interfaces, and core logic
- ⚙️ BookLibrary.Services — business logic and service implementations
- 🗄️ BookLibrary.Infrastructure — database context and data access using Entity Framework Core
- 🌐 BookLibrary.Presentation — contains the controllers and route handling
- 🧪 BookLibrary.Tests — xUnit-based unit tests for services and controllers
- 📡 BookLibrary.Api — Entry point of the application, responsible for application startup and middleware configuration
- 🔌 Services.Contracts — Defines contracts (interfaces) between services and other layers for loose coupling
- Retrieve all books
- Get book by ID
- Filter by title, author, or genre
- View top books
- Create, Read, Update, Delete books
- Create, Read, Update, Delete genres
- Create, Read, Update opinions
- (Planned): Delete opinions
- Search books by title or author
- Filter by genre
- Submit opinions with ratings
- Get average rating for a specific book
- Fetch opinions related to a book
-
Generate short stories based on book context using the OpenAI API
-
⚠️ Planned: More prompt customization and story saving
⚠️ Planned: Implement login system and secure admin/user routes
- 🔷 ASP.NET Core 8.0
- 💬 C#
- 📦 Entity Framework Core
- 🗃️ PostgreSQL (hosted on Eons)
- 🌐 Swagger / OpenAPI
- ⚛️ React + TypeScript (frontend)
- 🔒 JWT (Planned) for authentication
- 🤖 OpenAI API for story generation
- 🧪 xUnit for backend unit tests
📘 Book
-
GET /api/Books
-
POST /api/Books
-
GET /api/Books/{id}
-
PUT /api/Books/{id}
-
DELETE /api/Books/{id}
-
GET /api/Books/TopBooks
-
GET /api/Books/TitleOrAuthor
-
GET /api/Books/genre
🏷️ Genre
-
GET /api/Genres
-
POST /api/Genres
-
GET /api/Genres/{id}
-
PUT /api/Genres/{id}
-
DELETE /api/Genres/{id}
💬 Opinion
-
GET /api/Opinions
-
POST /api/Opinions
-
GET /api/Opinions/BookId={bookId}
-
GET /api/Opinions/averageRate
-
PUT /api/Opinions/{id} (planned for frontend)
✍️ Story
- POST /api/Story/AI — AI-generated short story
- Clone the Repository
git clone https://github.com/PhilippeLeopoldie/BookLibrary.git cd BookLibrary