├── .gitignore
├── README.md
├── build
├── _redirects
├── asset-manifest.json
├── favicon.png
├── index.html
├── manifest.json
├── precache-manifest.6c79c24bbe33c3bfdb7d79ed851bd1d0.js
├── robots.txt
├── service-worker.js
└── static
│ ├── css
│ ├── main.050523cc.chunk.css
│ └── main.050523cc.chunk.css.map
│ └── js
│ ├── 2.27d8e5b0.chunk.js
│ ├── 2.27d8e5b0.chunk.js.LICENSE.txt
│ ├── 2.27d8e5b0.chunk.js.map
│ ├── main.36c2a1b6.chunk.js
│ ├── main.36c2a1b6.chunk.js.map
│ ├── runtime-main.ff02b437.js
│ └── runtime-main.ff02b437.js.map
├── package.json
├── photos
├── account.PNG
├── architecture.png
├── favicon.png
├── login and dashboard.gif
├── login.PNG
├── signup.PNG
└── tododashboard.PNG
├── public
├── _redirects
├── favicon.png
├── index.html
├── manifest.json
└── robots.txt
├── src
├── App.css
├── App.js
├── App.test.js
├── components
│ ├── account.js
│ └── todo.js
├── index.js
├── pages
│ ├── home.js
│ ├── login.js
│ └── signup.js
├── serviceWorker.js
├── setupTests.js
└── util
│ └── auth.js
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 |
13 | # misc
14 | .DS_Store
15 | .env.local
16 | .env.development.local
17 | .env.test.local
18 | .env.production.local
19 |
20 | npm-debug.log*
21 | yarn-debug.log*
22 | yarn-error.log*
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ##### Full Tutorial with auth implementation using Firebase:
2 |
3 | https://www.freecodecamp.org/news/how-to-build-a-todo-application-using-reactjs-and-firebase/
4 |
5 |
6 | ### Demo
7 | url - https://reacttodoappfirebaseauth.netlify.app/
8 |
9 |
10 | ## Architecture
11 |
12 | 
13 |
14 |
15 | ## screens
16 |
17 | 
18 |
19 | 
20 |
21 | 
22 |
23 | 
24 |
25 | #### Components used
26 |
27 | - ReactJS
28 | - Material UI
29 | - Firebase
30 | - ExpressJS
31 | - Postman
32 |
33 |
34 | ********************************************************************************************************************************
35 |
36 |
37 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
38 |
39 | ## Available Scripts
40 |
41 | In the project directory, you can run:
42 |
43 | ### `yarn start`
44 |
45 | Runs the app in the development mode.
46 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
47 |
48 | The page will reload if you make edits.
49 | You will also see any lint errors in the console.
50 |
51 | ### `yarn test`
52 |
53 | Launches the test runner in the interactive watch mode.
54 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
55 |
56 | ### `yarn build`
57 |
58 | Builds the app for production to the `build` folder.
59 | It correctly bundles React in production mode and optimizes the build for the best performance.
60 |
61 | The build is minified and the filenames include the hashes.
62 | Your app is ready to be deployed!
63 |
64 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
65 |
66 | ### `yarn eject`
67 |
68 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
69 |
70 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
71 |
72 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
73 |
74 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
75 |
76 | ## Learn More
77 |
78 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
79 |
80 | To learn React, check out the [React documentation](https://reactjs.org/).
81 |
82 | ### Code Splitting
83 |
84 | This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
85 |
86 | ### Analyzing the Bundle Size
87 |
88 | This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
89 |
90 | ### Making a Progressive Web App
91 |
92 | This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
93 |
94 | ### Advanced Configuration
95 |
96 | This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
97 |
98 | ### Deployment
99 |
100 | This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
101 |
102 | ### `yarn build` fails to minify
103 |
104 | This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
105 |
--------------------------------------------------------------------------------
/build/_redirects:
--------------------------------------------------------------------------------
1 | /* /index.html 200
--------------------------------------------------------------------------------
/build/asset-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "files": {
3 | "main.css": "/static/css/main.050523cc.chunk.css",
4 | "main.js": "/static/js/main.36c2a1b6.chunk.js",
5 | "main.js.map": "/static/js/main.36c2a1b6.chunk.js.map",
6 | "runtime-main.js": "/static/js/runtime-main.ff02b437.js",
7 | "runtime-main.js.map": "/static/js/runtime-main.ff02b437.js.map",
8 | "static/js/2.27d8e5b0.chunk.js": "/static/js/2.27d8e5b0.chunk.js",
9 | "static/js/2.27d8e5b0.chunk.js.map": "/static/js/2.27d8e5b0.chunk.js.map",
10 | "index.html": "/index.html",
11 | "precache-manifest.6c79c24bbe33c3bfdb7d79ed851bd1d0.js": "/precache-manifest.6c79c24bbe33c3bfdb7d79ed851bd1d0.js",
12 | "service-worker.js": "/service-worker.js",
13 | "static/css/main.050523cc.chunk.css.map": "/static/css/main.050523cc.chunk.css.map",
14 | "static/js/2.27d8e5b0.chunk.js.LICENSE.txt": "/static/js/2.27d8e5b0.chunk.js.LICENSE.txt"
15 | },
16 | "entrypoints": [
17 | "static/js/runtime-main.ff02b437.js",
18 | "static/js/2.27d8e5b0.chunk.js",
19 | "static/css/main.050523cc.chunk.css",
20 | "static/js/main.36c2a1b6.chunk.js"
21 | ]
22 | }
--------------------------------------------------------------------------------
/build/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rajesh-Royal/React-Js-Todo-App-with-firebase-auth/cc094802b78f6215768caa7307a922cea1740285/build/favicon.png
--------------------------------------------------------------------------------
/build/index.html:
--------------------------------------------------------------------------------
1 |
Todo List App with firebase Authentication
--------------------------------------------------------------------------------
/build/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/build/precache-manifest.6c79c24bbe33c3bfdb7d79ed851bd1d0.js:
--------------------------------------------------------------------------------
1 | self.__precacheManifest = (self.__precacheManifest || []).concat([
2 | {
3 | "revision": "ad2fb95f6244fafa9b0e393eafd278e9",
4 | "url": "/index.html"
5 | },
6 | {
7 | "revision": "70fc031d7f087b1079d9",
8 | "url": "/static/css/main.050523cc.chunk.css"
9 | },
10 | {
11 | "revision": "24d7ddc2c4780399e258",
12 | "url": "/static/js/2.27d8e5b0.chunk.js"
13 | },
14 | {
15 | "revision": "0749163b59fbee32225059cb60c18af6",
16 | "url": "/static/js/2.27d8e5b0.chunk.js.LICENSE.txt"
17 | },
18 | {
19 | "revision": "70fc031d7f087b1079d9",
20 | "url": "/static/js/main.36c2a1b6.chunk.js"
21 | },
22 | {
23 | "revision": "03cc00eb0c215cdb696d",
24 | "url": "/static/js/runtime-main.ff02b437.js"
25 | }
26 | ]);
--------------------------------------------------------------------------------
/build/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/build/service-worker.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Welcome to your Workbox-powered service worker!
3 | *
4 | * You'll need to register this file in your web app and you should
5 | * disable HTTP caching for this file too.
6 | * See https://goo.gl/nhQhGp
7 | *
8 | * The rest of the code is auto-generated. Please don't update this file
9 | * directly; instead, make changes to your Workbox build configuration
10 | * and re-run your build process.
11 | * See https://goo.gl/2aRDsh
12 | */
13 |
14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
15 |
16 | importScripts(
17 | "/precache-manifest.6c79c24bbe33c3bfdb7d79ed851bd1d0.js"
18 | );
19 |
20 | self.addEventListener('message', (event) => {
21 | if (event.data && event.data.type === 'SKIP_WAITING') {
22 | self.skipWaiting();
23 | }
24 | });
25 |
26 | workbox.core.clientsClaim();
27 |
28 | /**
29 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to
30 | * requests for URLs in the manifest.
31 | * See https://goo.gl/S9QRab
32 | */
33 | self.__precacheManifest = [].concat(self.__precacheManifest || []);
34 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
35 |
36 | workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"), {
37 |
38 | blacklist: [/^\/_/,/\/[^/?]+\.[^/]+$/],
39 | });
40 |
--------------------------------------------------------------------------------
/build/static/css/main.050523cc.chunk.css:
--------------------------------------------------------------------------------
1 | .App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion:no-preference){.App-logo{-webkit-animation:App-logo-spin 20s linear infinite;animation:App-logo-spin 20s linear infinite}}.App-header{background-color:#282c34;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff}.App-link{color:#61dafb}@-webkit-keyframes App-logo-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes App-logo-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
2 | /*# sourceMappingURL=main.050523cc.chunk.css.map */
--------------------------------------------------------------------------------
/build/static/css/main.050523cc.chunk.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["App.css"],"names":[],"mappings":"AAAA,KACE,iBACF,CAEA,UACE,aAAc,CACd,mBACF,CAEA,8CACE,UACE,mDAA4C,CAA5C,2CACF,CACF,CAEA,YACE,wBAAyB,CACzB,gBAAiB,CACjB,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CACnB,sBAAuB,CACvB,4BAA6B,CAC7B,UACF,CAEA,UACE,aACF,CAEA,iCACE,GACE,sBACF,CACA,GACE,uBACF,CACF,CAPA,yBACE,GACE,sBACF,CACA,GACE,uBACF,CACF","file":"main.050523cc.chunk.css","sourcesContent":[".App {\n text-align: center;\n}\n\n.App-logo {\n height: 40vmin;\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .App-logo {\n animation: App-logo-spin infinite 20s linear;\n }\n}\n\n.App-header {\n background-color: #282c34;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: calc(10px + 2vmin);\n color: white;\n}\n\n.App-link {\n color: #61dafb;\n}\n\n@keyframes App-logo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n"]}
--------------------------------------------------------------------------------
/build/static/js/2.27d8e5b0.chunk.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /*
2 | object-assign
3 | (c) Sindre Sorhus
4 | @license MIT
5 | */
6 |
7 | /**
8 | * A better abstraction over CSS.
9 | *
10 | * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
11 | * @website https://github.com/cssinjs/jss
12 | * @license MIT
13 | */
14 |
15 | /** @license React v0.19.1
16 | * scheduler.production.min.js
17 | *
18 | * Copyright (c) Facebook, Inc. and its affiliates.
19 | *
20 | * This source code is licensed under the MIT license found in the
21 | * LICENSE file in the root directory of this source tree.
22 | */
23 |
24 | /** @license React v16.13.1
25 | * react-dom.production.min.js
26 | *
27 | * Copyright (c) Facebook, Inc. and its affiliates.
28 | *
29 | * This source code is licensed under the MIT license found in the
30 | * LICENSE file in the root directory of this source tree.
31 | */
32 |
33 | /** @license React v16.13.1
34 | * react-is.production.min.js
35 | *
36 | * Copyright (c) Facebook, Inc. and its affiliates.
37 | *
38 | * This source code is licensed under the MIT license found in the
39 | * LICENSE file in the root directory of this source tree.
40 | */
41 |
42 | /** @license React v16.13.1
43 | * react.production.min.js
44 | *
45 | * Copyright (c) Facebook, Inc. and its affiliates.
46 | *
47 | * This source code is licensed under the MIT license found in the
48 | * LICENSE file in the root directory of this source tree.
49 | */
50 |
--------------------------------------------------------------------------------
/build/static/js/main.36c2a1b6.chunk.js:
--------------------------------------------------------------------------------
1 | (this.webpackJsonpview=this.webpackJsonpview||[]).push([[0],{143:function(e,t,a){e.exports=a(191)},188:function(e,t,a){},191:function(e,t,a){"use strict";a.r(t);var n=a(0),o=a.n(n),r=a(9),l=a.n(r),i=a(126),s=a(11),c=a(18),m=a(27),u=a(28),d=a(29),p=a(31),h=a(248),g=a(228),f=a(226),b=a(247),E=a(231),v=a(230),y=a(71),N=a.n(y),C=a(52),w=a(24),x=a.n(w),S=a(224),T=a(229),k=a(12),O=a.n(k),j=function(e){Object(p.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(m.a)(this,a),(n=t.call(this,e)).handleChange=function(e){n.setState(Object(c.a)({},e.target.name,e.target.value))},n.handleSubmit=function(e){e.preventDefault(),n.setState({loading:!0});var t={email:n.state.email,password:n.state.password};O.a.post("https://us-central1-to-do-app-27bee.cloudfunctions.net/api/login",t).then((function(e){localStorage.setItem("AuthToken","Bearer ".concat(e.data.token)),n.setState({loading:!1}),n.props.history.push("/")})).catch((function(e){n.setState({errors:e.response.data,loading:!1})}))},n.state={email:"",password:"",errors:[],loading:!1},n}return Object(u.a)(a,[{key:"render",value:function(){var e=this.props.classes,t=this.state,a=t.errors,n=t.loading;return o.a.createElement(S.a,{component:"main",maxWidth:"xs"},o.a.createElement(f.a,null),o.a.createElement("div",{className:e.paper},o.a.createElement(h.a,{className:e.avatar},o.a.createElement(N.a,null)),o.a.createElement(C.a,{component:"h1",variant:"h5"},"Login"),o.a.createElement("form",{className:e.form,noValidate:!0},o.a.createElement(b.a,{variant:"outlined",margin:"normal",required:!0,fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",autoFocus:!0,helperText:a.email,error:!!a.email,onChange:this.handleChange}),o.a.createElement(b.a,{variant:"outlined",margin:"normal",required:!0,fullWidth:!0,name:"password",label:"Password",type:"password",id:"password",autoComplete:"current-password",helperText:a.password,error:!!a.password,onChange:this.handleChange}),o.a.createElement(g.a,{type:"submit",fullWidth:!0,variant:"contained",color:"primary",className:e.submit,onClick:this.handleSubmit,disabled:n||!this.state.email||!this.state.password},"Sign In",n&&o.a.createElement(T.a,{size:30,className:e.progess})),o.a.createElement(v.a,{container:!0},o.a.createElement(v.a,{item:!0},o.a.createElement(E.a,{href:"signup",variant:"body2"},"Don't have an account? Sign Up"))),a.general&&o.a.createElement(C.a,{variant:"body2",className:e.customError},a.general))))}}]),a}(n.Component),W=x()((function(e){return{paper:{marginTop:e.spacing(8),display:"flex",flexDirection:"column",alignItems:"center"},avatar:{margin:e.spacing(1),backgroundColor:e.palette.secondary.main},form:{width:"100%",marginTop:e.spacing(1)},submit:{margin:e.spacing(3,0,2)},customError:{color:"red",fontSize:"0.8rem",marginTop:10},progess:{position:"absolute"}}}))(j),P=function(e){Object(p.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(m.a)(this,a),(n=t.call(this,e)).handleChange=function(e){n.setState(Object(c.a)({},e.target.name,e.target.value))},n.handleSubmit=function(e){e.preventDefault(),n.setState({loading:!0});var t={firstName:n.state.firstName,lastName:n.state.lastName,phoneNumber:n.state.phoneNumber,country:n.state.country,username:n.state.username,email:n.state.email,password:n.state.password,confirmPassword:n.state.confirmPassword};O.a.post("https://us-central1-to-do-app-27bee.cloudfunctions.net/api/signup",t).then((function(e){localStorage.setItem("AuthToken","".concat(e.data.token)),n.setState({loading:!1}),n.props.history.push("/")})).catch((function(e){n.setState({errors:e.response.data,loading:!1})}))},n.state={firstName:"",lastName:"",phoneNumber:"",country:"",username:"",email:"",password:"",confirmPassword:"",errors:[],loading:!1},n}return Object(u.a)(a,[{key:"componentWillReceiveProps",value:function(e){e.UI.errors&&this.setState({errors:e.UI.errors})}},{key:"render",value:function(){var e=this.props.classes,t=this.state,a=t.errors,n=t.loading;return o.a.createElement(S.a,{component:"main",maxWidth:"xs"},o.a.createElement(f.a,null),o.a.createElement("div",{className:e.paper},o.a.createElement(h.a,{className:e.avatar},o.a.createElement(N.a,null)),o.a.createElement(C.a,{component:"h1",variant:"h5"},"Sign up"),o.a.createElement("form",{className:e.form,noValidate:!0},o.a.createElement(v.a,{container:!0,spacing:2},o.a.createElement(v.a,{item:!0,xs:12,sm:6},o.a.createElement(b.a,{variant:"outlined",required:!0,fullWidth:!0,id:"firstName",label:"First Name",name:"firstName",autoComplete:"firstName",helperText:a.firstName,error:!!a.firstName,onChange:this.handleChange})),o.a.createElement(v.a,{item:!0,xs:12,sm:6},o.a.createElement(b.a,{variant:"outlined",required:!0,fullWidth:!0,id:"lastName",label:"Last Name",name:"lastName",autoComplete:"lastName",helperText:a.lastName,error:!!a.lastName,onChange:this.handleChange})),o.a.createElement(v.a,{item:!0,xs:12,sm:6},o.a.createElement(b.a,{variant:"outlined",required:!0,fullWidth:!0,id:"username",label:"User Name",name:"username",autoComplete:"username",helperText:a.username,error:!!a.username,onChange:this.handleChange})),o.a.createElement(v.a,{item:!0,xs:12,sm:6},o.a.createElement(b.a,{variant:"outlined",required:!0,fullWidth:!0,id:"phoneNumber",label:"Phone Number",name:"phoneNumber",autoComplete:"phoneNumber",pattern:"[7-9]{1}[0-9]{9}",helperText:a.phoneNumber,error:!!a.phoneNumber,onChange:this.handleChange})),o.a.createElement(v.a,{item:!0,xs:12},o.a.createElement(b.a,{variant:"outlined",required:!0,fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",helperText:a.email,error:!!a.email,onChange:this.handleChange})),o.a.createElement(v.a,{item:!0,xs:12},o.a.createElement(b.a,{variant:"outlined",required:!0,fullWidth:!0,id:"country",label:"Country",name:"country",autoComplete:"country",helperText:a.country,error:!!a.country,onChange:this.handleChange})),o.a.createElement(v.a,{item:!0,xs:12},o.a.createElement(b.a,{variant:"outlined",required:!0,fullWidth:!0,name:"password",label:"Password",type:"password",id:"password",autoComplete:"current-password",helperText:a.password,error:!!a.password,onChange:this.handleChange})),o.a.createElement(v.a,{item:!0,xs:12},o.a.createElement(b.a,{variant:"outlined",required:!0,fullWidth:!0,name:"confirmPassword",label:"Confirm Password",type:"password",id:"confirmPassword",autoComplete:"current-password",onChange:this.handleChange}))),o.a.createElement(g.a,{type:"submit",fullWidth:!0,variant:"contained",color:"primary",className:e.submit,onClick:this.handleSubmit,disabled:n||!this.state.email||!this.state.password||!this.state.firstName||!this.state.lastName||!this.state.country||!this.state.username||!this.state.phoneNumber},"Sign Up",n&&o.a.createElement(T.a,{size:30,className:e.progess})),o.a.createElement(v.a,{container:!0,justify:"flex-end"},o.a.createElement(v.a,{item:!0},o.a.createElement(E.a,{href:"login",variant:"body2"},"Already have an account? Sign in"))))))}}]),a}(n.Component),I=x()((function(e){return{paper:{marginTop:e.spacing(8),display:"flex",flexDirection:"column",alignItems:"center"},avatar:{margin:e.spacing(1),backgroundColor:e.palette.secondary.main},form:{width:"100%",marginTop:e.spacing(3)},submit:{margin:e.spacing(3,0,2)},progess:{position:"absolute"}}}))(P),L=a(77),A=a(120),z=a.n(A),B=a(233),D=a(234),q=a(235),V=a(236),F=a(3),H=function(e){null===localStorage.getItem("AuthToken")&&e.push("/login")},U=function(e){Object(p.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(m.a)(this,a),(n=t.call(this,e)).componentWillMount=function(){H(n.props.history);var e=localStorage.getItem("AuthToken");O.a.defaults.headers.common={Authorization:"".concat(e)},O.a.get("https://us-central1-to-do-app-27bee.cloudfunctions.net/api/user").then((function(e){console.log(e.data),n.setState({firstName:e.data.userCredentials.firstName,lastName:e.data.userCredentials.lastName,email:e.data.userCredentials.email,phoneNumber:e.data.userCredentials.phoneNumber,country:e.data.userCredentials.country,username:e.data.userCredentials.username,uiLoading:!1})})).catch((function(e){403===e.response.status&&n.props.history.push("/login"),console.log(e),n.setState({errorMsg:"Error in retrieving the data"})}))},n.handleChange=function(e){n.setState(Object(c.a)({},e.target.name,e.target.value))},n.handleImageChange=function(e){n.setState({image:e.target.files[0]})},n.profilePictureHandler=function(e){e.preventDefault(),n.setState({uiLoading:!0}),H(n.props.history);var t=localStorage.getItem("AuthToken"),a=new FormData;a.append("image",n.state.image),a.append("content",n.state.content),O.a.defaults.headers.common={Authorization:"".concat(t)},O.a.post("https://us-central1-to-do-app-27bee.cloudfunctions.net/api/user/image",a,{headers:{"content-type":"multipart/form-data"}}).then((function(){window.location.reload()})).catch((function(e){403===e.response.status&&n.props.history.push("/login"),console.log(e),n.setState({uiLoading:!1,imageError:"Error in posting the data"})}))},n.updateFormValues=function(e){e.preventDefault(),n.setState({buttonLoading:!0}),H(n.props.history);var t=localStorage.getItem("AuthToken");O.a.defaults.headers.common={Authorization:"".concat(t)};var a={firstName:n.state.firstName,lastName:n.state.lastName,country:n.state.country};O.a.post("https://us-central1-to-do-app-27bee.cloudfunctions.net/api/user",a).then((function(){n.setState({buttonLoading:!1})})).catch((function(e){403===e.response.status&&n.props.history.push("/login"),console.log(e),n.setState({buttonLoading:!1})}))},n.state={firstName:"",lastName:"",email:"",phoneNumber:"",username:"",country:"",profilePicture:"",uiLoading:!0,buttonLoading:!1,imageError:""},n}return Object(u.a)(a,[{key:"render",value:function(){var e=this.props,t=e.classes,a=Object(L.a)(e,["classes"]);return!0===this.state.uiLoading?o.a.createElement("main",{className:t.content},o.a.createElement("div",{className:t.toolbar}),this.state.uiLoading&&o.a.createElement(T.a,{size:150,className:t.uiProgess})):o.a.createElement("main",{className:t.content},o.a.createElement("div",{className:t.toolbar}),o.a.createElement(B.a,Object.assign({},a,{className:Object(F.a)(t.root,t)}),o.a.createElement(D.a,null,o.a.createElement("div",{className:t.details},o.a.createElement("div",null,o.a.createElement(C.a,{className:t.locationText,gutterBottom:!0,variant:"h4"},this.state.firstName," ",this.state.lastName),o.a.createElement(g.a,{variant:"outlined",color:"primary",type:"submit",size:"small",startIcon:o.a.createElement(z.a,null),className:t.uploadButton,onClick:this.profilePictureHandler},"Upload Photo"),o.a.createElement("input",{type:"file",onChange:this.handleImageChange}),!!this.state.imageError&&o.a.createElement("div",{className:t.customError}," ","Wrong Image Format || Supported Format are PNG and JPG"))),o.a.createElement("div",{className:t.progress})),o.a.createElement(q.a,null)),o.a.createElement("br",null),o.a.createElement(B.a,Object.assign({},a,{className:Object(F.a)(t.root,t)}),o.a.createElement("form",{autoComplete:"off",noValidate:!0},o.a.createElement(q.a,null),o.a.createElement(D.a,null,o.a.createElement(v.a,{container:!0,spacing:3},o.a.createElement(v.a,{item:!0,md:6,xs:12},o.a.createElement(b.a,{fullWidth:!0,label:"First name",margin:"dense",name:"firstName",variant:"outlined",value:this.state.firstName,onChange:this.handleChange})),o.a.createElement(v.a,{item:!0,md:6,xs:12},o.a.createElement(b.a,{fullWidth:!0,label:"Last name",margin:"dense",name:"lastName",variant:"outlined",value:this.state.lastName,onChange:this.handleChange})),o.a.createElement(v.a,{item:!0,md:6,xs:12},o.a.createElement(b.a,{fullWidth:!0,label:"Email",margin:"dense",name:"email",variant:"outlined",disabled:!0,value:this.state.email,onChange:this.handleChange})),o.a.createElement(v.a,{item:!0,md:6,xs:12},o.a.createElement(b.a,{fullWidth:!0,label:"Phone Number",margin:"dense",name:"phone",type:"number",variant:"outlined",disabled:!0,value:this.state.phoneNumber,onChange:this.handleChange})),o.a.createElement(v.a,{item:!0,md:6,xs:12},o.a.createElement(b.a,{fullWidth:!0,label:"User Name",margin:"dense",name:"userHandle",disabled:!0,variant:"outlined",value:this.state.username,onChange:this.handleChange})),o.a.createElement(v.a,{item:!0,md:6,xs:12},o.a.createElement(b.a,{fullWidth:!0,label:"Country",margin:"dense",name:"country",variant:"outlined",value:this.state.country,onChange:this.handleChange})))),o.a.createElement(q.a,null),o.a.createElement(V.a,null))),o.a.createElement(g.a,{color:"primary",variant:"contained",type:"submit",className:t.submitButton,onClick:this.updateFormValues,disabled:this.state.buttonLoading||!this.state.firstName||!this.state.lastName||!this.state.country},"Save details",this.state.buttonLoading&&o.a.createElement(T.a,{size:30,className:t.progess})))}}]),a}(n.Component),M=x()((function(e){return{content:{flexGrow:1,padding:e.spacing(3)},toolbar:e.mixins.toolbar,root:{},details:{display:"flex"},avatar:{height:110,width:100,flexShrink:0,flexGrow:0},locationText:{paddingLeft:"15px"},buttonProperty:{position:"absolute",top:"50%"},uiProgess:{position:"fixed",zIndex:"1000",height:"31px",width:"31px",left:"50%",top:"35%"},progess:{position:"absolute"},uploadButton:{marginLeft:"8px",margin:e.spacing(1)},customError:{color:"red",fontSize:"0.8rem",marginTop:10},submitButton:{marginTop:"10px"}}}))(U),G=a(49),R=a(240),J=a(122),$=a.n(J),K=a(241),Q=a(242),X=a(238),Y=a(86),Z=a.n(Y),_=a(195),ee=a(237),te=a(239),ae=a(85),ne=a.n(ae),oe=a(121),re=a.n(oe),le=function(e){var t;return t={content:{flexGrow:1,padding:e.spacing(3)},toolbar:e.mixins.toolbar,title:{marginLeft:e.spacing(2),flex:1},submitButton:{display:"block",color:"white",textAlign:"center",position:"absolute",top:14,right:10},floatingButton:{position:"fixed",bottom:0,right:0},form:{width:"98%",marginLeft:13,marginTop:"130px"}},Object(c.a)(t,"toolbar",e.mixins.toolbar),Object(c.a)(t,"root",{minWidth:470}),Object(c.a)(t,"bullet",{display:"inline-block",margin:"0 2px",transform:"scale(0.8)"}),Object(c.a)(t,"pos",{marginBottom:12}),Object(c.a)(t,"uiProgess",{position:"fixed",zIndex:"1000",height:"31px",width:"31px",left:"50%",top:"35%"}),Object(c.a)(t,"dialogeStyle",{maxWidth:"50%"}),Object(c.a)(t,"viewRoot",{margin:0,padding:e.spacing(2)}),Object(c.a)(t,"closeButton",{position:"absolute",right:e.spacing(1),top:e.spacing(1),color:e.palette.grey[500]}),t},ie=o.a.forwardRef((function(e,t){return o.a.createElement(_.a,Object.assign({direction:"up",ref:t},e))})),se=function(e){Object(p.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(m.a)(this,a),(n=t.call(this,e)).handleChange=function(e){n.setState(Object(c.a)({},e.target.name,e.target.value))},n.componentWillMount=function(){H(n.props.history);var e=localStorage.getItem("AuthToken");O.a.defaults.headers.common={Authorization:"".concat(e)},O.a.get("https://us-central1-to-do-app-27bee.cloudfunctions.net/api/todos").then((function(e){n.setState({todos:e.data,uiLoading:!1})})).catch((function(e){console.log(e)}))},n.state={todos:"",title:"",body:"",todoId:"",errors:[],open:!1,uiLoading:!0,buttonType:"",viewOpen:!1},n.deleteTodoHandler=n.deleteTodoHandler.bind(Object(G.a)(n)),n.handleEditClickOpen=n.handleEditClickOpen.bind(Object(G.a)(n)),n.handleViewOpen=n.handleViewOpen.bind(Object(G.a)(n)),n}return Object(u.a)(a,[{key:"deleteTodoHandler",value:function(e){H(this.props.history);var t=localStorage.getItem("AuthToken");O.a.defaults.headers.common={Authorization:"".concat(t)};var a=e.todo.todoId;O.a.delete("https://us-central1-to-do-app-27bee.cloudfunctions.net/api/todo/".concat(a)).then((function(){window.location.reload()})).catch((function(e){console.log(e)}))}},{key:"handleEditClickOpen",value:function(e){this.setState({title:e.todo.title,body:e.todo.body,todoId:e.todo.todoId,buttonType:"Edit",open:!0})}},{key:"handleViewOpen",value:function(e){this.setState({title:e.todo.title,body:e.todo.body,viewOpen:!0})}},{key:"render",value:function(){var e=this,t=x()(le)((function(e){var t=e.children,a=e.classes,n=e.onClose,r=Object(L.a)(e,["children","classes","onClose"]);return o.a.createElement(ee.a,Object.assign({disableTypography:!0,className:a.root},r),o.a.createElement(C.a,{variant:"h6"},t),n?o.a.createElement(X.a,{"aria-label":"close",className:a.closeButton,onClick:n},o.a.createElement(Z.a,null)):null)})),a=x()((function(e){return{viewRoot:{padding:e.spacing(2)}}}))(te.a);ne.a.extend(re.a);var n=this.props.classes,r=this.state,l=r.open,i=r.errors,s=r.viewOpen,c=function(){e.setState({viewOpen:!1})},m=function(t){e.setState({open:!1})};return!0===this.state.uiLoading?o.a.createElement("main",{className:n.content},o.a.createElement("div",{className:n.toolbar}),this.state.uiLoading&&o.a.createElement(T.a,{size:150,className:n.uiProgess})):o.a.createElement("main",{className:n.content},o.a.createElement("div",{className:n.toolbar}),o.a.createElement(X.a,{className:n.floatingButton,color:"primary","aria-label":"Add Todo",onClick:function(){e.setState({todoId:"",title:"",body:"",buttonType:"",open:!0})}},o.a.createElement($.a,{style:{fontSize:60}})),o.a.createElement(R.a,{fullScreen:!0,open:l,onClose:m,TransitionComponent:ie},o.a.createElement(K.a,{className:n.appBar},o.a.createElement(Q.a,null,o.a.createElement(X.a,{edge:"start",color:"inherit",onClick:m,"aria-label":"close"},o.a.createElement(Z.a,null)),o.a.createElement(C.a,{variant:"h6",className:n.title},"Edit"===this.state.buttonType?"Edit Todo":"Create a new Todo"),o.a.createElement(g.a,{autoFocus:!0,color:"inherit",onClick:function(t){H(e.props.history),t.preventDefault();var a={title:e.state.title,body:e.state.body},n={};n="Edit"===e.state.buttonType?{url:"https://us-central1-to-do-app-27bee.cloudfunctions.net/api/todo/".concat(e.state.todoId),method:"put",data:a}:{url:"https://us-central1-to-do-app-27bee.cloudfunctions.net/api/todo",method:"post",data:a};var o=localStorage.getItem("AuthToken");O.a.defaults.headers.common={Authorization:"".concat(o)},O()(n).then((function(){e.setState({open:!1}),window.location.reload()})).catch((function(t){e.setState({open:!0,errors:t.response.data}),console.log(t)}))},className:n.submitButton},"Edit"===this.state.buttonType?"Save":"Submit"))),o.a.createElement("form",{className:n.form,noValidate:!0},o.a.createElement(v.a,{container:!0,spacing:2},o.a.createElement(v.a,{item:!0,xs:12},o.a.createElement(b.a,{variant:"outlined",required:!0,fullWidth:!0,id:"todoTitle",label:"Todo Title",name:"title",autoComplete:"todoTitle",helperText:i.title,value:this.state.title,error:!!i.title,onChange:this.handleChange})),o.a.createElement(v.a,{item:!0,xs:12},o.a.createElement(b.a,{variant:"outlined",required:!0,fullWidth:!0,id:"todoDetails",label:"Todo Details",name:"body",autoComplete:"todoDetails",multiline:!0,rows:25,rowsMax:25,helperText:i.body,error:!!i.body,onChange:this.handleChange,value:this.state.body}))))),o.a.createElement(v.a,{container:!0,spacing:2},this.state.todos.map((function(t){return o.a.createElement(v.a,{item:!0,xs:12,sm:6},o.a.createElement(B.a,{className:n.root,variant:"outlined"},o.a.createElement(D.a,null,o.a.createElement(C.a,{variant:"h5",component:"h2"},t.title),o.a.createElement(C.a,{className:n.pos,color:"textSecondary"},ne()(t.createdAt).fromNow()),o.a.createElement(C.a,{variant:"body2",component:"p"},"".concat(t.body.substring(0,65)))),o.a.createElement(V.a,null,o.a.createElement(g.a,{size:"small",color:"primary",onClick:function(){return e.handleViewOpen({todo:t})}}," ","View"," "),o.a.createElement(g.a,{size:"small",color:"primary",onClick:function(){return e.handleEditClickOpen({todo:t})}},"Edit"),o.a.createElement(g.a,{size:"small",color:"primary",onClick:function(){return e.deleteTodoHandler({todo:t})}},"Delete"))))}))),o.a.createElement(R.a,{onClose:c,"aria-labelledby":"customized-dialog-title",open:s,fullWidth:!0,classes:{paperFullWidth:n.dialogeStyle}},o.a.createElement(t,{id:"customized-dialog-title",onClose:c},this.state.title),o.a.createElement(a,{dividers:!0},o.a.createElement(b.a,{fullWidth:!0,id:"todoDetails",name:"body",multiline:!0,readonly:!0,rows:1,rowsMax:25,value:this.state.body,InputProps:{disableUnderline:!0}}))))}}]),a}(n.Component),ce=x()(le)(se),me=a(243),ue=a(227),de=a(244),pe=a(245),he=a(246),ge=a(124),fe=a.n(ge),be=a(123),Ee=a.n(be),ve=a(125),ye=a.n(ve),Ne=function(e){Object(p.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(m.a)(this,a),(n=t.call(this,e)).state={render:!1},n.loadAccountPage=function(e){n.setState({render:!0})},n.loadTodoPage=function(e){n.setState({render:!1})},n.logoutHandler=function(e){localStorage.removeItem("AuthToken"),n.props.history.push("/login")},n.componentWillMount=function(){H(n.props.history);var e=localStorage.getItem("AuthToken");O.a.defaults.headers.common={Authorization:"".concat(e)},O.a.get("https://us-central1-to-do-app-27bee.cloudfunctions.net/api/user").then((function(e){console.log(e.data),n.setState({firstName:e.data.userCredentials.firstName,lastName:e.data.userCredentials.lastName,email:e.data.userCredentials.email,phoneNumber:e.data.userCredentials.phoneNumber,country:e.data.userCredentials.country,username:e.data.userCredentials.username,uiLoading:!1,profilePicture:e.data.userCredentials.imageUrl})})).catch((function(e){403===e.response.status&&n.props.history.push("/login"),console.log(e),n.setState({errorMsg:"Error in retrieving the data"})}))},n.state={firstName:"",lastName:"",profilePicture:"",uiLoading:!0,imageLoading:!1},n}return Object(u.a)(a,[{key:"render",value:function(){var e=this.props.classes;return!0===this.state.uiLoading?o.a.createElement("div",{className:e.root},this.state.uiLoading&&o.a.createElement(T.a,{size:150,className:e.uiProgess})):o.a.createElement("div",{className:e.root},o.a.createElement(f.a,null),o.a.createElement(K.a,{position:"fixed",className:e.appBar},o.a.createElement(Q.a,null,o.a.createElement(C.a,{variant:"h6",noWrap:!0},"TodoApp"))),o.a.createElement(me.a,{className:e.drawer,variant:"permanent",classes:{paper:e.drawerPaper}},o.a.createElement("div",{className:e.toolbar}),o.a.createElement(q.a,null),o.a.createElement("center",null,o.a.createElement(h.a,{src:this.state.profilePicture,className:e.avatar}),o.a.createElement("p",null," ",this.state.firstName," ",this.state.lastName)),o.a.createElement(q.a,null),o.a.createElement(ue.a,null,o.a.createElement(de.a,{button:!0,key:"Todo",onClick:this.loadTodoPage},o.a.createElement(pe.a,null," ",o.a.createElement(Ee.a,null)," "),o.a.createElement(he.a,{primary:"Todo"})),o.a.createElement(de.a,{button:!0,key:"Account",onClick:this.loadAccountPage},o.a.createElement(pe.a,null," ",o.a.createElement(fe.a,null)," "),o.a.createElement(he.a,{primary:"Account"})),o.a.createElement(de.a,{button:!0,key:"Logout",onClick:this.logoutHandler},o.a.createElement(pe.a,null," ",o.a.createElement(ye.a,null)," "),o.a.createElement(he.a,{primary:"Logout"})))),o.a.createElement("div",null,this.state.render?o.a.createElement(M,null):o.a.createElement(ce,null)))}}]),a}(n.Component),Ce=x()((function(e){return{root:{display:"flex"},appBar:{zIndex:e.zIndex.drawer+1},drawer:{width:240,flexShrink:0},drawerPaper:{width:240},content:{flexGrow:1,padding:e.spacing(3)},avatar:{height:110,width:100,flexShrink:0,flexGrow:0,marginTop:20},uiProgess:{position:"fixed",zIndex:"1000",height:"31px",width:"31px",left:"50%",top:"35%"},toolbar:e.mixins.toolbar}}))(Ne),we=(a(188),a(232)),xe=a(84),Se=a.n(xe)()({palette:{primary:{light:"#8e99f3",main:"#3f51b5",dark:"#26418f",contrastText:"#fff"}}});var Te=function(){return o.a.createElement(we.a,{theme:Se},o.a.createElement(i.a,null,o.a.createElement("div",null,o.a.createElement(s.c,null,o.a.createElement(s.a,{exact:!0,path:"/login",component:W}),o.a.createElement(s.a,{exact:!0,path:"/signup",component:I}),o.a.createElement(s.a,{exact:!0,path:"/",component:Ce})))))};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));l.a.render(o.a.createElement(o.a.StrictMode,null,o.a.createElement(Te,null)),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[143,1,2]]]);
2 | //# sourceMappingURL=main.36c2a1b6.chunk.js.map
--------------------------------------------------------------------------------
/build/static/js/main.36c2a1b6.chunk.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["pages/login.js","pages/signup.js","util/auth.js","components/account.js","components/todo.js","pages/home.js","App.js","serviceWorker.js","index.js"],"names":["login","props","handleChange","event","setState","target","name","value","handleSubmit","preventDefault","loading","userData","email","state","password","axios","post","then","response","localStorage","setItem","data","token","history","push","catch","error","errors","classes","this","Container","component","maxWidth","CssBaseline","className","paper","Avatar","avatar","Typography","variant","form","noValidate","TextField","margin","required","fullWidth","id","label","autoComplete","autoFocus","helperText","onChange","type","Button","color","submit","onClick","disabled","CircularProgress","size","progess","Grid","container","item","Link","href","general","customError","Component","withStyles","theme","marginTop","spacing","display","flexDirection","alignItems","backgroundColor","palette","secondary","main","width","fontSize","position","signup","newUserData","firstName","lastName","phoneNumber","country","username","confirmPassword","nextProps","UI","xs","sm","pattern","justify","authMiddleWare","getItem","account","componentWillMount","authToken","defaults","headers","common","Authorization","get","console","log","userCredentials","uiLoading","status","errorMsg","handleImageChange","image","files","profilePictureHandler","form_data","FormData","append","content","window","location","reload","imageError","updateFormValues","buttonLoading","formRequest","profilePicture","rest","toolbar","uiProgess","Card","clsx","root","CardContent","details","locationText","gutterBottom","startIcon","uploadButton","progress","Divider","md","CardActions","submitButton","flexGrow","padding","mixins","height","flexShrink","paddingLeft","buttonProperty","top","zIndex","left","marginLeft","styles","title","flex","textAlign","right","floatingButton","bottom","minWidth","transform","marginBottom","grey","Transition","React","forwardRef","ref","Slide","direction","todo","todos","err","body","todoId","open","buttonType","viewOpen","deleteTodoHandler","bind","handleEditClickOpen","handleViewOpen","delete","DialogTitle","children","onClose","other","disableTypography","IconButton","aria-label","closeButton","DialogContent","viewRoot","MuiDialogContent","dayjs","extend","relativeTime","handleViewClose","handleClose","style","Dialog","fullScreen","TransitionComponent","AppBar","appBar","Toolbar","edge","userTodo","options","url","method","multiline","rows","rowsMax","map","pos","createdAt","fromNow","substring","aria-labelledby","paperFullWidth","dialogeStyle","dividers","readonly","InputProps","disableUnderline","home","render","loadAccountPage","loadTodoPage","logoutHandler","removeItem","imageUrl","imageLoading","noWrap","Drawer","drawer","drawerPaper","src","List","ListItem","button","key","ListItemIcon","ListItemText","primary","createMuiTheme","light","dark","contrastText","App","exact","path","Boolean","hostname","match","ReactDOM","StrictMode","document","getElementById","navigator","serviceWorker","ready","registration","unregister","message"],"mappings":"iYA2CMA,E,kDACL,WAAYC,GAAQ,IAAD,8BAClB,cAAMA,IAkBPC,aAAe,SAACC,GACf,EAAKC,SAAL,eACED,EAAME,OAAOC,KAAOH,EAAME,OAAOE,SArBjB,EAyBnBC,aAAe,SAACL,GACfA,EAAMM,iBACN,EAAKL,SAAS,CAAEM,SAAS,IACzB,IAAMC,EAAW,CAChBC,MAAO,EAAKC,MAAMD,MAClBE,SAAU,EAAKD,MAAMC,UAEtBC,IACEC,KAAK,mEAAoEL,GACzEM,MAAK,SAACC,GACNC,aAAaC,QAAQ,YAArB,iBAA4CF,EAASG,KAAKC,QAC1D,EAAKlB,SAAS,CACbM,SAAS,IAEV,EAAKT,MAAMsB,QAAQC,KAAK,QAExBC,OAAM,SAACC,GACP,EAAKtB,SAAS,CACbuB,OAAQD,EAAMR,SAASG,KACvBX,SAAS,QAzCZ,EAAKG,MAAQ,CACZD,MAAO,GACPE,SAAU,GACVa,OAAQ,GACRjB,SAAS,GAPQ,E,qDAiDT,IACDkB,EAAYC,KAAK5B,MAAjB2B,QADA,EAEoBC,KAAKhB,MAAzBc,EAFA,EAEAA,OAAQjB,EAFR,EAEQA,QAChB,OACC,kBAACoB,EAAA,EAAD,CAAWC,UAAU,OAAOC,SAAS,MACpC,kBAACC,EAAA,EAAD,MACA,yBAAKC,UAAWN,EAAQO,OACvB,kBAACC,EAAA,EAAD,CAAQF,UAAWN,EAAQS,QAC1B,kBAAC,IAAD,OAED,kBAACC,EAAA,EAAD,CAAYP,UAAU,KAAKQ,QAAQ,MAAnC,SAGA,0BAAML,UAAWN,EAAQY,KAAMC,YAAU,GACxC,kBAACC,EAAA,EAAD,CACCH,QAAQ,WACRI,OAAO,SACPC,UAAQ,EACRC,WAAS,EACTC,GAAG,QACHC,MAAM,gBACNzC,KAAK,QACL0C,aAAa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5BhK,G,OAAQoL,GAAe,CAC5B7K,QAAS,CACR4K,QAAS,CACRE,MAAO,UACP5K,KAAM,UACN6K,KAAM,UACNC,aAAc,WAsBFC,OAhBf,WACE,OACE,kBAAC,KAAD,CAAkBxL,MAAOA,IACzB,kBAAC,IAAD,KACE,6BACE,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAOyL,OAAK,EAACC,KAAK,SAASjO,UAAW/B,IACtC,kBAAC,IAAD,CAAO+P,OAAK,EAACC,KAAK,UAAUjO,UAAWoD,IACvC,kBAAC,IAAD,CAAO4K,OAAK,EAACC,KAAK,IAAIjO,UAAWuM,UClBvB2B,QACW,cAA7BxI,OAAOC,SAASwI,UAEe,UAA7BzI,OAAOC,SAASwI,UAEhBzI,OAAOC,SAASwI,SAASC,MACvB,2DCbNC,IAAS7B,OACP,kBAAC,IAAM8B,WAAP,KACE,kBAAC,GAAD,OAEFC,SAASC,eAAe,SD0HpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBzP,MAAK,SAAA0P,GACJA,EAAaC,gBAEdnP,OAAM,SAAAC,GACLiF,QAAQjF,MAAMA,EAAMmP,c","file":"static/js/main.36c2a1b6.chunk.js","sourcesContent":["import React, { Component } from 'react';\r\nimport Avatar from '@material-ui/core/Avatar';\r\nimport Button from '@material-ui/core/Button';\r\nimport CssBaseline from '@material-ui/core/CssBaseline';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport Link from '@material-ui/core/Link';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport LockOutlinedIcon from '@material-ui/icons/LockOutlined';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport withStyles from '@material-ui/core/styles/withStyles';\r\nimport Container from '@material-ui/core/Container';\r\nimport CircularProgress from '@material-ui/core/CircularProgress';\r\n\r\nimport axios from 'axios';\r\n\r\nconst styles = (theme) => ({\r\n\tpaper: {\r\n\t\tmarginTop: theme.spacing(8),\r\n\t\tdisplay: 'flex',\r\n\t\tflexDirection: 'column',\r\n\t\talignItems: 'center'\r\n\t},\r\n\tavatar: {\r\n\t\tmargin: theme.spacing(1),\r\n\t\tbackgroundColor: theme.palette.secondary.main\r\n\t},\r\n\tform: {\r\n\t\twidth: '100%',\r\n\t\tmarginTop: theme.spacing(1)\r\n\t},\r\n\tsubmit: {\r\n\t\tmargin: theme.spacing(3, 0, 2)\r\n\t},\r\n\tcustomError: {\r\n\t\tcolor: 'red',\r\n\t\tfontSize: '0.8rem',\r\n\t\tmarginTop: 10\r\n\t},\r\n\tprogess: {\r\n\t\tposition: 'absolute'\r\n\t}\r\n});\r\n\r\nclass login extends Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\r\n\t\tthis.state = {\r\n\t\t\temail: '',\r\n\t\t\tpassword: '',\r\n\t\t\terrors: [],\r\n\t\t\tloading: false\r\n\t\t};\r\n\t}\r\n\r\n\t/*componentWillReceiveProps(nextProps) {\r\n\t\tif (nextProps.UI.errors) {\r\n\t\t\tthis.setState({\r\n\t\t\t\terrors: nextProps.UI.errors\r\n\t\t\t});\r\n\t\t}\r\n\t} */\r\n\r\n\thandleChange = (event) => {\r\n\t\tthis.setState({\r\n\t\t\t[event.target.name]: event.target.value\r\n\t\t});\r\n\t};\r\n\r\n\thandleSubmit = (event) => {\r\n\t\tevent.preventDefault();\r\n\t\tthis.setState({ loading: true });\r\n\t\tconst userData = {\r\n\t\t\temail: this.state.email,\r\n\t\t\tpassword: this.state.password\r\n\t\t};\r\n\t\taxios\r\n\t\t\t.post('https://us-central1-to-do-app-27bee.cloudfunctions.net/api/login', userData)\r\n\t\t\t.then((response) => {\r\n\t\t\t\tlocalStorage.setItem('AuthToken', `Bearer ${response.data.token}`);\r\n\t\t\t\tthis.setState({ \r\n\t\t\t\t\tloading: false,\r\n\t\t\t\t});\t\t\r\n\t\t\t\tthis.props.history.push('/');\r\n\t\t\t})\r\n\t\t\t.catch((error) => {\t\t\t\t\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\terrors: error.response.data,\r\n\t\t\t\t\tloading: false\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t};\r\n\r\n\trender() {\r\n\t\tconst { classes } = this.props;\r\n\t\tconst { errors, loading } = this.state;\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport default withStyles(styles)(home);","import React from 'react';\nimport { BrowserRouter as Router, Route, Switch } from 'react-router-dom';\nimport login from './pages/login'\nimport signup from './pages/signup'\nimport home from './pages/home';\nimport './App.css';\n\nimport { ThemeProvider as MuiThemeProvider } from '@material-ui/core/styles';\nimport createMuiTheme from '@material-ui/core/styles/createMuiTheme';\n\nconst theme = createMuiTheme({\n\tpalette: {\n\t\tprimary: {\n\t\t\tlight: '#8e99f3',\n\t\t\tmain: '#3f51b5',\n\t\t\tdark: '#26418f',\n\t\t\tcontrastText: '#fff'\n\t\t}\n\t}\n});\n\n\nfunction App() {\n return (\n \n \n
\n \n \n \n \n \n
\n \n \n );\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}
--------------------------------------------------------------------------------
/build/static/js/runtime-main.ff02b437.js:
--------------------------------------------------------------------------------
1 | !function(e){function r(r){for(var n,i,l=r[0],f=r[1],a=r[2],c=0,s=[];c0.2%",
30 | "not dead",
31 | "not op_mini all"
32 | ],
33 | "development": [
34 | "last 1 chrome version",
35 | "last 1 firefox version",
36 | "last 1 safari version"
37 | ]
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/photos/account.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rajesh-Royal/React-Js-Todo-App-with-firebase-auth/cc094802b78f6215768caa7307a922cea1740285/photos/account.PNG
--------------------------------------------------------------------------------
/photos/architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rajesh-Royal/React-Js-Todo-App-with-firebase-auth/cc094802b78f6215768caa7307a922cea1740285/photos/architecture.png
--------------------------------------------------------------------------------
/photos/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rajesh-Royal/React-Js-Todo-App-with-firebase-auth/cc094802b78f6215768caa7307a922cea1740285/photos/favicon.png
--------------------------------------------------------------------------------
/photos/login and dashboard.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rajesh-Royal/React-Js-Todo-App-with-firebase-auth/cc094802b78f6215768caa7307a922cea1740285/photos/login and dashboard.gif
--------------------------------------------------------------------------------
/photos/login.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rajesh-Royal/React-Js-Todo-App-with-firebase-auth/cc094802b78f6215768caa7307a922cea1740285/photos/login.PNG
--------------------------------------------------------------------------------
/photos/signup.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rajesh-Royal/React-Js-Todo-App-with-firebase-auth/cc094802b78f6215768caa7307a922cea1740285/photos/signup.PNG
--------------------------------------------------------------------------------
/photos/tododashboard.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rajesh-Royal/React-Js-Todo-App-with-firebase-auth/cc094802b78f6215768caa7307a922cea1740285/photos/tododashboard.PNG
--------------------------------------------------------------------------------
/public/_redirects:
--------------------------------------------------------------------------------
1 | /* /index.html 200
--------------------------------------------------------------------------------
/public/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rajesh-Royal/React-Js-Todo-App-with-firebase-auth/cc094802b78f6215768caa7307a922cea1740285/public/favicon.png
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 | Todo List App with firebase Authentication
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | height: 40vmin;
7 | pointer-events: none;
8 | }
9 |
10 | @media (prefers-reduced-motion: no-preference) {
11 | .App-logo {
12 | animation: App-logo-spin infinite 20s linear;
13 | }
14 | }
15 |
16 | .App-header {
17 | background-color: #282c34;
18 | min-height: 100vh;
19 | display: flex;
20 | flex-direction: column;
21 | align-items: center;
22 | justify-content: center;
23 | font-size: calc(10px + 2vmin);
24 | color: white;
25 | }
26 |
27 | .App-link {
28 | color: #61dafb;
29 | }
30 |
31 | @keyframes App-logo-spin {
32 | from {
33 | transform: rotate(0deg);
34 | }
35 | to {
36 | transform: rotate(360deg);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
3 | import login from './pages/login'
4 | import signup from './pages/signup'
5 | import home from './pages/home';
6 | import './App.css';
7 |
8 | import { ThemeProvider as MuiThemeProvider } from '@material-ui/core/styles';
9 | import createMuiTheme from '@material-ui/core/styles/createMuiTheme';
10 |
11 | const theme = createMuiTheme({
12 | palette: {
13 | primary: {
14 | light: '#8e99f3',
15 | main: '#3f51b5',
16 | dark: '#26418f',
17 | contrastText: '#fff'
18 | }
19 | }
20 | });
21 |
22 |
23 | function App() {
24 | return (
25 |
26 |
27 |
264 |
265 | );
266 | }
267 | }
268 |
269 |
270 | export default withStyles(styles)(signup);
--------------------------------------------------------------------------------
/src/serviceWorker.js:
--------------------------------------------------------------------------------
1 | // This optional code is used to register a service worker.
2 | // register() is not called by default.
3 |
4 | // This lets the app load faster on subsequent visits in production, and gives
5 | // it offline capabilities. However, it also means that developers (and users)
6 | // will only see deployed updates on subsequent visits to a page, after all the
7 | // existing tabs open on the page have been closed, since previously cached
8 | // resources are updated in the background.
9 |
10 | // To learn more about the benefits of this model and instructions on how to
11 | // opt-in, read https://bit.ly/CRA-PWA
12 |
13 | const isLocalhost = Boolean(
14 | window.location.hostname === 'localhost' ||
15 | // [::1] is the IPv6 localhost address.
16 | window.location.hostname === '[::1]' ||
17 | // 127.0.0.0/8 are considered localhost for IPv4.
18 | window.location.hostname.match(
19 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
20 | )
21 | );
22 |
23 | export function register(config) {
24 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
25 | // The URL constructor is available in all browsers that support SW.
26 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
27 | if (publicUrl.origin !== window.location.origin) {
28 | // Our service worker won't work if PUBLIC_URL is on a different origin
29 | // from what our page is served on. This might happen if a CDN is used to
30 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374
31 | return;
32 | }
33 |
34 | window.addEventListener('load', () => {
35 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
36 |
37 | if (isLocalhost) {
38 | // This is running on localhost. Let's check if a service worker still exists or not.
39 | checkValidServiceWorker(swUrl, config);
40 |
41 | // Add some additional logging to localhost, pointing developers to the
42 | // service worker/PWA documentation.
43 | navigator.serviceWorker.ready.then(() => {
44 | console.log(
45 | 'This web app is being served cache-first by a service ' +
46 | 'worker. To learn more, visit https://bit.ly/CRA-PWA'
47 | );
48 | });
49 | } else {
50 | // Is not localhost. Just register service worker
51 | registerValidSW(swUrl, config);
52 | }
53 | });
54 | }
55 | }
56 |
57 | function registerValidSW(swUrl, config) {
58 | navigator.serviceWorker
59 | .register(swUrl)
60 | .then(registration => {
61 | registration.onupdatefound = () => {
62 | const installingWorker = registration.installing;
63 | if (installingWorker == null) {
64 | return;
65 | }
66 | installingWorker.onstatechange = () => {
67 | if (installingWorker.state === 'installed') {
68 | if (navigator.serviceWorker.controller) {
69 | // At this point, the updated precached content has been fetched,
70 | // but the previous service worker will still serve the older
71 | // content until all client tabs are closed.
72 | console.log(
73 | 'New content is available and will be used when all ' +
74 | 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
75 | );
76 |
77 | // Execute callback
78 | if (config && config.onUpdate) {
79 | config.onUpdate(registration);
80 | }
81 | } else {
82 | // At this point, everything has been precached.
83 | // It's the perfect time to display a
84 | // "Content is cached for offline use." message.
85 | console.log('Content is cached for offline use.');
86 |
87 | // Execute callback
88 | if (config && config.onSuccess) {
89 | config.onSuccess(registration);
90 | }
91 | }
92 | }
93 | };
94 | };
95 | })
96 | .catch(error => {
97 | console.error('Error during service worker registration:', error);
98 | });
99 | }
100 |
101 | function checkValidServiceWorker(swUrl, config) {
102 | // Check if the service worker can be found. If it can't reload the page.
103 | fetch(swUrl, {
104 | headers: { 'Service-Worker': 'script' },
105 | })
106 | .then(response => {
107 | // Ensure service worker exists, and that we really are getting a JS file.
108 | const contentType = response.headers.get('content-type');
109 | if (
110 | response.status === 404 ||
111 | (contentType != null && contentType.indexOf('javascript') === -1)
112 | ) {
113 | // No service worker found. Probably a different app. Reload the page.
114 | navigator.serviceWorker.ready.then(registration => {
115 | registration.unregister().then(() => {
116 | window.location.reload();
117 | });
118 | });
119 | } else {
120 | // Service worker found. Proceed as normal.
121 | registerValidSW(swUrl, config);
122 | }
123 | })
124 | .catch(() => {
125 | console.log(
126 | 'No internet connection found. App is running in offline mode.'
127 | );
128 | });
129 | }
130 |
131 | export function unregister() {
132 | if ('serviceWorker' in navigator) {
133 | navigator.serviceWorker.ready
134 | .then(registration => {
135 | registration.unregister();
136 | })
137 | .catch(error => {
138 | console.error(error.message);
139 | });
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom/extend-expect';
6 |
--------------------------------------------------------------------------------
/src/util/auth.js:
--------------------------------------------------------------------------------
1 | export const authMiddleWare = (history) => {
2 | const authToken = localStorage.getItem('AuthToken');
3 | if(authToken === null){
4 | history.push('/login')
5 | }
6 | }
--------------------------------------------------------------------------------