A full-stack web application for searching and managing technical books using Google Books API.
┌─────────────────────────────────────────────────────────────────┐
│ Client Browser │
│ React SPA (Vite + TypeScript) │
└──────────────────────────┬──────────────────────────────────────┘
│ HTTP/REST
│
┌──────────────────────────▼──────────────────────────────────────┐
│ Backend API (Go) │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Handler Layer (HTTP Controllers) │ │
│ │ - SearchBooksHandler │ │
│ │ - TsundokuHandler │ │
│ │ - FavoritesHandler │ │
│ └────────────────┬─────────────────────────────────────────┘ │
│ │ │
│ ┌────────────────▼─────────────────────────────────────────┐ │
│ │ Service Layer (Business Logic) │ │
│ │ - books.Service │ │
│ │ - tsundoku.Service │ │
│ │ - favorites.Service │ │
│ └───┬──────────────────────────────────────────┬───────────┘ │
│ │ │ │
│ ┌───▼─────────────────────┐ ┌────────────▼───────────┐ │
│ │ Infrastructure Layer │ │ Repository Interface │ │
│ │ - GoogleBooks Client │ │ - Favorites Repo │ │
│ │ (External API) │ │ - Tsundoku Repo │ │
│ └───┬─────────────────────┘ └────────────┬───────────┘ │
└──────┼──────────────────────────────────────────┼──────────────┘
│ │
│ │
┌──────▼──────────────────────┐ ┌────────────▼───────────┐
│ Google Books API v1 │ │ File Storage (JSON) │
│ (External Service) │ │ - favorites.json │
└─────────────────────────────┘ │ - tsundoku.json │
└────────────────────────┘
- Search technical books via Google Books API
- Technology tag filtering
- Pagination support
- Real-time search results
- Add/remove favorite books
- Persistent storage
- Dedicated favorites view
- Track reading progress with three statuses: Stacked, Currently Reading, Completed
- Add books to reading list
- Update reading status
GET /api/technical-books- Search books with query parametersq: search keywordsgenre: additional search termsstartIndex: pagination start (default: 0)maxResults: results per page (1-40, default: 20)orderBy: sort order (relevance/newest)lang: language filter (ja/en)
GET /api/tsundoku- Get all reading list itemsPOST /api/tsundoku- Add book to reading listPUT /api/tsundoku/:id/status- Update book statusDELETE /api/tsundoku/:id- Remove from reading list
GET /api/favorites- Get all favoritesPOST /api/favorites- Add to favoritesDELETE /api/favorites/:id- Remove from favorites
- Language: Go 1.25.3
- Router: chi v5.2.3
- External API: Google Books API v1
- Storage: File-based JSON
- Architecture: Clean architecture with service layer pattern
- Framework: React 19.1.1 with TypeScript
- Build Tool: Vite 7.1.7
- State Management: React Hooks
- HTTP Client: Fetch API
┌────────────────┐
│ User Action │
└───────┬────────┘
│
▼
┌───────────────────────────────────┐
│ React Component (SearchPage) │
│ - Calls custom hook │
└───────┬───────────────────────────┘
│
▼
┌───────────────────────────────────┐
│ Custom Hook (useBooksSearch) │
│ - Manages state │
│ - Calls API client │
└───────┬───────────────────────────┘
│
▼
┌───────────────────────────────────┐
│ API Client (api.ts) │
│ - Constructs HTTP request │
└───────┬───────────────────────────┘
│ HTTP/REST
▼
┌───────────────────────────────────┐
│ Backend Handler │
│ - Validates request │
│ - Calls service layer │
└───────┬───────────────────────────┘
│
▼
┌───────────────────────────────────┐
│ Service Layer │
│ - Business logic │
│ - Calls repository/client │
└───────┬───────────┬───────────────┘
│ │
▼ ▼
┌─────────────┐ ┌──────────────────┐
│ Google │ │ File Repository │
│ Books API │ │ (JSON Storage) │
└─────────────┘ └──────────────────┘
- Base URL:
https://www.googleapis.com/books/v1/volumes - Authentication: API Key (optional, passed via query parameter)
- Request Method: GET
- Response Format: JSON
infra/googlebooks/client.go implements:
- HTTP client configuration
- Request construction with query parameters
- Response parsing and error handling
- Rate limiting considerations
src/api.ts implements:
- Typed API functions with TypeScript
- Error handling with custom ApiError class
- Response parsing utilities
- Base URL configuration (localhost:8080)
back/
├── cmd/api/main.go # Entry point, dependency injection
├── internal/
│ ├── handler/ # HTTP handlers
│ ├── service/ # Business logic
│ └── infra/ # External integrations
│ ├── googlebooks/ # Google Books API client
│ └── {favorites,tsundoku}/filestore/ # JSON storage
└── data/ # Data files
front/
├── src/
│ ├── components/ # UI components
│ ├── hooks/ # Custom React hooks
│ ├── pages/ # Page components
│ └── api.ts # API client
- Go 1.25.3 or higher
- Node.js 18.x or higher
cd back
go mod tidy
# Optional: Set environment variables
# export BOOKS_API_KEY="your-api-key"
go run cmd/api/main.goBackend runs on http://localhost:8080
cd front
npm install
npm run devFrontend runs on http://localhost:5173
| Variable | Description | Default |
|---|---|---|
BOOKS_BASE_URL |
Google Books API URL | https://www.googleapis.com/books/v1/volumes |
BOOKS_API_KEY |
API key (optional) | - |
STORAGE_BACKEND |
Storage type | file |
TSUNDOKU_STORE_PATH |
Tsundoku data path | data/tsundoku.json |
FAVORITES_STORE_PATH |
Favorites data path | data/favorites.json |
- Enter keywords or select technology tags
- Browse paginated results
- Click star icon on book cards to add/remove favorites
- View all favorites in dedicated page
- Add books to reading list
- Pick from top to start reading
- Update status: Stacked, Currently Reading, Completed
cd back
go build -o server cmd/api/main.go
./servercd front
npm run buildOutput in front/dist/
Clean Architecture with clear separation:
- Handler Layer: HTTP request/response handling
- Service Layer: Business logic
- Infrastructure Layer: External API and file storage
- Repository Pattern: Data access abstraction
Dependency Injection in back/cmd/api/main.go:
- Services depend on repository interfaces
- Infrastructure implementations injected at startup
Organized reading list management with three status categories for tracking your reading progress.
Made with ❤️ and ☕ by Kevin Ryou Inoue