Skip to content

Creating An Application

Learn how to create a new Vue.js application from scratch. This guide covers the basic steps to get your first Vue app running, as well as tips for project structure and best practices.

  • Node.js and npm installed

You can check your versions with:

Terminal window
node -v
npm -v
  1. Install Vue CLI:
    Terminal window
    npm install -g @vue/cli
  2. Create a new project:
    Terminal window
    vue create my-vue-app
  3. Change directory and start the dev server:
    Terminal window
    cd my-vue-app
    npm run serve

Your Vue app is now running locally!

After creation, your project will look like this:

my-vue-app/
├── node_modules/
├── public/
├── src/
│ ├── assets/
│ ├── components/
│ ├── App.vue
│ └── main.js
├── package.json
└── README.md
  • src/ contains your application code.
  • public/ contains static assets.
  • App.vue is the root component.
  • main.js is the entry point.
  • Use meaningful component names.
  • Keep components small and focused.
  • Organize files by feature or domain.
  • Use version control (e.g., Git) from the start.
  • Explore the src/components folder and create your first component.
  • Learn about Vue Router and State Management for larger apps.