ea70d85f9d528b1bb350ea04e5995e166fd222b5
- Updated COMPLETE_DOCUMENTATION.md feature descriptions - Updated user journey reference from 'ebook library' to 'ebook collection' - Updated all frontend page titles and headers - Updated Bruno API collection and workspace names - All references now consistently use 'Bookmann' as the application name
📚 Bookmann
A self-hosted ebook management system built with Go, PostgreSQL, and Svelte (integrated into a single service) featuring a beautiful Tokyo Night dark theme.
✨ Features
- 🔒 Multi-User Authentication: Complete user system with registration/login, JWT-based sessions, and bcrypt password hashing
- ✅ Server-Side Validation: Comprehensive input validation with detailed error messages
- 🔔 Toast Notifications: Real-time error feedback with beautiful toast popups
- 🌙 Tokyo Night Theme: Stunning dark theme with smooth animations and modern UI
- 📖 Reading Progress: User-specific reading progress tracking
- 🔧 RESTful API: Clean API endpoints with JWT authentication
- 🐳 Docker Ready: Single-container deployment with PostgreSQL
- 🧪 API Testing: Complete Bruno collection for testing all endpoints
- 📱 Responsive Design: Mobile-first responsive interface
Quick Start
Prerequisites
- Docker and Docker Compose
Running the Application
- Clone the repository
- Run the application:
docker-compose up --build
- Access the application at http://localhost:8765
Database
PostgreSQL runs on port 5432 with default credentials:
- Database: ebookdb
- User: postgres
- Password: password
Development
Backend
cd backend
go mod tidy
go run github.com/sqlc-dev/sqlc/cmd/sqlc@latest generate
go run cmd/server/main.go
Frontend
For development, run the frontend separately:
cd frontend
npm install
npm run dev
✨ Enhanced Features:
- Authentication: Login/Register forms with Tokyo Night styling at
/loginand/register - JWT Management: Secure token storage with localStorage and session persistence
- Protected Routes: Automatic redirects with reactive auth state management
- Toast Notifications: Real-time error feedback for all API operations
- Input Validation: Client-side and server-side validation with detailed error messages
- Tokyo Night Theme: Beautiful dark theme with smooth animations and modern UI components
- Responsive Design: Mobile-first approach with optimized layouts for all screen sizes
Note: For production, the frontend is built to static files and served by the Go backend.
API Endpoints
Auth (Public)
POST /api/auth/register- Register new userPOST /api/auth/login- Login user (email or username)GET /api/auth/profile- Get user profile (requires JWT)
Ebooks (Protected)
GET /api/ebooks- List ebooksGET /api/ebooks/:id- Get specific ebookPOST /api/ebooks- Create new ebookPUT /api/ebooks/:id- Update ebookDELETE /api/ebooks/:id- Delete ebook
Reading Progress (Protected)
GET /api/ebooks/:id/progress- Get reading progressPUT /api/ebooks/:id/progress- Update reading progress
API Testing
Use the included Bruno collection in the bruno/ directory for testing the API:
- Install Bruno
- Import the
bruno/folder as a collection - Select the "localhost" environment
- Run the application and test the endpoints
Project Structure
.
├── backend/
│ ├── cmd/server/ # Application entry point
│ ├── internal/
│ │ ├── config/ # Configuration management
│ │ ├── database/ # Database connection and queries
│ │ └── handlers/ # HTTP handlers (auth + ebooks)
│ ├── migrations/ # Database migrations
│ └── sqlc.yaml # sqlc configuration
├── frontend/
│ ├── src/
│ │ ├── lib/
│ │ │ ├── api.ts # API client with auth & toast notifications
│ │ │ ├── auth.ts # Auth state management
│ │ │ └── toast.ts # Toast notification utilities
│ │ └── routes/
│ │ ├── login/ # Login page (Tokyo Night theme)
│ │ ├── register/ # Registration page (Tokyo Night theme)
│ │ └── ... # Other routes (Tokyo Night theme)
│ ├── app.css # Global styles with Tokyo Night theme
│ └── package.json # Build dependencies with toast library
├── bruno/ # Bruno API testing collection
├── docker-compose.yml
└── README.md
🎨 Recent Enhancements
Backend Improvements
- Server-Side Validation: Added comprehensive input validation using
go-playground/validator/v10 - Enhanced Security: All API endpoints now validate requests before processing
- Better Error Handling: Detailed validation error messages for improved debugging
Frontend Redesign
- Tokyo Night Theme: Complete UI overhaul with beautiful dark theme colors
- Toast Notifications: Real-time error feedback using
@zerodevx/svelte-toast - Modern UI Components: Card-based layouts, smooth animations, and responsive design
- Enhanced UX: Loading states, form validation, and improved user feedback
Technical Updates
- Dependencies: Added validation and toast libraries
- Typography: Inter font family for improved readability
- Animations: Custom fade-in and slide-in animations
- Performance: Optimized CSS compilation and build process
License
MIT