├── .eslintrc.js ├── .firebase └── hosting.YnVpbGQ.cache ├── .firebaserc ├── .gitignore ├── LICENSE ├── README.md ├── build └── bundle.js.LICENSE.txt ├── firebase.json ├── functions ├── .eslintrc.js ├── .gitignore ├── controllers │ └── cookieController.js ├── index.js └── package.json ├── package.json ├── server ├── controllers │ └── cookieController.js └── server.js ├── src ├── App.jsx ├── assets │ ├── bg_photo.png │ ├── ck_photo.png │ ├── dangoDB_logo_long_midboi.png │ ├── dango_deno.png │ ├── dango_deno_256 copy.ico │ ├── dango_deno_256.png │ ├── ey_photo.png │ └── sj_photo.png ├── components │ ├── ContactCard.jsx │ ├── CopyButton.jsx │ ├── Hero.jsx │ ├── HomeFooter.jsx │ ├── PropButton.jsx │ ├── PropForm.jsx │ ├── SchemaGenerator.jsx │ ├── UserSchema.jsx │ ├── buttons │ │ ├── Buttons.jsx │ │ ├── SetRequiredButton.jsx │ │ ├── SetUniqueButton.jsx │ │ └── TypeButton.jsx │ ├── containers │ │ ├── MainContainer.jsx │ │ └── SideBar.jsx │ └── website │ │ ├── DemoPage.jsx │ │ ├── DocsPage.jsx │ │ ├── HomePage.jsx │ │ ├── SchemaPage.jsx │ │ └── navbar │ │ └── NavBar.jsx ├── index.html ├── index.js ├── myIcon.ico └── style │ ├── base │ ├── _boilerplate.scss │ ├── _colors.scss │ ├── _index.scss │ ├── _mixins.scss │ └── _typography.scss │ ├── layouts │ ├── _demoPage.scss │ ├── _docsPage.scss │ ├── _homePage.scss │ ├── _index.scss │ ├── _navbar.scss │ └── _schemaPage.scss │ └── styles.scss └── webpack.config.js /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | es2021: true, 5 | node: true, 6 | }, 7 | extends: ['eslint:recommended', 'plugin:react/recommended'], 8 | parserOptions: { 9 | ecmaFeatures: { 10 | jsx: true, 11 | }, 12 | ecmaVersion: 'latest', 13 | sourceType: 'module', 14 | }, 15 | plugins: ['react'], 16 | rules: { 17 | indent: ['error', 2], 18 | quotes: ['error', 'single'], 19 | semi: ['error', 'always'], 20 | 'no-unused-vars': 'off', 21 | 'no-prototype-builtins': 'off', 22 | 'react/prop-types': 'off', 23 | }, 24 | }; 25 | -------------------------------------------------------------------------------- /.firebase/hosting.YnVpbGQ.cache: -------------------------------------------------------------------------------- 1 | 404.html,1652915590657,b7bab6b83fa074653ff28c8d2a64135d3434575f70a12ab3d3ba8080461b9537 2 | bundle.js,1652981739201,2b9768126aeabe4a498473c9e93faf8331ec72fe2f539b7371a39c145129904f 3 | bundle.js.LICENSE.txt,1652888615157,e497a8a3d892952d6ffb31b7068c0bc6aaf4a133a2916fb428f224be5108cc16 4 | dango_deno_256.png,1652888321997,d8ca8397915f889fc8ae18e55cf5775fa5635ea4154ac93cd25df02415b62709 5 | index.html,1652965671761,f234f5288d04a672f3e0899e8e1dfcd75d4a22e1d17772f7e7876ba685150d7f 6 | -------------------------------------------------------------------------------- /.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "dangodb-29d80" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | build 85 | 86 | # Gatsby files 87 | .cache/ 88 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 89 | # https://nextjs.org/blog/next-9-1#public-directory-support 90 | # public 91 | 92 | # vuepress build output 93 | .vuepress/dist 94 | 95 | # Serverless directories 96 | .serverless/ 97 | 98 | # FuseBox cache 99 | .fusebox/ 100 | 101 | # DynamoDB Local files 102 | .dynamodb/ 103 | 104 | # TernJS port file 105 | .tern-port 106 | 107 | package-lock.json -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 OSLabs Beta 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dangoDB_website 2 | 3 |

dangoDB

