3.4 KiB
3.4 KiB
Dashy Project Refactor: Progress Report
Objective: Transition Dashy from a browser-based SQLite (local storage) application to a Client-Server architecture using a Python FastAPI backend with a persistent database.
✅ Completed Tasks
1. Backend Infrastructure Setup
- Created
backend/directory structure. - Configured
requirements.txtwith essential libraries (fastapi,sqlalchemy,pydantic,jose, etc.). - Fix: Pinned
bcrypt==4.0.1to resolve compatibility issues withpasslib.
2. Database Modeling
- Schema Design: Translated the original
db.jsschema into SQLAlchemy models inmodels.py. - Relationships: Established Many-to-Many relationships for Task Tags and One-to-Many for User Tasks and Notes.
- Audit Logging: Implemented a robust Audit Log system to track all user actions.
3. API Development
- Main App (
main.py): Set up FastAPI with CORS middleware enabled for frontend communication. - Authentication: Built JWT-based login flow in
auth.py. - Endpoints: Created initial endpoints for:
- User retrieval
- Task CRUD (Create, Read, Update)
- Audit log retrieval/creation
4. Data Migration & Environment Handling
- Seeding: Created
seed.pyto migrate initial prototype data into the new database. - CIFS/NAS Fix:
- Implemented
DASHY_DB_PATHenvironment variable support to allow the database file to reside on a local disk while code stays on the NAS. - Added a 30-second connection timeout to mitigate network latency.
- Implemented
🚧 Current Status
- Backend: Feature-complete for the first phase.
- Database: Schema is stabilized, seeding logic is verified, and database is active.
- Frontend: Integrated with FastAPI backend via
api.js. Legacy WASM SQLite files archived.
⏭️ Upcoming Steps
Phase 2: Frontend Refactor & Workflow Polish (✅ Completed)
- API Service: Created
api.jsto dynamically connect to the backend (resolved connection refused issues by using dynamic hostnames) and handle all network requests. - Authentication Hook: Updated the Login screen to use real JWT tokens.
- Component Updates:
- Swapped
DashyDBcalls forasyncAPI calls inapp.jsx. - Fixed UI state refresh issues by silently loading subsequent data updates.
- Swapped
- Task Workflows:
- Completion: Added a "Mark as completed" button in
TaskDetailthat changes task status toclosed, records it in the Audit Log, and removes the task from the main Overview board. - Reopening: Added a "Reopen task" button to restore accidentally closed tasks back to the queue.
- User Views: Updated
UserScreento accurately display open task counts and render a dedicated, faded "Completed" section at the bottom for closed tasks. - Audit Rendering: Fixed crash in
TaskDetailby passing global API audit logs and filtering them locally for individual tasks.
- Completion: Added a "Mark as completed" button in
- Cleanup: Archived
db.js,data.jsxtoDashy-v1/scraps/and removedsql.jsWASM dependency fromDashy.html.
Phase 3: Advanced Features
- Real-time Notifications: Explore WebSockets for task assignments.
- iMessage Integration: Develop the "Molty" bridge for phone-to-task creation.
- File Uploads: Support for attaching photos/documents to tasks.
Last Updated: Monday, May 11, 2026 Status: Phase 2 Complete / Ready for Phase 3