├── topics ├── rxjs.yaml ├── ts.yaml ├── firestore.yaml ├── firebase.yaml ├── js.yaml ├── angular.yaml ├── cf.yaml └── flutter.yaml ├── package.json ├── README.md ├── quizzes ├── js-basics.yaml ├── defaults.yaml ├── tester.yaml ├── ts-basics.yaml ├── rxjs-basics.yaml ├── angular-basics.yaml ├── firestore-basics.yaml ├── cf-triggers.yaml ├── angular-templates.yaml ├── flutter-containers.yaml ├── js-variables.yaml ├── flutter-gestures.yaml ├── firebase-perf.yaml ├── cf-basics.yaml ├── flutter-scroll.yaml ├── flutter-material.yaml ├── flutter-flex.yaml └── flutter-basics.yaml ├── topics.js ├── download.js ├── quizzes.js └── .gitignore /topics/rxjs.yaml: -------------------------------------------------------------------------------- 1 | quizzes: 2 | - 3 | description: 'What is reactive programming?' 4 | id: rxjs-basics 5 | title: Basics 6 | id: rxjs 7 | img: rxjs.png 8 | title: RxJS 9 | -------------------------------------------------------------------------------- /topics/ts.yaml: -------------------------------------------------------------------------------- 1 | title: TypeScript 2 | quizzes: 3 | - 4 | description: 'What is strongly-typed JavaScript?' 5 | id: ts-basics 6 | title: Basics 7 | id: ts 8 | img: ts.png 9 | -------------------------------------------------------------------------------- /topics/firestore.yaml: -------------------------------------------------------------------------------- 1 | quizzes: 2 | - 3 | description: 'Getting started with NoSQL' 4 | id: firestore-basics 5 | title: Basics 6 | id: firestore 7 | img: firestore.png 8 | title: 'Cloud Firestore' 9 | -------------------------------------------------------------------------------- /topics/firebase.yaml: -------------------------------------------------------------------------------- 1 | quizzes: 2 | - 3 | description: 'Trace performance on any platform' 4 | id: firebase-perf 5 | title: 'Performance Monitoring' 6 | id: firebase 7 | img: firebase.png 8 | title: Firebase 9 | -------------------------------------------------------------------------------- /topics/js.yaml: -------------------------------------------------------------------------------- 1 | quizzes: 2 | - 3 | id: js-basics 4 | title: Basics 5 | description: 'What is JavaScript?' 6 | - 7 | description: 'var vs let vs const' 8 | id: js-variables 9 | title: Variables 10 | id: js 11 | img: js.png 12 | title: JavaScript 13 | -------------------------------------------------------------------------------- /topics/angular.yaml: -------------------------------------------------------------------------------- 1 | quizzes: 2 | - 3 | title: Basics 4 | description: 'What is Angular?' 5 | id: angular-basics 6 | - 7 | title: Templates 8 | description: 'Angular''s template syntax' 9 | id: angular-templates 10 | id: angular 11 | img: angular.png 12 | title: Angular 13 | -------------------------------------------------------------------------------- /topics/cf.yaml: -------------------------------------------------------------------------------- 1 | title: 'Cloud Functions' 2 | quizzes: 3 | - 4 | description: 'What is Serverless?' 5 | id: cf-basics 6 | title: Basics 7 | - 8 | id: cf-triggers 9 | title: Triggers 10 | description: 'How do you invoke a function?' 11 | id: cf 12 | img: cloud-functions.png 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@jeffd23/firequiz-questions", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "firebase-admin": "^7.3.0", 14 | "fs-extra": "^8.0.0", 15 | "yamljs": "^0.3.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Quiz Questions for the Flutter Firebase Course 2 | 3 | This repo allows you to populate your database with quiz questions for [Flutter Firebase - The Full Course](https://fireship.io/courses/flutter-firebase/) 4 | 5 | 6 | ## Instructions 7 | 8 | Requires Node.js >= 8. 9 | 10 | 1. Clone this repo, cd into it, and run `npm install`. 11 | 2. Download your service account (generate private key) from the [Firebase Console](https://console.firebase.google.com) under settings, then save it in the root of this project as `credentials.json`. 12 | 3. Run `node quizzes.js` and `node topics.js` 13 | -------------------------------------------------------------------------------- /quizzes/js-basics.yaml: -------------------------------------------------------------------------------- 1 | id: js-basics 2 | title: 'JavaScript Basics' 3 | questions: 4 | - 5 | text: 'JavaScript is a compiled language' 6 | options: 7 | - 8 | correct: false 9 | value: 'true' 10 | - 11 | correct: true 12 | value: 'false' 13 | - 14 | text: 'JavaScript is a strongly-typed language' 15 | options: 16 | - 17 | correct: false 18 | value: 'true' 19 | - 20 | correct: true 21 | value: 'false' 22 | description: 'JavaScript is a toy programming language commonly used to annoy people on websites 😉' 23 | topic: js 24 | -------------------------------------------------------------------------------- /quizzes/defaults.yaml: -------------------------------------------------------------------------------- 1 | title: Title 2 | id: topic-name 3 | img: foo.png 4 | video: youtube.com 5 | description: A quiz 6 | questions: 7 | - text: First Question 8 | options: 9 | - correct: true 10 | value: a 11 | detail: a 12 | - correct: false 13 | value: b 14 | detail: b 15 | - correct: false 16 | value: c 17 | detail: c 18 | - text: Second Question 19 | options: 20 | - correct: true 21 | value: a 22 | detail: a 23 | - correct: false 24 | value: b 25 | detail: b 26 | - correct: false 27 | value: c 28 | detail: c 29 | 30 | # # Topics 31 | 32 | # id: 33 | # title: 34 | # image: 35 | # topics: 36 | -------------------------------------------------------------------------------- /quizzes/tester.yaml: -------------------------------------------------------------------------------- 1 | title: 'Angular Basics' 2 | questions: 3 | - {text: 'What is the proper way to refer to the Angular 2+ framework?', options: [{detail: 'Nope, that''s how you should refer to the old Angular version1 framework', correct: false, value: AngularJS}, {correct: true, value: Angular, detail: 'Nailed It!'}, {correct: false, value: 'Angular Two', detail: 'Nope, Angular is currently on version 8, so that doesn''t really work.'}]} 4 | - {text: 'By default, Angular ships with which two key JavaScript libraries?', options: [{correct: true, value: 'RxJS and TypeScript'}, {correct: false, value: 'Mobx and Dart'}, {correct: false, value: 'Redux and Flow'}]} 5 | description: 'Angular is a platform for building large-scale JavaScript applications' 6 | topic: angular 7 | id: angular-basics 8 | -------------------------------------------------------------------------------- /topics/flutter.yaml: -------------------------------------------------------------------------------- 1 | quizzes: 2 | - 3 | description: 'What is Flutter?' 4 | id: flutter-basics 5 | title: Basics 6 | - 7 | description: 'Get to know common Material widgets' 8 | id: flutter-material 9 | title: 'Material Widgets' 10 | - 11 | description: 'Single widget layouts' 12 | id: flutter-containers 13 | title: Containers 14 | - 15 | description: 'Flexible rows & columns' 16 | id: flutter-flex 17 | title: 'Flex Layout' 18 | - 19 | description: 'Detect user interaction' 20 | id: flutter-gestures 21 | title: Gestures 22 | - 23 | description: 'Scroll multiple widgets ' 24 | id: flutter-scroll 25 | title: Scroll 26 | id: flutter 27 | img: flutter.png 28 | title: Flutter 29 | -------------------------------------------------------------------------------- /topics.js: -------------------------------------------------------------------------------- 1 | const admin = require('firebase-admin'); 2 | const fs = require('fs-extra'); 3 | const yaml = require('yamljs'); 4 | 5 | admin.initializeApp({ 6 | credential: admin.credential.cert(require('./credentials.json')), 7 | }); 8 | const db = admin.firestore(); 9 | 10 | const topics = [ 11 | 'angular', 12 | 'flutter', 13 | 'cf', 14 | 'firebase', 15 | 'firestore', 16 | 'flutter', 17 | 'rxjs', 18 | 'js', 19 | 'ts' 20 | ] 21 | 22 | 23 | const update = async(id) => { 24 | 25 | const json = yaml.load(`topics/${id}.yaml`); 26 | 27 | console.log(JSON.stringify(json)); 28 | 29 | const ref = db.collection('topics').doc(id); 30 | 31 | await ref.set(json, { merge: true }); 32 | 33 | console.log('DONE'); 34 | 35 | } 36 | 37 | for (const topic of topics) { 38 | update(topic); 39 | } 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /quizzes/ts-basics.yaml: -------------------------------------------------------------------------------- 1 | description: 'TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.' 2 | topic: ts 3 | id: ts-basics 4 | title: 'TypeScript Basics' 5 | questions: 6 | - 7 | text: 'Valid JS code is also valid TS code' 8 | options: 9 | - 10 | detail: 'Yes, TS is a superset of JS' 11 | correct: true 12 | value: 'true' 13 | - 14 | correct: false 15 | value: 'false' 16 | - 17 | text: 'Which of the following is valid TS code?' 18 | options: 19 | - 20 | correct: true 21 | value: 'const x: number = 23;' 22 | - 23 | correct: false 24 | value: 'number x = 23;' 25 | - 26 | correct: false 27 | value: 'const x = 23;' 28 | -------------------------------------------------------------------------------- /download.js: -------------------------------------------------------------------------------- 1 | const admin = require('firebase-admin'); 2 | const fs = require('fs-extra'); 3 | const yaml = require('yamljs'); 4 | 5 | admin.initializeApp({ 6 | credential: admin.credential.cert(require('./credentials.json')), 7 | }); 8 | const db = admin.firestore(); 9 | 10 | 11 | const toFile = async(id) => { 12 | 13 | const ref = db.collection('topics').doc(id); 14 | // const ref = db.collection('quizzes').doc(id); 15 | 16 | const data = await ref.get().then(v => v.data()); 17 | 18 | const str = yaml.stringify(data, 8); 19 | 20 | await fs.outputFile(`topics/${id}.yaml`, str); 21 | // await fs.outputFile(`quizzes/${id}.yaml`, str); 22 | 23 | console.log('DONE') 24 | 25 | } 26 | 27 | const topics = [ 28 | 'angular', 29 | 'flutter', 30 | 'cf', 31 | 'firebase', 32 | 'firestore', 33 | 'flutter', 34 | 'rxjs', 35 | 'js', 36 | 'ts' 37 | ] 38 | 39 | 40 | for (const x of topics) { 41 | toFile(x); 42 | } -------------------------------------------------------------------------------- /quizzes/rxjs-basics.yaml: -------------------------------------------------------------------------------- 1 | description: 'RxJS is a library for reactive programming using Observables, to make it easier to compose asynchronous or callback-based code' 2 | topic: rxjs 3 | id: rxjs-basics 4 | title: 'RxJS Basics' 5 | questions: 6 | - 7 | text: 'An Observable is pull-based?' 8 | options: 9 | - 10 | correct: false 11 | value: 'true' 12 | detail: 'Wrong, interators or loops are pull-based, but Observables are push-based.' 13 | - 14 | correct: true 15 | value: 'false' 16 | - 17 | text: 'Which method is called to attach a listener to an Observable?' 18 | options: 19 | - 20 | correct: true 21 | value: subscribe() 22 | - 23 | correct: false 24 | value: listen() 25 | detail: 'Not in RxJS, but that would work in RxDart.' 26 | - 27 | detail: 'Nope, that''s used for Promises' 28 | correct: false 29 | value: then() 30 | -------------------------------------------------------------------------------- /quizzes.js: -------------------------------------------------------------------------------- 1 | const admin = require('firebase-admin'); 2 | const fs = require('fs-extra'); 3 | const yaml = require('yamljs'); 4 | 5 | admin.initializeApp({ 6 | credential: admin.credential.cert(require('./credentials.json')), 7 | }); 8 | const db = admin.firestore(); 9 | 10 | const quizzes = [ 11 | 'angular-basics', 12 | 'flutter-scroll', 13 | 'cf-basics', 14 | 'cf-triggers', 15 | 'firebase-perf', 16 | 'firestore-basics', 17 | 'flutter-basics', 18 | 'flutter-containers', 19 | 'flutter-flex', 20 | 'flutter-gestures', 21 | 'flutter-material', 22 | 'flutter-scroll', 23 | 'js-basics', 24 | 'js-variables', 25 | 'rxjs-basics', 26 | 'ts-basics' 27 | ] 28 | 29 | 30 | const update = async(quizId) => { 31 | 32 | const json = yaml.load(`quizzes/${quizId}.yaml`); 33 | 34 | console.log(JSON.stringify(json)); 35 | 36 | const ref = db.collection('quizzes').doc(quizId); 37 | 38 | await ref.set(json, { merge: true }); 39 | 40 | console.log('DONE'); 41 | 42 | } 43 | 44 | for (const quiz of quizzes) { 45 | update(quiz); 46 | } 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /quizzes/angular-basics.yaml: -------------------------------------------------------------------------------- 1 | id: angular-basics 2 | title: 'Angular Basics' 3 | questions: 4 | - 5 | text: 'What is the proper way to refer to the Angular 2+ framework?' 6 | options: 7 | - 8 | correct: false 9 | value: AngularJS 10 | detail: 'Nope, that''s how you should refer to the old Angular version1 framework' 11 | - 12 | correct: true 13 | value: Angular 14 | detail: 'Nailed It!' 15 | - 16 | detail: 'Nope, Angular is currently on version 8, so that doesn''t really work.' 17 | correct: false 18 | value: 'Angular Two' 19 | - 20 | text: 'By default, Angular ships with which two key JavaScript libraries?' 21 | options: 22 | - 23 | correct: true 24 | value: 'RxJS and TypeScript' 25 | - 26 | correct: false 27 | value: 'Mobx and Dart' 28 | - 29 | correct: false 30 | value: 'Redux and Flow' 31 | description: 'Angular is a platform for building large-scale JavaScript applications' 32 | topic: angular 33 | -------------------------------------------------------------------------------- /quizzes/firestore-basics.yaml: -------------------------------------------------------------------------------- 1 | description: 'Cloud Firestore is a scalable NoSQL cloud database to store and sync data for client and server-side development.' 2 | topic: firestore 3 | id: firestore-basics 4 | title: 'Cloud Firestore Basics' 5 | questions: 6 | - 7 | text: 'NoSQL databases require a schema' 8 | options: 9 | - 10 | correct: false 11 | value: 'true' 12 | detail: 'No, they have a flexible schema, commonly called schema-less' 13 | - 14 | correct: true 15 | value: 'false' 16 | detail: 'Yes, no schema means rapid development, but you need to be careful about data modeling' 17 | - 18 | text: 'Document databases are organized into a hierarchy of ...' 19 | options: 20 | - 21 | correct: false 22 | value: 'Buckets and Files' 23 | detail: 'That sounds more like cloud file storage' 24 | - 25 | correct: true 26 | value: 'Collections and Documents' 27 | detail: Bingo! 28 | - 29 | correct: false 30 | value: 'Tables and Rows' 31 | detail: 'Nope, you must be thinking of SQL' 32 | -------------------------------------------------------------------------------- /quizzes/cf-triggers.yaml: -------------------------------------------------------------------------------- 1 | id: cf-triggers 2 | title: 'Cloud Functions Triggers' 3 | questions: 4 | - 5 | text: 'Which is NOT a valid Firestore trigger?' 6 | options: 7 | - 8 | correct: true 9 | value: onRead 10 | - 11 | correct: false 12 | value: onCreate 13 | - 14 | correct: false 15 | value: onUpdate 16 | - 17 | text: 'Which trigger provides the user''s authentication state?' 18 | options: 19 | - 20 | correct: false 21 | value: Firestore 22 | - 23 | correct: false 24 | value: Pub/Sub 25 | - 26 | correct: true 27 | value: Callable 28 | - 29 | text: 'Firebase rules are applied to database writes in a Cloud function?' 30 | options: 31 | - 32 | correct: false 33 | value: 'true' 34 | - 35 | correct: true 36 | value: 'false' 37 | - 38 | text: 'Which trigger is more secure for passing messages between GCP services?' 39 | options: 40 | - 41 | correct: true 42 | value: Pub/Sub 43 | - 44 | correct: false 45 | value: HTTP 46 | description: 'Triggers are events the determine when your backend code will be executed' 47 | topic: cf 48 | -------------------------------------------------------------------------------- /quizzes/angular-templates.yaml: -------------------------------------------------------------------------------- 1 | description: 'Angular has it''s own custom templating syntax. ' 2 | topic: angular 3 | id: angular-templates 4 | title: 'Angular Template Syntax' 5 | questions: 6 | - 7 | text: '`
Hello
` How will Angular render this as HTML?' 8 | options: 9 | - 10 | correct: true 11 | value: 'Nothing at all' 12 | detail: 'Yes, Angular will completely remove this div from the DOM when the expression is falsey.' 13 | - 14 | correct: false 15 | value: 'An empty div' 16 | detail: 'Close, that''s not exactly correct...' 17 | - 18 | correct: false 19 | value: '
Hello
' 20 | detail: 'Nope, look at the expression inside of the *ngIf directive' 21 | - 22 | text: 'What does event binding look like?' 23 | options: 24 | - 25 | correct: true 26 | value: '