booktracker#
A multi platform application and server to track your book reading journey, built with Tauri, Nuxt, and NestJS.
Project Structure#
This is a pnpm monorepo containing:
apps/frontend- Tauri + Nuxt applicationapps/backend- NestJS API with Drizzle ORM and PostgreSQL
Quick Start#
Prerequisites#
Installation#
# Install dependencies
pnpm install
# Set up database
docker compose up -d postgres
# Configure backend
cp apps/backend/env.example apps/backend/.env
# Edit apps/backend/.env with your database credentials
# Run migrations
pnpm db:migrate
Development#
# Run everything
pnpm dev
# Or individually
pnpm dev:frontend # Tauri app
pnpm dev:backend # NestJS API
pnpm db:studio # Database GUI
Mobile Setup#
Building booktracker for Android.
Prerequesites#
cd apps/frontend
# First time: initialize Android project
pnpm tauri android init
Physical Device Testing#
- Enable Developer Mode: Settings → About phone → Tap "Build number" 7 times
- Enable USB debugging: Settings → System → Developer options → USB debugging
- Connect via USB and verify:
adb devices - Run:
cd apps/frontend && pnpm tauri android dev
Building#
# Local debug build (unsigned)
cd apps/frontend
pnpm tauri android build --debug
Nix Flake#
This project includes a Nix flake for a reproducible development environment.
To enter the Nix shell:
nix develop
This will drop you in a Bash shell with Node, Pnpm, Rust & Tauri.
You can also use direnv to automatically enter the Nix shell when you cd into the project. (More info: https://direnv.net/)
Building#
# Frontend (Tauri app for current platform)
pnpm build:frontend
# Backend
pnpm build:backend
# Backend Docker image
docker build -t booktracker-backend ./apps/backend
Testing#
pnpm test:rust # Frontend Rust tests
pnpm test:backend # Backend unit tests
pnpm test:backend:e2e # Backend e2e tests
Database#
Uses Drizzle ORM with PostgreSQL. Schema: apps/backend/src/db/schema.ts
pnpm db:generate # Generate migration
pnpm db:migrate # Run migrations
pnpm db:studio # Open database GUI
Docker#
# Local development
docker compose up -d
docker compose logs -f
docker compose down
# Build backend image (from repo root)
docker build -f apps/backend/Dockerfile -t booktracker-backend .
# Run backend container
docker run -p 3001:3001 -e DATABASE_URL="postgresql://..." booktracker-backend
License#
Contributors#
Thanks goes to these wonderful people (emoji key):
Sebastian Di Luzio 💻 📖 🔧 🚧 |
Tibor Pilz 💻 📖 🔧 |
This project follows the all-contributors specification. Contributions of any kind welcome!