diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index b04db404..80231ec7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Bug report about: Create a report to help us improve title: '' -labels: JWoC +labels: gssoc20 assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 6c534e5d..ee5386b1 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Feature request about: Suggest an idea for this project title: '' -labels: JWoC +labels: gssoc20 assignees: '' --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b512c09d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/README.md b/README.md index 303066ce..20b34de7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # [Water Monitoring System](https://vinitshahdeo.github.io/Water-Monitoring-System/) - IoT Project -[![GitHub license](https://img.shields.io/github/license/vinitshahdeo/Water-Monitoring-System.svg?logo=github)](https://github.com/vinitshahdeo/Water-Monitoring-System/blob/master/LICENSE) [![GitHub stars](https://img.shields.io/github/stars/vinitshahdeo/Water-Monitoring-System.svg?logo=github)](https://github.com/vinitshahdeo/Water-Monitoring-System/stargazers) [![GitHub forks](https://img.shields.io/github/forks/vinitshahdeo/Water-Monitoring-System.svg?logo=github&color=teal)](https://github.com/vinitshahdeo/Water-Monitoring-System/network) [![GitHub top language](https://img.shields.io/github/languages/top/vinitshahdeo/Water-Monitoring-System?color=yellow&logo=javascript)](https://github.com/vinitshahdeo/Water-Monitoring-System) +[![first-timers-only](https://img.shields.io/badge/first--timers--only-friendly-tomato.svg?style=flat&logo=git)](https://github.com/vinitshahdeo/Water-Monitoring-System/issues) [![GitHub license](https://img.shields.io/github/license/vinitshahdeo/Water-Monitoring-System.svg?logo=github)](https://github.com/vinitshahdeo/Water-Monitoring-System/blob/master/LICENSE) [![GitHub stars](https://img.shields.io/github/stars/vinitshahdeo/Water-Monitoring-System.svg?logo=github)](https://github.com/vinitshahdeo/Water-Monitoring-System/stargazers) [![GitHub forks](https://img.shields.io/github/forks/vinitshahdeo/Water-Monitoring-System.svg?logo=github&color=teal)](https://github.com/vinitshahdeo/Water-Monitoring-System/network) [![GitHub top language](https://img.shields.io/github/languages/top/vinitshahdeo/Water-Monitoring-System?color=yellow&logo=javascript)](https://github.com/vinitshahdeo/Water-Monitoring-System) > **You can view the demo [here](https://vinitshahdeo.github.io/Water-Monitoring-System/src/home.html).** @@ -113,6 +113,14 @@ git push -u origin - Refer [this](https://github.com/vinitshahdeo/Water-Monitoring-System/blob/master/CONTRIBUTING.md) for more. +## Open Source Programs + +This project is part of the following Open Source programs: + +- [GirlScript Summer of Code 2020](https://www.gssoc.tech/) +- [Rails Girls Summer of Code 2020](http://railsgirlssummerofcode.org/) +- [JGEC Winter of Code 2020](https://jwoc.tech/) + ## Frequently Asked Questions(FAQs) for [GSSoC'20](https://www.gssoc.tech/) @@ -151,6 +159,8 @@ git push -u origin - If you're interested in contributing for **frontend**, please checkout `feature/frontend` branch. +> **Note:** Are you an **absolute beginner?** Please [check the issues](https://github.com/vinitshahdeo/Water-Monitoring-System/issues?q=is%3Aopen+is%3Aissue+label%3Afirst-timers-only) labeled with `first-timers-only`. These issues might _let your Open Source journey begin_ - **Welcome onboard!** + ## Mentors diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000..6d546ded --- /dev/null +++ b/netlify.toml @@ -0,0 +1,4 @@ +[build] +publish = "build/" +command = "yarn build" +base = "react-frontend" diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..b13ec3c6 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,299 @@ +{ + "name": "Water-Monitoring-System", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "email-addresses": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/email-addresses/-/email-addresses-3.1.0.tgz", + "integrity": "sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "filename-reserved-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz", + "integrity": "sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=" + }, + "filenamify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-1.2.1.tgz", + "integrity": "sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=", + "requires": { + "filename-reserved-regex": "^1.0.0", + "strip-outer": "^1.0.0", + "trim-repeated": "^1.0.0" + } + }, + "filenamify-url": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/filenamify-url/-/filenamify-url-1.0.0.tgz", + "integrity": "sha1-syvYExnvWGO3MHi+1Q9GpPeXX1A=", + "requires": { + "filenamify": "^1.0.0", + "humanize-url": "^1.0.0" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "gh-pages": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-2.2.0.tgz", + "integrity": "sha512-c+yPkNOPMFGNisYg9r4qvsMIjVYikJv7ImFOhPIVPt0+AcRUamZ7zkGRLHz7FKB0xrlZ+ddSOJsZv9XAFVXLmA==", + "requires": { + "async": "^2.6.1", + "commander": "^2.18.0", + "email-addresses": "^3.0.1", + "filenamify-url": "^1.0.0", + "fs-extra": "^8.1.0", + "globby": "^6.1.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" + }, + "humanize-url": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/humanize-url/-/humanize-url-1.0.1.tgz", + "integrity": "sha1-9KuZ4NKIF0yk4eUEB8VfuuRk7/8=", + "requires": { + "normalize-url": "^1.0.0", + "strip-url-auth": "^1.0.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "requires": { + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + } + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, + "strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "strip-url-auth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-url-auth/-/strip-url-auth-1.0.1.tgz", + "integrity": "sha1-IrD6OkE4WzO+PzMVUbu4N/oM164=" + }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..e4788cf9 --- /dev/null +++ b/package.json @@ -0,0 +1,26 @@ +{ + "name": "Water-Monitoring-System", + "version": "1.0.0", + "description": "[![GitHub license](https://img.shields.io/github/license/vinitshahdeo/Water-Monitoring-System.svg?logo=github)](https://github.com/vinitshahdeo/Water-Monitoring-System/blob/master/LICENSE) [![GitHub stars](https://img.shields.io/github/stars/vinitshahdeo/Water-Monitoring-System.svg?logo=github)](https://github.com/vinitshahdeo/Water-Monitoring-System/stargazers) [![GitHub forks](https://img.shields.io/github/forks/vinitshahdeo/Water-Monitoring-System.svg?logo=github&color=teal)](https://github.com/vinitshahdeo/Water-Monitoring-System/network) [![GitHub top language](https://img.shields.io/github/languages/top/vinitshahdeo/Water-Monitoring-System?color=yellow&logo=javascript)](https://github.com/vinitshahdeo/Water-Monitoring-System)", + "main": "index.js", + "directories": { + "doc": "docs" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/habeeba-naaz/Water-Monitoring-System.git" + }, + "keywords": [], + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/habeeba-naaz/Water-Monitoring-System/issues" + }, + "homepage": "https://github.com/habeeba-naaz/Water-Monitoring-System#readme", + "dependencies": { + "gh-pages": "^2.2.0" + } +} diff --git a/react-frontend/package-lock.json b/react-frontend/package-lock.json index 47154f09..4aced6c7 100644 --- a/react-frontend/package-lock.json +++ b/react-frontend/package-lock.json @@ -1397,6 +1397,8 @@ }, "@testing-library/jest-dom": { "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-4.2.4.tgz", + "integrity": "sha512-j31Bn0rQo12fhCWOUWy9fl7wtqkp7In/YP2p5ZFyRuiiB9Qs3g+hS4gAmDWONbAHcRmVooNJ5eOHQDCOmUFXHg==", "requires": { "@babel/runtime": "^7.5.1", "chalk": "^2.4.1", @@ -1411,6 +1413,8 @@ }, "@testing-library/react": { "version": "9.4.1", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-9.4.1.tgz", + "integrity": "sha512-sta3ui24HPgW92quHyQj6gpOkNgLNx8BX/QOU4k1bddo43ZdqlGwmzCYwL93bExfhergwiau+IzBGl7TCsSFeA==", "requires": { "@babel/runtime": "^7.8.3", "@testing-library/dom": "^6.11.0", @@ -1418,7 +1422,9 @@ } }, "@testing-library/user-event": { - "version": "7.2.1" + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-7.2.1.tgz", + "integrity": "sha512-oZ0Ib5I4Z2pUEcoo95cT1cr6slco9WY7yiPpG+RGNkj8YcYgJnM7pXmYmorNOReh8MIGcKSqXyeGjxnr8YiZbA==" }, "@types/babel__core": { "version": "7.1.6", @@ -10210,6 +10216,8 @@ }, "react": { "version": "16.13.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.13.0.tgz", + "integrity": "sha512-TSavZz2iSLkq5/oiE7gnFzmURKZMltmi193rm5HEoUDAXpzT9Kzw6oNZnGoai/4+fUnm7FqS5dwgUL34TujcWQ==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -10376,6 +10384,8 @@ }, "react-dom": { "version": "16.13.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.0.tgz", + "integrity": "sha512-y09d2c4cG220DzdlFkPTnVvGTszVvNpC73v+AaLGLHbkpy3SSgvYq8x0rNwPJ/Rk/CicTNgk0hbHNw1gMEZAXg==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -10472,6 +10482,8 @@ }, "react-scripts": { "version": "3.4.0", + "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.4.0.tgz", + "integrity": "sha512-pBqaAroFoHnFAkuX+uSK9Th1uEh2GYdGY2IG1I9/7HmuEf+ls3lLCk1p2GFYRSrLMz6ieQR/SyN6TLIGK3hKRg==", "requires": { "@babel/core": "7.8.4", "@svgr/webpack": "4.3.3", diff --git a/react-frontend/package.json b/react-frontend/package.json index 458047bc..08bbf6de 100644 --- a/react-frontend/package.json +++ b/react-frontend/package.json @@ -1,7 +1,7 @@ { "name": "react-frontend", - "version": "0.1.0", - "private": true, + "version": "0.0.1", + "private": false, "dependencies": { "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", diff --git a/react-frontend/public/index.html b/react-frontend/public/index.html index b41a66e3..af53f084 100644 --- a/react-frontend/public/index.html +++ b/react-frontend/public/index.html @@ -9,7 +9,10 @@ name="description" content="Water Level Monitoring System - IoT Project" /> - + + diff --git a/react-frontend/public/manifest.json b/react-frontend/public/manifest.json index 080d6c77..32aa744f 100644 --- a/react-frontend/public/manifest.json +++ b/react-frontend/public/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "React App", - "name": "Create React App Sample", + "short_name": "Water-monitoring-system", + "name": "Water-monitoring-system", "icons": [ { "src": "favicon.ico", diff --git a/react-frontend/public/worker.js b/react-frontend/public/worker.js new file mode 100644 index 00000000..b4ed516c --- /dev/null +++ b/react-frontend/public/worker.js @@ -0,0 +1,51 @@ +var CACHE_NAME = "water-monitoring-system"; +var urlsToCache = ["/"]; + +// Install a service worker +self.addEventListener("install", event => { + // Perform install steps + event.waitUntil( + caches + .open(CACHE_NAME) + .then(function(cache) { + console.log("Opened cache"); + return cache.addAll(urlsToCache); + }) + .catch(err => console.error(err)) + ); +}); + +// Cache and return requests +self.addEventListener("fetch", event => { + event.respondWith( + caches + .match(event.request) + .then(function(response) { + // Cache hit - return response + if (response) { + return response; + } + return fetch(event.request); + }) + .catch(err => console.error(err)) + ); +}); + +// Update a service worker +self.addEventListener("activate", event => { + var cacheWhitelist = ["uddesh-portfolio-pwa"]; + event.waitUntil( + caches + .keys() + .then(cacheNames => { + return Promise.all( + cacheNames.map(cacheName => { + if (cacheWhitelist.indexOf(cacheName) === -1) { + return caches.delete(cacheName); + } + }) + ); + }) + .catch(err => console.error(err)) + ); +}); diff --git a/react-frontend/src/App.css b/react-frontend/src/App.css index cc101e60..b99a2034 100644 --- a/react-frontend/src/App.css +++ b/react-frontend/src/App.css @@ -1,6 +1,6 @@ body { background-color: #fafafa; - font-family: 'Montserrat', sans-serif; + font-family: "Montserrat", sans-serif; } h1 { diff --git a/react-frontend/src/App.js b/react-frontend/src/App.js index aaad1c84..9b292a72 100644 --- a/react-frontend/src/App.js +++ b/react-frontend/src/App.js @@ -1,15 +1,20 @@ -import React, { Component } from 'react'; -import Home from './pages/Home' -import { Provider } from 'react-redux'; -import store from './store/store'; -import './App.css' -class App extends Component{ +import React, { Component } from "react"; +import Home from "./pages/Home"; +import { Provider } from "react-redux"; +import store from "./store/store"; +import "./App.css"; +import {BrowserRouter as Router, Switch, Route} from "react-router-dom"; +class App extends Component { render() { - return ( - - - - ); + return ( + + + + + + + + ); } } diff --git a/react-frontend/src/actions/tankActions.js b/react-frontend/src/actions/tankActions.js index 5879821e..752f0c96 100644 --- a/react-frontend/src/actions/tankActions.js +++ b/react-frontend/src/actions/tankActions.js @@ -1,13 +1,13 @@ -import {FETCH_TANKS} from './types'; +import { FETCH_TANKS } from "./types"; export const fetchTanks = () => { - return ({ + return { type: FETCH_TANKS, payload: [ - {"id":"1","value":"70"}, - {"id":"2","value":"80"}, - {"id":"3","value":"40"}, - {"id":"4","value":"90"} + { id: "1", value: "70" }, + { id: "2", value: "80" }, + { id: "3", value: "40" }, + { id: "4", value: "90" } ] - }) -} \ No newline at end of file + }; +}; diff --git a/react-frontend/src/actions/types.js b/react-frontend/src/actions/types.js index 8d61750d..a541e656 100644 --- a/react-frontend/src/actions/types.js +++ b/react-frontend/src/actions/types.js @@ -1 +1 @@ -export const FETCH_TANKS = 'FETCH_TANKS'; \ No newline at end of file +export const FETCH_TANKS = "FETCH_TANKS"; diff --git a/react-frontend/src/components/Sticker.js b/react-frontend/src/components/Sticker.js index 49df2543..ca6fed9a 100644 --- a/react-frontend/src/components/Sticker.js +++ b/react-frontend/src/components/Sticker.js @@ -1,4 +1,4 @@ -import styled from 'styled-components' +import styled from "styled-components"; export const Sticker = styled.div` background-color: ${props => props.backgroundColor}; @@ -7,4 +7,4 @@ export const Sticker = styled.div` display: flex; justify-content: center; align-items: center; -` \ No newline at end of file +`; diff --git a/react-frontend/src/components/Tank.js b/react-frontend/src/components/Tank.js index 1a9aa810..3d58279a 100644 --- a/react-frontend/src/components/Tank.js +++ b/react-frontend/src/components/Tank.js @@ -1,4 +1,4 @@ -import styled from 'styled-components' +import styled from "styled-components"; export const TankCircle = styled.div` height: 200px; @@ -6,15 +6,15 @@ export const TankCircle = styled.div` border-color: ${props => props.borderColor || "red"}; border-width: 2px; border-style: solid; - border-radius: 50%; -` + border-radius: 50%; +`; export const TankWaterValue = styled.p` - position: relative; + position: relative; display: flex; justify-content: center; align-items: center; height: 200px; width: 200px; - color: grey; -` \ No newline at end of file + color: grey; +`; diff --git a/react-frontend/src/index.css b/react-frontend/src/index.css index e84f2fc0..2e7944b3 100644 --- a/react-frontend/src/index.css +++ b/react-frontend/src/index.css @@ -1,10 +1,10 @@ body { margin: 0; background-color: #fafafa; - font-family: 'Montserrat', sans-serif; + font-family: "Montserrat", sans-serif; } code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; } diff --git a/react-frontend/src/index.js b/react-frontend/src/index.js index 14b16b55..bdd66d66 100644 --- a/react-frontend/src/index.js +++ b/react-frontend/src/index.js @@ -1,13 +1,13 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import 'bootstrap/dist/css/bootstrap.min.css'; -import './index.css'; -import App from './App'; -import * as serviceWorker from './serviceWorker'; +import React from "react"; +import ReactDOM from "react-dom"; +import "bootstrap/dist/css/bootstrap.min.css"; +import "./index.css"; +import App from "./App"; +import * as serviceWorker from "./serviceWorker"; -ReactDOM.render(, document.getElementById('root')); +ReactDOM.render(, document.getElementById("root")); // If you want your app to work offline and load faster, you can change // unregister() to register() below. Note this comes with some pitfalls. // Learn more about service workers: https://bit.ly/CRA-PWA -serviceWorker.unregister(); +serviceWorker.register(); diff --git a/react-frontend/src/pages/Home.js b/react-frontend/src/pages/Home.js index 7b6ce967..87bda682 100644 --- a/react-frontend/src/pages/Home.js +++ b/react-frontend/src/pages/Home.js @@ -6,8 +6,8 @@ import { fetchTanks } from '../actions/tankActions'; import {overflowAlarm} from '../actions/alarms'; class Home extends Component { - componentWillMount(){ - this.props.fetchTanks() + componentWillMount() { + this.props.fetchTanks(); } render() { @@ -17,20 +17,26 @@ class Home extends Component {

