refactor: consolidate backend/frontend, remove api/web duplicates

- backend/ kept as canonical, api/ features merged (EBook, ReadingProgress, ReadingSettings)
- frontend/ kept as canonical, web/ pages merged (Library, Reader, AddBook, Auth, Settings)
- Added Dockerfiles for backend/ and frontend/
- Updated docker-compose.yml for consolidated services
- Updated README, package.json workspaces
- api/ and web/ directories removed
This commit is contained in:
Marko (Hermes Implementer)
2026-05-26 02:58:24 +00:00
parent 3b5b301e42
commit 45d16d00ed
55 changed files with 903 additions and 2454 deletions
+36 -17
View File
@@ -1,38 +1,57 @@
# Cloud Reader
A full-stack cloud-based e-book reader application with cross-device synchronization.
A full-stack e-book reader application with cross-device sync. Upload EPUB/PDF files, track reading progress, bookmark passages, take notes, and customize your reading experience.
## Architecture
- **Backend**: Django 5.x + Django REST Framework
- **Frontend**: React with TypeScript
- **Database**: PostgreSQL
- **Monorepo**: Yarn workspaces
```
cloud-reader/
├── backend/ # Django REST API (canonical backend)
│ ├── config/ # Django project settings
│ ├── apps/
│ │ ├── users/ # User auth (JWT)
│ │ ├── books/ # Books, e-books, reading progress, settings
│ │ └── annotations/ # Bookmarks and notes
│ ├── manage.py
│ └── requirements.txt
├── frontend/ # React + Vite + TypeScript (canonical frontend)
│ ├── src/
│ │ ├── api/ # API client (axios with JWT refresh)
│ │ ├── components/ # Reusable components
│ │ ├── context/ # Auth and annotations context
│ │ ├── hooks/ # Custom hooks
│ │ ├── pages/ # Route pages (Library, Reader, AddBook, Auth, Settings)
│ │ └── types/ # TypeScript type definitions
│ └── package.json
└── docker-compose.yml
```
## Getting Started
## Quick Start
### Prerequisites
- Python 3.12+
- Node.js 20+
- PostgreSQL 15+
### Docker (recommended)
```bash
docker compose up --build
```
- **Frontend:** http://localhost:5173
- **Backend API:** http://localhost:8000/api/
### Backend Setup
### Backend (standalone)
```bash
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver
```
### Frontend Setup
### Frontend (standalone)
```bash
cd frontend
yarn install
yarn dev
```
## Projects
See [Gitea Issues](https://gitea-dev.codescripters.org/crisleo-hermes/cloud-reader/issues) for the full roadmap.
## Migration Notes
Consolidated from duplicate `api/` + `web/` into single `backend/` + `frontend/` canonical structure.
- `backend/` kept as canonical; `api/` features (e-book uploads, reading progress, reading settings) merged in.
- `frontend/` kept as canonical; `web/` pages (Library, Reader, AddBook, Auth, Settings) merged in.
- `api/` and `web/` directories removed.