These MUST be resolved before this PR can be merged.
[File: backend/apps/books/views.py | Line ~67]permission_classes - IsEBookOwner incorrectly extends AllowAny instead of BasePermission. This completely bypasses the has_object_permission check since AllowAny permits all access by default. Must extend BasePermission or IsAuthenticated.
[File: backend/apps/books/models.py]missing migrations - New models EBook, ReadingProgress, and ReadingSettings have been added, but no Django migrations are included in the PR. Per AC: "Migrations missing or not included when models change." Run python manage.py makemigrations and include the generated migration files.
🟡 Suggestions (Non-Blocking)
These are recommendations for improvement. Not required for merge.
[File: frontend/src/App.tsx] Inline styles in LoadingFallback component. Consider extracting to CSS module or styled-components for maintainability.
[File: frontend/src/pages/AddBook.tsx] Extensive inline styles throughout the component. For a production app, CSS modules or a styling solution like styled-components would be preferable.
[File: frontend/src/pages/AuthPage.tsx] Inline styles and from "react-router-dom"; import without type annotation. Consider consistent styling approach.
Architectural Delineation - Repository now has single backend/ and frontend/ structure
Backend Consolidation - api/ removed, functionality merged into backend/
Frontend Consolidation - web/ removed, functionality merged into frontend/
Dependency Resolution - requirements.txt updated with Pillow, docker-compose updated
Build & Deployment Alignment - docker-compose.yml uses only backend/frontend services
Updated Documentation - README.md updated with new architecture
No Residual Files - api/ and web/ directories fully removed
## Reid's Review — PR #11
**Verdict:** 🔴 Changes Required
---
### 🔴 Blocking Issues
> These MUST be resolved before this PR can be merged.
- **[File: backend/apps/books/views.py | Line ~67]** `permission_classes` - `IsEBookOwner` incorrectly extends `AllowAny` instead of `BasePermission`. This completely bypasses the `has_object_permission` check since `AllowAny` permits all access by default. Must extend `BasePermission` or `IsAuthenticated`.
- **[File: backend/apps/books/models.py]** `missing migrations` - New models `EBook`, `ReadingProgress`, and `ReadingSettings` have been added, but no Django migrations are included in the PR. Per AC: "Migrations missing or not included when models change." Run `python manage.py makemigrations` and include the generated migration files.
---
### 🟡 Suggestions (Non-Blocking)
> These are recommendations for improvement. Not required for merge.
- **[File: frontend/src/App.tsx]** Inline styles in `LoadingFallback` component. Consider extracting to CSS module or styled-components for maintainability.
- **[File: frontend/src/pages/AddBook.tsx]** Extensive inline styles throughout the component. For a production app, CSS modules or a styling solution like styled-components would be preferable.
- **[File: frontend/src/pages/AuthPage.tsx]** Inline styles and `from "react-router-dom";` import without type annotation. Consider consistent styling approach.
---
### 📋 AC Coverage
> Based on linked issue #10
- [x] Architectural Delineation - Repository now has single `backend/` and `frontend/` structure
- [x] Backend Consolidation - `api/` removed, functionality merged into `backend/`
- [x] Frontend Consolidation - `web/` removed, functionality merged into `frontend/`
- [x] Dependency Resolution - requirements.txt updated with Pillow, docker-compose updated
- [x] Build & Deployment Alignment - docker-compose.yml uses only backend/frontend services
- [x] Updated Documentation - README.md updated with new architecture
- [x] No Residual Files - `api/` and `web/` directories fully removed
IsEBookOwner extends AllowAny → Changed to permissions.BasePermission in backend/apps/books/views.py. Also added permissions to the from rest_framework import ... line.
Missing migrations → Ran python manage.py makemigrations books. New 0001_initial.py included that covers Book, EBook, ReadingProgress, and ReadingSettings models.
🟡 Suggestions — Noted
Inline styles — The existing frontend/ codebase uses inline styles throughout (Layout, Bookmarks, Annotations). The new pages follow the same convention for consistency. A future refactor can migrate to CSS modules across the board.
📋 AC Coverage — All 7 checked ✅
Commit updated: 5ffa6e9
Branch force-pushed to feature/refactor-consolidate-duplicates.
## Addressed Reid's Review ✅
### 🔴 Blocking — Fixed
- **IsEBookOwner extends AllowAny** → Changed to `permissions.BasePermission` in `backend/apps/books/views.py`. Also added `permissions` to the `from rest_framework import ...` line.
- **Missing migrations** → Ran `python manage.py makemigrations books`. New `0001_initial.py` included that covers Book, EBook, ReadingProgress, and ReadingSettings models.
### 🟡 Suggestions — Noted
- **Inline styles** — The existing `frontend/` codebase uses inline styles throughout (Layout, Bookmarks, Annotations). The new pages follow the same convention for consistency. A future refactor can migrate to CSS modules across the board.
### 📋 AC Coverage — All 7 checked ✅
Commit updated: `5ffa6e9`
Branch force-pushed to `feature/refactor-consolidate-duplicates`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Consolidated duplicate backend (
api/vsbackend/) and frontend (web/vsfrontend/) implementations into a single canonical structure.Changes
api/web/backend/Dockerfileandfrontend/Dockerfiledocker-compose.ymlto use backend/frontend services onlypackage.jsonworkspacesapi/andweb/directories entirelyFiles Changed: 55 files
Closes #10
Reid's Review — PR #11
Verdict: 🔴 Changes Required
🔴 Blocking Issues
[File: backend/apps/books/views.py | Line ~67]
permission_classes-IsEBookOwnerincorrectly extendsAllowAnyinstead ofBasePermission. This completely bypasses thehas_object_permissioncheck sinceAllowAnypermits all access by default. Must extendBasePermissionorIsAuthenticated.[File: backend/apps/books/models.py]
missing migrations- New modelsEBook,ReadingProgress, andReadingSettingshave been added, but no Django migrations are included in the PR. Per AC: "Migrations missing or not included when models change." Runpython manage.py makemigrationsand include the generated migration files.🟡 Suggestions (Non-Blocking)
[File: frontend/src/App.tsx] Inline styles in
LoadingFallbackcomponent. Consider extracting to CSS module or styled-components for maintainability.[File: frontend/src/pages/AddBook.tsx] Extensive inline styles throughout the component. For a production app, CSS modules or a styling solution like styled-components would be preferable.
[File: frontend/src/pages/AuthPage.tsx] Inline styles and
from "react-router-dom";import without type annotation. Consider consistent styling approach.📋 AC Coverage
backend/andfrontend/structureapi/removed, functionality merged intobackend/web/removed, functionality merged intofrontend/api/andweb/directories fully removed45d16d00edto5ffa6e914eAddressed Reid's Review ✅
🔴 Blocking — Fixed
permissions.BasePermissioninbackend/apps/books/views.py. Also addedpermissionsto thefrom rest_framework import ...line.python manage.py makemigrations books. New0001_initial.pyincluded that covers Book, EBook, ReadingProgress, and ReadingSettings models.🟡 Suggestions — Noted
frontend/codebase uses inline styles throughout (Layout, Bookmarks, Annotations). The new pages follow the same convention for consistency. A future refactor can migrate to CSS modules across the board.📋 AC Coverage — All 7 checked ✅
Commit updated:
5ffa6e9Branch force-pushed to
feature/refactor-consolidate-duplicates.Reid's Review — PR #11 (Verification)
Verdict: ✅ Approved & Merged
Blocking Issues
IsEBookOwnernow correctly extendspermissions.BasePermissioninstead ofAllowAny. Thehas_object_permissionmethod properly checksobj.user == request.user.AC Coverage (All 7 items verified)
backend/andfrontend/structureapi/removed, functionality merged intobackend/web/removed, functionality merged intofrontend/api/andweb/directories fully removedMerged successfully.