Water Monitoring System

-

Water Monitoring System is an IOT based Liquid Level Monitoring system that has - mechanisms to keep the user alerted in case of liquid overflow or when tank depletes.

+

+ Water Monitoring System is an IOT based Liquid Level Monitoring + system that has mechanisms to keep the user alerted in case of + liquid overflow or when tank depletes. +

- {this.props.tanks.map(tank=> ( -
-
+ {this.props.tanks.map((tank, index) => ( +
+
- {tank.value}% + {tank.value}%
- Tank{ tank.id} + Tank{tank.id}
{this.props.overflowAlarm(tank.value, tank.id)} @@ -43,31 +49,35 @@ class Home extends Component {
-

Danger Zone

+ +

Danger Zone

+
-

Warning Zone

+ +

Warning Zone

+
-

Safe Zone

+ +

Safe Zone

+
-
-

-

Made by Vinit Shahdeo
-

+
+
+

+ Made by Vinit Shahdeo +

+
- ) + ); } } const mapStateToProps = state => ({ - tanks: state.tanks.tanks, + tanks: state.tanks.tanks }); export default connect(mapStateToProps, { fetchTanks })(Home); - - - - diff --git a/react-frontend/src/reducers/index.js b/react-frontend/src/reducers/index.js index 02dc1193..89ec18c1 100644 --- a/react-frontend/src/reducers/index.js +++ b/react-frontend/src/reducers/index.js @@ -1,6 +1,6 @@ -import { combineReducers } from 'redux' -import tankReducer from './tankReducer'; +import { combineReducers } from "redux"; +import tankReducer from "./tankReducer"; export default combineReducers({ tanks: tankReducer -}) \ No newline at end of file +}); diff --git a/react-frontend/src/reducers/tankReducer.js b/react-frontend/src/reducers/tankReducer.js index 9fb545ea..76a02103 100644 --- a/react-frontend/src/reducers/tankReducer.js +++ b/react-frontend/src/reducers/tankReducer.js @@ -1,7 +1,7 @@ -import { FETCH_TANKS } from '../actions/types'; +import { FETCH_TANKS } from "../actions/types"; const initialState = { - tanks: [], + tanks: [] }; export default function(state = initialState, action) { @@ -14,4 +14,4 @@ export default function(state = initialState, action) { default: return state; } -} \ No newline at end of file +} diff --git a/react-frontend/src/serviceWorker.js b/react-frontend/src/serviceWorker.js index c4838eb5..a0951cae 100644 --- a/react-frontend/src/serviceWorker.js +++ b/react-frontend/src/serviceWorker.js @@ -11,9 +11,9 @@ // opt-in, read https://bit.ly/CRA-PWA const isLocalhost = Boolean( - window.location.hostname === 'localhost' || + window.location.hostname === "localhost" || // [::1] is the IPv6 localhost address. - window.location.hostname === '[::1]' || + window.location.hostname === "[::1]" || // 127.0.0.0/8 are considered localhost for IPv4. window.location.hostname.match( /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ @@ -21,7 +21,7 @@ const isLocalhost = Boolean( ); export function register(config) { - if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) { // The URL constructor is available in all browsers that support SW. const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); if (publicUrl.origin !== window.location.origin) { @@ -31,7 +31,7 @@ export function register(config) { return; } - window.addEventListener('load', () => { + window.addEventListener("load", () => { const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; if (isLocalhost) { @@ -42,8 +42,8 @@ export function register(config) { // service worker/PWA documentation. navigator.serviceWorker.ready.then(() => { console.log( - 'This web app is being served cache-first by a service ' + - 'worker. To learn more, visit https://bit.ly/CRA-PWA' + "This web app is being served cache-first by a service " + + "worker. To learn more, visit https://bit.ly/CRA-PWA" ); }); } else { @@ -64,14 +64,14 @@ function registerValidSW(swUrl, config) { return; } installingWorker.onstatechange = () => { - if (installingWorker.state === 'installed') { + if (installingWorker.state === "installed") { if (navigator.serviceWorker.controller) { // At this point, the updated precached content has been fetched, // but the previous service worker will still serve the older // content until all client tabs are closed. console.log( - 'New content is available and will be used when all ' + - 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' + "New content is available and will be used when all " + + "tabs for this page are closed. See https://bit.ly/CRA-PWA." ); // Execute callback @@ -82,7 +82,7 @@ function registerValidSW(swUrl, config) { // At this point, everything has been precached. // It's the perfect time to display a // "Content is cached for offline use." message. - console.log('Content is cached for offline use.'); + console.log("Content is cached for offline use."); // Execute callback if (config && config.onSuccess) { @@ -94,21 +94,21 @@ function registerValidSW(swUrl, config) { }; }) .catch(error => { - console.error('Error during service worker registration:', error); + console.error("Error during service worker registration:", error); }); } function checkValidServiceWorker(swUrl, config) { // Check if the service worker can be found. If it can't reload the page. fetch(swUrl, { - headers: { 'Service-Worker': 'script' } + headers: { "Service-Worker": "script" } }) .then(response => { // Ensure service worker exists, and that we really are getting a JS file. - const contentType = response.headers.get('content-type'); + const contentType = response.headers.get("content-type"); if ( response.status === 404 || - (contentType != null && contentType.indexOf('javascript') === -1) + (contentType != null && contentType.indexOf("javascript") === -1) ) { // No service worker found. Probably a different app. Reload the page. navigator.serviceWorker.ready.then(registration => { @@ -123,13 +123,13 @@ function checkValidServiceWorker(swUrl, config) { }) .catch(() => { console.log( - 'No internet connection found. App is running in offline mode.' + "No internet connection found. App is running in offline mode." ); }); } export function unregister() { - if ('serviceWorker' in navigator) { + if ("serviceWorker" in navigator) { navigator.serviceWorker.ready .then(registration => { registration.unregister(); diff --git a/react-frontend/src/setupTests.js b/react-frontend/src/setupTests.js index 74b1a275..5fdf0016 100644 --- a/react-frontend/src/setupTests.js +++ b/react-frontend/src/setupTests.js @@ -2,4 +2,4 @@ // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom/extend-expect'; +import "@testing-library/jest-dom/extend-expect"; diff --git a/react-frontend/src/store/store.js b/react-frontend/src/store/store.js index c13d5338..ff360528 100644 --- a/react-frontend/src/store/store.js +++ b/react-frontend/src/store/store.js @@ -1,10 +1,14 @@ -import {createStore, applyMiddleware } from 'redux' -import thunk from 'redux-thunk' -import rootReducer from '../reducers/index' +import { createStore, applyMiddleware } from "redux"; +import thunk from "redux-thunk"; +import rootReducer from "../reducers/index"; const initialState = {}; const middleware = [thunk]; -const store = createStore(rootReducer, initialState, applyMiddleware(...middleware)) +const store = createStore( + rootReducer, + initialState, + applyMiddleware(...middleware) +); -export default store \ No newline at end of file +export default store; diff --git a/screenshots/Instance #1/LandingPageDesign.png b/screenshots/Instance #1/LandingPageDesign.png new file mode 100644 index 00000000..af614a61 Binary files /dev/null and b/screenshots/Instance #1/LandingPageDesign.png differ diff --git a/screenshots/Instance #3/1.1.PNG b/screenshots/Instance #3/1.1.PNG new file mode 100644 index 00000000..b0a917d2 Binary files /dev/null and b/screenshots/Instance #3/1.1.PNG differ diff --git a/screenshots/Instance #3/1.1.png b/screenshots/Instance #3/1.1.png new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/screenshots/Instance #3/1.1.png @@ -0,0 +1 @@ + diff --git a/screenshots/Instance #3/1.2.PNG b/screenshots/Instance #3/1.2.PNG new file mode 100644 index 00000000..24499305 Binary files /dev/null and b/screenshots/Instance #3/1.2.PNG differ diff --git a/screenshots/Instance #3/1.3.PNG b/screenshots/Instance #3/1.3.PNG new file mode 100644 index 00000000..b279632d Binary files /dev/null and b/screenshots/Instance #3/1.3.PNG differ diff --git a/screenshots/Instance #3/2.1.PNG b/screenshots/Instance #3/2.1.PNG new file mode 100644 index 00000000..afec6ea5 Binary files /dev/null and b/screenshots/Instance #3/2.1.PNG differ diff --git a/screenshots/Instance #8/Screenshot (01).png b/screenshots/Instance #8/Screenshot (01).png new file mode 100644 index 00000000..033f8f08 Binary files /dev/null and b/screenshots/Instance #8/Screenshot (01).png differ diff --git a/screenshots/Instance #8/Screenshot (02).png b/screenshots/Instance #8/Screenshot (02).png new file mode 100644 index 00000000..3568d7a2 Binary files /dev/null and b/screenshots/Instance #8/Screenshot (02).png differ diff --git a/screenshots/Instance #8/Screenshot (03).png b/screenshots/Instance #8/Screenshot (03).png new file mode 100644 index 00000000..c8df8780 Binary files /dev/null and b/screenshots/Instance #8/Screenshot (03).png differ diff --git a/screenshots/Instance #8/Screenshot (04).png b/screenshots/Instance #8/Screenshot (04).png new file mode 100644 index 00000000..93bd3905 Binary files /dev/null and b/screenshots/Instance #8/Screenshot (04).png differ diff --git a/screenshots/Instance #8/Screenshot (05).png b/screenshots/Instance #8/Screenshot (05).png new file mode 100644 index 00000000..43f298b2 Binary files /dev/null and b/screenshots/Instance #8/Screenshot (05).png differ diff --git a/screenshots/Instance #8/Screenshot (06).png b/screenshots/Instance #8/Screenshot (06).png new file mode 100644 index 00000000..f22f1c94 Binary files /dev/null and b/screenshots/Instance #8/Screenshot (06).png differ diff --git a/screenshots/Instance #8/landing_page.xd b/screenshots/Instance #8/landing_page.xd new file mode 100644 index 00000000..56c6bfb8 Binary files /dev/null and b/screenshots/Instance #8/landing_page.xd differ diff --git a/screenshots/Instance No. #9/Design.xd b/screenshots/Instance No. #9/Design.xd new file mode 100644 index 00000000..2e513ba8 Binary files /dev/null and b/screenshots/Instance No. #9/Design.xd differ diff --git a/screenshots/Instance No. #9/screenshot1.jpg b/screenshots/Instance No. #9/screenshot1.jpg new file mode 100644 index 00000000..1db21958 Binary files /dev/null and b/screenshots/Instance No. #9/screenshot1.jpg differ diff --git a/screenshots/instance#4/design.jpg b/screenshots/instance#4/design.jpg new file mode 100644 index 00000000..d6458e39 Binary files /dev/null and b/screenshots/instance#4/design.jpg differ diff --git a/screenshots/instance#4/design.psd b/screenshots/instance#4/design.psd new file mode 100644 index 00000000..aae093b6 Binary files /dev/null and b/screenshots/instance#4/design.psd differ diff --git a/screenshots/instance#7/WMSDesign.png b/screenshots/instance#7/WMSDesign.png new file mode 100644 index 00000000..108fd3da Binary files /dev/null and b/screenshots/instance#7/WMSDesign.png differ diff --git a/screenshots/instance#7/WaterMonitoringSystem.xd b/screenshots/instance#7/WaterMonitoringSystem.xd new file mode 100644 index 00000000..1a041e43 Binary files /dev/null and b/screenshots/instance#7/WaterMonitoringSystem.xd differ diff --git a/src/1.PNG b/src/1.PNG new file mode 100644 index 00000000..8ba6f4b2 Binary files /dev/null and b/src/1.PNG differ diff --git a/src/demo.html b/src/demo.html index 45f49e11..d211970e 100644 --- a/src/demo.html +++ b/src/demo.html @@ -8,6 +8,28 @@ Water Monitoring System + + + + + + + + + + + + + + + + + + + + + + @@ -47,59 +173,68 @@