4 | 5 |
A MongoDB ODM for Deno
6 |
7 |
Visit our Website
8 |
9 | 10 | Please visit our Generate Schema page in order to easily choose and render a property type that you can then copy and utilize in dangoDB for a more streamlined experience. 11 | 12 | Resources: 13 | Find the documentation here for dangoDB 14 | V 15 | Checkout our Medium Article 16 | -------------------------------------------------------------------------------- /build/bundle.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * @license React 3 | * react-dom.production.min.js 4 | * 5 | * Copyright (c) Facebook, Inc. and its affiliates. 6 | * 7 | * This source code is licensed under the MIT license found in the 8 | * LICENSE file in the root directory of this source tree. 9 | */ 10 | 11 | /** 12 | * @license React 13 | * react-jsx-runtime.production.min.js 14 | * 15 | * Copyright (c) Facebook, Inc. and its affiliates. 16 | * 17 | * This source code is licensed under the MIT license found in the 18 | * LICENSE file in the root directory of this source tree. 19 | */ 20 | 21 | /** 22 | * @license React 23 | * react.production.min.js 24 | * 25 | * Copyright (c) Facebook, Inc. and its affiliates. 26 | * 27 | * This source code is licensed under the MIT license found in the 28 | * LICENSE file in the root directory of this source tree. 29 | */ 30 | 31 | /** 32 | * @license React 33 | * scheduler.production.min.js 34 | * 35 | * Copyright (c) Facebook, Inc. and its affiliates. 36 | * 37 | * This source code is licensed under the MIT license found in the 38 | * LICENSE file in the root directory of this source tree. 39 | */ 40 | 41 | /** 42 | * React Router DOM v6.3.0 43 | * 44 | * Copyright (c) Remix Software Inc. 45 | * 46 | * This source code is licensed under the MIT license found in the 47 | * LICENSE.md file in the root directory of this source tree. 48 | * 49 | * @license MIT 50 | */ 51 | 52 | /** 53 | * React Router v6.3.0 54 | * 55 | * Copyright (c) Remix Software Inc. 56 | * 57 | * This source code is licensed under the MIT license found in the 58 | * LICENSE.md file in the root directory of this source tree. 59 | * 60 | * @license MIT 61 | */ 62 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "build", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ], 9 | "rewrites": [ 10 | { 11 | "source": "**", 12 | "function": "fireapp" 13 | } 14 | ] 15 | }, 16 | "functions": { 17 | "predeploy": [ 18 | "npm --prefix \"$RESOURCE_DIR\" run lint" 19 | ], 20 | "source": "functions" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /functions/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | es6: true, 5 | node: true, 6 | }, 7 | extends: [], 8 | rules: {}, 9 | }; 10 | -------------------------------------------------------------------------------- /functions/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /functions/controllers/cookieController.js: -------------------------------------------------------------------------------- 1 | const cookieController = {}; 2 | 3 | // Session cookies will persist schema state on page refresh. 4 | cookieController.setSessionCookie = (req, res, next) => { 5 | try { 6 | const { schema } = req.body; 7 | if (req.cookies.__session) res.clearCookie('__session'); 8 | res.cookie('__session', schema); 9 | return next(); 10 | } catch (err) { 11 | const error = { 12 | log: 'Express error handler caught an error in the setSessionCookie middleware.', 13 | status: 400, 14 | message: { err }, 15 | }; 16 | return next(error); 17 | } 18 | }; 19 | 20 | cookieController.getSessionCookie = (req, res, next) => { 21 | try { 22 | const schema = req.cookies.__session; 23 | res.locals.schema = schema !== undefined ? schema : []; 24 | return next(); 25 | } catch (err) { 26 | const error = { 27 | log: 'Express error handler caught an error in the getSessionCookie middleware.', 28 | status: 400, 29 | message: { err }, 30 | }; 31 | return next(error); 32 | } 33 | }; 34 | 35 | module.exports = cookieController; -------------------------------------------------------------------------------- /functions/index.js: -------------------------------------------------------------------------------- 1 | const functions = require('firebase-functions'); 2 | const firebase = require('firebase-admin'); 3 | 4 | const express = require('express'); 5 | const path = require('path'); 6 | const cookieParser = require('cookie-parser'); 7 | 8 | const cookieController = require('./controllers/cookieController'); 9 | 10 | const app = express(); 11 | const PORT = 3000; 12 | 13 | // Global JSON, HTTP body, and cookie parser 14 | app.use(express.json()); 15 | app.use(express.urlencoded({ extended: true })); 16 | app.use(cookieParser()); 17 | 18 | // statically serve everything in the build folder on the route '/build' 19 | // app.use('/build', 20 | // express.static(path.resolve(__dirname, '../build')) 21 | // ); 22 | 23 | exports.fireapp = functions.https.onRequest(app); 24 | app.post('/save-schema', cookieController.setSessionCookie, (req, res) => { 25 | return res.status(201).send(); 26 | }); 27 | 28 | app.get('/save-schema', cookieController.getSessionCookie, (req, res) => { 29 | return res.status(200).json(res.locals.schema); 30 | }); 31 | 32 | // React Router handles client-side navigation of the below endpoints. 33 | // Each endpoint responds with the template index.html file for scenario of page refersh on one of those endpoints. 34 | // app.get('/docs', 35 | // (req, res) => { 36 | // return res.status(200).sendFile(path.join(__dirname, '../src/index.html')); 37 | // } 38 | // ); 39 | // app.get('/demo', 40 | // (req, res) => { 41 | // return res.status(200).sendFile(path.join(__dirname, '../src/index.html')); 42 | // } 43 | // ); 44 | // app.get('/schema', 45 | // (req, res) => { 46 | // return res.status(200).sendFile(path.join(__dirname, '../src/index.html')); 47 | // } 48 | // ); 49 | // app.get('/', 50 | // (req, res) => { 51 | // return res.status(200).sendFile(path.join(__dirname, '../build/index.html')); 52 | // } 53 | // ); 54 | 55 | // 404 route handler for unspecified endpoints 56 | app.use((req, res) => res.status(404).send('Page not found!')); 57 | 58 | // Global event handler 59 | app.use((err, req, res, next) => { 60 | const defaultErr = { 61 | log: `Unknown error: ${err}`, 62 | status: 400, 63 | message: { err: 'An error occured' }, 64 | }; 65 | 66 | // Overwrite default error properties with new error message information, if any 67 | const errObj = Object.assign(defaultErr, err); 68 | 69 | // Logs error stack to console 70 | console.log(errObj.log); 71 | 72 | // Completes HTTP cycle by sending back error message 73 | res.status(errObj.status).json(errObj.message); 74 | }); 75 | 76 | app.listen(PORT, () => { 77 | console.log(`Server listening on port ${PORT}`); 78 | }); 79 | 80 | // const app = require('../server/server'); 81 | exports.fireapp = functions.https.onRequest(app); 82 | // exports.fireapp = functions.https.onRequest((req, res) => { 83 | // res.json(req.method) 84 | // }); 85 | 86 | // // Create and Deploy Your First Cloud Functions 87 | // // https://firebase.google.com/docs/functions/write-firebase-functions 88 | // 89 | // exports.fireapp = functions.https.onRequest((request, response) => { 90 | // functions.logger.info("Hello logs!", {structuredData: true}); 91 | // response.send("Hello from Firebase!"); 92 | // }); 93 | -------------------------------------------------------------------------------- /functions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "functions", 3 | "description": "Cloud Functions for Firebase", 4 | "scripts": { 5 | "lint": "eslint .", 6 | "serve": "firebase emulators:start --only functions", 7 | "shell": "firebase functions:shell", 8 | "start": "npm run shell", 9 | "deploy": "firebase deploy --only functions", 10 | "logs": "firebase functions:log" 11 | }, 12 | "engines": { 13 | "node": "16" 14 | }, 15 | "main": "index.js", 16 | "dependencies": { 17 | "cookie-parser": "^1.4.6", 18 | "express": "^4.18.1", 19 | "firebase-admin": "^10.0.2", 20 | "firebase-functions": "^3.18.0" 21 | }, 22 | "devDependencies": { 23 | "eslint": "^8.9.0", 24 | "eslint-config-google": "^0.14.0", 25 | "firebase-functions-test": "^0.2.0" 26 | }, 27 | "private": true 28 | } 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dangodb_website", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "NODE_ENV=production node server/server.js", 8 | "build": "NODE_ENV=production webpack", 9 | "dev": "NODE_ENV=development webpack serve --open & nodemon server/server.js", 10 | "test": "echo \"Error: no test specified\" && exit 1", 11 | "lint": "eslint . --ext .js", 12 | "lint-fix": "eslint --fix . --ext .js" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git+https://github.com/oslabs-beta/dangoDB_website.git" 17 | }, 18 | "nodemonConfig": { 19 | "ignore": [ 20 | "build", 21 | "client" 22 | ] 23 | }, 24 | "keywords": [], 25 | "author": "dangoDB", 26 | "license": "ISC", 27 | "bugs": { 28 | "url": "https://github.com/oslabs-beta/dangoDB_website/issues" 29 | }, 30 | "homepage": "https://github.com/oslabs-beta/dangoDB_website#readme", 31 | "dependencies": { 32 | "-": "^0.0.1", 33 | "@codemirror/lang-javascript": "^0.20.0", 34 | "@codemirror/theme-one-dark": "^0.20.0", 35 | "@emotion/react": "^11.9.0", 36 | "@emotion/styled": "^11.8.1", 37 | "@mui/material": "^5.7.0", 38 | "@uiw/react-codemirror": "^4.7.0", 39 | "babel-loader": "^8.2.5", 40 | "codemirror": "^5.65.3", 41 | "connect-history-api-fallback": "^1.6.0", 42 | "cookie-parser": "^1.4.6", 43 | "copy-to-clipboard": "^3.3.1", 44 | "css-loader": "^6.7.1", 45 | "express": "^4.18.1", 46 | "file-saver": "^2.0.5", 47 | "firebase": "^9.8.1", 48 | "firebase-admin": "^10.2.0", 49 | "firebase-functions": "^3.21.2", 50 | "html-webpack-plugin": "^5.5.0", 51 | "js-beautify": "^1.14.3", 52 | "kill-port": "^2.0.0", 53 | "nodemon": "^2.0.16", 54 | "path": "^0.12.7", 55 | "react": "^18.1.0", 56 | "react-copy-to-clipboard": "^5.1.0", 57 | "react-dom": "^18.1.0", 58 | "react-icons": "^4.3.1", 59 | "react-router-dom": "^6.3.0", 60 | "react-scripts": "^5.0.1", 61 | "react-syntax-highlighter": "^15.5.0" 62 | }, 63 | "devDependencies": { 64 | "@babel/core": "^7.17.10", 65 | "@babel/preset-env": "^7.17.10", 66 | "@babel/preset-react": "^7.16.7", 67 | "cross-env": "^7.0.3", 68 | "eslint": "^8.15.0", 69 | "eslint-plugin-import": "^2.26.0", 70 | "eslint-plugin-jsx-a11y": "^6.5.1", 71 | "eslint-plugin-react": "^7.30.0", 72 | "eslint-plugin-react-hooks": "^4.5.0", 73 | "favicons": "^6.2.2", 74 | "file-loader": "^6.2.0", 75 | "sass": "^1.51.0", 76 | "sass-loader": "^12.6.0", 77 | "style-loader": "^3.3.1", 78 | "url-loader": "^4.1.1", 79 | "webpack": "^5.72.0", 80 | "webpack-cli": "^4.9.2", 81 | "webpack-dev-server": "^4.9.0" 82 | }, 83 | "settings": { 84 | "react": { 85 | "version": "detect" 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /server/controllers/cookieController.js: -------------------------------------------------------------------------------- 1 | const cookieController = {}; 2 | 3 | // Session cookies will persist schema state on page refresh. 4 | cookieController.setSessionCookie = (req, res, next) => { 5 | try { 6 | const { schema } = req.body; 7 | if (req.cookies.__session) res.clearCookie('__session'); 8 | res.cookie('__session', schema); 9 | return next(); 10 | } catch (err) { 11 | const error = { 12 | log: 'Express error handler caught an error in the setSessionCookie middleware.', 13 | status: 400, 14 | message: { err }, 15 | }; 16 | return next(error); 17 | } 18 | }; 19 | 20 | cookieController.getSessionCookie = (req, res, next) => { 21 | try { 22 | const schema = req.cookies.__session; 23 | res.locals.schema = schema !== undefined ? schema : []; 24 | return next(); 25 | } catch (err) { 26 | const error = { 27 | log: 'Express error handler caught an error in the getSessionCookie middleware.', 28 | status: 400, 29 | message: { err }, 30 | }; 31 | return next(error); 32 | } 33 | }; 34 | 35 | module.exports = cookieController; 36 | -------------------------------------------------------------------------------- /server/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const path = require('path'); 3 | 4 | const cookieParser = require('cookie-parser'); 5 | const cookieController = require('./controllers/cookieController'); 6 | 7 | const app = express(); 8 | const PORT = 3000; 9 | 10 | // Global JSON, HTTP body, and cookie parser 11 | app.use(express.json()); 12 | app.use(express.urlencoded({ extended: true })); 13 | app.use(cookieParser()); 14 | 15 | // statically serve everything in the build folder on the route '/build' 16 | app.use('/build', express.static(path.resolve(__dirname, '../build'))); 17 | 18 | // post and store schema data session via cookie 19 | app.post('/save-schema', cookieController.setSessionCookie, (req, res) => res.status(201).send()); 20 | 21 | // get schema from saved cookie session 22 | app.get('/save-schema', cookieController.getSessionCookie, (req, res) => res.status(200).json(res.locals.schema)); 23 | 24 | app.get('/', (req, res) => res.status(200).sendFile(path.join(__dirname, '../src/index.html'))); 25 | 26 | // 404 route handler for unspecified endpoints 27 | app.use((req, res) => res.status(404).send('Page not found!')); 28 | 29 | // Global event handler 30 | app.use((err, req, res, next) => { 31 | const defaultErr = { 32 | log: `Unknown error: ${err}`, 33 | status: 400, 34 | message: { err: 'An error occured' }, 35 | }; 36 | 37 | // Overwrite default error properties with new error message information, if any 38 | const errObj = Object.assign(defaultErr, err); 39 | 40 | // Logs error stack to console 41 | console.log(errObj.log); 42 | 43 | // Completes HTTP cycle by sending back error message 44 | res.status(errObj.status).json(errObj.message); 45 | }); 46 | 47 | app.listen(PORT, () => { 48 | console.log(`Server listening on port ${PORT}`); 49 | }); 50 | 51 | module.exports = app; 52 | -------------------------------------------------------------------------------- /src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { HashRouter, BrowserRouter, Routes, Route } from 'react-router-dom'; 3 | import NavBar from './components/website/navbar/NavBar'; 4 | import Home from './components/website/HomePage'; 5 | // import Demo from './components/website/DemoPage'; 6 | // import Docs from './components/website/DocsPage'; 7 | import Schema from './components/website/SchemaPage'; 8 | 9 | 10 | // App page housing all components 11 | const App = () => { 12 | 13 | const [savedProps, setSavedProps] = React.useState([]); 14 | 15 | React.useEffect(() => { 16 | fetch('/save-schema') 17 | .then((res) => res.json()) 18 | .then((data) => { 19 | setSavedProps(data); 20 | }) 21 | .catch((err) => { 22 | console.log(`${err}`); 23 | }); 24 | }, []); 25 | 26 | return ( 27 |
28 | 29 | 30 | 31 | 35 | } 36 | path="/" 37 | /> 38 | } path="/schema" /> 39 | 40 | 41 |
42 | ); 43 | }; 44 | 45 | 46 | export default App; -------------------------------------------------------------------------------- /src/assets/bg_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/dangoDB_website/b578b836b76f007f9d2eeabec40a8c88c6000c0f/src/assets/bg_photo.png -------------------------------------------------------------------------------- /src/assets/ck_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/dangoDB_website/b578b836b76f007f9d2eeabec40a8c88c6000c0f/src/assets/ck_photo.png -------------------------------------------------------------------------------- /src/assets/dangoDB_logo_long_midboi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/dangoDB_website/b578b836b76f007f9d2eeabec40a8c88c6000c0f/src/assets/dangoDB_logo_long_midboi.png -------------------------------------------------------------------------------- /src/assets/dango_deno.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/dangoDB_website/b578b836b76f007f9d2eeabec40a8c88c6000c0f/src/assets/dango_deno.png -------------------------------------------------------------------------------- /src/assets/dango_deno_256 copy.ico: -------------------------------------------------------------------------------- 1 |  �.�PNG 2 |  3 | IHDR\r�forNTϢw�.�IDATx�� x�W��'w��FB�4$)$ ���@g SJ�̤0-�-�>��0-��Ni�I�a�@!C�{�\[�f[�����o�lɖ%��������_�}�eɖ��}��Ȗ������m�;��P� �S�g�-g666�D�W���cHq�t}(���=��9���>�Fâ ;}h� ��qN���眩��gߵ��}%\9Q��W���D?j�y�SmAe��,��wШ�A��.ݏ���w)�%���x~������pE`�ou�B�Ӈ�߲NxEк��T��2�����-��\ W��|i�*G2�&h (��힅�cX�U@��jC�{��������|� ��f��(��_/g���W��A�j���ƈ�WHH��'��A�~sS"Nm�4�a}�rF�P1°�_ۜ\��/TBo.�S���&����MG>�Vf;i��Y�wU>�Z�=��_ ZW����c���|� ԱU���fp��f�W���!A�!W� ?]Ԕ�v,1�뛛�� ��Q�/񊏅 }c��/�f~uy�V����7�}uЖ�����T�q�/q-�����x����O 4 | ^ۣ�d�ݫ����ǫ?U��J�v��RV�q���!�K� �W���G �t%`�J`Ǒ �$ħ{������x1W�֊�Eh֦_^�������1� $ ��ޅ���:P(���E���W����Z�k�]4+�e�\U�k�� �߹��d�I�#H����:�޲�e0�����q�xCƭ�.g��R���lqy�-�Ս�H�v��x�_��d+����*��Ӱ�', ���E�o;�h[7�w�_l�!�҄�B���.X����nl% 8 | ������?�x�o�j��B���sy}� |�@ ��oD+id�[|�����W`��,�J?eQL������k�Si�� 9 | K3�Э&���L��Þ{ّ(`a'�g|8#�����jg+�o�p�B� 10 | �f���V ���^J�[ѮdȪU���e33b��iW2w'Z�� ��2]���;����+������#��������}ڐ�S^[�s`��o���m�A[����5��hWƈ�E����ͥ߮ 12 | XC�6�-~�����J��|���t�w�[���6�Ɗ�Z��H��s�������Ž_t���[��bl� �%��?�9��[���ͨ~�V�z/���w��=�;~�8$�� 13 | ��p��} V葕���H�%��@�. z߯��5��+���g5!�m�@KO������CA����B�v��TVV�U�{ [��ݎ �m�`.�|{p@����ꀵ0� 14 | ���ǁi�vu8���9����;�[C��>y�!�zޛ���� 6�r`�<|&��W,ic��X�0{5|c�G����� �a9�+�zIrU�� ��a �R}0�qߣd��e ��{UUȖ5��? ��,� �0(�Q��X᪏_{��M�!��}_ 15 | ϥn�K���~N-�1��U���Or젱�V�}��+G*�Z��Z�ڂ^�p����g��mDZ_c�ib�,�{�7�*/6Ž�f��ʕ�7��ɻpt"�_�S\TL��l��W��I�蝉_W��z+�7����A����Bf����qv>{�: ����ua�����$l��ϟXg�E_�� CFem�6d7�sชOS��i^v>\m2+��Ak�� 16 | �o�P��Ī��:`)��7�֙�5騗�&� 17 | �u;����]J���ʀe���=u+��T 18 | ��� CJ(��-�߼:� 19 | �1%oKj�~ �2 )�d��F�Al��gB���p�`H���>�}ڰC��0Ę��'�����0 )xu6D�/ HT��'�*���Il�ֆ��A�W�k�|�p�`HY\*_� ڂ�P�#VZ�\W��X>�ve��0�V`��KC�6_^���C�� �>�:W�K���A�Mq�p�`�1F���,��5��2\aR�~F����s�8�!H���-��R��A��2�iӗ�=W�g*�0��w��oY ϥ C�>��!>yg 20 | @��g�n�� C����im�!Ts�&���+%h�Hr!�VUК�I?HL�.@R���G��1(������ C�)�y)�A�X5�=�W�|�6� ��G*t;\iB⅙{�A� �*l�WV+��J�b�{�Z?�w 21 | @���*�0��[[gt���B���4 !��2�S�KI~ �4 ���|kP�� @��Q��0l����YMȮT�_}���P Æ7y�"`Y����+ CF������:`�4\m2B���Uk|@����.�� ��0dXc�o�{���� ߃p�`�H�g�P�>��D R(��|8�~+\q"�Q����r�y� 22 | @��` 0 ���u�͇1�@)���Np������̆�HE��L" :m�Ϭ���9���%�A� ���~��Ț�fp"Y^^>�I��}b�$g��#X���9���I~����|��gim� ���6�Oˎt�� ��3����Hx" 24 | �X͆*�.�5%@���?mM�c�vT�+�ceк���_��l�|ez'�T2y�A���D$H�}�j8 �J)�̦�_$��h % L;��}�~_�����ݮ����aF'��t������T,pYS\6���P�O�Ă��O 25 | ��K@*(� �� ,�V9c�z�;Ȇ�(��`f�����Pʥ�o��*�&ƫ̉1�7�%�H���I�oY w�f ��*R��Ri �-��H +�)�d ���%����l4|�?=� �8�B~&�S �#��I�ߴ�n�9�i6�9�����-u��_��f p�XYY9��>,��8��:�!�X�'jc�C\l�vK��LsX�P���~��Xa�NM�n�r�@T�׿���U����?&��E�����5e�c @,���G�o�]�g�3���Ro׆�#~����}f p,XX(\�J&�c$rʤ�� 26 | ^W5�o��f- ԃ�cBO�o�$���'R?�%ޣ �Un�u���M�3i2��Y������ ��k~�����4Wl�� 27 | � �^��Tj��&�����).k.�L컀��Z>훉�.Y���Re}�:�A�H�W`���v�\��$����˪X�=n)ܭ�5ڭ��N*�AK 28 | wS���A@zL` ��:��ǥR���׵��S�L�c���KQ~H�>{nϠkx%�$`�X\\��h��ϛr�'�w�@�� 29 | R��.'�f2hB�M�a2��8����� 30 | >{�n L��E������+��hB��T��g���#���E�8� ���i���Ϥb�[���|�Ш 31 | �Ap�`���NK�RN>Y�c������oc;��]��l�s��7J�y���o�[{��"���! ޥR����E��W����T�� и��L����-E 𚙀�Ivg���ԋ��[���-#�.do�'�����|rO��D �� 32 | 9666N#��=����Q�Ǣ r�w�DD*�㲙� s���kep&�E�!~�\"� w�� ]! �a�n�~�#�s�;-q��A� �Nc�?�m��(�(`��|���]�X�����S����ë9d���9~z���k(|��n%g6h�����( 33 | �*�I�ƈ�Y��ǐ�oQ�~��p]�0Ӏ�bii� 34 | $�w;춧#�P��;��n �e�9o�C��X��2��m�|�BШ�u���\ƞ+>��B`�U�S_�o+�[����H(x�Ѡ�x�T,����M�ڊޖ�c��l�7�y�\F���� m��?=I�����7����h��$��a� 35 | �%o�Y9���|^�{dR�E6G����p(���Cp9̎^K��ǩ?��A*�^GY������&��!�8���~��q�9ٽw���jO��8Rb������Ś�_h�XH�,u%�(��b@�C-��j%�c4끢4���E���d��݃����V��)C��0�@�H�����j1�?=eeՋy��� ��o�K|J4�1N{�L"n'q& =c�k-Ղ@�?���3��Z��Ja����G� � 36 | �����3�N_��I�aM�����f�~��FPOȟn��mMup ���G,���8mo�-���\AHV�ګ�d��\&��1�i�����|��"��Ե\�.P����\&���&�<2P��|�A��G�'ƚU�T��Y��땄8 ȫ�|��]�P��6Zn�&�x f#p�XL�G��n�&v7ϩA=�N�ˆ�6����� ������3�a7�Q��5� ��\��߄ �����F��f#p� �G��������������fA��C[��i)�i� ���3��?�Q��� �)��p�,u�pML 'G*�,��`6���d�32�Ǡ�鷛� 37 | ��� ����VrZp��3�n��b�Y ��<|5� ��l�%.P?Pd�5T~.m8^��:v���5`��k�#x�H�_+���@�D� %�Ǩ��2���8p0�����?��@�P�� ��ڂ~��#�f1�wt��C '������l��s��=�C~9��� 38 | r�*�?�M>��?�c��{)�F�@jaP״ -XW�ye.��(U��-a?p���ۑ��wV�u6��jT�F-7��2�,&c�q̉��M!�)tl�y�.5�� @��ص�� X�fc7Œ�bq�jd�;ii@�x����=��MA�[�8B�q��z���<�JC���Ql����#�G�_bQ��ز%��Œ����+2�+��� ����w��˩5���K�&�fmfȎ?�lŊh�-@��8�@�P�$tS��ƺ���HY��߆ E �3�J�Y]"���]^O�ķ�@�8� 39 | �����] ����p#p��gN��Y���N�&�� =��>���sy��� �f"p�ז�Xb�oU��n�z�m �͔ �����L}�E�o����X�BN/A�=EȞ`��A"x8���$ߟ^6jMA��B5 p���2W"��~�ԩ�Z��y�g-%����������� 41 | P�֟o�m���.��P[Ñ����� } 42 | p�Q�P. �����R���؀����0_.�5�<�B¿����������-�(~6n����*�f*�K��vw���Wo���Y�Vбe��=��/F��B.�P�#�x�����)��������i[��ye�����ϗ���=A����l��7�zͺ��[�uW 43 | �6��@lVK���1�弁n݄�d�E��*bJ8U{N�bd�K�b5�O� 44 | �8�t���RR����oZi[T��>>��܍��-fcg�o�8m�P{�O*j���6+�|��@z=��k���|9!�֎���'k��it��d�nʎ=|7�N`��f��O��z\��k$W�=���ՙ��[��MAgt�t�����Fjw��r��?� �8�lB���)>���������Ӊ�Ƙ�c0C��Q(���G�o�}&�E�T,!Z]�>���gS��Ʈ� �G�j��†%�������kq�,��2��|�������Ҕ���s0K���SLָ��8����gB�-����t`C���z�Y��?ߙR�<�q>T�Q�K�8l�D##DENJ�.H\�|�C7�A@<, �7a�!�K�����M�լ�6���yH�~��k�p�����+�QT�#���7� �.{%�LՎ,�:�#��q�a�}gmk�1⺀V���*��dp�.��nG}��J!k��z��v*�.e�V���LB����G��-Ø�#W���xf+�w\��CJ��� �]f�l� �䬉βචդ'���f��dܥq=@��j !s�]‹���b��s�lS��� 45 | �����C�u����C��0b��h�M?���x�o(\18ٖ�k���0 �R���s�>�]h 46 | G���xf,�W��G�����h5z̴��q 8�R��l����pu`+��$���p�_!"}��n���?�L�|� ަb�1��@�� ��ƨ�����S�ɶ `� �h��؃{��]���p� �Es��}���sp-�( ?�(� A@����࢟|����=9ͥ�l���m֡�� {�Va8"4B�`0%�y�����a�}�u?q�՟������o��Gi�b|��/��nC��� 47 | `Z&��ݮ�6�" pp 48 | ��k5!����%0%��ϧ� sH���<��T|�x$��k�K8777A'�M�6�-���� 49 | E���o^�yR!u�- �W~���ï�>�^ 50 | X٨� A��1�<��Ÿ^j�*I��i ���u������X���4aG�TY� 51 | f/p W���R��A %�g��"}����K�sk݈F�(��ڂ�V��� �/���� 'm# 52 | ��p���K]2����W� -��śa��}������xw���_�����WK��Q/�+��l�]������>��~�>K{�l;k�,&��;�՟l_��*�jF^��li���@Ϥ��P���0���1O!$Wc�G`Я�c�.@�R��X��@Ⱦ0WY�f1�3�T��H�w��oߖ���c�Ĺ�A�6~,��u�&!u���׳3���ka=c�z~<����f���Ugp<�߯O!��k^Gl����7׮�Y ��&�yZv����؝gU�6 1��פ),� �~.�������R`�z�PY�Q���R`�lT���@�_��Y!�&X�3q�a�N��ܡ���A��@@o�g��V,k�#0�;����p�l�����Ǐ���m±�?�m�.����@ϸ���qP~H�K��S~��?�����ޗ�n�OIx�U+|`ɨw���� ��{���A������`��P��Ʌ�Ȣ����Ճ��G�91)�$��8nL*�k����eT�q�`=�;�"��G��ﶢ�~���=��B ��,\̃o' ��� �:����7ƶ3���@Olmm��m����/�p�.Vds�YA��B�O�Մ'`ŧ eȶͧ �������u^>� 53 | �]����+�oG�}�`i}���@Oxґ�w�@�q��� h 54 | �%���0a�/h�ù�@��S���'ڌa�%��� ��@o��rwr(� �R���v�����KW�Lz"2��_����?�@f����a=�L�L�3����/��hb[�̥�Y ���_a��~&�D7�y���g`&=1W^��� ���;�t�a��@��q|���#GX Ϧ�Y �l�"Χ�0�� �]����A���|�Vu����� �KO0�<�2tzaee�%��9n 55 | 5r)�1�4��OO�Lz�?{P�����1eV��S�f2�of�nІ�J��Go���� ���P� 56 | ������-q��D¿ ��h �ߌL)�5��{���e���|��|O�7���A���9K'j 57 | ���j�(�V�"����/C��Q�� ?�(� ?P�_�� \:���ߢ ;~��K;�F/���� 58 | ':��lZ ��=ط�?�J��H�zq�����(t��"V�����][[��@�Nbs�b���V�M~��Sb��&fw~<.� �T-2�o��<�T,1X�GwH}&�u)gWᯏu_"| ��6=�ȻLQ�S��5���j��?���7d��~<�unۻAN(��������a��ʀe���[���{��c@+?�&� 59 | &vSU�E�� 'I��v���3G=�G��Sᷬ�����"������Q�������z*�K��I�?�;��m�z.��[x��y<ƴU�,� �8��m0��AJ��|�:_&� ��ׅ���$� y�o?y2����3u������ ^FJ�l� s H�3g���m���O�!��,���j�H���`߸��?�o%�|�H��;�sɻ�1�BB�CB�oT��*�M~ew��=G1����4B̖ �8����O�22ﳵ�]ß�?�;�Xz��� 60 | Ը,�T��jͧn��}� �̍�8a�o Ƒ�6< ��<����D.ݾ���1�"��O@†�P.y�!�zV�������>a�`��O��||�1J����v�� 61 | ��� �l��V�D+�WTkT�޴]c���x���% Y�.G��8XI/C�ߚP���K,��U,��TH< �6d,o,�6ךol(��aٗ�vd�N�ĄF@�!�����V���Do��M�.�A�EO4�c� 7�R �uY>�+暓��=�A�u܀~7������bmm�̛��� 62 | ������Co�2��iC���k����-�!ҧ6��B�P����nG�%hU�~��EA0�"�M�M�w+�������sh"�t��dV�C���8S��&��H� R`k��́���e�[��u�,��}�D�D����������:�����L��?�⯰t��I��ʷ��B��*r�� $h�n ����>e�l��` ���D�=w�Q�62�W^s��)�x/ ����U�_�g2oëѥ޿-����^�<Е??~� ��A)j�o�������5�Z���g6Y��L\�agsg��dn�n����ج~��W�����)�I4T ρ|�ЛRn m�u1;����G�ui�y4 63 | x�F#�F�=�L� z��!�I&�q�F�s�^�m�I�y���z��@"rS��xn�X�w�Ȗ�?>h@��>SYK��XāG��'q�b�,'�!R�8p�3brHK�9����wq���c�-�Sf�L%C- O��1�i�r �UЖ,��ζ_SG�R� }K�?�f��/XX�bss������R�r�lq��la����-���m�L�P:y��fS��gR7's�2��u��ū+��+++���r�'�3|�Pz c����b���>�Q��cȧm��%4ɷ(VMs��A����|��H8��a�;�KȒ��{�+h�R9]Y]=[(-\����>�˼-�I�HF���C�zb��=����X����$oN��n��/\�,�+�Ņ��a:k���6�N�?c��}q��!6i�rA��>_�T^�=pK[����Ԉ��ݷ� �l�p�:h�t1~nM��]\)_u����7mQ���3꣮�v{�|y�Ȩ|)�� �u��]��S�P�:��Ë+�p,80x*++�t!��0�*`ɧ泷���$��[�2�G+@v8׷�vͶl��V�g�9�D^��U��L�!w%� ��J��r�����^|��J���&2�����?��o^ �G�ӖJ�S�N�oE�92s��K��fo����e�R� �t������im���o&�� Pԫ�p�����T���~��x����a�YQW�,F��|�VU�Z�P�|T,ˡ\�ޣ����M�5��ϩ ;ؐ�F� 0E�/�VG�@܀Z ����GZ��H�ި{�U 4� ��b��3y���Th���}�9���q������+���� 64 | �3��(k��4��l�`��� 65 | p���,xGާX@C�j@ˊ+�7��Y3 �;�!���� % ol�½j�]7H��F �B&�� 66 | �;w;� �'+��C#,���]ƨk+��&%��tl�n|��\B���RJt������Y[���<��v�Yj��iLkƨ���b�-C�Y�xґG�J� �Y��vꇳ��k� >���A[�c�\�C����d�@�aC~�NS���r�0�q��vr���ǒ �k���Z����e�hK��f�y�A�%4~m�{�v��_F���l�.(�N ;;;�K�9d�N#��\_ �)���� XK���b�y����>��R�rT?;>�+�A�������Vo���?a���a�y�E�/���*�$r����D>s�����Wxu�X!�����2Z��OIEND�B`� -------------------------------------------------------------------------------- /src/assets/dango_deno_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/dangoDB_website/b578b836b76f007f9d2eeabec40a8c88c6000c0f/src/assets/dango_deno_256.png -------------------------------------------------------------------------------- /src/assets/ey_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/dangoDB_website/b578b836b76f007f9d2eeabec40a8c88c6000c0f/src/assets/ey_photo.png -------------------------------------------------------------------------------- /src/assets/sj_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/dangoDB_website/b578b836b76f007f9d2eeabec40a8c88c6000c0f/src/assets/sj_photo.png -------------------------------------------------------------------------------- /src/components/ContactCard.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { AiOutlineGithub, AiFillLinkedin } from 'react-icons/ai'; 3 | 4 | // Contact component holding software engineer information 5 | function ContactCard({ photo, linkedin, github, name }) { 6 | return ( 7 |
  • 8 | Engineer Headshot 9 | {name} 10 | Software Engineer 11 | 19 |
  • 20 | ); 21 | }; 22 | 23 | export default ContactCard; -------------------------------------------------------------------------------- /src/components/CopyButton.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import {CopyToClipboard} from 'react-copy-to-clipboard'; 3 | import { FaRegCopy } from 'react-icons/fa'; 4 | 5 | // Copy button after schema has been generated 6 | const CopyButton = ({ parsedProps }) => { 7 | const[copied, setCopied] = React.useState(false); 8 | 9 | return ( 10 |
    11 | setCopied(true)}> 13 | 14 | 15 |
    16 | ); 17 | }; 18 | 19 | export default CopyButton; 20 | 21 | -------------------------------------------------------------------------------- /src/components/Hero.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import dangoLogo from '../assets/dangoDB_logo_long_midboi.png' 3 | 4 | // Hero banner for home page 5 | function Hero() { 6 | 7 | return ( 8 |
    9 | 10 |
    11 | ); 12 | }; 13 | 14 | export default Hero; -------------------------------------------------------------------------------- /src/components/HomeFooter.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import bill from '../assets/bg_photo.png' 3 | import celeste from '../assets/ck_photo.png' 4 | import emilia from '../assets/ey_photo.png' 5 | import steve from '../assets/sj_photo.png' 6 | import ContactCard from './ContactCard' 7 | 8 | // Contact container housing all contact card information 9 | class ContactInfo { 10 | constructor(photo, linkedin, github, name) { 11 | this.photo = photo; 12 | this.linkedin = linkedin; 13 | this.github = github; 14 | this.name = name; 15 | } 16 | }; 17 | 18 | // dangoDB Software Engineer information 19 | const BILL = new ContactInfo(bill, 'https://www.linkedin.com/in/bill-greco/', 'https://github.com/wgreco13', 'Bill Greco',); 20 | const CELESTE = new ContactInfo(celeste, 'https://www.linkedin.com/in/celeste-knopf37/','https://github.com/DHolliday1881', 'Celeste Knopf'); 21 | const EMILIA = new ContactInfo(emilia, 'https://www.linkedin.com/in/emiliayoffie/', 'https://github.com/emiliayoffie', 'Emilia Yoffie'); 22 | const STEVE = new ContactInfo(steve, 'https://www.linkedin.com/in/stephen-jue09/','https://github.com/kaizenjoo', 'Steve Jue'); 23 | const TEAMMEMBERS = [BILL, CELESTE, EMILIA, STEVE] 24 | 25 | // Home Footer renders all contact information to container 26 | function HomeFooter() { 27 | 28 | const teamInfo = TEAMMEMBERS.reduce((acc, person) => { 29 | acc.push() 30 | return acc; 31 | }, []) 32 | 33 | return ( 34 |
    35 |

    Meet the Team

    36 |
      37 | { teamInfo } 38 |
    39 |
    40 | ); 41 | }; 42 | 43 | export default HomeFooter; -------------------------------------------------------------------------------- /src/components/PropButton.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | // Saved property button 4 | const PropButton = ({ propName, currentProp, setCurrentProp }) => { 5 | 6 | const [showPropPreview, setShowPropPreview] = useState(false); 7 | 8 | return ( 9 |
    10 | 11 |
    12 |
    13 | 14 |
    15 | {showPropPreview && 16 |
    17 |

    here where the currentProp goes

    18 | 19 |
    20 | } 21 |
    22 |
    23 | ) 24 | }; 25 | 26 | 27 | 28 | export default PropButton; -------------------------------------------------------------------------------- /src/components/PropForm.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import TypeButton from './buttons/TypeButton'; 3 | import SetRequiredButton from './buttons/SetRequiredButton'; 4 | import SetUniqueButton from './buttons/SetUniqueButton'; 5 | 6 | // Property form for storing property object for later use - passed onto Property Button 7 | const PropForm = ({ addProp, setCurrentProp }) => { 8 | 9 | // Schema field needed in dangoDB; 10 | const [propInfo, setPropInfo] = React.useState({ 11 | propName: '', 12 | type: 'number', 13 | required: false, 14 | unique: false, 15 | defaultVal: '', 16 | validationFunc: false, 17 | }); 18 | 19 | const handleChangePropName = (event) => { 20 | setPropInfo({ 21 | ...propInfo, 22 | propName: event.target.value, 23 | }); 24 | }; 25 | 26 | const handleChangeDefaultVal = (event) => { 27 | setPropInfo({ 28 | ...propInfo, 29 | defaultVal: event.target.value, 30 | }); 31 | }; 32 | 33 | const handleChangeFunc = (event) => { 34 | setPropInfo({ 35 | ...propInfo, 36 | validationFunc: event.target.checked, 37 | }); 38 | }; 39 | 40 | // saving schema session data via cookies and reseting Property Form fields 41 | const handleClick = (event) => { 42 | event.preventDefault(); 43 | addProp(propInfo); 44 | setCurrentProp({ 45 | index: undefined, 46 | }); 47 | setPropInfo({ 48 | propName: '', 49 | type: 'number', 50 | required: false, 51 | unique: false, 52 | defaultVal: '', 53 | validationFunc: false, 54 | }); 55 | }; 56 | 57 | return ( 58 | 59 |
    60 |

    Property Generator

    61 |
    62 |
    63 |
    64 | 65 | 66 | 72 |
    73 |
    74 | 79 |
    80 |
    81 | 83 | 84 |
    85 |
    86 | 87 | 88 |
    89 |
    90 | 91 | 97 |
    98 |
    99 | 102 | 108 |
    109 |
    110 |
    111 |
    112 | 113 |
    114 |
    115 | ); 116 | }; 117 | 118 | 119 | export default PropForm; -------------------------------------------------------------------------------- /src/components/SchemaGenerator.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import UserSchema from './UserSchema'; 3 | 4 | // Schema creation from saved property form 5 | const SchemaGenerator = ({ generateSchema, setGenerateSchema, savedProps }) => { 6 | return ( 7 |
    8 |
    9 | 13 |
    14 |
    15 | ); 16 | }; 17 | 18 | 19 | export default SchemaGenerator; -------------------------------------------------------------------------------- /src/components/UserSchema.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import CodeMirror from '@uiw/react-codemirror'; 3 | import { javascript } from '@codemirror/lang-javascript'; 4 | import { oneDark } from '@codemirror/theme-one-dark'; 5 | import CopyButton from './CopyButton'; 6 | 7 | 8 | // User Schema is a rendered schema after clicking generate schema with copy funcationality 9 | const UserSchema = ({ generateSchema, savedProps }) => { 10 | 11 | const [parsedProps, setParsedProps] = React.useState(''); 12 | 13 | // Temporary useEffect 14 | React.useEffect(() => { 15 | setParsedProps(parseState(savedProps)); 16 | }, [savedProps]); 17 | 18 | return ( 19 | 20 |
    21 |
    22 | 27 |
    28 |
    29 | 38 |
    39 |
    40 | ); 41 | }; 42 | 43 | 44 | const parseState = (state) => { 45 | if (state.length === 0) return ''; 46 | const indent = ' '; 47 | const newLine = '\n'; 48 | const objectEnd = ': '; 49 | let numIndent = 1; 50 | let code = 'const mySchema = dango.schema('.concat(newLine, indent.repeat(numIndent), '{'); 51 | numIndent += 1; 52 | for (let i = 0; i < state.length; i++) { 53 | code = code.concat(newLine); 54 | parseObject(state[i]); 55 | } 56 | numIndent -= 1; 57 | code = code.concat(newLine, indent.repeat(numIndent),'}', newLine, ');'); 58 | 59 | function parseObject (obj) { 60 | code = code.concat(indent.repeat(numIndent), obj.propName, objectEnd, newLine, indent.repeat(++numIndent), '{', newLine); 61 | numIndent += 1; 62 | for (const key in obj) { 63 | if (key !== 'propName') { 64 | const parsedKey = parseKey(key) 65 | const parsedValue = parseValue(key, obj[key]) 66 | code = code.concat(indent.repeat(numIndent), parsedKey, objectEnd); 67 | code = code.concat(parsedValue,','); 68 | code = code.concat(newLine); 69 | } 70 | } 71 | code = code.concat(indent.repeat(--numIndent), '},'); 72 | numIndent -= 1; 73 | }; 74 | 75 | function parseKey (key) { 76 | if (key === 'defaultVal') key = 'default'; 77 | else if (key === 'validationFunc') key = 'validator'; 78 | return key; 79 | }; 80 | 81 | function parseValue (key, value) { 82 | if (key === 'defaultVal' && value === '') return null; 83 | else if (key === 'validationFunc' && value === false) return null; 84 | else if (key === 'validationFunc' && value === true) return '/** Insert Callback Function Here */'; 85 | else if (key === 'type' || key === 'defaultVal') return `'${value}'`; 86 | else return value; 87 | }; 88 | return code; 89 | }; 90 | 91 | 92 | export default UserSchema; 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | // ,--._ 131 | // `. `. ,-. 132 | // `.`. `. ,' ) 133 | // \`: \ ,' / 134 | // \`: ),. ,-' , / 135 | // ( : |:::. ,-' ,' ,' 136 | // `.;: |:::: ,' ,:' ,-' 137 | // ,^-. `,--.-/ ,' _,' 138 | // (__ ^ ( _,' 139 | // __((o\ __ ,-' 140 | // ,',-. ((o) / 141 | // ,',' `. `-- ( 142 | // |' ,` \ 143 | // | ,:' ` | 144 | // ( `-- :-. | 145 | // `,.__ ,-,' ; 146 | // (_/ `,__,-' / ,' 147 | // |\`--|_/,' ,' _,' 148 | // \_^--^,',-' -'( 149 | // (_`--',' `-. 150 | // ;;;;' ::::.`------. 151 | // ,:: `:::: `:. `. 152 | // ,:::` ::::: `::. \ 153 | // ;::::: `:::: `:: \ 154 | // |::::: `::' `: ; 155 | // |:::::. ;' ; | 156 | // |:::::; ) | 157 | // |:::::: , `::' | \ 158 | // |::::::. ;. :' ; ::. 159 | // |::::,:: :. : ,;: |:: 160 | // ;:::;`":: ,::: |,-' `: |::, 161 | // /;::| `--;""';' | :. (`";' 162 | // \ ; ; | :: `, 163 | // ; | | ,:; | : 164 | // | ; | |:; | | 165 | // | | | |: | | 166 | // | | | ;: | | 167 | // /___| /____| ,:__| 168 | // / / -hrr- / | / ) 169 | // `---' '----' `---' 170 | 171 | // ------------------------------------------------ 172 | -------------------------------------------------------------------------------- /src/components/buttons/Buttons.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import SetRequiredButton from './SetRequiredButton'; 3 | import SetUniqueButton from './SetUniqueButton'; 4 | 5 | 6 | // Button components for Property Form 7 | const Buttons = () => { 8 | return ( 9 |
    10 | 11 | 12 | 13 |
    14 | ); 15 | }; 16 | 17 | export default Buttons; 18 | -------------------------------------------------------------------------------- /src/components/buttons/SetRequiredButton.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | // Button component for Required boolean in Property creator form 4 | const SetRequiredButton = ({ propInfo, setPropInfo }) => { 5 | 6 | return ( 7 |
    8 | {[ 9 | { name: 'true', value: true }, 10 | { name: 'false', value: false }, 11 | ].map((option) => ( 12 | 28 | ))} 29 |
    30 | ); 31 | }; 32 | 33 | export default SetRequiredButton; 34 | -------------------------------------------------------------------------------- /src/components/buttons/SetUniqueButton.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | // Button component for Unique boolean in Property creator form 4 | const SetUniqueButton = ({ propInfo, setPropInfo }) => { 5 | return ( 6 |
    7 | {[ 8 | { name: 'true', value: true }, 9 | { name: 'false', value: false }, 10 | ].map((option) => ( 11 | 27 | ))} 28 |
    29 | ); 30 | }; 31 | 32 | export default SetUniqueButton; -------------------------------------------------------------------------------- /src/components/buttons/TypeButton.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | // Drop down type button for Property Generator 4 | const TypeButton = ({ propInfo, setPropInfo }) => { 5 | const typeOptions = [ 6 | { name: 'number', value: 'number' }, 7 | { name: 'decimal128', value: 'decimal128' }, 8 | { name: 'string', value: 'string' }, 9 | { name: 'boolean', value: 'boolean' }, 10 | { name: 'objectid', value: 'objectid' }, 11 | { name: 'UUID', value: 'UUID' }, 12 | { name: 'date', value: 'date' }, 13 | ]; 14 | 15 | const handleTypeChange = (event) => { 16 | setPropInfo({ 17 | ...propInfo, 18 | type: event.target.value, 19 | }); 20 | }; 21 | 22 | return ( 23 |
    24 | 31 |
    32 | ); 33 | }; 34 | 35 | // Dropdown event change for Type button 36 | const Dropdown = ({ value, handleTypeChange, typeOptions }) => { 37 | return ( 38 | 46 | ); 47 | }; 48 | 49 | export default TypeButton; -------------------------------------------------------------------------------- /src/components/containers/MainContainer.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import PropForm from '../PropForm'; 3 | import SideBar from './SideBar'; 4 | import SchemaGenerator from '../SchemaGenerator'; 5 | 6 | // Main container on Schema Page holding all components 7 | const MainContainer = ({ savedProps, setSavedProps }) => { 8 | 9 | // Setting state for Generate Schema and New Property buttons 10 | const [currentProp, setCurrentProp] = React.useState({ index: undefined }); 11 | const [generateSchema, setGenerateSchema] = React.useState(false); 12 | 13 | const schemaToggler = () => { 14 | setGenerateSchema(!generateSchema); 15 | }; 16 | const addProp = (property) => { 17 | if (currentProp.index === undefined) { 18 | setSavedProps([...savedProps, property]); 19 | } 20 | else { 21 | const saved = savedProps.slice(); 22 | saved[currentProp.index] = property; 23 | setSavedProps(saved); 24 | } 25 | }; 26 | 27 | // Server request and setting session cookie to save on page reload 28 | React.useEffect(() => { 29 | console.log('here', savedProps.length); 30 | if (savedProps.length !== 0) { 31 | const response = fetch('/save-schema', { 32 | method: 'POST', 33 | headers: { 34 | 'Content-Type': 'application/json', 35 | }, 36 | body: JSON.stringify({ schema: savedProps }) 37 | }) 38 | .catch((err) => { 39 | console.log(`${err}`); 40 | }); 41 | } 42 | }, [savedProps]); 43 | 44 | return ( 45 |
    46 | {/* */} 51 |
    52 |
    53 | {generateSchema === false && } 57 | {generateSchema === true && } 62 |
    63 |
    64 | {generateSchema === true && } 67 | {generateSchema === false && } 70 |
    71 |
    72 |
    73 | ); 74 | }; 75 | 76 | export default MainContainer; 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /src/components/containers/SideBar.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import PropButton from '../PropButton'; 3 | 4 | 5 | // Sidebar component housing all property objects saved 6 | const SideBar = ({ savedProps, currentProp, setCurrentProp }) => { 7 | 8 | const sidePropElement = savedProps.map((property) => { 9 | ; 15 | }); 16 | 17 | return ( 18 |
    19 | {sidePropElement} 20 |
    21 | ); 22 | }; 23 | 24 | export default SideBar; 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | // ⢀⡴⠑⡄⠀⠀⠀⠀⠀⠀⠀⣀⣀⣤⣤⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ 40 | // ⠸⡇⠀⠿⡀⠀⠀⠀⣀⡴⢿⣿⣿⣿⣿⣿⣿⣿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀ 41 | // ⠀⠀⠀⠀⠑⢄⣠⠾⠁⣀⣄⡈⠙⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀ 42 | // ⠀⠀⠀⠀⢀⡀⠁⠀⠀⠈⠙⠛⠂⠈⣿⣿⣿⣿⣿⠿⡿⢿⣆⠀⠀⠀⠀⠀⠀⠀ 43 | // ⠀⠀⠀⢀⡾⣁⣀⠀⠴⠂⠙⣗⡀⠀⢻⣿⣿⠭⢤⣴⣦⣤⣹⠀⠀⠀⢀⢴⣶⣆ 44 | // ⠀⠀⢀⣾⣿⣿⣿⣷⣮⣽⣾⣿⣥⣴⣿⣿⡿⢂⠔⢚⡿⢿⣿⣦⣴⣾⠁⠸⣼⡿ 45 | // ⠀⢀⡞⠁⠙⠻⠿⠟⠉⠀⠛⢹⣿⣿⣿⣿⣿⣌⢤⣼⣿⣾⣿⡟⠉⠀⠀⠀⠀⠀ 46 | // ⠀⣾⣷⣶⠇⠀⠀⣤⣄⣀⡀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀ 47 | // ⠀⠉⠈⠉⠀⠀⢦⡈⢻⣿⣿⣿⣶⣶⣶⣶⣤⣽⡹⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀ 48 | // ⠀⠀⠀⠀⠀⠀⠀⠉⠲⣽⡻⢿⣿⣿⣿⣿⣿⣿⣷⣜⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀ 49 | // ⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣷⣶⣮⣭⣽⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀ 50 | // ⠀⠀⠀⠀⠀⠀⣀⣀⣈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀ 51 | // ⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀ 52 | // ⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀ 53 | // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠻⠿⠿⠿⠿⠛⠉ 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /src/components/website/DemoPage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function Demo() { 4 | return ( 5 |

    this is the demopage

    6 | ); 7 | } 8 | 9 | export default Demo; -------------------------------------------------------------------------------- /src/components/website/DocsPage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function Docs() { 4 | return ( 5 |

    this is the docs page

    6 | ); 7 | } 8 | 9 | export default Docs; -------------------------------------------------------------------------------- /src/components/website/HomePage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Hero from '../Hero'; 3 | import HomeFooter from '../HomeFooter' 4 | import { SiMongodb } from 'react-icons/si'; 5 | import { AiFillDatabase } from 'react-icons/ai'; 6 | import { FaDatabase } from 'react-icons/fa'; 7 | 8 | 9 | // Home page containing hero, main content and footer 10 | function Home() { 11 | return ( 12 |
    13 |
    14 | 15 |
    16 |

    17 | dangoDB 18 | is a light-weight 19 | MongoDB 20 | Object Document Mapper (ODM) built for 21 | Deno 22 | . It provides the core functionality and familiar look and feel of established Node-based libraries for the Deno runtime. 23 |

    24 |
    25 |
    26 |
    27 |
    28 | 29 |

    Validate

    30 |

    Implement data type-casting and schema validation to structure your database.

    31 |
    32 |
    33 | 34 |

    Query

    35 |

    Make quick, model-based queries to your MongoDB database.

    36 |
    37 |
    38 | 39 |

    Simplify

    40 |

    Allow the library to abstract away connection and driver boilerplate.

    41 |
    42 |
    43 |
    44 |

    Get Started

    45 |
    46 | 47 | 48 |

    Import the Library

    49 |

    Head over to Deno.land to import the dangoDB library, connect to your MongoDB instance, and get started in just minutes.

    50 |
    51 | 52 | 53 |

    Design Your Schema

    54 |

    Build your schema with our easy-to-use schema generator. With just a few clicks, you can copy and paste your new schema straight to your codebase.

    55 |
    56 |
    57 |
    58 | 59 |
    60 | ); 61 | }; 62 | 63 | export default Home; -------------------------------------------------------------------------------- /src/components/website/SchemaPage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import MainContainer from '../containers/MainContainer'; 3 | 4 | // Schema Page housing Main Container holding all components 5 | function Schema({ savedProps, setSavedProps }) { 6 | return ( 7 |
    8 | 9 |
    10 | ); 11 | } 12 | 13 | export default Schema; 14 | -------------------------------------------------------------------------------- /src/components/website/navbar/NavBar.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Link } from 'react-router-dom'; 3 | import { AiOutlineGithub } from 'react-icons/ai'; 4 | import { SiDeno } from 'react-icons/si'; 5 | import dangoDeno from '../../../assets/dango_deno.png'; 6 | 7 | 8 | // Navbar container with linked routes 9 | const NavBar = () => { 10 | return ( 11 | 48 | 49 | ); 50 | }; 51 | 52 | export default NavBar; 53 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | dangoDB: A MongoDB ODM for Deno 8 | 9 | 10 | 11 |
    12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM, { render } from 'react-dom'; 3 | import { createRoot } from 'react-dom/client'; 4 | import App from './App.jsx'; 5 | import styles from './style/styles.scss'; 6 | 7 | const container = document.getElementById('root'); 8 | const root = createRoot(container); 9 | root.render(); 10 | -------------------------------------------------------------------------------- /src/myIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslabs-beta/dangoDB_website/b578b836b76f007f9d2eeabec40a8c88c6000c0f/src/myIcon.ico -------------------------------------------------------------------------------- /src/style/base/_boilerplate.scss: -------------------------------------------------------------------------------- 1 | @use './colors' as c; 2 | @use './typography' as t; 3 | 4 | // all base and reset styling for webpage 5 | 6 | html, 7 | body, 8 | div, 9 | span, 10 | applet, 11 | object, 12 | iframe, 13 | h1, 14 | h2, 15 | h3, 16 | h4, 17 | h5, 18 | h6, 19 | p, 20 | blockquote, 21 | pre, 22 | a, 23 | abbr, 24 | acronym, 25 | address, 26 | big, 27 | cite, 28 | code, 29 | del, 30 | dfn, 31 | em, 32 | img, 33 | ins, 34 | kbd, 35 | q, 36 | s, 37 | samp, 38 | small, 39 | strike, 40 | strong, 41 | sub, 42 | sup, 43 | tt, 44 | var, 45 | b, 46 | u, 47 | i, 48 | center, 49 | dl, 50 | dt, 51 | dd, 52 | ol, 53 | ul, 54 | li, 55 | fieldset, 56 | form, 57 | label, 58 | legend, 59 | table, 60 | caption, 61 | tbody, 62 | tfoot, 63 | thead, 64 | tr, 65 | th, 66 | td, 67 | article, 68 | aside, 69 | canvas, 70 | details, 71 | embed, 72 | figure, 73 | figcaption, 74 | footer, 75 | header, 76 | hgroup, 77 | menu, 78 | nav, 79 | output, 80 | ruby, 81 | section, 82 | summary, 83 | time, 84 | mark, 85 | audio, 86 | video { 87 | margin: 0; 88 | padding: 0; 89 | border: 0; 90 | font-size: 100%; 91 | font: inherit; 92 | vertical-align: baseline; 93 | } 94 | 95 | /* HTML5 display-role reset for older browsers */ 96 | article, 97 | aside, 98 | details, 99 | figcaption, 100 | figure, 101 | footer, 102 | header, 103 | hgroup, 104 | menu, 105 | nav, 106 | section { 107 | display: block; 108 | } 109 | body { 110 | line-height: 1; 111 | } 112 | ol, 113 | ul { 114 | list-style: none; 115 | } 116 | blockquote, 117 | q { 118 | quotes: none; 119 | } 120 | blockquote:before, 121 | blockquote:after, 122 | q:before, 123 | q:after { 124 | content: ''; 125 | content: none; 126 | } 127 | table { 128 | border-collapse: collapse; 129 | border-spacing: 0; 130 | } 131 | html { 132 | box-sizing: border-box; 133 | font-size: 100%; 134 | } 135 | 136 | *, 137 | *:before, 138 | *:after { 139 | -webkit-box-sizing: border-box; 140 | -moz-box-sizing: border-box; 141 | box-sizing: border-box; 142 | } 143 | 144 | 145 | body { 146 | margin: 0; 147 | padding: 0; 148 | background-color: c.$bkrd-primary-color; 149 | color: c.$primary-black; 150 | font-family: t.$font-montserrat; 151 | } 152 | 153 | img { 154 | width: 100%; 155 | } 156 | 157 | #root { 158 | height: 100%; 159 | } -------------------------------------------------------------------------------- /src/style/base/_colors.scss: -------------------------------------------------------------------------------- 1 | // website color variables 2 | 3 | $bkrd-primary-color: #FDFDFA; 4 | 5 | $primary-black: #181818; 6 | $primary-grey: #645E59; 7 | $primary-grey-drk: #322f2c; 8 | 9 | $primary-color-xdrk: #67BF9F; 10 | $primary-color-drk: #82D3B4; 11 | $primary-color: #adcec2; 12 | $primary-color-lt: #c1d9ce; 13 | $primary-color-xlt: #d8e6df; 14 | 15 | $secondary-color-xdrk:#638FDC; 16 | $secondary-color-drk: #79ACFF; 17 | $secondary-color: #b0c5e7; 18 | $secondary-color-lt: #b6cbe0; 19 | $secondary-color-xlt: #cad7e4; 20 | 21 | $tertiary-color-xdrk:#DE70A5; 22 | $tertiary-color-drk: #FF99C9; 23 | $tertiary-color: #ECC2D6; 24 | $tertiary-color-lt: #F6E1EB; 25 | $tertiary-color-xlt: #FAF0F5; 26 | 27 | $linen-color-lt:#FDFDFA; 28 | $linen-color: #fff7f1; 29 | $linen-color-drk: #EEE3D9; 30 | -------------------------------------------------------------------------------- /src/style/base/_index.scss: -------------------------------------------------------------------------------- 1 | @forward 'colors'; 2 | @forward 'mixins'; 3 | @forward 'typography'; 4 | @forward 'boilerplate'; -------------------------------------------------------------------------------- /src/style/base/_mixins.scss: -------------------------------------------------------------------------------- 1 | // header height 2 | $headerHeight: 100px; 3 | 4 | // Breakpoints 5 | @mixin smMinBreakPoint { 6 | } 7 | 8 | @mixin mdMinBreakPoint { 9 | } 10 | 11 | @mixin lgMinBreakPoint { 12 | } 13 | 14 | @mixin xlMinBreakPoint { 15 | } ; 16 | -------------------------------------------------------------------------------- /src/style/base/_typography.scss: -------------------------------------------------------------------------------- 1 | @use './mixins'; 2 | @use './colors' as c; 3 | 4 | // All typography for website 5 | 6 | /* Google Font Import */ 7 | @import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Questrial&display=swap'); 8 | 9 | // website font variables 10 | $font-montserrat: 'Montserrat', sans-serif; 11 | $font-questrial: 'Questrial', sans-serif; 12 | 13 | html { 14 | font-size: 0.625em; 15 | font-family: $font-montserrat, $font-questrial; 16 | } 17 | 18 | h1, h2, h3, h4, h5, h6 { 19 | // color: ; 20 | margin-top: 0; 21 | } 22 | 23 | h1 { 24 | margin-top: 10px 0; 25 | font-size: 3.5rem; 26 | line-height: 1.2; 27 | } 28 | 29 | h2 { 30 | margin-top: 10px 0; 31 | font-size: 2.75rem; 32 | line-height: 1.2; 33 | } 34 | 35 | h3 { 36 | font-size: 2.25rem; 37 | } 38 | 39 | h4 { 40 | font-size: 1.65rem; 41 | } 42 | 43 | p { 44 | font-size: 1.20rem; 45 | margin-bottom: 1.25rem; 46 | } 47 | 48 | ul { 49 | list-style: none; 50 | } 51 | 52 | a, a:visited, a:active { 53 | text-decoration: none; 54 | } 55 | 56 | .small { 57 | font-size: .95rem; 58 | } 59 | -------------------------------------------------------------------------------- /src/style/layouts/_demoPage.scss: -------------------------------------------------------------------------------- 1 | @use '../base/colors' as c; 2 | @use '../base/typography' as t; 3 | -------------------------------------------------------------------------------- /src/style/layouts/_docsPage.scss: -------------------------------------------------------------------------------- 1 | @use '../base/colors' as c; 2 | @use '../base/typography' as t; 3 | -------------------------------------------------------------------------------- /src/style/layouts/_homePage.scss: -------------------------------------------------------------------------------- 1 | @use '../base/colors' as c; 2 | @use '../base/typography' as t; 3 | 4 | // Home page main content styling 5 | .main-content { 6 | padding: 10%; 7 | } 8 | 9 | // Hero banner styling 10 | .hero-container { 11 | text-align: center; 12 | } 13 | 14 | .home-hero-container { 15 | display: flex; 16 | padding: 5% 10%; 17 | 18 | .main-description { 19 | font-family: t.$font-questrial; 20 | display: flex; 21 | justify-content: center; 22 | align-items: center; 23 | text-align: left; 24 | flex: 1 0 50%; 25 | 26 | h1 { 27 | margin-top: 10px 0; 28 | font-size: 3.5rem; 29 | line-height: 1.5; 30 | font-weight: bold; 31 | } 32 | 33 | p { 34 | line-height: 1.5; 35 | font-size: 1.5rem; 36 | } 37 | 38 | a { 39 | color: c.$secondary-color; 40 | 41 | &:hover { 42 | color: c.$secondary-color-drk; 43 | } 44 | } 45 | } 46 | } 47 | 48 | @media screen and (max-width: 750px) { 49 | .home-hero-container { 50 | flex-direction: column; 51 | } 52 | } 53 | 54 | #dango-main-logo { 55 | padding-top: 1rem 0; 56 | flex: 1 0 50%; 57 | } 58 | 59 | 60 | @media screen and (max-width: 750px) { 61 | .home-hero-container { 62 | flex-direction: column; 63 | 64 | .main-description { 65 | text-align: center; 66 | 67 | .dango-text { 68 | display: inline; 69 | color: c.$primary-color-drk; 70 | } 71 | } 72 | } 73 | } 74 | 75 | // Main features styling 76 | .main-features { 77 | background-color: c.$primary-color-xlt; 78 | display: flex; 79 | justify-content: space-evenly; 80 | text-align: center; 81 | gap: 2rem; 82 | 83 | .feature { 84 | display: flex; 85 | flex-direction: column; 86 | justify-content: flex-start; 87 | align-items: center; 88 | gap: 1rem; 89 | flex: 1 0 33%; 90 | flex-wrap: wrap; 91 | } 92 | 93 | .feature-icon { 94 | color: c.$primary-grey; 95 | height: 3rem; 96 | width: 3rem; 97 | } 98 | 99 | .feature-title { 100 | font-family: t.$font-questrial; 101 | font-size: 2.75rem; 102 | color: c.$primary-grey; 103 | } 104 | 105 | .feature-description { 106 | font-size: 1.25rem; 107 | line-height: 1.2; 108 | } 109 | } 110 | 111 | @media screen and (max-width: 750px) { 112 | .main-features { 113 | flex-direction: column; 114 | } 115 | } 116 | 117 | // Get started banner styling housing schema and dangoDB 118 | .main-get-started { 119 | display: flex; 120 | justify-content: center; 121 | flex-direction: column; 122 | align-items: center; 123 | gap: 2rem; 124 | 125 | .get-started-title { 126 | font-family: t.$font-questrial; 127 | font-size: 2.75rem; 128 | color: c.$primary-grey-drk; 129 | } 130 | 131 | .get-started-content { 132 | display: flex; 133 | justify-content: space-between; 134 | gap: 2rem; 135 | :hover { 136 | transform: scale(1.05); 137 | } 138 | } 139 | 140 | .get-started-content-container { 141 | display: flex; 142 | flex-direction: column; 143 | align-items: center; 144 | text-align: center; 145 | flex: 1 1 0px; 146 | background-color: c.$primary-color-xlt; 147 | border-radius: 8px; 148 | padding: 1.5rem; 149 | gap: .5rem; 150 | 151 | &:hover { 152 | transform: scale(1); 153 | } 154 | 155 | .get-started-content-title { 156 | font-family: t.$font-questrial; 157 | font-size: 2rem; 158 | color: c.$primary-grey; 159 | } 160 | 161 | .get-started-content-description { 162 | line-height: 1.2; 163 | font-size: 1.1rem; 164 | color: c.$primary-grey; 165 | } 166 | } 167 | } 168 | 169 | @media screen and (max-width: 750px){ 170 | .get-started-content { 171 | flex-direction: column; 172 | } 173 | } 174 | 175 | // Home Footer contact component styling 176 | .home-footer-container { 177 | background: c.$primary-color-xlt; 178 | text-align: center; 179 | padding: 4rem; 180 | 181 | h2 { 182 | font-family: t.$font-questrial; 183 | font-size: 2.75rem; 184 | color: c.$primary-grey; 185 | } 186 | 187 | .home-footer { 188 | display: flex; 189 | justify-content: center; 190 | flex-wrap: wrap; 191 | gap: 1.5rem; 192 | padding: 2rem; 193 | } 194 | 195 | .contact-card { 196 | padding: 1.25rem 1.5rem 1rem 1.5rem; 197 | background: c.$bkrd-primary-color; 198 | border-radius: 8px; 199 | display: flex; 200 | flex-direction: column; 201 | flex: 0 0 auto; 202 | align-items: center; 203 | gap: 0.5rem; 204 | text-align: center; 205 | &:hover, &:focus { 206 | animation: shake .8s cubic-bezier(.36,.07,.19,.97) both; 207 | backface-visibility: hidden; 208 | transform-origin: center; 209 | } 210 | div { 211 | display: flex; 212 | gap: 0.25rem; 213 | justify-content: center; 214 | } 215 | } 216 | 217 | @keyframes shake { 218 | 0% { transform: rotate(0); } 219 | 20% { transform: rotate(3deg); } 220 | 40% { transform: rotate(-3deg); } 221 | 60% { transform: rotate(2deg); } 222 | 80% { transform: rotate(-2deg); } 223 | 100% { transform: rotate(0); } 224 | } 225 | 226 | .headshot { 227 | height: 7rem; 228 | width: 7rem; 229 | border-radius: 8px; 230 | } 231 | 232 | .contact-name { 233 | font-size: 1.1rem; 234 | font-weight: 800; 235 | font-family: t.$font-questrial; 236 | } 237 | 238 | .contact-title { 239 | font-size: 0.95rem; 240 | font-family: t.$font-questrial; 241 | word-wrap: false; 242 | } 243 | 244 | .contact-link-container { 245 | height: 2.5rem; 246 | width: 2.5rem; 247 | display: flex; 248 | justify-content: center; 249 | align-items: center; 250 | gap: 0.25rem; 251 | } 252 | 253 | .contact-link { 254 | color: c.$tertiary-color; 255 | height: 2rem; 256 | width: 2rem; 257 | 258 | &:hover { 259 | color: c.$tertiary-color-xdrk; 260 | height: 2.5rem; 261 | width: 2.5rem; 262 | transition: 0.3s; 263 | } 264 | 265 | &:active { 266 | height: 1.75rem; 267 | width: 1.75rem; 268 | transition: 0.3s; 269 | } 270 | } 271 | } 272 | -------------------------------------------------------------------------------- /src/style/layouts/_index.scss: -------------------------------------------------------------------------------- 1 | @forward '../layouts/navbar'; 2 | @forward '../layouts/homePage'; 3 | @forward '../layouts/schemaPage'; 4 | // @forward '../layouts/demoPage'; 5 | // @forward '../layouts/docsPage' 6 | -------------------------------------------------------------------------------- /src/style/layouts/_navbar.scss: -------------------------------------------------------------------------------- 1 | @use '../base/colors' as c; 2 | @use '../base/typography' as t; 3 | @use '../base/mixins' as m; 4 | 5 | // Navbar styling 6 | .navBarContainer { 7 | background-color: c.$bkrd-primary-color; 8 | box-shadow: 0px 0px 14px 0px rgba(0,0,0,0.75); 9 | position: fixed; 10 | width: 100%; 11 | top: 0; 12 | left: 0; 13 | border-radius: 5px; 14 | height: 100px; 15 | z-index: 2; 16 | 17 | 18 | .navbar { 19 | display: flex; 20 | align-items: center; 21 | justify-content: space-between; 22 | position: fixed; 23 | font-size: 20px; 24 | font-family: t.$font-questrial; 25 | background-color: c.$bkrd-primary-color; 26 | color: c.$secondary-color-xdrk; 27 | width: 100%; 28 | height: 100px; 29 | top: 0px; 30 | left: 0; 31 | padding: 0 30px; 32 | 33 | 34 | a { 35 | font-family: t.$font-questrial; 36 | font-size: 20px; 37 | color: c.$secondary-color-xdrk; 38 | padding: 5px 10px; 39 | margin: 0 5px; 40 | 41 | &:hover { 42 | color: c.$secondary-color-drk; 43 | } 44 | } 45 | 46 | 47 | .nav-links { 48 | display: flex; 49 | align-items: center; 50 | transition: all 0.3s ease 0s; 51 | 52 | &:hover { 53 | color: c.$secondary-color-drk; 54 | } 55 | } 56 | 57 | 58 | .schema_btn { 59 | padding: 4px; 60 | background-color: c.$secondary-color-xlt; 61 | border: 1px solid c.$secondary-color-xlt; 62 | border-radius: 5px; 63 | box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px; 64 | } 65 | 66 | .social_cont { 67 | display: flex; 68 | margin-left: 10px; 69 | 70 | a { 71 | padding: 5px 0 5px; 72 | } 73 | .nav_github { 74 | display: flex; 75 | color: c.$secondary-color; 76 | height: 2.6rem; 77 | width: 2.6rem; 78 | 79 | &:hover { 80 | color: c.$secondary-color-drk; 81 | height: 3rem; 82 | width: 3rem; 83 | transition: 0.3s; 84 | } 85 | 86 | &:active { 87 | height: 2rem; 88 | width: 2rem; 89 | transition: 0.3s; 90 | } 91 | }; 92 | 93 | .nav_denoland{ 94 | display: flex; 95 | color: c.$secondary-color; 96 | height: 2.4rem; 97 | width: 2.4rem; 98 | 99 | 100 | &:hover { 101 | color: c.$secondary-color-drk; 102 | height: 2.9rem; 103 | width: 2.9rem; 104 | transition: 0.3s; 105 | } 106 | 107 | &:active { 108 | height: 1.9rem; 109 | width: 1.9rem; 110 | transition: 0.3s; 111 | } 112 | }; 113 | } 114 | 115 | } 116 | 117 | 118 | 119 | .nav-title { 120 | display: flex; 121 | align-items: center; 122 | a { 123 | margin: 0; 124 | padding: 2px 0 2px 2px; 125 | #dangoDB-logo { 126 | width: 3rem; 127 | height: 3rem; 128 | margin: 0 0 0 5px; 129 | } 130 | } 131 | 132 | 133 | } 134 | } ; -------------------------------------------------------------------------------- /src/style/layouts/_schemaPage.scss: -------------------------------------------------------------------------------- 1 | @use '../base/colors' as c; 2 | @use '../base/typography' as t; 3 | 4 | 5 | // Schema Page styling 6 | main { 7 | display: flex; 8 | align-items: center; 9 | justify-content: center; 10 | 11 | .mainContainer { 12 | background-color: c.$bkrd-primary-color; 13 | display: flex; 14 | flex-direction: row; 15 | align-items: center; 16 | justify-content: space-around; 17 | height: 100vh; 18 | width: 1075px; 19 | overflow: hidden; 20 | margin: 0; 21 | 22 | .center_cont { 23 | display: flex; 24 | flex-direction: column; 25 | align-items: center; 26 | justify-content: space-around; 27 | 28 | // Side bar housing saved properties 29 | .side_bar { 30 | display: flex; 31 | align-items: center; 32 | height: 500px; 33 | width: 200px; 34 | border-radius: 6px; 35 | background-color: c.$linen-color; 36 | } 37 | 38 | .schemaGen_container { 39 | .codeblock { 40 | position: relative; 41 | 42 | .mirror { 43 | border-radius: 5px; 44 | border: 4px solid c.$primary-grey; 45 | } 46 | } 47 | } 48 | 49 | 50 | .cpybtn { 51 | position: absolute; 52 | top: 8px; 53 | right: 30px; 54 | display: inline-block; 55 | color: c.$bkrd-primary-color; 56 | z-index: 2; 57 | transition: 0.2s ease; 58 | 59 | &:hover { 60 | color: c.$tertiary-color-drk; 61 | } 62 | 63 | &:active { 64 | transform: scale(0.85); 65 | color: c.$primary-grey; 66 | } 67 | 68 | } 69 | 70 | // Property Form 71 | .Form { 72 | display: flex; 73 | flex-direction: column; 74 | align-items: center; 75 | justify-content: center; 76 | background-color: c.$primary-color-xlt; 77 | font-size: 20px; 78 | width: 500px; 79 | height: 500px; 80 | margin: 0; 81 | border: 2px solid c.$primary-color-lt; 82 | box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px; 83 | border-radius: 5px; 84 | 85 | .outerbrdr { 86 | margin: 3px; 87 | padding: 30px; 88 | border: 3px solid c.$primary-color-lt; 89 | border: 2px solid c.$primary-color; 90 | } 91 | 92 | h1 { 93 | display: flex; 94 | font-family: t.$font-questrial; 95 | color: c.$primary-grey-drk; 96 | font-weight: 500; 97 | font-size: 25px; 98 | margin: 5px 5px 20px 5px; 99 | } 100 | label { 101 | margin: 0 20px; 102 | } 103 | 104 | .form-row { 105 | display: flex; 106 | align-items: center; 107 | justify-content: space-between; 108 | margin: 3px 5px; 109 | padding: 5px; 110 | 111 | input[type="radio"] { 112 | appearance: none; 113 | width: 15px; 114 | height: 15px; 115 | border: 2px solid c.$primary-grey; 116 | border-radius: 50%; 117 | background-clip: content-box; 118 | padding: 3px; 119 | } 120 | 121 | input[type="radio"]:checked { 122 | background-color: c.$primary-grey; 123 | } 124 | 125 | #prop-type { 126 | display: flex; 127 | font-size: 16px; 128 | padding: 6px; 129 | border-radius: 5px; 130 | border: 1px solid c.$primary-color-lt; 131 | width: 175px; 132 | } 133 | 134 | .dropdown { 135 | display: flex; 136 | align-items: center; 137 | padding: 4px 4px 4px 0; 138 | 139 | .toggle { 140 | margin: 0 0 0 20px; 141 | font-family: t.$font-questrial; 142 | font-size: 16px; 143 | padding: 4px; 144 | border-radius: 5px; 145 | border: 1px solid c.$primary-color-lt; 146 | } 147 | } 148 | 149 | .required { 150 | display: flex; 151 | justify-content: space-between; 152 | } 153 | 154 | .unique { 155 | display: flex; 156 | justify-content: space-between; 157 | 158 | .uniquebtn { 159 | display: flex; 160 | } 161 | } 162 | 163 | #defaultval { 164 | font-family: t.$font-questrial; 165 | font-size: 16px; 166 | padding: 6px; 167 | border-radius: 5px; 168 | border: 1px solid c.$primary-color-xlt; 169 | width: 175px; 170 | } 171 | 172 | .btn_form { 173 | display: flex; 174 | align-items: center; 175 | justify-content: center; 176 | font-family: t.$font-questrial; 177 | font-size: 20px; 178 | padding: 10px; 179 | margin-top: 10px; 180 | 181 | border-radius: 10px; 182 | background-color: c.$linen-color-lt; 183 | border: 1px solid c.$primary-color-lt; 184 | color: c.$primary-grey-drk; 185 | font-weight: 400; 186 | box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px; 187 | 188 | &:hover { 189 | background-color: c.$primary-color; 190 | color: c.$primary-color-xlt; 191 | 192 | } 193 | 194 | &:active { 195 | background: c.$primary-grey 196 | } 197 | 198 | } 199 | } 200 | } 201 | 202 | // Schema Generator 203 | .schemabtn { 204 | display: flex; 205 | align-items: center; 206 | justify-content: center; 207 | padding: 10px; 208 | margin: 60px 20px 0 20px; 209 | width: 200px; 210 | border-radius: 10px; 211 | background-color: c.$linen-color-lt; 212 | border: 1px solid c.$primary-color-xlt; 213 | color: c.$primary-grey-drk; 214 | font-family: t.$font-questrial; 215 | font-size: 20px; 216 | background-color: c.$linen-color-lt; 217 | font-weight: 400; 218 | box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px; 219 | transition: 0.4s ease; 220 | 221 | &:hover { 222 | background-color: c.$primary-color; 223 | color: c.$primary-color-xlt; 224 | } 225 | 226 | &:active { 227 | background: c.$primary-grey 228 | } 229 | } 230 | } 231 | } 232 | } -------------------------------------------------------------------------------- /src/style/styles.scss: -------------------------------------------------------------------------------- 1 | @use './base'; 2 | @use './layouts'; 3 | 4 | // Housing all styles 5 | 6 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const HtmlWebpackPlugin = require('html-webpack-plugin'); 3 | 4 | module.exports = { 5 | mode: process.env.NODE_ENV, 6 | entry: './src/index.js', 7 | output: { 8 | // in production, the bundle will live on file System 9 | filename: 'bundle.js', 10 | path: path.resolve(__dirname, 'build/'), 11 | publicPath: '/', 12 | }, 13 | devServer: { 14 | static: { 15 | publicPath: '/', 16 | // directory: path.resolve(__dirname, 'build'), 17 | directory: path.resolve(__dirname, './src'), 18 | }, 19 | proxy: { 20 | '/': 'http://localhost:3000', 21 | '/save-schema': 'http://localhost:3000', 22 | }, 23 | hot: true, 24 | }, 25 | module: { 26 | rules: [ 27 | { 28 | test: /\.jsx?$/, 29 | exclude: /node_modules/, 30 | use: { 31 | loader: 'babel-loader', 32 | options: { 33 | presets: ['@babel/preset-env', '@babel/preset-react'], 34 | }, 35 | }, 36 | }, 37 | { 38 | test: /\.s?[ac]ss$/i, 39 | use: ['style-loader', 'css-loader', 'sass-loader'], 40 | }, 41 | { 42 | test: /\.(jpg|png)$/, 43 | use: { 44 | loader: 'url-loader', 45 | }, 46 | }, 47 | ], 48 | }, 49 | plugins: [ 50 | new HtmlWebpackPlugin( 51 | { 52 | template: './src/index.html', 53 | favicon: './src/assets/dango_deno_256.png', 54 | }, 55 | ), 56 | ], 57 | resolve: { 58 | extensions: ['.js', '.jsx'], 59 | }, 60 | }; 61 | --------------------------------------------------------------------------------