Feat/issue 1179 roadmap progress - #1199
Merged
komalharshita merged 7 commits intoJul 19, 2026
Merged
Conversation
added 5 commits
June 26, 2026 16:52
…y) (komalharshita#1176) - Added Flask-SQLAlchemy to requirements - Created Project db.Model with db.JSON support - Wrote seed_db.py script to migrate JSON to SQLite - Refactored load_all_projects to query SQLite db - Updated test_basic.py to use temporary in-memory sqlite db
…1178) - Created secure /admin routes protected by is_admin check - Added is_admin column to User database model - Built dashboard.html with paginated project listings - Built form.html for creating and updating projects natively into SQLite backend - Restructured index.html navigation dynamically for admins - Added test_admin_forbidden_for_anonymous, test_admin_forbidden_for_normal_user, and test_admin_crud
- Added ProjectProgress SQLAlchemy model to track roadmap state - Created GET and POST /api/project/<id>/progress routes - Injected USER_LOGGED_IN boolean into project.html payload - Refactored script.js roadmap checkboxes to use hybrid Fetch API and localStorage logic - Added unauthenticated endpoint tests to test_basic.py
|
Someone is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel. A member of the Team first needs to authorize it. |
komalharshita
requested changes
Jul 18, 2026
komalharshita
left a comment
Owner
There was a problem hiding this comment.
Thanks for the contribution! The roadmap progress persistence feature is valuable, but I have a few requests before this PR can be merged.
- Please resolve the current merge conflicts with the latest
mainbranch. - The PR currently includes
data/devpath.db. Committed database files generally shouldn't be part of the repository unless absolutely necessary. Please remove it and use migrations/seed data if schema changes are required. - Since this PR touches multiple areas (models, routes, templates, scripts, tests, and admin functionality), please clarify which changes are essential for roadmap progress persistence and which are supporting changes.
- Please include testing evidence for both authenticated users (database persistence) and guest users (localStorage fallback), as well as synchronization behavior after login.
Once these items are addressed, I'd be happy to review it again.
added 2 commits
July 18, 2026 21:02
- Resolved conflicts in models, routes, templates, and scripts - Removed data/devpath.db from git tracking as it shouldn't be version controlled - Synchronized tests to work with both Authlib and updated pytest
Author
|
@komalharshita done mam |
Owner
|
Thank you for your contribution to DevPath and for taking the time to improve our project! Great work, and I'm happy to approve this PR. Keep contributing! 🚀 |
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
This PR resolves #1179 by adding full backend database persistence for the Roadmap Progress checkboxes on the project detail page. Previously, progress was solely stored in
localStorage, meaning users lost their progress when switching between mobile devices and laptops. This PR introduces a hybrid system: logged-in users get persistent cross-device database synchronization, while unregistered visitors seamlessly fall back to usinglocalStorage.Because this feature relies on the
UserandProjectSQLAlchemy models, this branch incorporates the database migration commits from the Admin Dashboard feature (#1178).Related Issue
Closes #1179
Type of Change
data/projects.jsonWhat Was Changed
src/models.pyProjectProgressmodel to linkUsers andProjects and track a JSON array ofcompleted_stepsboolean states. Added the reverseprogressrelationship onUsers.src/routes/main_routes.pyGET /api/project/<id>/progressto retrieve states, andPOST /api/project/<id>/progressto upsert checking states for logged-in users.src/templates/project.htmlUSER_LOGGED_INjavascript boolean.src/static/script.jsupdateRoadmapProgressto use the Fetch API. On page load, the script now asynchronously asks the backend for the roadmap state. Clicking a checkbox silently fires a POST payload to update the database. Falls back tolocalStoragewhenUSER_LOGGED_INis false.tests/test_basic.py401 Unauthorizedresponses for unauthenticated roadmap API usage.How to Test This PR
git checkout feat/issue-1179-roadmap-progresspip install -r requirements.txt.python src/seed_db.pyto seed your local SQLite database.python src/app.py.localStoragefallback persists your checked boxes.Test Results
Self-Review Checklist
feat/,fix/,docs/,data/,style/,test/pytest tests/test_basic.pyand all tests passflake8 .locally and there are no errorsprint()orconsole.log()debug statements