Water Monitoring System

-

Water Monitoring System is an IOT based Liquid Level Monitoring system that has +

Water Monitoring System is an IOT based Liquid Level Monitoring system that has mechanisms to keep the user alerted in case of liquid overflow or when tank depletes.

-
-
+
+

Tank 1

-
-
+
+

Tank 2

-
-
+
+

Tank 3

-
-
+
+

Tank 4

+
-
- -
-
-
-

Danger Zone

-
-
-

Warning Zone

-
-
-

Safe Zone

+
+
+
+

Danger Zone

+
+
+

Warning Zone

+
+
+

Safe Zone

+
-
-
-

-

Made by Vinit Shahdeo
-

-
+
+

+

Made by Vinit Shahdeo
+

+
- + + +
+
+
+

Frequently Asked Questions(FAQs) for Water Monitoring System

+

What is Water Monitoring System?

+

+ Water Monitoring System is an IOT based Liquid Level Monitoring + system that has mechanisms to keep the user alerted in case of + liquid overflow or when tank depletes. +

+

How Water Monitoring System works?

+

+ The water tanks can be fixed with ultrasonic sensors that is placed + over the container. Ultrasonic sensor is used to measure, compare + container depth and liquid level. +

+

How status of the system could be monitored?

+

+ The status of the system could be monitored by an LCD screen or a + web page that provides a brilliant graphical representation. Colours + are used to depict various scenarios with respect to the amount of + liquid in the tanks or containers and the buzzer buzzes when the + limit exceeds the permissible quantity of fill. +

