├── static ├── .gitkeep └── img │ └── logo.png ├── .travis.yml ├── tamiatlogo.png ├── config ├── prod.env.js ├── dev.env.js └── index.js ├── src ├── assets │ └── img │ │ ├── coast.jpg │ │ ├── hero.jpg │ │ ├── balloon.jpg │ │ ├── island.jpg │ │ └── mountain.jpg ├── App.vue ├── mixins │ ├── notifier.js │ └── image-loader.js ├── config.js ├── main.js ├── components │ ├── Admin │ │ ├── content │ │ │ ├── editor-options.js │ │ │ ├── Media.vue │ │ │ ├── UserNew.vue │ │ │ ├── Posts.vue │ │ │ ├── PostNew.vue │ │ │ ├── Users.vue │ │ │ ├── PostEdit.vue │ │ │ ├── Settings.vue │ │ │ └── Pages.vue │ │ ├── layout │ │ │ ├── Navbar.vue │ │ │ └── Sidebar.vue │ │ ├── Login.vue │ │ └── Signup.vue │ ├── Admin.vue │ ├── shared │ │ └── Modal.vue │ └── Home.vue └── router │ └── index.js ├── .editorconfig ├── .gitignore ├── .babelrc ├── .postcssrc.js ├── firebase.json ├── index.html ├── demo.txt ├── .eslintrc.js ├── LICENSE ├── database.rules.json ├── package.json └── README.md /static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: node_js 3 | node_js: 4 | - "node" 5 | -------------------------------------------------------------------------------- /tamiatlogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/tamiat/master/tamiatlogo.png -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/tamiat/master/static/img/logo.png -------------------------------------------------------------------------------- /src/assets/img/coast.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/tamiat/master/src/assets/img/coast.jpg -------------------------------------------------------------------------------- /src/assets/img/hero.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/tamiat/master/src/assets/img/hero.jpg -------------------------------------------------------------------------------- /src/assets/img/balloon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/tamiat/master/src/assets/img/balloon.jpg -------------------------------------------------------------------------------- /src/assets/img/island.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/tamiat/master/src/assets/img/island.jpg -------------------------------------------------------------------------------- /src/assets/img/mountain.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/tamiat/master/src/assets/img/mountain.jpg -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | .vscode 11 | *.suo 12 | *.ntvs* 13 | *.njsproj 14 | *.sln 15 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"] 12 | } 13 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "dist", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ], 9 | "rewrites": [ 10 | { 11 | "source": "**", 12 | "destination": "/index.html" 13 | } 14 | ] 15 | }, 16 | "database": { 17 | "rules": "database.rules.json" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Tamiat CMS | Front end focused CMS based on vue.js and firebase 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 31 | -------------------------------------------------------------------------------- /demo.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | Username: demo@tamiat.org 17 | Password: password 18 | -------------------------------------------------------------------------------- /src/mixins/notifier.js: -------------------------------------------------------------------------------- 1 | // USED BY TAMIAT CMS 2 | 3 | export default { 4 | data () { 5 | return { 6 | notification: { 7 | type: '', 8 | message: '' 9 | } 10 | } 11 | }, 12 | methods: { 13 | showNotification (type, message) { 14 | this.notification.type = type 15 | this.notification.message = message 16 | setTimeout(() => { 17 | this.hideNotifications() 18 | }, 3000) 19 | }, 20 | hideNotifications () { 21 | // hide all notifications 22 | this.notification.type = '' 23 | this.notification.message = '' 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/config.js: -------------------------------------------------------------------------------- 1 | /* This is the Firebase configuration file */ 2 | 3 | import Firebase from 'firebase' 4 | 5 | let config = { 6 | apiKey: 'AIzaSyDN6vYIk-89PI1y1gmI8P-33hvZ8NxT3iI', 7 | authDomain: 'tamiatcms.firebaseapp.com', 8 | databaseURL: 'https://tamiatcms.firebaseio.com', 9 | projectId: 'tamiatcms', 10 | storageBucket: 'tamiatcms.appspot.com', 11 | messagingSenderId: '94963392700' 12 | } 13 | 14 | let app = Firebase.initializeApp(config) 15 | let db = app.database() 16 | 17 | // create a database references 18 | const settingsRef = db.ref('settings') 19 | const pagesRef = db.ref('pages') 20 | const postsRef = db.ref('posts') 21 | const usersRef = db.ref('users') 22 | const mediaRef = db.ref('media') 23 | 24 | export { postsRef, usersRef, settingsRef, pagesRef, mediaRef } 25 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | import VueFire from 'vuefire' 7 | import VueQuillEditor from 'vue-quill-editor' 8 | 9 | // import external stylesheets 10 | import '../node_modules/font-awesome/css/font-awesome.css' 11 | import '../node_modules/bulma/css/bulma.css' 12 | 13 | // import vue-quill-editor styles 14 | import 'quill/dist/quill.core.css' 15 | import 'quill/dist/quill.snow.css' 16 | import 'quill/dist/quill.bubble.css' 17 | 18 | Vue.use(VueFire) // activate vuefire plugin 19 | Vue.use(VueQuillEditor) // activate vue-quill-editor 20 | Vue.config.productionTip = false 21 | 22 | /* eslint-disable no-new */ 23 | new Vue({ 24 | el: '#app', 25 | router, 26 | components: { App }, 27 | template: '' 28 | }) 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 tamiat 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/components/Admin/content/editor-options.js: -------------------------------------------------------------------------------- 1 | export default { 2 | debug: 'warn', 3 | modules: { 4 | toolbar: { 5 | container: [ 6 | ['bold', 'italic', 'underline', 'strike'], // toggled buttons 7 | ['blockquote', 'code-block'], 8 | 9 | [{ 'header': 1 }, { 'header': 2 }], // custom button values 10 | [{ 'list': 'ordered' }, { 'list': 'bullet' }], 11 | [{ 'script': 'sub' }, { 'script': 'super' }], // superscript/subscript 12 | [{ 'indent': '-1' }, { 'indent': '+1' }], // outdent/indent 13 | [{ 'direction': 'rtl' }], // text direction 14 | 15 | [{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown 16 | [{ 'header': [1, 2, 3, 4, 5, 6, false] }], 17 | 18 | [{ 'color': [] }, { 'background': [] }], // dropdown with defaults from theme 19 | [{ 'font': [] }], 20 | [{ 'align': '' }, { 'align': 'center' }, { 'align': 'right' }], 21 | 22 | ['image', 'link'] 23 | ], 24 | handlers: { 25 | 'image': function () { 26 | document.getElementById('getImage').click() 27 | } 28 | } 29 | } 30 | }, 31 | placeholder: 'post body ...', 32 | theme: 'snow' 33 | } 34 | -------------------------------------------------------------------------------- /src/mixins/image-loader.js: -------------------------------------------------------------------------------- 1 | // USED BY TAMIAT CMS 2 | 3 | import firebase from 'firebase' 4 | import { mediaRef } from '../config' 5 | 6 | export default { 7 | methods: { 8 | // upload image file 9 | uploadImage (e) { 10 | let file = e.target.files[0] 11 | let storageRef = firebase.storage().ref('images/' + file.name) 12 | 13 | storageRef.put(file).then((snapshot) => { 14 | console.log('Image uploaded') 15 | mediaRef.once('value') 16 | .then(function (media) { 17 | const existingEntry = Object.values(media.val()).find(e => e.path === snapshot.ref.fullPath) 18 | if (existingEntry) { 19 | console.log(existingEntry) 20 | this.insertImage(existingEntry.src) 21 | } else { 22 | mediaRef.push({ 23 | src: snapshot.downloadURL, 24 | path: snapshot.ref.fullPath, 25 | name: snapshot.metadata.name 26 | }) 27 | this.insertImage(snapshot.downloadURL) 28 | } 29 | }) 30 | }) 31 | }, 32 | // insert the uploaded image as a DOM node in the editor 33 | insertImage (url) { 34 | let img = document.createElement('img') 35 | img.src = url 36 | document.getElementsByClassName('ql-editor')[0].appendChild(img) 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /database.rules.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | ".write": "auth.uid === 'YOURID'", 4 | ".read": true, 5 | "posts": { 6 | "$id": { 7 | "author": { 8 | ".validate": "newData.isString()" 9 | }, 10 | "body": { 11 | ".validate": "newData.isString()" 12 | }, 13 | "title": { 14 | ".validate": "newData.isString()" 15 | }, 16 | "img": { 17 | ".validate": "newData.isString()" 18 | }, 19 | "created": { 20 | // ".validate": "newData.val() < now" 21 | } 22 | } 23 | }, 24 | "settings": { 25 | ".validate": true 26 | }, 27 | "pages": { 28 | "$id": { 29 | "name": { 30 | ".validate": "newData.isString()" 31 | }, 32 | "fields": { 33 | ".validate": true 34 | }, 35 | "$other": { 36 | ".validate": false 37 | } 38 | } 39 | }, 40 | "users": { 41 | "$uid": { 42 | // ".write": "auth != null && auth.uid == $uid && root.child('users').child(auth.uid).child('role').val() === 'admin' " 43 | } 44 | }, 45 | "media": { 46 | "$id": { 47 | // ".write": "auth != null && auth.uid == $uid && root.child('users').child(auth.uid).child('role').val() === 'admin' " 48 | } 49 | }, 50 | "$other": { 51 | ".validate": false 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | 4 | // import app pages 5 | import Home from '../components/Home' 6 | import Admin from '../components/Admin' 7 | import Login from '../components/Admin/Login' 8 | 9 | // import admin page components 10 | import Posts from '../components/Admin/content/Posts' 11 | import PostNew from '../components/Admin/content/PostNew' 12 | import PostEdit from '../components/Admin/content/PostEdit' 13 | import Settings from '../components/Admin/content/Settings' 14 | import Pages from '../components/Admin/content/Pages' 15 | import Media from '../components/Admin/content/Media' 16 | 17 | Vue.use(Router) 18 | 19 | export default new Router({ 20 | mode: 'history', 21 | routes: [ 22 | { 23 | path: '/', 24 | name: 'Home', 25 | component: Home 26 | }, 27 | { 28 | path: '/login', 29 | name: 'Login', 30 | component: Login 31 | }, 32 | { 33 | path: '/admin', 34 | name: 'Admin', 35 | component: Admin, 36 | children: [ 37 | { 38 | path: 'posts', 39 | component: Posts, 40 | children: [ 41 | { 42 | path: 'new', 43 | component: PostNew 44 | }, 45 | { 46 | path: 'edit/:key', 47 | component: PostEdit 48 | } 49 | ] 50 | }, 51 | { 52 | path: 'settings', 53 | component: Settings 54 | }, 55 | { 56 | path: 'pages', 57 | component: Pages 58 | }, 59 | { 60 | path: 'media', 61 | component: Media 62 | } 63 | ] 64 | }, 65 | { 66 | path: '*', 67 | name: 'default', 68 | component: Home 69 | } 70 | ] 71 | }) 72 | -------------------------------------------------------------------------------- /src/components/Admin.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 43 | 44 | 80 | -------------------------------------------------------------------------------- /src/components/Admin/layout/Navbar.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 66 | 67 | 89 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.3.1 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | module.exports = { 8 | dev: { 9 | 10 | // Paths 11 | assetsSubDirectory: 'static', 12 | assetsPublicPath: '/', 13 | proxyTable: {}, 14 | 15 | // Various Dev Server settings 16 | host: 'localhost', // can be overwritten by process.env.HOST 17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 18 | autoOpenBrowser: false, 19 | errorOverlay: true, 20 | notifyOnErrors: true, 21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 22 | 23 | 24 | /** 25 | * Source Maps 26 | */ 27 | 28 | // https://webpack.js.org/configuration/devtool/#development 29 | devtool: 'cheap-module-eval-source-map', 30 | 31 | // If you have problems debugging vue-files in devtools, 32 | // set this to false - it *may* help 33 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 34 | cacheBusting: true, 35 | 36 | cssSourceMap: true 37 | }, 38 | 39 | build: { 40 | // Template for index.html 41 | index: path.resolve(__dirname, '../dist/index.html'), 42 | 43 | // Paths 44 | assetsRoot: path.resolve(__dirname, '../dist'), 45 | assetsSubDirectory: 'static', 46 | assetsPublicPath: '/', 47 | 48 | /** 49 | * Source Maps 50 | */ 51 | 52 | productionSourceMap: true, 53 | // https://webpack.js.org/configuration/devtool/#production 54 | devtool: '#source-map', 55 | 56 | // Gzip off by default as many popular static hosts such as 57 | // Surge or Netlify already gzip all static assets for you. 58 | // Before setting to `true`, make sure to: 59 | // npm install --save-dev compression-webpack-plugin 60 | productionGzip: false, 61 | productionGzipExtensions: ['js', 'css'], 62 | 63 | // Run the build command with an extra argument to 64 | // View the bundle analyzer report after build finishes: 65 | // `npm run build --report` 66 | // Set to `true` or `false` to always turn it on or off 67 | bundleAnalyzerReport: process.env.npm_config_report 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/components/Admin/content/Media.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 49 | 50 | 51 | 95 | -------------------------------------------------------------------------------- /src/components/Admin/layout/Sidebar.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 53 | 54 | 97 | -------------------------------------------------------------------------------- /src/components/Admin/content/UserNew.vue: -------------------------------------------------------------------------------- 1 | 40 | 41 | 74 | 75 | 82 | -------------------------------------------------------------------------------- /src/components/shared/Modal.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 67 | -------------------------------------------------------------------------------- /src/components/Admin/Login.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 70 | 71 | 93 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tamiat", 3 | "version": "1.0.0", 4 | "description": "Tamiat CMS", 5 | "author": "Mahmoud_Nouman ", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "build": "node build/build.js" 11 | }, 12 | "dependencies": { 13 | "bulma": "^0.6.2", 14 | "firebase": "^4.9.0", 15 | "font-awesome": "^4.7.0", 16 | "moment": "^2.20.1", 17 | "vue": "^2.5.2", 18 | "vue-quill-editor": "^3.0.4", 19 | "vue-router": "^3.0.1", 20 | "vuefire": "^1.4.5" 21 | }, 22 | "devDependencies": { 23 | "autoprefixer": "^7.1.2", 24 | "babel-core": "^6.22.1", 25 | "babel-eslint": "^8.2.1", 26 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 27 | "babel-loader": "^7.1.1", 28 | "babel-plugin-syntax-jsx": "^6.18.0", 29 | "babel-plugin-transform-runtime": "^6.22.0", 30 | "babel-plugin-transform-vue-jsx": "^3.5.0", 31 | "babel-preset-env": "^1.3.2", 32 | "babel-preset-stage-2": "^6.22.0", 33 | "chalk": "^2.0.1", 34 | "copy-webpack-plugin": "^4.0.1", 35 | "css-loader": "^0.28.0", 36 | "eslint": "^4.17.0", 37 | "eslint-config-standard": "^11.0.0-beta.0", 38 | "eslint-friendly-formatter": "^3.0.0", 39 | "eslint-loader": "^1.9.0", 40 | "eslint-plugin-import": "^2.8.0", 41 | "eslint-plugin-node": "^6.0.0", 42 | "eslint-plugin-promise": "^3.6.0", 43 | "eslint-plugin-standard": "^3.0.1", 44 | "eslint-plugin-vue": "^4.2.2", 45 | "extract-text-webpack-plugin": "^3.0.0", 46 | "file-loader": "^1.1.4", 47 | "friendly-errors-webpack-plugin": "^1.6.1", 48 | "html-webpack-plugin": "^2.30.1", 49 | "node-notifier": "^5.1.2", 50 | "node-sass": "^4.7.2", 51 | "optimize-css-assets-webpack-plugin": "^3.2.0", 52 | "ora": "^1.2.0", 53 | "portfinder": "^1.0.13", 54 | "postcss-import": "^11.0.0", 55 | "postcss-loader": "^2.0.8", 56 | "postcss-url": "^7.2.1", 57 | "rimraf": "^2.6.0", 58 | "sass-loader": "^6.0.6", 59 | "semver": "^5.3.0", 60 | "shelljs": "^0.7.6", 61 | "uglifyjs-webpack-plugin": "^1.1.1", 62 | "url-loader": "^0.5.8", 63 | "vue-loader": "^13.3.0", 64 | "vue-style-loader": "^3.0.1", 65 | "vue-template-compiler": "^2.5.2", 66 | "webpack": "^3.6.0", 67 | "webpack-bundle-analyzer": "^2.9.0", 68 | "webpack-dev-server": "^2.9.1", 69 | "webpack-merge": "^4.1.0" 70 | }, 71 | "engines": { 72 | "node": ">= 6.0.0", 73 | "npm": ">= 3.0.0" 74 | }, 75 | "browserslist": [ 76 | "> 1%", 77 | "last 2 versions", 78 | "not ie <= 8" 79 | ] 80 | } 81 | -------------------------------------------------------------------------------- /src/components/Admin/Signup.vue: -------------------------------------------------------------------------------- 1 | 56 | 57 | 111 | 112 | 141 | -------------------------------------------------------------------------------- /src/components/Admin/content/Posts.vue: -------------------------------------------------------------------------------- 1 | 64 | 65 | 128 | 129 | 142 | -------------------------------------------------------------------------------- /src/components/Admin/content/PostNew.vue: -------------------------------------------------------------------------------- 1 | 76 | 77 | 139 | -------------------------------------------------------------------------------- /src/components/Admin/content/Users.vue: -------------------------------------------------------------------------------- 1 | 70 | 71 | 135 | 136 | 169 | -------------------------------------------------------------------------------- /src/components/Admin/content/PostEdit.vue: -------------------------------------------------------------------------------- 1 | 77 | 78 | 144 | -------------------------------------------------------------------------------- /src/components/Admin/content/Settings.vue: -------------------------------------------------------------------------------- 1 | 59 | 60 | 172 | 173 | 180 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 |

