Book Library App

A personal book library management application built with Val Town.

Features

  • šŸ“š Add, edit, and delete books from your personal library
  • šŸ” Search books by title, author, or genre
  • šŸ“– Track reading status (Want to Read, Currently Reading, Read)
  • ⭐ Rate books and add personal notes
  • šŸ“± Responsive web interface

Project Structure

ā”œā”€ā”€ backend/
│   ā”œā”€ā”€ database/
│   │   ā”œā”€ā”€ migrations.ts    # Database schema setup
│   │   └── queries.ts       # Database query functions
│   ā”œā”€ā”€ routes/
│   │   └── books.ts         # Book CRUD API routes
│   └── index.ts             # Main Hono server
ā”œā”€ā”€ frontend/
│   ā”œā”€ā”€ components/
│   │   ā”œā”€ā”€ App.tsx          # Main React application
│   │   ā”œā”€ā”€ BookCard.tsx     # Individual book display
│   │   ā”œā”€ā”€ BookForm.tsx     # Add/edit book form
│   │   └── SearchBar.tsx    # Search and filter component
│   ā”œā”€ā”€ index.html           # Main HTML template
│   ā”œā”€ā”€ index.tsx            # Frontend entry point
│   └── style.css            # Custom styles
└── shared/
    └── types.ts             # Shared TypeScript types

Getting Started

  1. The app will automatically set up the database on first run
  2. Navigate to the app URL to start managing your book library
  3. Use the "Add Book" button to add your first book

API Endpoints

  • GET /api/books - Get all books with optional search/filter
  • POST /api/books - Add a new book
  • PUT /api/books/:id - Update an existing book
  • DELETE /api/books/:id - Delete a book

Tech Stack

  • Backend: Hono.js with SQLite database
  • Frontend: React with TypeScript
  • Styling: TailwindCSS
  • Platform: Val Town