A full-stack web application for managing your personal book collection and tracking your reading progress.
The application consists of two main components:
- Backend: FastAPI (Python) REST API with SQLite database
- Frontend: Vue.js 3 (TypeScript) single-page application
- Navigate to the backend directory:
cd books-backend- Install dependencies using uv:
uv syncOr using pip:
pip install -e .- Set up the database:
# Initialize Alembic migrations (if needed)
uv run alembic upgrade head- Run the development server:
uv run fastapi dev main.pyThe API will be available at http://localhost:8000
- Navigate to the frontend directory:
cd books-frontend- Install dependencies:
npm install- Run the development server:
npm run devThe frontend will be available at http://localhost:5173
Build and run the backend container:
cd books-backend
docker build -t books-backend .
docker run -p 80:80 books-backendOnce the backend is running, visit http://localhost:8000/docs for interactive API documentation (Swagger UI).
This repo includes a versioned pre-commit hook that runs backend type checking, linting, and tests plus frontend type checking.
To enable it on your machine, point git at the versioned hooks directory (run once per clone):
git config core.hooksPath .githooksType checking, linting, tests:
cd books-backend
uv run ty check # type checking
uv run ruff check # linting
uv run pytest # run the testsBuild for production (includes type checking):
cd books-frontend
npm run buildDATABASE_URL=sqlite:///./books.db
APP_NAME=Books API
DEBUG=False
ALLOWED_ORIGINS=http://localhost:5173