Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Project structure · Frontend

Vue 3 with Vite project structure

Opens with credits

For developers building a Vue single-page app with TypeScript, Vue Router and Pinia, the stack create-vue sets up. The example is an orders dashboard with sign-in: the scaffold folders stay for app-wide pieces (plugins, layouts, base components, router), and each product area lives in a feature folder with its own views, components, store, API calls and tests.

Curated by Tauseef FayyazBeginner210 files and foldersVue 3.5, Vite 8, TypeScript 6Checked October 2026
Explore the filesPick any file to see what it is, why it exists and when you add it.

How it grows

Each stage opens the explorer there

  1. 1Day 1What the scaffold and your first hour give you46 files and folders
  2. 2GrowingWhat a real app with features and tests adds+89 files and folders
  3. ProductionWhat running it for real users adds+31 files and foldersOpens with credits
  4. ExpertWhat a team needs to keep it healthy for years+44 files and foldersOpens with credits

How it is organised

  • Keep the scaffold folders (components, router, stores, views) for app-wide pieces, and put each product area in src/features/<name> with its own views, components, store, API calls and tests.
  • Features never import from each other. Shared UI goes to src/components/base, shared logic to src/composables, configured clients to src/lib, and app wiring (plugins, router, layouts) stays at the top of src.
  • Use <script setup lang="ts"> and the Composition API everywhere. Reusable stateful logic becomes a composable (useSomething), not a mixin.
  • Pinia holds state that several components share; local state stays in the component with ref and computed. Destructure store state with storeToRefs.
  • Component names are multi-word PascalCase (OrdersTable.vue), and base components start with Base (BaseButton.vue), as the Vue style guide recommends.
  • Every route except the home page is lazy loaded, so each feature becomes its own chunk, and route guards only shape the UI: the backend checks every request.
  • Everything in the bundle is public. VITE_ variables are baked in at build time, so secrets never go in them.
  • Playwright over Cypress for e2e: create-vue offers both; Playwright runs Chromium, Firefox and WebKit in parallel and its generated config already tests the preview build in CI. Pick Cypress if your team wants its interactive runner and in-browser component tests.

At the top of the project

Open one in the explorer for the full story

Learn more on Sefism

Roadmaps, cheat sheets and projects that go with Vue 3 with Vite.

See 8 more
Checked against 20 official sources, October 2026. If something has changed, the docs win.Show sources

Picked from the other libraries by shared topics.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com