4 | 5 |

6 | Version 7 | Build Status 8 | PRs Welcome 9 | Tamiat.org 10 | Online Demo 11 |

12 | 13 |

Tamiat CMS

14 | 15 |

16 | Tamiat headless CMS 17 |

18 | 19 |

20 | Made with ❤︎ by 21 | Mahmoud Nouman and 22 | contributors 23 | 24 |

25 | 26 |
27 | 28 | --- 29 | 30 |

31 | Support our development with 32 | 33 |

34 | 35 | 36 | [Vue]: http://vuejs.org/ 37 | [Firebase]: https://firebase.google.com/ 38 | 39 | --- 40 | 41 | 42 | # Features 43 | 44 | * Front end focused CMS 45 | * Powered by [Vue][] **2.0** & [Firebase] 46 | 47 |
48 | 49 |

What It Looks Like

50 | 51 | ![posts section](https://i.imgur.com/Kstbzxu.png) 52 | ![pages section](https://i.imgur.com/XDyOayH.png) 53 | ![media section](https://i.imgur.com/54vjwey.jpg) 54 | 55 | 56 |
57 | 58 | # Getting Started 59 | 60 | 61 | To get started with Tamiat CMS, you have two options: 62 | 63 | - Making Tamiat your starting point. 64 | - Integrating Tamiat into an existing project. 65 | 66 |
67 | 68 | ## Making Tamiat Your Starting Point 69 | 70 | 1. Clone the CMS repository and install the dependencies. 71 | 72 | ```bash 73 | # clone the repo 74 | git clone https://github.com/tamiat/tamiat.git 75 | 76 | # install the dependencies 77 | npm install 78 | # or 79 | yarn 80 | ``` 81 | 82 | 2. Log in to firebase console using your google account and create a new firebase project. 83 | 84 | 85 | 3. In the authentication section, add a new user by providing an email and a password. 86 | 87 | 88 | 4. Setup your database basic security rules by going to the `database.rules.json` file in your project and fill in your UID. 89 | 90 | 91 | ```js 92 | { 93 | "rules": { 94 | ".write": "(auth.uid === yourUID) || (auth.uid === anOtherUID)" // you can chain these together like so 95 | ``` 96 | 97 | 98 | > yourUID and anOtherUID are the uids of users with permission to write to the database. They look something like this "Lxgqp3FmcPVU6UYO6gNdkn1i0ok1". You can obtain a user uid from the authentication section in the firebase console. 99 | 100 | 101 | 5. Copy your project configurations from WEB SETUP (*in `authentication` section of the firebase console*) and paste them in `config.js` file by replacing the existing ones. 102 | 103 | 104 | ```js 105 | // replace the existing config object below 106 | let config = { 107 | apiKey: "AIzaSyCnxuLX6AgMduDMLtSJVDNJhR8xuMNvs4Y", 108 | authDomain: "tamiat-demo.firebaseapp.com", 109 | databaseURL: "https://tamiat-demo.firebaseio.com/", 110 | projectId: "tamiat-demo", 111 | storageBucket: "", 112 | messagingSenderId: "188459960333" 113 | }; 114 | ``` 115 | 116 | 117 | 6. Run the `firebase init` command (if you haven't installed firebase yet, do so), select your project from the list, use the default database rules already present `database.rules.json`, choose `dist` as your public directory and configure the project as a single-page app. 118 | 119 | 120 | 7. You can now use `firebase deploy` to deploy the security rules you just entered (to deploy the actual web app you must first use `npm run build` or `yarn build`). 121 | 122 | 123 | 8. Run the local dev server with `npm run dev` or `yarn dev`. 124 | 125 | 126 | 9. Access the admin interface by navigating to `localhost:8080/admin`. 127 | 128 | 129 | 10. Sign in with your previous email and password. 130 | 131 | 132 | 11. Enjoy! 133 | 134 |
135 | 136 | ## Integrating Tamiat Into an Existing Project 137 | 138 | 1. Create a new vue.js project based on webpack template. 139 | 140 | ```bash 141 | vue init webpack my-project 142 | # install webpack template dependencies 143 | npm install 144 | ``` 145 | 146 | 2. Install the required dependencies by Tamiat. 147 | 148 | ```bash 149 | cd my-project 150 | 151 | # install development dependencies 152 | npm install node-sass sass-loader --save-dev 153 | 154 | # install production dependencies 155 | npm install moment vue-router bulma firebase vuefire font-awesome vue-quill-editor 156 | ``` 157 | 158 | 3. In `main.js` file, import the external stylesheets and the necessary plugins and activate them. 159 | 160 | ```js 161 | import router from './router' 162 | import VueFire from 'vuefire' 163 | import VueQuillEditor from 'vue-quill-editor' 164 | 165 | // import external stylesheets 166 | import fontAwesome from '../node_modules/font-awesome/css/font-awesome.css' 167 | import bulma from '../node_modules/bulma/css/bulma.css' 168 | 169 | Vue.use(VueFire) // activate vuefire plugin 170 | Vue.use(VueQuillEditor) // activate vue-quill-editor 171 | ``` 172 | 173 | > **Remember, don't forget to add the `router` property to the vue instance.** 174 | 175 | ```js 176 | new Vue({ 177 | el: '#app', 178 | router, // this property should be added to the vue instance 179 | template: '', 180 | components: { App } 181 | }) 182 | ``` 183 | 184 | 4. Clean up your `App.vue` file by deleting the extra content and making it similar to that: 185 | 186 | ```html 187 | 192 | ``` 193 | 194 | 5. Now, open the Tamiat CMS repo and copy the following folders and files: 195 | 196 | ##### Folders to be copied: 197 | 198 | | Source | Target | Description | 199 | |--------|--------|---------| 200 | | Tamiat/src/components | my-project/src/components | The building blocks components of the admin interface | 201 | | Tamiat/src/mixins | my-project/src/mixins | The shared functionalities between components | 202 | | Tamiat/src/router | my-project/src/router | The routing logic of the CMS | 203 | 204 | 205 | ##### Files to be copied: 206 | 207 | | Source | Target | Description | 208 | |--------|--------|---------| 209 | | Tamiat/src/Admin.vue | my-project/src/Admin.vue | The admin's interface main view | 210 | | Tamiat/src/Home.vue | my-project/src/Home.vue | The default home page | 211 | | Tamiat/src/config.js | my-project/src/config.js | The firebase configuration file | 212 | 213 | 214 | 6. Once this is done, you can just follow the same instructions of the first option above starting from `step 2`. 215 | 216 | 7. Enjoy! 217 | -------------------------------------------------------------------------------- /src/components/Admin/content/Pages.vue: -------------------------------------------------------------------------------- 1 | 100 | 101 | 249 | 250 | 265 | -------------------------------------------------------------------------------- /src/components/Home.vue: -------------------------------------------------------------------------------- 1 | 159 | 160 | 179 | 180 | 719 | --------------------------------------------------------------------------------