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.vuecomponent is loaded. App.vuerenders the primary user interface, including theTaskTable.vuecomponent (which displays the list of tasks) and theThemeToggle.vuecomponent (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.vueconfigured for adding a task. - Inside the modal, the
TaskForm.vueis presented for the user to input task details. - Upon submission, the
TaskForm.vuesends the data totaskStore.ts. taskStore.tsprocesses the request to add the new task, updates the application state, persists the changes toLocalStorage, and notifiesTaskTable.vueto 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.vuecomponent showing the selected task's full information. - Edit: Opens
TaskModal.vue, presentingTaskForm.vuepre-filled with the task's current data. After editing and submission,taskStore.tshandles the update, saves toLocalStorage, and refreshes theTaskTable.vue. - Delete: Opens
TaskModal.vue, showing theTaskDelete.vuecomponent for confirmation. If confirmed,taskStore.tsremoves the task, updatesLocalStorage, and refreshes theTaskTable.vue. - Add Subtask: Opens
TaskModal.vue, again usingTaskForm.vueto 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.tsis responsible for managing the application's task data state.- It interacts with
LocalStorageto 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.vuereflects 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 todoappThe 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 Extensionsin 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.