A book tracking web app with an interactive 3D shelf built in Three.js. Search books via Open Library, rate and review them, manage your reading list, and view your collection as a 3D scene.
Bookshelf is a portfolio project focused on clean layered architecture in ASP.NET Core and a custom Three.js 3D renderer. Users can search for real books through the Open Library API, add them to shelves by status (Reading / Read / Want to Read), leave reviews, and explore what others are reading on the Discover page. The 3D shelf renders book covers as textured meshes with hover animations and holographic shimmer.
- Search books via Open Library with fanfic filtering (cover + author + edition count + subjects)
- 3D bookshelf — three shelves by reading status, hover pull-out with tilt, holographic shimmer overlay
- Star ratings + text reviews per book
- Bayesian ranking on Discover (
score = (n·R + k·C) / (n+k)) - User profiles — public/private toggle, bio, avatar upload with drag-to-crop
- Settings — change username (invalidates all sessions), change password, delete account
- JWT auth — access token 15 min + refresh token 7 days, stored as SHA-256 hash in DB
- Deterministic avatar fallback — symbol + gradient generated from username
| Pattern | Implementation |
|---|---|
| Layered Design | Domain → Application → Infrastructure → Presentation |
| Auth | IJwtService / IAuthService — JWT + BCrypt workFactor 12 |
| Services | IBookService, IShelfService, IReviewService, IUserService |
| External API | IOpenLibraryService — HTTP client with result caching in DB |
| Rate Limiting | ASP.NET Core built-in — AuthPolicy on auth and settings endpoints |
| Migrations | EF Core code-first — AppDbContext + Fluent API |
- Backend: ASP.NET Core 10, EF Core 10, PostgreSQL 18
- Auth: JWT Bearer + BCrypt.Net-Next
- Frontend: Vanilla JS (ES modules), HTML, CSS
- 3D: Three.js
- External API: Open Library
- Fonts: Sexsmith, Exposure C Two, Drowner, Inter
- Clone the repository
- Create
backend/Bookshelf.API/appsettings.Development.json:
{
"ConnectionStrings": {
"Default": "Host=localhost;Database=bookshelf;Username=postgres;Password=yourpassword"
},
"Jwt": {
"Secret": "your-secret-key-min-32-chars",
"Issuer": "bookshelf-api",
"Audience": "bookshelf-client",
"AccessTokenExpirationMinutes": 15,
"RefreshTokenExpirationDays": 7
}
}- Apply migrations:
dotnet ef database updateinbackend/Bookshelf.API/ - Run the API:
dotnet run— available athttp://localhost:5152 - Open
frontend/index.htmlin a local server (e.g. Live Server on port 5500)
- GitHub: nnivis