Vue Task Client / API-backed front-end study / 2024
Keeping task views connected through one Pinia store.
This Vue coursework client derives completed and unfinished views from shared task records and refreshes account state before protected navigation.
- ROLE
- Vue client implementation / coursework
- STATE OF THE BUILD
- Study
- RECORD UPDATED
- PUBLIC SOURCE
- View on GitHub
THE WORK
The project.
The Vue Task Client keeps one task collection behind its different views. When an API call creates, edits or completes a task, Pinia applies the returned data to that collection; computed lists decide where the task appears. Axios modules handle the requests, while a separate account store checks the current user during navigation. The client coordinates what the interface shows, leaving authorization of the actual records to the server.
IMPLEMENTATION
Design choices.
- A shared task collection avoids keeping completed and unfinished copies synchronized by hand. Both views derive their contents from each record's completion state.
- Task actions use the API's returned values when updating the store. Request modules and state changes have distinct jobs, keeping endpoint details out of the views.
- Refreshing the user before navigation avoids relying only on an old local login value. It also makes a network failure part of the navigation behavior, so session expiry and failed requests need deliberate testing.
HOW IT FITS TOGETHER
Architecture.
- Axios request modules contain the task and account endpoints, with credentialed requests and CSRF handling configured in the HTTP client. Components can call those operations without rebuilding their request details.
- Pinia actions await task responses and update the shared collection. Completed and unfinished lists filter that collection, so changing is_completed changes the derived view rather than moving copies between independent stores.
- Before navigation, Vue Router refreshes the user through the authentication store and applies the destination's protected or guest rule. A failed user request clears the local user value, which also affects the redirect decision.
- The related Laravel Task API has matching task and completion endpoints. Their interfaces align in source; a configured, running connection between the two hasn't been verified.
MADE WITH
Vue 3 · Pinia · Vue Router · Axios · Vite
ACCESS & INPUT
Security controls.
- Credential and CSRF settings support the account request flow. They don't replace access checks on the API's task operations.
- The router fetches the current user before deciding whether a protected page or guest page should open. This controls navigation, not permission to read or mutate server records.
CHECKS & RESULTS
What was checked.
A source review shows what the code does. It is not a fresh test of the running app.
Code and development records reviewedReviewed
The code, tests and available development records were checked. Reported test results keep their original scope. No fresh app or live deployment check was run for this write-up.
- Scope of this check
- Code review, not a fresh run of the app
NEXT
Still to work through.
This is a frontend integration study. The complete client and server flow, expired sessions and failed mutations still need to be exercised; source-level store and routing behavior doesn't establish that the integration is running.