Skip to content

to-do list feature implemented#177

Merged
Annanyatiwary4 merged 1 commit intoDevSyncx:mainfrom
prayagupa23:main
Oct 13, 2025
Merged

to-do list feature implemented#177
Annanyatiwary4 merged 1 commit intoDevSyncx:mainfrom
prayagupa23:main

Conversation

@prayagupa23
Copy link
Copy Markdown
Contributor

🚀 Pull Request Checklist
[x] ✅ My issue is assigned to me, and I have not taken up another task simultaneously.
[x] 🔁 I have pulled the latest changes from the main branch.
[x] 🧪 My code is tested and does not break existing functionality.
[ ] 📚 I have added/updated documentation wherever necessary.
[x] 🧹 My code follows the project’s coding standards.
[x] ✍️ My commits are clear and meaningful.
[x] 🧾 I have linked the issue this PR addresses with Closes #55.


📌 Related Issue


🧠 Description
This PR implements a personal To‑Do List feature with full frontend and backend integration.

  • Frontend (Standalone To‑Do page)

    • Add Task modal with Title, Description, Status, Deadline.
    • Pending and Completed task sections.
    • Filters: All, Upcoming deadlines, Completed.
    • Quick Tips panel, Goals progress, and Weekly Goals widget.
    • Back button to return to the main Dashboard.
    • Dark mode readability improvements (e.g., heading contrast).
    • Full API wiring: fetch, create, edit, complete toggle, delete.
  • Backend

    • Task model with fields: title, description, status (pending/completed), deadline, userId (+ timestamps).
    • Secure, user-scoped CRUD:
      • POST /api/tasks — create task (user derived from JWT).
      • GET /api/tasks — list tasks for authenticated user.
      • PUT /api/tasks/:id — update task (owner only).
      • DELETE /api/tasks/:id — delete task (owner only).
      • Ownership enforced; server ignores any client-provided userId.

✅ Type of Change
[ ] 🐞 Bug fix
[x] 💡 Feature
[ ] 🧹 Code cleanup/refactor
[ ] 🧪 Test cases
[ ] 📚 Docs update


🧪 How I Tested

  • Logged in to obtain localStorage.token.
  • Navigated to /todo and verified:
  • Create via modal (with/without deadline).
  • Edit task via modal; changes persist after refresh.
  • Toggle complete; status updates correctly.
  • Delete task; item removed and persists after refresh.
  • API verified with headers x-auth-token: :
  • POST /api/tasks, GET /api/tasks, PUT /api/tasks/:id, DELETE /api/tasks/:id.

Environment:

  • Frontend: VITE_API_URL set to backend URL.
  • Backend: MONGO_URI, JWT_SECRET, CLIENT_URL, PORT.
    • 🔐 Security/Ownership
    • All endpoints require a valid JWT.
    • userId is attached on the server from the token; client userId is ignored.
    • Update/Delete restricted to the task owner.

📚 Notes for Reviewers

  • UI uses existing design tokens: var(--card), var(--primary), var(--border) for consistent theming (light/dark).
  • No breaking changes; new routes mounted at /api/tasks.
    @Annanyatiwary4

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 13, 2025

@prayagupa23 is attempting to deploy a commit to the Annanya's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

🙌 Thanks @prayagupa23 for raising this PR!
Our team will review it soon ⏳ — meanwhile, please make sure your PR follows our contributing guidelines 👉 Contributing Guidelines 🎉

@Annanyatiwary4 Annanyatiwary4 merged commit 560e527 into DevSyncx:main Oct 13, 2025
1 of 2 checks passed
@github-actions
Copy link
Copy Markdown

🎉🎉 Thank you for your contribution! Your PR #177 has been merged! 🎉🎉

@Annanyatiwary4 Annanyatiwary4 added gssoc25 Only for Gssoc 25 contributors Level 3 Frontend Features backend hacktoberfest-accepted only for hacktoberfest 2025 candidate labels Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Features Frontend gssoc25 Only for Gssoc 25 contributors hacktoberfest-accepted only for hacktoberfest 2025 candidate Level 3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement To-Do List

2 participants