Tic-Tac-Vue is a simple JavaScript Single Page Application (SPA) written with Vue, Vuex and Vue Router. Its goal is to be a "case study" for beginners who want to learn Vue and its powerful ecosystem.
Click here to try the online demo version.
In this project I adopted two methodologies to have a better factored code and organized source files: BEM and Atomic Design.
BEM (which means Block Element Modifier) is a methodology that helps you to create reusable components in front-end development. It's all about splitting your CSS classes using Blocks, Elements and Modifiers. The final DOM could be verbose, but you will have a better factored source code and, because of you don't have to nest CSS classes, your CSS bundle will result less heavy.
Click here if you want to go deeper into BEM.
Atomic Design is a methodology for creating design systems. Similarly to chemistry, you can organize your components file (in this scenario Vue Single File Components) using atoms, molecules and organisms.
Atoms are the basic building blocks of matter. Applied to web interfaces, atoms are our HTML tags, such as a form label, an input or a button.
Molecules are groups of atoms bonded together and are the smallest fundamental units of a compound.
Organisms are groups of molecules joined together to form a relatively complex, distinct section of an interface.
First of all, I strongly suggest you to have a look at Vue documentation, especially to:
- Vue handlers
- Vue props
- Vue computed properties
- Vue Single File Components
- Vuex state
- Vuex getters
- Vuex mutations
- Vue Router
You can install Tic-Tac-Vue cloning the project:
git clone https://github.com/Sanfra1407/tic-tac-vue.git
then install npm dependencies:
npm install
Since this project has been developed with Vite.js, you can use its own integrated CLI commands to serve, build or to have a preview of the application.
npm run dev
npm run build
npm run preview
npm run lint
To deploy your application, you can follow the official Vite.js guide.