This project is a starter template for building modern web applications using Vue 3, Vite, TypeScript, and Nuxt UI 3. It is set up for rapid development with a focus on best practices and developer experience.
- Vue 3: Progressive JavaScript framework for building user interfaces.
- Vite: Fast, next-generation frontend tooling.
- TypeScript: Type-safe development.
- Nuxt UI 3: Beautiful, customizable UI components.
- ESLint & Prettier: Code quality and formatting.
- Tailwind CSS: Utility-first CSS framework (with Prettier plugin).
- Auto Imports: Common composables and utilities are auto-imported for convenience.
flowchart TD
A[User Opens App] --> B[App.vue]
B --> C[TaskTable.vue - Show Task List]
B --> D[ThemeToggle.vue - Toggle Dark Mode]
C --> E[Actions Dropdown]
E -->|View| F[TaskModal.vue - VIEW_TASK]
E -->|Edit| G[TaskModal.vue - EDIT_TASK]
E -->|Delete| H[TaskModal.vue - DELETE_TASK]
E -->|Add Subtask| I[TaskModal.vue - ADD_SUBTASK]
B --> J[Add Task Button]
J --> K[TaskModal.vue - ADD_TASK]
F --> L[TaskDetail.vue]
G --> M[TaskForm.vue]
K --> M
I --> M
H --> N[TaskDelete.vue]
M --> O[taskStore.ts - Add/Edit/Delete Task/Subtask]
N --> O
O --> C
O --> P[LocalStorage]
C --> Q[Progress/Status Updates]
This section describes the user flow and component interactions within the ToDoApp, as illustrated in the application flow diagram.
-
Initialization:
- When a user opens the application, the main
App.vue
component is loaded. App.vue
renders the primary user interface, including theTaskTable.vue
component (which displays the list of tasks) and theThemeToggle.vue
component (allowing the user to switch between light and dark modes).
- When a user opens the application, the main
-
Adding a New Task:
- The user clicks the "Add Task" button.
- This action triggers the display of
TaskModal.vue
configured for adding a task. - Inside the modal, the
TaskForm.vue
is presented for the user to input task details. - Upon submission, the
TaskForm.vue
sends the data totaskStore.ts
. taskStore.ts
processes the request to add the new task, updates the application state, persists the changes toLocalStorage
, and notifiesTaskTable.vue
to refresh the displayed list.
-
Managing Existing Tasks (via Actions Dropdown):
- Within the
TaskTable.vue
, each task has an associated "Actions Dropdown". - This dropdown provides several options:
- View: Opens
TaskModal.vue
, which then displays theTaskDetail.vue
component showing the selected task's full information. - Edit: Opens
TaskModal.vue
, presentingTaskForm.vue
pre-filled with the task's current data. After editing and submission,taskStore.ts
handles the update, saves toLocalStorage
, and refreshes theTaskTable.vue
. - Delete: Opens
TaskModal.vue
, showing theTaskDelete.vue
component for confirmation. If confirmed,taskStore.ts
removes the task, updatesLocalStorage
, and refreshes theTaskTable.vue
. - Add Subtask: Opens
TaskModal.vue
, again usingTaskForm.vue
to create a new task linked as a subtask to the selected parent. Submission follows the standard add process viataskStore.ts
,LocalStorage
, and updatingTaskTable.vue
.
- View: Opens
- Within the
-
State Management and Persistence:
- All core task operations (add, edit, delete, subtask management) are handled centrally by
taskStore.ts
. taskStore.ts
is responsible for managing the application's task data state.- It interacts with
LocalStorage
to ensure task data persists across browser sessions. - Changes managed by the store trigger reactivity, updating components like
TaskTable.vue
.
- All core task operations (add, edit, delete, subtask management) are handled centrally by
-
User Feedback:
- The
TaskTable.vue
reflects real-time updates, including changes to task progress or status, providing immediate feedback to the user after any operation.
- The
-
Install dependencies
bun install
-
Run the development server
bun dev
-
Build for production
bun build
-
Preview production build
bun preview
You can build and run this app using Docker.
Make sure you have Docker installed.
docker build -t todoapp .
docker run -p 8080:8080 todoapp
The app will be available at http://localhost:8080.
- VS Code
- Volar (disable Vetur)
- TypeScript Vue Plugin (Volar)
TypeScript does not natively understand .vue
files. This template uses vue-tsc
for type checking.
For best experience, use Volar’s Take Over Mode:
- Disable the built-in TypeScript Extension:
- Run
Extensions: Show Built-in Extensions
in VS Code. - Find
TypeScript and JavaScript Language Features
, right-click, and selectDisable (Workspace)
.
- Run
- Reload the window (
Developer: Reload Window
).
- Uses Bun as the package manager.
- Lockfile maintenance and dependency updates are managed by Renovate.
For more details, see the Nuxt UI documentation and Vite documentation.