+

+ What colors are used to represent various scenarios with respect to + the amount of liquid in the tank? +

+

+ Danger Zone is indicated as + Red color, + Warning Zone is indicated as + Yellow color, Safe Zone is + indicated as Green color. +

+

What are the Goals of this Project?

+
    +
  • To reduce the wastage of water across the city
  • +
  • To provide better water supply to the people
  • +
+

What are the IoT(Hardware) components required?

+
    +
  • AVR family microcontroller
  • +
  • LCD screen
  • +
  • Wifi modem
  • +
  • A buzzer
  • +
  • 12V transformer
  • +
+

Is this a hardware/IoT project?

+

+ Yes, it is a hardware/IoT + software project. There would be maximum + tasks related to frontend, backend, design and documentation of the + website and later, it would be integarted with the real-time data + from the sensors. +

+

What is the tech Stack for this project?

+
    +
  • Frontend: React
  • +
  • Backend: Django, Node.js
  • +
+
+
+
+
+
+
+

WATER MONITORING SYSTEM

+
+

IOT based Liquid Level Monitoring system with mechanisms to keep alert the user in case of + liquid overflow or tank depletion.

+
+
+

CONTACT

+
+
+ + + + + + + + + + + + + + + + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + - - + $('.tank4').createWaterBall({ + csv_config: { + width: $('.tank4').width(), + height: $('.tank4').height() + }, + wave_config: { + waveWidth: 0.02, + waveHeight: 15 + }, + data_range: [40, 50, 100], + targetRange: 80 + }); + + function getQueryStringValue(key) { + return decodeURIComponent( + window.location.search.replace( + new RegExp( + "^(?:.*[&\\?]" + + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + + "(?:\\=([^&]*))?)?.*$", + "i" + ), + "$1" + ) + ); + } + var x = getQueryStringValue("tank1"); + var y = getQueryStringValue("tank2"); + var z = getQueryStringValue("tank3"); + var w = getQueryStringValue("tank4"); + $(".tank1").createWaterBall({ + targetRange: x + }); + $(".tank2").createWaterBall({ + targetRange: y + }); + $(".tank3").createWaterBall({ + targetRange: z + }); + $(".tank4").createWaterBall({ + targetRange: w + }); + + var loadingEle = $(".loading"); + var loading_width = loadingEle.width(), + loading_height = loadingEle.height(); + $(".loading").createWaterBall({ + cvs_config: { + width: loading_width, + height: loading_height + }, + wave_config: { + waveWidth: 0.02, + waveHeight: 5 + }, + data_range: [30, 70, 100], + isLoading: true, + nowRange: 70, + targetRange: 70 + }); + setTimeout(function() { + $(".loading").createWaterBall("updateRange", 80); + }, 1000); + $(".waterBall1").createWaterBall({ + csv_config: { + width: $(".waterBall1").width(), + height: $(".waterBall1").height() + }, + wave_config: { + waveWidth: 0.02, + waveHeight: 5 + }, + data_range: [40, 50, 100], + targetRange: 45 + }); + + - \ No newline at end of file + + +