| name | code-review |
| description | Review code changes for consistency with project patterns and conventions |
Review all unstaged changes (git diff) against the project's established patterns. Check each of the following areas and report findings as a numbered list with PASS/WARN/FAIL per item.
Backend (Python/FastAPI) Checks
- Naming conventions: Functions use camelCase, classes and DB table names use PascalCase. Variables use camelCase.
- Response wrapper: All endpoint response functions return via
Response(status, message, data) from helpers.server. No raw dict returns.
- Authentication: Every non-public endpoint has
ForceAuthentication(token) or ForceAuthentication(token, "admin"). The only public endpoint is /api/app/config.
- Session management: Database access uses
with Session() as session: context manager. No session.close() inside with blocks. ORM objects are not accessed after the session scope ends.
- Pydantic models: POST endpoints with JSON bodies have a corresponding model in
endpoints/models/. Model fields use camelCase matching the frontend's expectations.
- Settings access: Settings are accessed via
settings_handler.getSetting("category.settingName"). New settings are defined in settings_schema.py.
- Docstrings: New functions have docstrings with purpose, parameters, and return description.
Frontend (Vue 2/Vuetify) Checks
- Vue 2 Options API: Components use
data(), methods, computed, watch, mounted etc. No Composition API (setup(), ref(), reactive()). No Vue 3 syntax.
- Vuetify 2 components: UI uses Vuetify 2 components (
v-data-table, v-btn, v-card, etc.). No raw HTML elements where Vuetify components exist. No Vuetify 3 syntax.
- Date handling: All date formatting uses Day.js via
helpers/time.js (DisplayTime, TimestampToLocalTimeZone). No raw new Date() or moment.
- API URLs: All endpoint URLs come from
AppUrls.js. No hardcoded API paths in components.
- State management: Shared state goes through Vuex store (
src/store/store.js). No component-to-component direct data passing for global state.
- ESLint: Run
cd webapp/frontend && npm run lint and report any errors.
General Checks
- No hardcoded values: Ports, IPs, and environment-specific values come from settings, not hardcoded.
- Existing patterns respected: New code follows the same structure and conventions as adjacent existing code in the same file/directory.
Present results as a checklist. For any WARN or FAIL items, show the specific file and line with a brief explanation of what needs to change.