Skip to content

Latest commit

 

History

291 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Books App

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

Installation

Backend Setup

  1. Navigate to the backend directory:
cd books-backend
  1. Install dependencies using uv:
uv sync

Or using pip:

pip install -e .
  1. Set up the database:
# Initialize Alembic migrations (if needed)
uv run alembic upgrade head
  1. Run the development server:
uv run fastapi dev main.py

The API will be available at http://localhost:8000

Frontend Setup

  1. Navigate to the frontend directory:
cd books-frontend
  1. Install dependencies:
npm install
  1. Run the development server:
npm run dev

The frontend will be available at http://localhost:5173

Running with Docker

Build and run the backend container:

cd books-backend
docker build -t books-backend .
docker run -p 80:80 books-backend

API Documentation

Once the backend is running, visit http://localhost:8000/docs for interactive API documentation (Swagger UI).

Development

Git Hooks

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 .githooks

Backend Development

Type checking, linting, tests:

cd books-backend
uv run ty check    # type checking
uv run ruff check  # linting
uv run pytest      # run the tests

Frontend Development

Build for production (includes type checking):

cd books-frontend
npm run build

Environment Variables

Backend (.env)

DATABASE_URL=sqlite:///./books.db
APP_NAME=Books API
DEBUG=False
ALLOWED_ORIGINS=http://localhost:5173

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages