This is a sample architecture for Vue.js projects based on views
. The views are application pages and components are used by them.
vuex
- data storevue-router
- routingvue-axios
- backend callsmirage.js
- mocking api calls
views
- one folder containing all the pages of the applicationcomponents
- one folder containing all the components used in pages
router
- contains all the routes of the applicationstore
- contains the global storeservices
- file to contain all the api calls and any logic functions needed by vue componentsmock-server
- (file) contains mocks for the apis used in the application. The mocks are disabled automaticaly whenenvironment != development
For api mocking, the following axios package was used: miragejs
npm install
npm run serve
npm run build
Happy coding!,
@Imhotepp