├── .gitignore ├── README.md ├── babel.config.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html └── src ├── App.vue ├── assets ├── cal-screen.JPG ├── logo.png └── logo.svg ├── components └── Calendar.vue ├── main.js ├── plugins └── vuetify.js └── store.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vuestacks-calendar-vue-firebase 2 | 3 | ![alt text](https://raw.githubusercontent.com/jsfanatik/vuestacks-calendar-vue-firebase/master/src/assets/cal-screen.JPG) 4 | 5 | ## Project setup 6 | ``` 7 | npm install 8 | ``` 9 | 10 | ### Compiles and hot-reloads for development 11 | ``` 12 | npm run serve 13 | ``` 14 | 15 | ### Compiles and minifies for production 16 | ``` 17 | npm run build 18 | ``` 19 | 20 | ### Run your tests 21 | ``` 22 | npm run test 23 | ``` 24 | 25 | ### Lints and fixes files 26 | ``` 27 | npm run lint 28 | ``` 29 | 30 | ### Customize configuration 31 | See [Configuration Reference](https://cli.vuejs.org/config/). 32 | 33 | ### Overview 34 | 35 | The VueStacks calendar demo utilizes general Vue.js + Firebase CRUD functions to enable creating, updating, and deleting of events in a modified Vuetify calendar component (see the following to learn more about Vuetify calendars: https://vuetifyjs.com/en/components/calendars). 36 | 37 | See full component in ```components/Calendar.vue``` 38 | 39 | ### Addition Dependencies 40 | 41 | This demo uses ```vue-textarea-autosize``` as a dependency. See the following for installation instructions: https://www.npmjs.com/package/vue-textarea-autosize 42 | 43 | ### Setting Up Firebase 44 | 45 | 1. Set up a new project in Firebase with Database enabled. 46 | 2. Implement the following Firebase SDK scripts in main.js: 47 | 48 | ``` 49 | import firebase from "firebase"; 50 | firebase.initializeApp({ 51 | apiKey: "", 52 | authDomain: "", 53 | databaseURL: "", 54 | projectId: "", 55 | storageBucket: "", 56 | messagingSenderId: "", 57 | appId: "" 58 | }); 59 | 60 | export const db = firebase.firestore(); 61 | ``` 62 | Enjoy the demo! Submit an issue if you see anything that could be improved! 63 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vuestacks-cal", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "core-js": "^2.6.5", 12 | "firebase": "^6.5.0", 13 | "vue": "^2.6.10", 14 | "vue-moment": "^4.0.0", 15 | "vue-textarea-autosize": "^1.0.4", 16 | "vuetify": "^2.0.11", 17 | "vuex": "^3.0.1" 18 | }, 19 | "devDependencies": { 20 | "@vue/cli-plugin-babel": "^3.11.0", 21 | "@vue/cli-plugin-eslint": "^3.11.0", 22 | "@vue/cli-service": "^3.11.0", 23 | "babel-eslint": "^10.0.1", 24 | "eslint": "^5.16.0", 25 | "eslint-plugin-vue": "^5.0.0", 26 | "node-sass": "^4.9.0", 27 | "sass": "^1.17.4", 28 | "sass-loader": "^7.1.0", 29 | "vue-cli-plugin-vuetify": "^0.6.3", 30 | "vue-template-compiler": "^2.6.10", 31 | "vuetify-loader": "^1.2.2" 32 | }, 33 | "eslintConfig": { 34 | "root": true, 35 | "env": { 36 | "node": true 37 | }, 38 | "extends": [ 39 | "plugin:vue/essential", 40 | "eslint:recommended" 41 | ], 42 | "rules": {}, 43 | "parserOptions": { 44 | "parser": "babel-eslint" 45 | } 46 | }, 47 | "postcss": { 48 | "plugins": { 49 | "autoprefixer": {} 50 | } 51 | }, 52 | "browserslist": [ 53 | "> 1%", 54 | "last 2 versions" 55 | ] 56 | } 57 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsfanatik/vuestacks-calendar-vue-firebase/f62434ab1372e0fe6d0e8696377a6ca74b33cbc4/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | vuestacks-cal 9 | 10 | 11 | 12 | 13 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 22 | -------------------------------------------------------------------------------- /src/assets/cal-screen.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsfanatik/vuestacks-calendar-vue-firebase/f62434ab1372e0fe6d0e8696377a6ca74b33cbc4/src/assets/cal-screen.JPG -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsfanatik/vuestacks-calendar-vue-firebase/f62434ab1372e0fe6d0e8696377a6ca74b33cbc4/src/assets/logo.png -------------------------------------------------------------------------------- /src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | Artboard 46 2 | -------------------------------------------------------------------------------- /src/components/Calendar.vue: -------------------------------------------------------------------------------- 1 | 142 | 143 | 294 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import vuetify from './plugins/vuetify'; 4 | import firebase from "firebase"; 5 | import VueTextareaAutosize from 'vue-textarea-autosize' 6 | 7 | Vue.use(VueTextareaAutosize) 8 | 9 | Vue.config.productionTip = false 10 | 11 | firebase.initializeApp({ 12 | apiKey: "", 13 | authDomain: "", 14 | databaseURL: "", 15 | projectId: "", 16 | storageBucket: "", 17 | messagingSenderId: "", 18 | appId: "" 19 | }); 20 | 21 | export const db = firebase.firestore(); 22 | 23 | new Vue({ 24 | vuetify, 25 | render: h => h(App) 26 | }).$mount('#app') 27 | -------------------------------------------------------------------------------- /src/plugins/vuetify.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuetify from 'vuetify/lib'; 3 | 4 | Vue.use(Vuetify); 5 | 6 | export default new Vuetify({ 7 | icons: { 8 | iconfont: 'mdi', 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /src/store.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | Vue.use(Vuex) 5 | 6 | export default new Vuex.Store({ 7 | state: { 8 | 9 | }, 10 | mutations: { 11 | 12 | }, 13 | actions: { 14 | 15 | } 16 | }) 17 | --------------------------------------------------------------------------------