Hereβs an organized and easy-to-follow version of your note for online publication:
Steps to Set Up a Vue 3 Project with TypeScript, Tailwind CSS, and Other Useful Libraries
-
Create the Vue 3 project with TypeScript template
npm create vue@latest my-app -- --template vue-ts -
Install required dependencies
npm install tailwindcss postcss autoprefixer axios vue-router @vueuse/core @vueuse/motion lucide-vue-next vue-i18n vue-toastification@next yup -
Initialize Tailwind CSS
npx tailwindcss init -p
Project Structure
src Folder Structure
src
βββ assets
β βββ styles
β β βββ base.css
β β βββ tailwind.css
β β βββ variables.css
β βββ images
β βββ logo.png
βββ components
β βββ common
β β βββ Button.vue
β β βββ Modal.vue
β β βββ InputField.vue
β βββ layout
β β βββ AppHeader.vue
β β βββ AppSidebar.vue
β β βββ AppFooter.vue
β βββ navigation
β βββ Breadcrumbs.vue
βββ composables
β βββ useAuth.ts
β βββ useFetch.ts
β βββ useToast.ts
β βββ index.ts
βββ i18n
β βββ en.json
β βββ fr.json
β βββ index.ts
βββ layouts
β βββ DefaultLayout.vue
β βββ AuthLayout.vue
β βββ AdminLayout.vue
βββ middleware
β βββ auth.ts
β βββ guest.ts
β βββ admin.ts
βββ modules
β βββ dashboard
β β βββ components
β β β βββ DashboardCard.vue
β β βββ views
β β β βββ DashboardView.vue
β β βββ store.ts
β βββ users
β βββ components
β β βββ UserCard.vue
β βββ views
β β βββ UserListView.vue
β β βββ UserDetailView.vue
β βββ store.ts
βββ router
β βββ modules
β β βββ dashboardRoutes.ts
β β βββ authRoutes.ts
β β βββ userRoutes.ts
β βββ index.ts
βββ services
β βββ apiClient.ts
β βββ authService.ts
β βββ userService.ts
βββ store
β βββ modules
β β βββ auth.ts
β β βββ user.ts
β β βββ settings.ts
β βββ index.ts
βββ utils
β βββ constants.ts
β βββ helpers.ts
β βββ validationSchema.ts
βββ views
β βββ HomeView.vue
β βββ LoginView.vue
β βββ RegisterView.vue
β βββ Error404View.vue
βββ App.vue
βββ main.ts
βββ shims-vue.d.ts
βββ env.d.ts
Key Libraries Included
- Tailwind CSS: For utility-first styling.
- Axios: For HTTP requests.
- Vue Router: For routing between pages.
- VueUse: A collection of useful composition API functions.
- Lucide Vue Next: For scalable vector icons.
- Vue I18n: For internationalization (i18n) support.
- Vue Toastification: For easy-to-use toast notifications.
- Yup: For form validation schema.