Add SQLite persistence with Python server#2
Merged
Conversation
- Flask server serves index.html and /api/board endpoints - SQLite stores full board state (people, tasks, config) - Frontend loads on startup and auto-saves after edits - Seed data populated on first run Co-authored-by: Sanket Sharma <sharma.sanket272@gmail.com>
5fa6f84 to
864a5c7
Compare
Fix .gitignore so /data/ only ignores the SQLite directory at repo root, not src/data/. The missing modules caused module resolution failures in CI. Co-authored-by: Sanket Sharma <sharma.sanket272@gmail.com>
|
The persistence change left DATA empty when /api/board was unavailable (GitHub Pages, static serve). Re-add the original sample projects as a local fallback and only enable auto-save when the server responds. Co-authored-by: Sanket Sharma <sharma.sanket272@gmail.com>
The persistence refactor replaced inline sample data with an async load that could render an empty board and blocked startup with top-level await. - Restore constants.js and main.js data/init from main - Add board-sync.js for background load/save only - Keep sync renderAll() + window globals like main - Reseed SQLite when stored board is empty Co-authored-by: Sanket Sharma <sharma.sanket272@gmail.com>
Co-authored-by: Sanket Sharma <sharma.sanket272@gmail.com>
Co-authored-by: Sanket Sharma <sharma.sanket272@gmail.com>
seed_data.make() was calling make(**child) on already-built nodes, which corrupted the task tree (no due dates, no subtasks, zero gantt bars). Also validate server board quality before replacing inline sample data. Co-authored-by: Sanket Sharma <sharma.sanket272@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds server-side persistence so task board data survives page refreshes and is shared across all users hitting the same server. Rebased onto latest
main(ES module refactor).data/taskboard.dbGET/PUT /api/boardfor full board load/savesrc/lib/persistence.js+src/data/board-store.js) loads board on startup, debounced auto-save after editsArchitecture
Manual deploy steps (on your server)
pip install -r requirements.txtpython server.py --host 0.0.0.0 --port 8090(replace your current Python module)data/directory is writabledata/taskboard.dbregularlyNotes
data/taskboard.dbto reset to seed data