7 |
8 |
9 |
22 |
23 |
55 |
--------------------------------------------------------------------------------
/examples/nuxt-basic/components/README.md:
--------------------------------------------------------------------------------
1 | # COMPONENTS
2 |
3 | The components directory contains your Vue.js Components.
4 | Nuxt.js doesn't supercharge these components.
5 |
6 | **This directory is not required, you can delete it if you don't want to use it.**
7 |
--------------------------------------------------------------------------------
/examples/nuxt-basic/layouts/README.md:
--------------------------------------------------------------------------------
1 | # LAYOUTS
2 |
3 | This directory contains your Application Layouts.
4 |
5 | More information about the usage of this directory in the documentation:
6 | https://nuxtjs.org/guide/views#layouts
7 |
8 | **This directory is not required, you can delete it if you don't want to use it.**
9 |
--------------------------------------------------------------------------------
/examples/nuxt-basic/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
53 |
--------------------------------------------------------------------------------
/examples/nuxt-basic/middleware/README.md:
--------------------------------------------------------------------------------
1 | # MIDDLEWARE
2 |
3 | This directory contains your Application Middleware.
4 | The middleware lets you define custom function to be ran before rendering a page or a group of pages (layouts).
5 |
6 | More information about the usage of this directory in the documentation:
7 | https://nuxtjs.org/guide/routing#middleware
8 |
9 | **This directory is not required, you can delete it if you don't want to use it.**
10 |
--------------------------------------------------------------------------------
/examples/nuxt-basic/nuxt.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | /*
3 | ** Headers of the page
4 | */
5 | head: {
6 | title: 'nuxt-basic',
7 | meta: [
8 | { charset: 'utf-8' },
9 | { name: 'viewport', content: 'width=device-width, initial-scale=1' },
10 | { hid: 'description', name: 'description', content: 'Basic example showing how to use Flamelink with Nuxt, both server and client side.' }
11 | ],
12 | link: [
13 | { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
14 | ]
15 | },
16 | /*
17 | ** Customize the progress bar color
18 | */
19 | loading: { color: '#3B8070' },
20 | /*
21 | ** Build configuration
22 | */
23 | build: {
24 | /*
25 | ** Run ESLint on save
26 | */
27 | extend (config, { isDev, isClient }) {
28 | if (isDev && isClient) {
29 | config.module.rules.push({
30 | enforce: 'pre',
31 | test: /\.(js|vue)$/,
32 | loader: 'eslint-loader',
33 | exclude: /(node_modules)/
34 | })
35 | }
36 | }
37 | },
38 | plugins: ['~/plugins/flamelink'],
39 | modules: [
40 | '@nuxtjs/dotenv'
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/examples/nuxt-basic/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nuxt-basic",
3 | "version": "1.0.0",
4 | "description": "Basic example showing how to use Flamelink with Nuxt, both server and client side.",
5 | "author": "JP Erasmus ",
6 | "private": true,
7 | "engines": {
8 | "node": ">=8"
9 | },
10 | "scripts": {
11 | "dev": "nuxt",
12 | "build": "nuxt build",
13 | "start": "nuxt start",
14 | "generate": "nuxt generate",
15 | "lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
16 | "precommit": "npm run lint"
17 | },
18 | "dependencies": {
19 | "@nuxtjs/dotenv": "^1.4.0",
20 | "core-js": "^2.6.5",
21 | "firebase": "^6.3.5",
22 | "firebase-admin": "^8.3.0",
23 | "flamelink": "^1.0.0-alpha.24",
24 | "lodash.get": "^4.4.2",
25 | "nuxt": "^2.8.1"
26 | },
27 | "devDependencies": {
28 | "babel-eslint": "^10.0.2",
29 | "eslint": "^6.1.0",
30 | "eslint-friendly-formatter": "^4.0.1",
31 | "eslint-loader": "^2.2.1",
32 | "eslint-plugin-vue": "^5.2.3"
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/examples/nuxt-basic/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the .vue files inside this directory and creates the router of your application.
5 |
6 | More information about the usage of this directory in the documentation:
7 | https://nuxtjs.org/guide/routing
8 |
--------------------------------------------------------------------------------
/examples/nuxt-basic/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | nuxt-basic
7 |
8 |
9 | Basic example showing how to use Flamelink with Nuxt, both server and client side.
10 |
11 |
Flamelink Products
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
46 |
47 |
91 |
--------------------------------------------------------------------------------
/examples/nuxt-basic/plugins/README.md:
--------------------------------------------------------------------------------
1 | # PLUGINS
2 |
3 | This directory contains your Javascript plugins that you want to run before instantiating the root vue.js application.
4 |
5 | More information about the usage of this directory in the documentation:
6 | https://nuxtjs.org/guide/plugins
7 |
8 | **This directory is not required, you can delete it if you don't want to use it.**
9 |
--------------------------------------------------------------------------------
/examples/nuxt-basic/plugins/flamelink.js:
--------------------------------------------------------------------------------
1 | import flamelink from 'flamelink/app'
2 | // This example uses RTDB (Realtime Database) - replace with `cf` for Cloud Firestore
3 | import 'flamelink/rtdb/content'
4 | import 'flamelink/rtdb/storage'
5 | // import 'flamelink/rtdb/settings'
6 | // import 'flamelink/rtdb/navigation'
7 | // import 'flamelink/rtdb/users'
8 |
9 | export default ({ app }) => {
10 | let firebaseApp
11 |
12 | if (process.server) {
13 | const admin = require ('firebase-admin')
14 |
15 | if (!admin.apps.length) {
16 | const serviceAccount = require(process.env.FLAMELINK_PATH_TO_SERVICE_ACCOUNT)
17 |
18 | firebaseApp = admin.initializeApp({
19 | credential: admin.credential.cert(serviceAccount),
20 | databaseURL: process.env.FLAMELINK_DB_URL,
21 | storageBucket: process.env.FLAMELINK_STORAGE_BUCKET
22 | });
23 | } else {
24 | firebaseApp = admin.app()
25 | }
26 | } else {
27 | const firebase = require('firebase/app')
28 | // require('firebase/auth')
29 | // require('firebase/firestore')
30 | require('firebase/database')
31 | require('firebase/storage')
32 |
33 | if (!firebase.apps.length) {
34 | firebaseApp = firebase.initializeApp({
35 | apiKey: process.env.FLAMELINK_API_KEY,
36 | authDomain: process.env.FLAMELINK_AUTH_DOMAIN,
37 | databaseURL: process.env.FLAMELINK_DB_URL,
38 | projectId: process.env.FLAMELINK_PROJECT_ID,
39 | storageBucket: process.env.FLAMELINK_STORAGE_BUCKET,
40 | messagingSenderId: process.env.FLAMELINK_MESSAGING_SENDER_ID
41 | })
42 | } else {
43 | firebaseApp = firebase.app()
44 | }
45 | }
46 |
47 | app.flamelink = flamelink({ firebaseApp, dbType: 'rtdb' })
48 | }
49 |
--------------------------------------------------------------------------------
/examples/nuxt-basic/static/README.md:
--------------------------------------------------------------------------------
1 | # STATIC
2 |
3 | This directory contains your static files.
4 | Each file inside this directory is mapped to /.
5 |
6 | Example: /static/robots.txt is mapped as /robots.txt.
7 |
8 | More information about the usage of this directory in the documentation:
9 | https://nuxtjs.org/guide/assets#static
10 |
11 | **This directory is not required, you can delete it if you don't want to use it.**
12 |
--------------------------------------------------------------------------------
/examples/nuxt-basic/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/nuxt-basic/static/favicon.ico
--------------------------------------------------------------------------------
/examples/nuxt-basic/store/README.md:
--------------------------------------------------------------------------------
1 | # STORE
2 |
3 | This directory contains your Vuex Store files.
4 | Vuex Store option is implemented in the Nuxt.js framework.
5 | Creating a index.js file in this directory activate the option in the framework automatically.
6 |
7 | More information about the usage of this directory in the documentation:
8 | https://nuxtjs.org/guide/vuex-store
9 |
10 | **This directory is not required, you can delete it if you don't want to use it.**
11 |
--------------------------------------------------------------------------------
/examples/vue-basic/.browserslistrc:
--------------------------------------------------------------------------------
1 | > 1%
2 | last 2 versions
3 | not ie <= 8
--------------------------------------------------------------------------------
/examples/vue-basic/.env:
--------------------------------------------------------------------------------
1 | VUE_APP_FLAMELINK_API_KEY=""
2 | VUE_APP_FLAMELINK_AUTH_DOMAIN=""
3 | VUE_APP_FLAMELINK_DB_URL=""
4 | VUE_APP_FLAMELINK_PROJECT_ID=""
5 | VUE_APP_FLAMELINK_STORAGE_BUCKET=""
6 | VUE_APP_FLAMELINK_MESSAGING_SENDER_ID=""
--------------------------------------------------------------------------------
/examples/vue-basic/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | node: true
5 | },
6 | 'extends': [
7 | 'plugin:vue/essential',
8 | '@vue/prettier'
9 | ],
10 | rules: {
11 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
13 | },
14 | parserOptions: {
15 | parser: 'babel-eslint'
16 | }
17 | }
--------------------------------------------------------------------------------
/examples/vue-basic/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 | !.env
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 |
15 | # Editor directories and files
16 | .idea
17 | .vscode
18 | *.suo
19 | *.ntvs*
20 | *.njsproj
21 | *.sln
22 | *.sw*
23 |
--------------------------------------------------------------------------------
/examples/vue-basic/.postcssrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | autoprefixer: {}
4 | }
5 | }
--------------------------------------------------------------------------------
/examples/vue-basic/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": false,
3 | "semi": true
4 | }
5 |
--------------------------------------------------------------------------------
/examples/vue-basic/README.md:
--------------------------------------------------------------------------------
1 | # vue-basic
2 |
3 | > Project bootstrapped with [@vue/cli](https://cli.vuejs.org/)
4 |
5 | This aims to be an example of how you would connect Flamelink with your Vue application.
6 |
7 | View the app running [here](https://flamelink-vue-basic.firebaseapp.com/#/)
8 |
9 | ## Setup
10 |
11 | ### Firebase Project Config
12 |
13 | If you want to follow along:
14 |
15 | - Ensure that you have an existing [Firebase project](https://console.firebase.google.com/u/0/) that you can use.
16 | - Copy the `.env` file and save as `.env.local`.
17 | - Replace all the environment variables with your Firebase project config details, for example:
18 |
19 | Change:
20 |
21 | ```sh
22 | VUE_APP_FLAMELINK_API_KEY=""
23 | ```
24 |
25 | with:
26 |
27 | ```sh
28 | VUE_APP_FLAMELINK_API_KEY=AIzaSyDuTZiS23eqbkLA557_rlO9F0NBRZWViRx
29 | ```
30 |
31 | #### Database Rules
32 |
33 | To quickly make the content and navigation items available from our app without a user being authenticated, I've updated the default Flamelink Database rules to the following:
34 |
35 | ```json
36 | {
37 | "rules": {
38 | "flamelink": {
39 | ".read": "auth != null",
40 | ".write": "auth != null",
41 | "environments": {
42 | "$env": {
43 | ".read": true
44 | }
45 | },
46 | "users": {
47 | ".indexOn": ["email"]
48 | }
49 | }
50 | }
51 | }
52 | ```
53 |
54 | This simply makes everything inside the `flamelink/environments` reference readable to anyone.
55 |
56 | > **Important**! As always, once you are ready to you roll your app out to your end users, make sure to set the strictest rules possible for your use case. When it comes to these rules and security in general, it is a good idea to following the [Principle of Least Privilege](https://en.wikipedia.org/wiki/Principle_of_least_privilege). Check out: [Understanding Firebase Realtime Database Rules](https://firebase.google.com/docs/database/security/).
57 |
58 | #### Database Structure
59 |
60 | The following database structure was created from within the Flamelink CMS:
61 |
62 | ##### Navigation
63 |
64 | 
65 |
66 | - Navigation Name: Main Navigation
67 | - NaKey: mainNavigation
68 | - Navigation Items:
69 |
70 | ```text
71 | -- Home
72 | - Title: Home
73 | - URI: /
74 | - CSS Class: home-page
75 | - Component: Home
76 | -- About
77 | - Title: About
78 | - URI: /about
79 | - CSS Class: about-page
80 | - Component: About
81 | -- Our Vision
82 | - Title: Our Vision
83 | - URI: our-vision
84 | - CSS Class: about-page
85 | - Component: OurVision
86 | -- Who we are
87 | - Title: Who we are
88 | - URI: who-we-are
89 | - CSS Class: about-page
90 | - Component: People
91 | -- Contact Us
92 | - Title: Contact Us
93 | - URI: /contact-us
94 | - CSS Class: contact-us-page
95 | - Component: ContactForm
96 | ```
97 |
98 | ##### Schemas
99 |
100 | ```text
101 | -- Home
102 | - Title: Home
103 | - Schema ID: home
104 | - Type: Single
105 | - Group: Pages
106 | - Enabled: true
107 | -- Fields:
108 | -- Text
109 | - Field Name: Page Title
110 | - Field Key: pageTitle
111 | - Show in overview table: true
112 | -- Textarea
113 | - Field Name: Page Body
114 | - Field Key: pageBody
115 | - Show in overview table: false
116 |
117 | -- Our Vision
118 | - Title: Our Vision
119 | - Schema ID: ourVision
120 | - Type: Single
121 | - Group: Pages
122 | - Enabled: true
123 | -- Fields:
124 | -- Text
125 | - Field Name: Title
126 | - Field Key: title
127 | - Show in overview table: true
128 | -- Textarea
129 | - Field Name: Body
130 | - Field Key: body
131 | - Show in overview table: false
132 |
133 | -- Who We Are
134 | - Title: Who We Are
135 | - Schema ID: whoWeAre
136 | - Type: Single
137 | - Group: Pages
138 | - Enabled: true
139 | -- Fields:
140 | -- Text
141 | - Field Name: Title
142 | - Field Key: title
143 | - Show in overview table: true
144 | -- Textarea
145 | - Field Name: Body
146 | - Field Key: body
147 | - Show in overview table: false
148 | -- Repeater
149 | - Field Name: People
150 | - Field Key: people
151 | - Field Layout: Table
152 | - Show in overview table: false
153 | -- Fields:
154 | -- Text
155 | - Field Name: Name
156 | - Field Key: name
157 | -- Text
158 | - Field Name: Job Title
159 | - Field Key: jobTitle
160 | -- Textarea
161 | - Field Name: Bio
162 | - Field Key: bio
163 | -- Media
164 | - Field Name: Avatar
165 | - Field Key: avatar
166 | - Selection Limit: 1
167 | - Media Types: Images
168 | ```
169 |
170 | ##### Content
171 |
172 | Make sure you add any data for the fields we've created in our schema
173 |
174 | ### Install dependencies
175 |
176 | ```bash
177 | yarn install
178 | ```
179 |
180 | ### Compiles and hot-reloads for development
181 |
182 | ```bash
183 | yarn run serve
184 | ```
185 |
186 | ### Compiles and minifies for production
187 |
188 | ```bash
189 | yarn run build
190 | ```
191 |
192 | ### Lints and fixes files
193 |
194 | ```bash
195 | yarn run lint
196 | ```
197 |
--------------------------------------------------------------------------------
/examples/vue-basic/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ["@vue/app"]
3 | };
4 |
--------------------------------------------------------------------------------
/examples/vue-basic/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-basic",
3 | "version": "0.1.0",
4 | "private": true,
5 | "engines": {
6 | "node": ">= 6 < 10"
7 | },
8 | "scripts": {
9 | "serve": "vue-cli-service serve",
10 | "build": "vue-cli-service build",
11 | "lint": "vue-cli-service lint",
12 | "deploy": "npm run build && cd dist && surge"
13 | },
14 | "dependencies": {
15 | "flamelink": "^0.17.1",
16 | "register-service-worker": "^1.0.0",
17 | "vue": "^2.5.17",
18 | "vue-router": "^3.0.1"
19 | },
20 | "devDependencies": {
21 | "@vue/cli-plugin-babel": "^3.0.0-rc.12",
22 | "@vue/cli-plugin-eslint": "^3.0.0-rc.12",
23 | "@vue/cli-plugin-pwa": "^3.0.0-rc.12",
24 | "@vue/cli-service": "^3.0.0-rc.12",
25 | "@vue/eslint-config-prettier": "^3.0.0-rc.12",
26 | "node-sass": "^4.9.0",
27 | "sass-loader": "^7.0.1",
28 | "vue-template-compiler": "^2.5.17"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/examples/vue-basic/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/favicon.ico
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/icons/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/img/icons/android-chrome-192x192.png
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/icons/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/img/icons/android-chrome-512x512.png
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/icons/apple-touch-icon-120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/img/icons/apple-touch-icon-120x120.png
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/icons/apple-touch-icon-152x152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/img/icons/apple-touch-icon-152x152.png
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/icons/apple-touch-icon-180x180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/img/icons/apple-touch-icon-180x180.png
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/icons/apple-touch-icon-60x60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/img/icons/apple-touch-icon-60x60.png
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/icons/apple-touch-icon-76x76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/img/icons/apple-touch-icon-76x76.png
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/icons/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/img/icons/apple-touch-icon.png
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/icons/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/img/icons/favicon-16x16.png
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/icons/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/img/icons/favicon-32x32.png
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/icons/msapplication-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/img/icons/msapplication-icon-144x144.png
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/icons/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/img/icons/mstile-150x150.png
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/icons/safari-pinned-tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
150 |
--------------------------------------------------------------------------------
/examples/vue-basic/public/img/main-navigation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flamelink/examples/5738f4cb5dce07cea1e0169afc48e4eb6697b372/examples/vue-basic/public/img/main-navigation.png
--------------------------------------------------------------------------------
/examples/vue-basic/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | vue-basic
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/examples/vue-basic/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-basic",
3 | "short_name": "vue-basic",
4 | "icons": [
5 | {
6 | "src": "/img/icons/android-chrome-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "/img/icons/android-chrome-512x512.png",
12 | "sizes": "512x512",
13 | "type": "image/png"
14 | }
15 | ],
16 | "start_url": "/index.html",
17 | "display": "standalone",
18 | "background_color": "#000000",
19 | "theme_color": "#4DBA87"
20 | }
21 |
--------------------------------------------------------------------------------
/examples/vue-basic/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/examples/vue-basic/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |