├── Ilas
├── README.md
├── custom-countdown-project
├── index.html
├── script.js
└── style.css
├── dodo-app
├── .gitignore
├── client
│ ├── .gitignore
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ └── src
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── App.test.js
│ │ ├── assets
│ │ ├── landing.jpg
│ │ ├── login.png
│ │ └── logo.png
│ │ ├── components
│ │ └── Navbar.jsx
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── pages
│ │ ├── Auth
│ │ │ ├── Login.jsx
│ │ │ ├── Login.module.css
│ │ │ └── Register.jsx
│ │ ├── Landing
│ │ │ ├── Landing.jsx
│ │ │ └── Landing.module.css
│ │ └── ToDo
│ │ │ ├── ToDoList.jsx
│ │ │ └── ToDoList.module.css
│ │ ├── reportWebVitals.js
│ │ ├── services
│ │ ├── authServices.js
│ │ └── toDoServices.js
│ │ ├── setupTests.js
│ │ └── util
│ │ ├── GetError.js
│ │ └── GetUser.js
├── controllers
│ ├── authController.js
│ └── toDoController.js
├── middleware
│ └── authJwt.js
├── models
│ ├── ToDoList.js
│ └── User.js
├── package-lock.json
├── package.json
├── routes
│ ├── ToDoRoutes.js
│ └── authRoutes.js
└── server.js
├── google-oauth-passport-js
├── auth.js
├── client
│ └── index.html
├── index.js
├── package-lock.json
└── package.json
├── mern-tutorial
├── backend
│ ├── models
│ │ ├── SingleBlog.js
│ │ └── index.js
│ ├── package-lock.json
│ ├── package.json
│ └── server.js
└── frontend
│ ├── .gitignore
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ └── src
│ ├── App.css
│ ├── App.js
│ ├── Pages
│ ├── Blogs.jsx
│ ├── Home.jsx
│ └── home.css
│ ├── components
│ └── Navbar.jsx
│ ├── index.css
│ └── index.js
├── nextjs-intro
├── .eslintrc.json
├── .gitignore
├── README.md
├── next.config.js
├── package.json
├── pages
│ ├── Login.js
│ ├── _app.js
│ ├── api
│ │ └── hello.js
│ ├── courses
│ │ └── web-development.js
│ └── index.js
├── public
│ ├── favicon.ico
│ ├── nature.jpg
│ └── vercel.svg
├── styles
│ ├── Home.module.css
│ ├── Login.module.css
│ └── globals.css
└── yarn.lock
├── test1
└── todo-app
├── .gitignore
├── README.md
├── package-lock.json
├── package.json
├── public
├── favicon.ico
├── index.html
├── logo192.png
├── logo512.png
├── manifest.json
└── robots.txt
└── src
├── App.css
├── App.js
├── App.test.js
├── index.css
├── index.js
├── reportWebVitals.js
└── setupTests.js
/Ilas:
--------------------------------------------------------------------------------
1 | https://www.ecommercetemplates.com/phphelp/ecommplus/about.asp
2 |
3 | PHP Ecommerce Plus Shopping Cart Software
4 | Our Ecommerce Plus Templates are designed to help you get a well designed ecommerce website up and running in no time at all. The ecommerce shopping cart software is available for WordPress, Dreamweaver, CSS and Responsive Design formats, all you need to do is change the template
5 |
6 | This help section is for the PHP / mySQL version of the Ecommerce Plus templates. If you have a Windows server and wish to use the ASP versions then please click here.
7 |
8 | Store Administration
9 | Full online control panel for simple admin management More details view demo
10 | Mobile friendly, tablet optimized control panel
11 | Responsive dashboard with store stats
12 | Dynamically populate product pages without the need to touch the database.
13 | Content management system integrated More details more details
14 | Password protected CSS based control panel
15 | Restrict admin pages depending on login
16 | Simple process for adding / modifying / deleting products and categories More details more details
17 | Full online order viewing by date selection and search.
18 | Product search within the admin section.
19 | Editable order details More details more details
20 | Optional Customer login for order history viewing and creating accounts.
21 | Abandoned cart email for order recovery more details more details
22 | Affiliate program included with online viewing of affiliate sales More details more details
23 | Downloadable product inventory.
24 | CSV database upload More details more details
25 | Language specific admin available More details more details
26 | Optional email notification for new orders, affiliates, reviews and customer accounts
27 | Up to 3 languages supported from the same database More details more details
28 | Turn off store with "vacation / holiday" setting more details more details
29 | In-built mailing list / newsletter feature more details more details
30 | MailChimp integration more details more details
31 | Product / category options
32 | Unlimited number of products.
33 | Table-less css layouts for category, product and detail pages more details more details
34 | Choose the order and formatting of elements on the detail page more details more details
35 | Choose the order and formatting of elements on the product page more details more details
36 | Upselling of related, bestselling, recommended products as well as suggesting products purchased by other customers More details more details
37 | Gift registry and wish lists More details more details
38 | Spry tabbed panels More details more details
39 | Show recently viewed items More details more details
40 | Product reviews and ratings feature More details more details
41 | Gift certificate feature More details more details
42 | Show multiple currencies More details more details
43 | CSS dynamic menu system More details more details
44 | Social media buttons More details more details
45 | Quick Buy feature More details more details
46 | Place products in several categories
47 | Make custom bundles / packages with individual products more details more details
48 | Rich snippets / Structured data
49 | Allow customers to filter products by keyword, price, grouping etc.
50 | Extra detail page for more detailed product descriptions with layout options.
51 | Show multiple product images.
52 | Image upload
53 | Allows for use of HTML in product descriptions to make formatting simpler More details more details
54 | Setup and assign Designers / Manufacturers / Drop Shippers to products and send them order details if required on receipt of orders More details more details
55 | Manufacturers page More details more details
56 | Donations feature More details more details
57 | Provision of coupons so clients can purchase at a discounted rate by entering their coupon code More details more details
58 | Apply discounts by product or category depending on total purchase or quantity ordered More details more details
59 | Make products storewide discount exempt
60 | Specify the number of products per page.
61 | Filter results option for products page
62 | Choice of product and category layouts, using one or multiple columns of products More details more details
63 | Optional images choice for categories.
64 | Optional category header for product pages
65 | Choice of product listing by price, id, user preference or alphabetically More details more details
66 | Product options allow for the selection of color, size etc. with price differences shown in real time - choose between drop down menus and radio buttons More details more details
67 | Product option selection can change product image displayed
68 | Products options with tool tips
69 | Date picker product option
70 | Multiple purchase feature for product options
71 | Allow clients to type in their own requirements for a particular product More details more details
72 | Product options can have their own product ID More details more details
73 | Clone products and product options for faster input.
74 | Wholesale / retail pricing depending on login More details more details
75 | Quantity pricing option More details more details
76 | Option of showing the "buy" button or an "Out of stock message".
77 | Option of maintaining a product in your inventory but not showing on the store.
78 | Stock management feature permits you to define the number of products in stock, and the store will automatically generate an "Out of stock" message once the last item in stock has been purchased More details more details
79 | Notify customer email when stock is replenished
80 | Stock management for product options More details more details
81 | Show number of products in stock on the products page
82 | Set minimum purchase total requirement More details more details
83 | Set minimum purchase quantity requirement more details more details
84 | Email to friend link option - product specific More details more details
85 | Choice of currency symbols and formatting.
86 | Change all store generated language from one place More details more details
87 | Option to remove buy / checkout buttons making the plus version compatible for other uses eg. real estate listings, online catalog etc More details more details
88 | Order categories to suit your needs.
89 | Option of showing list price / your price & you save feature.
90 | Show product ID, SKU, Manufacturer on the product pages.
91 | Shipping / checkout features
92 | Editable and flexible CCS based cart and checkout more details more details
93 | Weight based shipping by zone More details more details
94 | Flat rate shipping More details more details
95 | USPS shipping rate integration and order tracking More details more details
96 | UPS shipping and order tracking More details more details
97 | FedEx shipping and order tracking More details more details
98 | DHL shipping rates more details more details
99 | Australia Post more details more details
100 | Canada Post More details more details
101 | Soft cart feature more details more details
102 | Free shipping option (choose by country and / or total order or number of items purchased) More details more details
103 | Product exemption from free shipping
104 | Price based shipping More details more details
105 | Shipping estimator before checkout More details more details
106 | Optional Google reCaptcha More details more details
107 | Streamlined checkout process
108 | Gift wrapping choice
109 | Back order availability
110 | Saved cart for non-logged in customers
111 | Google Analytics ecommerce tracking
112 | Customer shipping carrier selector More details more details
113 | Provide a different shipping method for international customers in respect to domestic buyers.
114 | Global handling charge option.
115 | Handling charge per payment provider
116 | Handling exempt products
117 | Compatible with all major tax systems (including Canada and Australia) More details more details
118 | Complete integration with the top payment processors, and / or email notification only More details more details
119 | Manual order creation
120 | Order status look up page for customers More details more details
121 | Offer customers a tracking number.
122 | Automatic email to customers on order status change More details more details
123 | Integrates PayPal's Instant Payment Notification for secure order processing More details more details
124 | Cardinal Commerce 3D Secure system to provide Verified by VISA, Mastercard SecureCode and J/Secure functionality More details more details
125 | Email notification once an order has been placed.
126 | Printable receipt on thanks page
127 | HTML header and footer for the confirmation email
128 | Download orders to a .csv file.
129 | Print packing slips from the admin orders page.
130 | Print invoices from the admin orders page.
131 | Collect email address on checkout.
132 | Send out newsletters More details more details
133 | Filter newsletter recipients by product purchased, location, wholesaler etc.
134 | "Remember me" option for return users.
135 | Javascript and Cookie disabled detection.
136 | Block IPs or IP ranges.
137 | Search engine friendly features
138 | URL Rewriting systems for extensionless, search engine friendly URLs
139 | Per page title and meta description tags on dynamic pages
140 | Dynamic title and meta description tags
141 | Static pages available
142 | Tag products with searchable keywords
143 | ALT information for all store generated images
144 | Structured Data / Rich Snippets / schema.org support
145 | Product name or ID in page URL
146 | Product name in
tags
147 | Lightweight, fast loading pages.
148 | Design options
149 | Choice of editor - WordPress, Dreamweaver, Expression Web or design your own.
150 | Table-less css layouts for product, detail and category pages more details more details
151 | Mobile friendly features more details more details
152 | Search engine friendly options such as static pages and generated title and meta tags available More details more details
153 | Original .png files included for editing graphics in Fireworks.
154 | Global design changes made simple through Dreamweaver .dwt and .lbi files.
155 | Simple to change colors and personalize the store.
156 | Multiple CSS classes available for key display options More details more details
157 | ALT information automatically added to category and product images
158 | Aiming for XHTML 1.0 Transitional compliant and Section 508(accessibility) compliant code.
159 | General features
160 | Integrated product search page.
161 | Editable and flexible CCS based search layout more details more details
162 | Customizable filters on search page
163 | Mini search field available for all pages
164 | Built in modular fashion, allowing for free future upgrades and addition of new features.
165 | 6 month free online technical support More details more details
166 | Downloadable User Manual More details more details
167 | 30 day money back guarantee.
168 | Requirements
169 | For the PHP templates a UNIX / Linux server with a minimum of PHP 5 and a mySQL database.
170 | WordPress 3.5+, Dreamweaver 3+, or Expression Web
171 | Versions
172 | Ecommerce Plus shopping cart software in Dreamweaver version
173 | Ecommerce Plus shopping cart software in WordPress version
174 | Ecommerce Plus shopping cart software in CSS layouts and Expression Web
175 | Ecommerce Plus shopping cart software in CSS Response Design version
176 | Design your own - Generic Version
177 | Developer License
178 | BUY NOW...
179 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Web Development Projects
2 |
--------------------------------------------------------------------------------
/custom-countdown-project/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Counter
8 |
9 |
10 |
11 |
12 |
13 |
27 |
28 |
29 |
30 |
Counter Title
31 |
32 | 3 Days
33 | 6 Hours
34 | 12 Minutes
35 | 23 Seconds
36 |
37 |
Reset
38 |
39 |
40 |
41 |
42 |
43 |
Counter Completed!
44 | Countdown finished on 27-07-2022
45 | New Countdown
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/custom-countdown-project/script.js:
--------------------------------------------------------------------------------
1 | const counterFormArea = document.querySelector ('.form-area');
2 | const counterForm = document.getElementById ('counter-form');
3 | const counterEl = document.getElementById ('counter');
4 |
5 | const counterTitleEl = document.getElementById ('counter-title');
6 | const timeElements = document.querySelectorAll ('span');
7 | const counterResetBtn = document.getElementById ('counter-reset');
8 |
9 | const complete = document.getElementById ('complete');
10 | const completeInfo = document.getElementById ('complete-info');
11 | const completeBtn = document.getElementById ('complete-button');
12 |
13 | const datePicker = document.getElementById ('counter-date');
14 |
15 | let countdownValue = Date;
16 | let countdownActive;
17 |
18 | const second = 1000;
19 | const minute = second * 60;
20 | const hour = minute * 60;
21 | const day = hour * 24;
22 |
23 | let title = '';
24 | let date = '';
25 |
26 | let today = new Date ().toISOString ().split ('T')[0];
27 | console.log (today);
28 |
29 | datePicker.setAttribute ('min', today);
30 |
31 | function updateDom () {
32 | countdownActive = setInterval (() => {
33 | let now = new Date ().getTime ();
34 | let distance = countdownValue - now;
35 | // console.log (distance);
36 | const days = Math.floor (distance / day);
37 | const hours = Math.floor (distance % day / hour);
38 | const minutes = Math.floor (distance % hour / minute);
39 | const seconds = Math.floor (distance % minute / second);
40 |
41 | if (distance < 0) {
42 | counterEl.hidden = true;
43 | counterFormArea.hidden = true;
44 | complete.hidden = false;
45 | clearInterval (countdownActive);
46 | completeInfo.textContent = `${title} is finished on ${date}`;
47 | } else {
48 | timeElements[0].textContent = days;
49 | timeElements[1].textContent = hours;
50 | timeElements[2].textContent = minutes;
51 | timeElements[3].textContent = seconds;
52 | counterTitleEl.textContent = title;
53 | counterFormArea.hidden = true;
54 | counterEl.hidden = false;
55 | }
56 | }, 1000);
57 | }
58 |
59 | function updateCountdown (e) {
60 | e.preventDefault ();
61 | title = e.srcElement[0].value;
62 | date = e.srcElement[1].value;
63 |
64 | const savedCountdown = {
65 | title: title,
66 | date: date,
67 | };
68 |
69 | localStorage.setItem ('countdown', JSON.stringify (savedCountdown));
70 |
71 | console.log (title, date);
72 | if (date === '') {
73 | alert ('Please enter a date!');
74 | } else {
75 | countdownValue = new Date (date).getTime ();
76 | console.log (countdownValue);
77 | updateDom ();
78 | }
79 | }
80 |
81 | function reset () {
82 | localStorage.removeItem ('countdown');
83 | counterEl.hidden = true;
84 | complete.hidden = true;
85 | clearInterval (countdownActive);
86 | title = '';
87 | date = '';
88 | counterFormArea.hidden = false;
89 | }
90 |
91 | function restoreCountdown () {
92 | if (localStorage.getItem ('countdown')) {
93 | counterFormArea.hidden = true;
94 | let countdownData = JSON.parse (localStorage.getItem ('countdown'));
95 | title = countdownData.title;
96 | date = countdownData.date;
97 | countdownValue = new Date (date).getTime ();
98 | updateDom ();
99 | }
100 | }
101 |
102 | counterForm.addEventListener ('submit', updateCountdown);
103 | counterResetBtn.addEventListener ('click', reset);
104 | completeBtn.addEventListener ('click', reset);
105 |
106 | restoreCountdown ();
107 |
--------------------------------------------------------------------------------
/custom-countdown-project/style.css:
--------------------------------------------------------------------------------
1 | body{
2 | background-color: #4c4177;
3 | background-image: linear-gradient(315deg,#4c4177 0%,#2e5470 74%);
4 | font-family: Arial, Helvetica, sans-serif;
5 | }
6 |
7 |
8 | .form-area,.counter,.complete{
9 | padding: 20px;
10 | border-radius: 5px;
11 | box-shadow: #1d3647;
12 | background-color: white;
13 | width: fit-content;
14 | margin-left: auto;
15 | margin-right: auto;
16 | margin-top: 10%;
17 |
18 |
19 | }
20 |
21 | .form-area input{
22 | display: block;
23 | margin: 15px;
24 | padding: 10px;
25 | margin-left: 0px;
26 | margin-right: 0px;
27 | width: 300px;
28 | }
29 |
30 | .form-area{
31 | font-size: 14px;
32 | font-weight: bold;
33 | }
34 |
35 | button{
36 | background-color: rgb(0, 110, 255);
37 | width: 100%;
38 | padding: 15px;
39 | border: none;
40 | color: white;
41 | font-weight: bold;
42 | font-size: 16px;
43 | border-radius: 5px;
44 | }
45 |
46 | button:hover{
47 | background-color: rgb(0, 89, 172);
48 | cursor: pointer;
49 | }
50 |
51 | .counter h1{
52 | text-align: center;
53 | }
54 |
55 |
56 | li{
57 | display: inline-block;
58 | font-size: 30px;
59 | list-style-type: none;
60 | padding: 10px;
61 | text-transform: uppercase;
62 | color: rgb(27, 27, 27);
63 | }
64 |
65 | li span{
66 | display: block;
67 | font-size: 80px;
68 | text-align: center;
69 |
70 | }
71 |
72 |
73 | .complete-title{
74 | animation: complete 4s infinite;
75 | text-align: center;
76 | }
77 |
78 |
79 | @keyframes complete {
80 | 0%{
81 | color: red;
82 | }
83 |
84 | 25%{
85 | color: yellow;
86 | transform: rotate(5deg);
87 | }
88 |
89 | 50%{
90 | color: green;
91 | transform: scale(1.2)
92 | }
93 |
94 | 75%{
95 | color: blue;
96 | transform: rotate(-5deg);
97 | }
98 |
99 | 100%{
100 | color: red;
101 | transform: rotate(0deg);
102 | }
103 | }
104 |
105 |
106 |
--------------------------------------------------------------------------------
/dodo-app/.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 | #client dependencies
9 | /client/node_modules
10 |
11 | # testing
12 | /coverage
13 |
14 | # production
15 | /build
16 |
17 | # misc
18 | .DS_Store
19 | .env
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/dodo-app/client/.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 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/dodo-app/client/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Create React App
2 |
3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4 |
5 | ## Available Scripts
6 |
7 | In the project directory, you can run:
8 |
9 | ### `npm start`
10 |
11 | Runs the app in the development mode.\
12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
13 |
14 | The page will reload when you make changes.\
15 | You may also see any lint errors in the console.
16 |
17 | ### `npm test`
18 |
19 | Launches the test runner in the interactive watch mode.\
20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21 |
22 | ### `npm run build`
23 |
24 | Builds the app for production to the `build` folder.\
25 | It correctly bundles React in production mode and optimizes the build for the best performance.
26 |
27 | The build is minified and the filenames include the hashes.\
28 | Your app is ready to be deployed!
29 |
30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31 |
32 | ### `npm run eject`
33 |
34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!**
35 |
36 | 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.
37 |
38 | 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.
39 |
40 | 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.
41 |
42 | ## Learn More
43 |
44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45 |
46 | To learn React, check out the [React documentation](https://reactjs.org/).
47 |
48 | ### Code Splitting
49 |
50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51 |
52 | ### Analyzing the Bundle Size
53 |
54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55 |
56 | ### Making a Progressive Web App
57 |
58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59 |
60 | ### Advanced Configuration
61 |
62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63 |
64 | ### Deployment
65 |
66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67 |
68 | ### `npm run build` fails to minify
69 |
70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
71 |
--------------------------------------------------------------------------------
/dodo-app/client/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "client",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@ant-design/icons": "^5.2.6",
7 | "@testing-library/jest-dom": "^5.17.0",
8 | "@testing-library/react": "^13.4.0",
9 | "@testing-library/user-event": "^13.5.0",
10 | "antd": "^5.10.0",
11 | "axios": "^1.5.1",
12 | "react": "^18.2.0",
13 | "react-dom": "^18.2.0",
14 | "react-router": "^6.16.0",
15 | "react-router-dom": "^6.16.0",
16 | "react-scripts": "5.0.1",
17 | "web-vitals": "^2.1.4"
18 | },
19 | "scripts": {
20 | "start": "react-scripts start",
21 | "build": "react-scripts build",
22 | "test": "react-scripts test",
23 | "eject": "react-scripts eject"
24 | },
25 | "eslintConfig": {
26 | "extends": [
27 | "react-app",
28 | "react-app/jest"
29 | ]
30 | },
31 | "browserslist": {
32 | "production": [
33 | ">0.2%",
34 | "not dead",
35 | "not op_mini all"
36 | ],
37 | "development": [
38 | "last 1 chrome version",
39 | "last 1 firefox version",
40 | "last 1 safari version"
41 | ]
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/dodo-app/client/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/dodo-app/client/public/favicon.ico
--------------------------------------------------------------------------------
/dodo-app/client/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
27 | React App
28 |
29 |
30 | You need to enable JavaScript to run this app.
31 |
32 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/dodo-app/client/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/dodo-app/client/public/logo192.png
--------------------------------------------------------------------------------
/dodo-app/client/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/dodo-app/client/public/logo512.png
--------------------------------------------------------------------------------
/dodo-app/client/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 |
--------------------------------------------------------------------------------
/dodo-app/client/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/dodo-app/client/src/App.css:
--------------------------------------------------------------------------------
1 | :root{
2 | --primary:rgb(0, 132, 255);
3 | --darkPrimary:rgb(4, 110, 209);
4 | --secondary:rgb(211, 233, 253);
5 | --darkSecondary:rgb(185, 214, 241);
6 | }
7 |
8 | body{
9 | margin: 0;
10 | padding: 0;
11 | }
12 |
13 |
14 | nav {
15 | position: fixed;
16 | top: 0;
17 | left: 0;
18 | z-index: 100;
19 | width: 100%;
20 | background-color: white;
21 | box-shadow: 0px 0.233px 8px lightgray;
22 | display: flex;
23 | align-items: center;
24 | justify-content: space-between;
25 | padding-left: 2rem;
26 | }
27 |
28 |
29 | .logo__wrapper img{
30 | width: 30px;
31 | }
32 |
33 | .logo__wrapper{
34 | display: flex;
35 | align-items: center;
36 |
37 | }
38 |
39 | .logo__wrapper h4{
40 | font-weight: bold;
41 | margin: 0px;
42 | margin-left: 10px;
43 | font-family: Arial, Helvetica, sans-serif;
44 | }
45 | .navigation-menu{
46 | position: relative;
47 | display: flex;
48 | justify-content: space-between;
49 | align-items: center;
50 | list-style: none;
51 | padding: 0;
52 | margin: 0;
53 | padding-right: 2rem;
54 |
55 | }
56 |
57 |
58 | .navigation-menu li {
59 | position: relative;
60 | }
61 | .navigation-menu li a {
62 | position: relative;
63 | display: block;
64 | text-decoration: none;
65 | padding: 1rem 2rem;
66 | font-size: 15px;
67 | color: rgb(82, 81, 81);
68 |
69 | }
70 |
71 | .navigation-menu li a:hover:not(.activeNav){
72 | background-color: whitesmoke;
73 | color: var(--primary);
74 | }
75 |
76 | .userInfoNav{
77 | border: 1px solid lightgray;
78 | padding: 5px 20px;
79 | border-radius: 5px;
80 | margin-left: 10px;
81 | margin-right: 10px;
82 | display: flex;
83 | align-items: center;
84 | justify-content: space-between;
85 | cursor: pointer;
86 | font-size: 14px;
87 | }
88 |
89 | .userInfoNav img{
90 | width: 30px;
91 | margin-right: 5px;
92 | }
93 |
94 | .activeNav{
95 | background-color: whitesmoke;
96 | }
97 |
98 | .primaryText{
99 | color: var(--primary);
100 | }
101 |
102 | .primaryBtn{
103 | background-color: var(--primary);
104 | color:white;
105 | text-decoration: none;
106 | border: none;
107 | border-radius: 5px;
108 | padding: 10px 30px;
109 | margin:1rem;
110 | }
111 |
112 |
113 |
114 | .primaryBtn:hover{
115 | background-color: var(--darkPrimary);
116 |
117 | }
118 |
119 | .secondaryBtn{
120 | background-color: var(--secondary);
121 | color:var(--darkPrimary);
122 | text-decoration: none;
123 | border: none;
124 | border-radius: 5px;
125 | padding: 10px 30px;
126 | margin:1rem;
127 | }
128 |
129 | .secondaryBtn:hover{
130 | background-color: var(--darkSecondary);
131 | }
--------------------------------------------------------------------------------
/dodo-app/client/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import {Route, Routes} from 'react-router';
3 | import Landing from './pages/Landing/Landing';
4 | import Login from './pages/Auth/Login';
5 | import Register from './pages/Auth/Register';
6 | import ToDoList from './pages/ToDo/ToDoList';
7 | import './App.css';
8 | import 'antd/dist/reset.css';
9 | function App() {
10 | return (
11 |
12 | } />
13 | } />
14 | } />
15 | } />
16 |
17 |
18 | )
19 | }
20 |
21 | export default App
--------------------------------------------------------------------------------
/dodo-app/client/src/App.test.js:
--------------------------------------------------------------------------------
1 | import { render, screen } from '@testing-library/react';
2 | import App from './App';
3 |
4 | test('renders learn react link', () => {
5 | render( );
6 | const linkElement = screen.getByText(/learn react/i);
7 | expect(linkElement).toBeInTheDocument();
8 | });
9 |
--------------------------------------------------------------------------------
/dodo-app/client/src/assets/landing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/dodo-app/client/src/assets/landing.jpg
--------------------------------------------------------------------------------
/dodo-app/client/src/assets/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/dodo-app/client/src/assets/login.png
--------------------------------------------------------------------------------
/dodo-app/client/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/dodo-app/client/src/assets/logo.png
--------------------------------------------------------------------------------
/dodo-app/client/src/components/Navbar.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from 'react'
2 | import { Link, useNavigate } from 'react-router-dom'
3 | import logo from '../assets/logo.png';
4 | import { getUserDetails } from '../util/GetUser';
5 | import { Dropdown } from 'antd';
6 | import avatar from '../assets/login.png';
7 | function Navbar({active}) {
8 | const [user,setUser] = useState("");
9 | const navigate = useNavigate();
10 |
11 | useEffect(()=>{
12 | const userDetails = getUserDetails();
13 | setUser(userDetails);
14 | },[]);
15 |
16 | const handleLogout = ()=>{
17 | localStorage.removeItem('toDoAppUser');
18 | navigate('/login');
19 | }
20 |
21 | const items = [
22 | {
23 | key: '1',
24 | label: (
25 | Logout
26 | ),
27 | },
28 |
29 |
30 | ];
31 |
32 | return (
33 |
34 |
35 |
36 |
37 |
DoDo
38 |
39 |
40 |
41 | Home
42 | {user && My Task }
43 |
44 | {user ?
45 |
46 |
53 |
54 |
55 |
{user?.firstName ? `Hello, ${user?.firstName} ${user?.lastName}` : user?.username}
56 |
57 |
58 | : <>
59 | Login
60 | Register
61 | >}
62 |
63 |
64 |
65 |
66 |
67 | )
68 | }
69 |
70 | export default Navbar
--------------------------------------------------------------------------------
/dodo-app/client/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/dodo-app/client/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import './index.css';
4 | import App from './App';
5 | import reportWebVitals from './reportWebVitals';
6 | import {BrowserRouter} from 'react-router-dom';
7 |
8 | const root = ReactDOM.createRoot(document.getElementById('root'));
9 | root.render(
10 |
11 |
12 |
13 |
14 |
15 | );
16 |
17 | // If you want to start measuring performance in your app, pass a function
18 | // to log results (for example: reportWebVitals(console.log))
19 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
20 | reportWebVitals();
21 |
--------------------------------------------------------------------------------
/dodo-app/client/src/pages/Auth/Login.jsx:
--------------------------------------------------------------------------------
1 | import React,{useState} from 'react'
2 | import styles from './Login.module.css';
3 | import login from '../../assets/login.png';
4 | import {Button, Input, message} from 'antd';
5 | import { Link, useNavigate } from 'react-router-dom';
6 | import AuthServices from '../../services/authServices';
7 | import { getErrorMessage } from '../../util/GetError';
8 |
9 | function Login() {
10 | const [username,setUsername] = useState("");
11 | const [password,setPassword] = useState("");
12 | const [loading,setLoading] = useState(false);
13 | const navigate = useNavigate();
14 |
15 | const handleSubmit = async ()=>{
16 |
17 | try{
18 | setLoading(true);
19 | let data = {
20 | username,
21 | password
22 | }
23 | const response = await AuthServices.loginUser(data);
24 | console.log(response.data);
25 | localStorage.setItem('toDoAppUser',JSON.stringify(response.data));
26 | message.success("Logged in Successfully!");
27 | navigate('/to-do-list');
28 | setLoading(false);
29 | }catch(err){
30 | console.log(err);
31 | message.error(getErrorMessage(err));
32 | setLoading(false);
33 | }
34 | }
35 | return (
36 |
37 |
38 |
39 |
Login
40 |
41 | setUsername(e.target.value)} />
45 |
46 |
47 | setPassword(e.target.value)} />
51 |
52 |
53 | New User? Register
54 |
55 |
Login
56 |
57 |
58 | )
59 | }
60 |
61 | export default Login
--------------------------------------------------------------------------------
/dodo-app/client/src/pages/Auth/Login.module.css:
--------------------------------------------------------------------------------
1 | .login__card{
2 | width: 30%;
3 | margin-left: auto;
4 | margin-right: auto;
5 | margin-top: 100px;
6 | box-shadow: 0px 0.344px 12px rgb(238, 238, 238);
7 | padding: 2rem;
8 | border: 1px solid lightgray;
9 | border-radius: 5px;
10 | display: flex;
11 | justify-content: center;
12 | flex-direction: column;
13 | align-items: center;
14 | }
15 |
16 | .login__card h2{
17 | text-align: center;
18 | font-size: 2rem;
19 | }
20 |
21 |
22 | .input__wrapper,.input__inline__wrapper{
23 | margin-bottom: 1rem;
24 | width: 80%;
25 |
26 | }
27 |
28 | .input__inline__wrapper{
29 | display: flex;
30 | justify-content: space-between;
31 | }
32 |
33 |
34 | .login__card img{
35 | width: 100px;
36 | }
37 |
38 |
39 | .input__info{
40 | text-align: center;
41 | font-size: 13px;
42 | color:gray;
43 | margin-bottom: 1rem;
44 | }
45 |
46 | .input__info a{
47 | text-decoration: none;
48 | }
49 |
50 | .input__info a:hover{
51 | text-decoration: underline;
52 |
53 | }
--------------------------------------------------------------------------------
/dodo-app/client/src/pages/Auth/Register.jsx:
--------------------------------------------------------------------------------
1 | import React,{useState} from 'react'
2 | import styles from './Login.module.css';
3 | import login from '../../assets/login.png';
4 | import {Button, Input, message} from 'antd';
5 | import { Link, useNavigate } from 'react-router-dom';
6 | import { getErrorMessage } from '../../util/GetError';
7 | import AuthServices from '../../services/authServices';
8 |
9 | function Register() {
10 | const [username,setUsername] = useState("");
11 | const [password,setPassword] = useState("");
12 | const [firstName,setFirstName] = useState("");
13 | const [lastName,setLastName] = useState("");
14 | const [loading,setLoading] = useState(false);
15 | const navigate = useNavigate();
16 | const handleSubmit = async ()=>{
17 | try{
18 | setLoading(true);
19 | const data = {
20 | firstName,
21 | lastName,
22 | username,
23 | password
24 | }
25 | const response = await AuthServices.registerUser(data);
26 | console.log(response.data);
27 | setLoading(false);
28 | message.success("You're Registered Successfully!");
29 | navigate('/login');
30 | }catch(err){
31 | console.log(err);
32 | message.error(getErrorMessage(err));
33 | setLoading(false);
34 | }
35 | }
36 | return (
37 |
38 |
39 |
40 |
Register
41 |
42 | setFirstName(e.target.value)} />
46 | setLastName(e.target.value)} />
51 |
52 |
53 |
54 | setUsername(e.target.value)} />
58 |
59 |
60 | setPassword(e.target.value)} />
64 |
65 |
66 | Existing User? Login
67 |
68 |
Register
69 |
70 |
71 | )
72 | }
73 |
74 | export default Register
--------------------------------------------------------------------------------
/dodo-app/client/src/pages/Landing/Landing.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Navbar from '../../components/Navbar'
3 | import { Link } from 'react-router-dom'
4 | import landing from '../../assets/landing.jpg';
5 | import styles from './Landing.module.css';
6 | function Landing() {
7 | return (
8 |
9 |
10 |
11 |
12 |
Schedule Your Daily Tasks With DoDo!
13 |
14 | Register
15 | Login
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | )
25 | }
26 |
27 | export default Landing
--------------------------------------------------------------------------------
/dodo-app/client/src/pages/Landing/Landing.module.css:
--------------------------------------------------------------------------------
1 | .landing__wrapper{
2 | display:flex;
3 | flex-wrap: wrap;
4 | margin-top: 100px;
5 | padding: 2rem;
6 | }
7 |
8 | .landing__text{
9 | width: 40%;
10 | }
11 |
12 | .landing__text h1{
13 | font-size: 4rem;
14 | }
15 |
16 | .landing__img{
17 | width: 50%;
18 | margin-left: 2rem;
19 |
20 | }
21 |
22 | .landing__img img{
23 | width: 100%;
24 | }
--------------------------------------------------------------------------------
/dodo-app/client/src/pages/ToDo/ToDoList.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from 'react'
2 | import Navbar from '../../components/Navbar'
3 | import styles from './ToDoList.module.css';
4 | import { Button, Divider, Empty, Input, Modal, Select, Tag, Tooltip, message } from 'antd';
5 | import {getErrorMessage} from '../../util/GetError';
6 | import { getUserDetails } from '../../util/GetUser';
7 | import ToDoServices from '../../services/toDoServices';
8 | import { useNavigate } from 'react-router';
9 | import { CheckCircleFilled, CheckCircleOutlined, DeleteOutlined, EditOutlined } from '@ant-design/icons';
10 |
11 |
12 | function ToDoList() {
13 | const [title,setTitle] = useState("");
14 | const [description,setDescription] = useState("");
15 | const [isAdding,setIsAdding] = useState(false);
16 | const [loading,setLoading] = useState(false);
17 | const [allToDo,setAllToDo] = useState([]);
18 | const [currentEditItem,setCurrentEditItem] = useState("");
19 | const [isEditing,setIsEditing] = useState(false);
20 | const [updatedTitle,setUpdatedTitle] = useState("");
21 | const [updatedDescription,setUpdatedDescription] = useState("");
22 | const [updatedStatus,setUpdatedStatus] = useState("");
23 | const [currentTaskType,setCurrentTaskType] = useState("incomplete");
24 | const [completedTodo,setCompletedTodo] = useState([]);
25 | const [incompletedTodo,setIncompletedTodo] = useState([]);
26 | const [currentTodoTask,setCurrentToDoTask] = useState([]);
27 | const [filteredToDo,setFilteredToDo] = useState([]);
28 |
29 | const navigate = useNavigate();
30 |
31 | const getAllToDo = async ()=>{
32 | try{
33 | let user = getUserDetails();
34 | console.log(user?.userId);
35 | const response = await ToDoServices.getAllToDo(user?.userId);
36 | console.log(response.data);
37 | setAllToDo(response.data);
38 | }catch(err){
39 | console.log(err);
40 | message.error(getErrorMessage(err));
41 | }
42 | }
43 |
44 | useEffect(()=>{
45 | let user = getUserDetails();
46 | const getAllToDo = async ()=>{
47 | try{
48 | console.log(user?.userId);
49 | const response = await ToDoServices.getAllToDo(user?.userId);
50 | console.log(response.data);
51 | setAllToDo(response.data);
52 | }catch(err){
53 | console.log(err);
54 | message.error(getErrorMessage(err));
55 | }
56 | }
57 | if(user && user?.userId){
58 | getAllToDo();
59 | }else{
60 | navigate('/login');
61 | }
62 |
63 | },[navigate]);
64 |
65 | useEffect(()=>{
66 | const incomplete = allToDo.filter((item)=>item.isCompleted===false);
67 | const complete = allToDo.filter((item)=>item.isCompleted===true);
68 | setIncompletedTodo(incomplete);
69 | setCompletedTodo(complete);
70 | if(currentTaskType==='incomplete'){
71 | setCurrentToDoTask(incomplete);
72 | }else{
73 | setCurrentToDoTask(complete)
74 | }
75 | },[allToDo])
76 |
77 | const handleSubmitTask = async ()=>{
78 | setLoading(true);
79 | try{
80 | const userId = getUserDetails()?.userId;
81 | const data = {
82 | title,
83 | description,
84 | isCompleted:false,
85 | createdBy:userId
86 | }
87 | const response = await ToDoServices.createToDo(data);
88 | console.log(response.data);
89 | setLoading(false);
90 | message.success("To Do Task Added Successfully!");
91 | setIsAdding(false);
92 | getAllToDo();
93 | }catch(err){
94 | console.log(err);
95 | setLoading(false);
96 | message.error(getErrorMessage(err))
97 | }
98 | }
99 |
100 | const getFormattedDate = (value)=>{
101 | let date = new Date(value);
102 | let dateString = date.toDateString();
103 | let hh = date.getHours();
104 | let min = date.getMinutes();
105 | let ss = date.getSeconds();
106 | let finalDate = `${dateString} at ${hh}:${min}:${ss}`;
107 | return finalDate;
108 | }
109 |
110 | const handleEdit = (item)=>{
111 | console.log(item);
112 | setCurrentEditItem(item);
113 | setUpdatedTitle(item?.title);
114 | setUpdatedDescription(item?.description);
115 | setUpdatedStatus(item?.isCompleted);
116 | setIsEditing(true);
117 | };
118 |
119 | const handleDelete = async (item)=>{
120 | try{
121 | const response = await ToDoServices.deleteToDo(item._id);
122 | console.log(response.data);
123 | message.success(`${item.title} is Deleted Successfully!`);
124 | getAllToDo();
125 | }catch(err){
126 | console.log(err);
127 | message.error(getErrorMessage(err));
128 | }
129 | }
130 |
131 | const handleUpdateStatus = async (id,status)=>{
132 | console.log(id);
133 | try{
134 | const response = await ToDoServices.updateToDo(id,{isCompleted:status});
135 | console.log(response.data);
136 | message.success("Task Status Updated Successfully!");
137 | getAllToDo();
138 | }catch(err){
139 | console.log(err);
140 | message.error(getErrorMessage(err));
141 | }
142 | }
143 |
144 | const handleUpdateTask = async ()=>{
145 | try{
146 | setLoading(true);
147 | const data = {
148 | title:updatedTitle,
149 | description:updatedDescription,
150 | isCompleted:updatedStatus
151 | };
152 | console.log(data);
153 | const response = await ToDoServices.updateToDo(currentEditItem?._id,data);
154 | console.log(response.data);
155 | message.success(`${currentEditItem?.title} Updated Successfully!`);
156 | setLoading(false);
157 | setIsEditing(false);
158 | getAllToDo();
159 | }catch(err){
160 | console.log(err);
161 | setLoading(false);
162 | message.error(getErrorMessage(err))
163 | }
164 | }
165 |
166 | const handleTypeChange = (value)=>{
167 | console.log(value);
168 | setCurrentTaskType(value);
169 | if(value==='incomplete'){
170 | setCurrentToDoTask(incompletedTodo);
171 | }else{
172 | setCurrentToDoTask(completedTodo);
173 | }
174 | }
175 |
176 | const handleSearch = (e)=>{
177 | let query = e.target.value;
178 | let filteredList = allToDo.filter((item)=>item.title.toLowerCase().match(query.toLowerCase()));
179 | console.log(filteredList);
180 | if(filteredList.length > 0 && query){
181 | setFilteredToDo(filteredList);
182 | }else{
183 | setFilteredToDo([]);
184 | }
185 | }
186 | return (
187 | <>
188 |
189 |
190 |
191 |
Your Tasks
192 |
193 |
194 | setIsAdding(true)} type="primary" size="large">Add Task
195 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 | {filteredToDo.length > 0 ? filteredToDo.map((item)=>{
214 | return(
215 |
216 |
217 |
218 |
{item?.title}
219 | {item?.isCompleted ? Completed : Incomplete }
220 |
221 |
{item?.description}
222 |
223 |
224 |
225 |
{getFormattedDate(item?.createdAt)}
226 |
227 | handleEdit(item)} className={styles.actionIcon} />
228 | handleDelete(item)} style={{color:'red'}} className={styles.actionIcon}/>
229 | {item?.isCompleted ? handleUpdateStatus(item._id,false)} style={{color:'green'}} className={styles.actionIcon} /> :handleUpdateStatus(item._id,true)} className={styles.actionIcon}/> }
230 |
231 |
232 |
233 |
234 | )
235 | }) : currentTodoTask.length > 0 ? currentTodoTask.map((item)=>{
236 | return(
237 |
238 |
239 |
240 |
{item?.title}
241 | {item?.isCompleted ? Completed : Incomplete }
242 |
243 |
{item?.description}
244 |
245 |
246 |
247 |
{getFormattedDate(item?.createdAt)}
248 |
249 | handleEdit(item)} className={styles.actionIcon} />
250 | handleDelete(item)} style={{color:'red'}} className={styles.actionIcon}/>
251 | {item?.isCompleted ? handleUpdateStatus(item._id,false)} style={{color:'green'}} className={styles.actionIcon} /> :handleUpdateStatus(item._id,true)} className={styles.actionIcon}/> }
252 |
253 |
254 |
255 |
256 | )
257 | }) :
258 |
259 |
260 |
261 |
262 |
263 | }
264 |
265 |
266 |
267 | setIsAdding(false)}>
268 | setTitle(e.target.value)} />
269 | setDescription(e.target.value)} />
270 |
271 |
272 | setIsEditing(false)}>
273 | setUpdatedTitle(e.target.value)} />
274 | setUpdatedDescription(e.target.value)} />
275 | setUpdatedStatus(value)}
278 | value={updatedStatus}
279 | options={[
280 |
281 | {
282 | value: false,
283 | label: 'Not Completed',
284 | },
285 |
286 | {
287 | value: true,
288 | label: 'Completed',
289 | },
290 |
291 | ]}
292 | />
293 |
294 |
295 | >
296 | )
297 | }
298 |
299 | export default ToDoList
--------------------------------------------------------------------------------
/dodo-app/client/src/pages/ToDo/ToDoList.module.css:
--------------------------------------------------------------------------------
1 | .toDoWrapper{
2 | margin-top: 100px;
3 | padding: 2rem;
4 | }
5 |
6 | .toDoHeader{
7 | display: flex;
8 | align-items:center;
9 | flex-wrap: wrap;
10 | justify-content: space-between;
11 | margin: 0px;
12 | }
13 |
14 |
15 |
16 | .toDoCard{
17 | border: 1px solid whitesmoke;
18 | box-shadow: 0px 0.233px 8px lightgray;
19 | padding: 1rem;
20 | border-radius: 10px;
21 | width: 25%;
22 | margin: 1rem 1.5rem;
23 | display: flex;
24 | flex-direction: column;
25 | justify-content: space-between;
26 | }
27 |
28 | .toDoCard p{
29 | font-size: 15px;
30 | color: gray;
31 | margin-top: 1rem;
32 | margin-bottom: 1rem;
33 | }
34 |
35 | .toDoListCardWrapper{
36 | display: flex;
37 | flex-wrap: wrap;
38 | }
39 |
40 | .toDoCardFooter,.toDoCardHeader{
41 | display: flex;
42 | justify-content: space-between;
43 | align-items: center;
44 | }
45 |
46 | .toDoCardFooter{
47 | border-top: 1px solid rgb(236, 235, 235);
48 | padding-top: 10px;
49 | }
50 |
51 | .toDoFooterAction{
52 | display: flex;
53 | }
54 |
55 |
56 |
57 | .actionIcon{
58 | font-size: 1.2ren;
59 | margin-left: 5px;
60 | margin-right: 5px;
61 | cursor: pointer;
62 | color: var(--primary);
63 | }
64 |
65 | .actionIcon:hover{
66 | filter: brightness(50%);
67 | }
68 |
69 | .noTaskWrapper{
70 | padding: 2rem;
71 | display: flex;
72 | justify-content: center;
73 | align-items: center;
74 | width: 100%;
75 | }
--------------------------------------------------------------------------------
/dodo-app/client/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/dodo-app/client/src/services/authServices.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 |
3 | const SERVER_URL = 'http://localhost:5000/api';
4 |
5 |
6 | const registerUser = (data)=>{
7 | return axios.post(SERVER_URL+'/register',data);
8 | }
9 |
10 | const loginUser = (data)=>{
11 | return axios.post(SERVER_URL+'/login',data);
12 | }
13 |
14 |
15 | const AuthServices = {
16 | registerUser,
17 | loginUser
18 | }
19 |
20 |
21 | export default AuthServices;
22 |
23 |
24 |
--------------------------------------------------------------------------------
/dodo-app/client/src/services/toDoServices.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 | import { getUserDetails } from '../util/GetUser';
3 |
4 | const SERVER_URL = 'http://localhost:5000/api/todo';
5 |
6 | const authHeaders = ()=>{
7 | let userToken = getUserDetails()?.token;
8 | return {headers:{'Authorization':userToken}}
9 |
10 | }
11 |
12 | const createToDo = (data)=>{
13 | return axios.post(SERVER_URL+'/create-to-do',data,authHeaders());
14 | }
15 |
16 | const getAllToDo = (userId)=>{
17 | return axios.get(SERVER_URL+'/get-all-to-do/'+userId,authHeaders());
18 | }
19 |
20 | const deleteToDo = (id)=>{
21 | return axios.delete(SERVER_URL+'/delete-to-do/'+id,authHeaders());
22 | }
23 |
24 | const updateToDo = (id,data)=>{
25 | return axios.patch(SERVER_URL+'/update-to-do/'+id,data,authHeaders());
26 | }
27 |
28 |
29 |
30 | const ToDoServices = {
31 | createToDo,
32 | getAllToDo,
33 | deleteToDo,
34 | updateToDo
35 | }
36 |
37 |
38 | export default ToDoServices;
39 |
40 |
41 |
--------------------------------------------------------------------------------
/dodo-app/client/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';
6 |
--------------------------------------------------------------------------------
/dodo-app/client/src/util/GetError.js:
--------------------------------------------------------------------------------
1 | export function getErrorMessage (error) {
2 | const msg =
3 | (error.response && error.response.data && error.response.data.message) ||
4 | error.message ||
5 | error.toString ();
6 | return msg;
7 | }
8 |
--------------------------------------------------------------------------------
/dodo-app/client/src/util/GetUser.js:
--------------------------------------------------------------------------------
1 | export function getUserDetails(){
2 | let user = JSON.parse(localStorage.getItem('toDoAppUser'));
3 | return user;
4 | }
--------------------------------------------------------------------------------
/dodo-app/controllers/authController.js:
--------------------------------------------------------------------------------
1 | const User = require('../models/User');
2 | const jwt = require('jsonwebtoken');
3 | require('dotenv').config();
4 |
5 | const secretKey = process.env.JWT_SECRET;
6 |
7 | async function registerUser(req,res){
8 | let {firstName,lastName,username,password} = req.body;
9 | try{
10 | const duplicate = await User.find({username});
11 | if(duplicate && duplicate.length > 0){
12 | return res.status(400).send({message:'User already registered with this username'});
13 | }
14 | let user = new User({firstName,lastName,username,password});
15 | const result = await user.save();
16 | console.log(result);
17 | res.status(201).send({message:'User registered successfullY!'});
18 | }catch(err){
19 | console.log(err);
20 | res.status(400).send(err);
21 | }
22 |
23 | }
24 |
25 |
26 | async function loginUser(req,res){
27 | try{
28 | const {username,password} = req.body;
29 | const user = await User.findOne({username});
30 | if(!user){
31 | return res.status(404).send({message:"Authentication Failed!"});
32 | }
33 | const isPasswordValid = await user.comparePassword(password);
34 | if(!isPasswordValid){
35 | return res.status(404).send({message:"You Entered Wrong pasword"});
36 | }
37 | let token = jwt.sign({userId:user?._id},secretKey,{expiresIn:'1h'});
38 | let finalData = {
39 | userId:user?._id,
40 | username:user?.username,
41 | firstName:user?.firstName,
42 | lastName:user?.lastName,
43 | token
44 | }
45 | res.send(finalData);
46 | }catch(err){
47 | console.log(err);
48 | res.status(400).send(err)
49 | }
50 |
51 |
52 | }
53 |
54 |
55 | const AuthController = {
56 | registerUser,
57 | loginUser
58 | }
59 |
60 | module.exports = AuthController;
--------------------------------------------------------------------------------
/dodo-app/controllers/toDoController.js:
--------------------------------------------------------------------------------
1 | const ToDo = require("../models/ToDoList");
2 |
3 |
4 | exports.createToDo = async (req,res)=>{
5 | try{
6 | const data = req.body;
7 | const todo = new ToDo(data);
8 | const result = await todo.save();
9 | console.log(result);
10 | res.status(201).send({message:"Created New Task !"});
11 |
12 | }catch(err){
13 | console.log(err);
14 | res.status(err);
15 | }
16 | }
17 |
18 |
19 | exports.getAllToDo = async (req,res)=>{
20 | let {userId} = req.params;
21 |
22 | try{
23 | const result = await ToDo.find({createdBy:userId});
24 | res.send(result);
25 |
26 | }catch(err){
27 | console.log(err);
28 | res.status(400).send(err);
29 | }
30 |
31 | }
32 |
33 |
34 | exports.updateToDo = async (req,res)=>{
35 | try{
36 | const {id} = req.params;
37 | const data = req.body;
38 | const result = await ToDo.findByIdAndUpdate(id,{$set:data},{returnOriginal:false});
39 | console.log(result);
40 | res.send({message:'ToDo list Updated!'})
41 | }catch(err){
42 | console.log(err);
43 | res.status(400).send(err);
44 | }
45 | }
46 |
47 | exports.deleteToDo = async (req,res)=>{
48 | try{
49 | const {id} = req.params;
50 | const result = await ToDo.findByIdAndDelete(id);
51 | console.log(result);
52 | res.send({message:"ToDo Task Deleted!"});
53 | }catch(err){
54 | console.log(err);
55 | res.status(400).send(err);
56 | }
57 | }
--------------------------------------------------------------------------------
/dodo-app/middleware/authJwt.js:
--------------------------------------------------------------------------------
1 | const jwt = require('jsonwebtoken');
2 | require('dotenv').config();
3 | const secretKey = process.env.JWT_SECRET;
4 |
5 |
6 |
7 | const authenticateToken = async (req,res,next)=>{
8 | let token = req.header('Authorization');
9 | if(!token) return res.status(401).send({message:'Authentication Failed!'});
10 |
11 | jwt.verify(token,secretKey,(err,user)=>{
12 | if(err) return res.status(403).send({message:"Token is not valid! Please Login again!"});
13 | req.user = user;
14 | next();
15 | })
16 |
17 | }
18 |
19 |
20 | module.exports = authenticateToken;
--------------------------------------------------------------------------------
/dodo-app/models/ToDoList.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 | const {Schema} = mongoose;
3 |
4 | const toDoSchema = new Schema({
5 | title:{type:String,required:true},
6 | description:{type:String,required:true},
7 | isCompleted:{type:Boolean,required:true},
8 | completedOn:String,
9 | createdBy:{
10 | ref:"User",
11 | type:Schema.ObjectId
12 | }
13 | },
14 | {
15 | timestamps:true
16 | });
17 |
18 |
19 | const ToDo = mongoose.model("ToDo",toDoSchema);
20 |
21 | module.exports = ToDo;
--------------------------------------------------------------------------------
/dodo-app/models/User.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 | const {Schema} = mongoose;
3 | const bcrypt = require('bcrypt');
4 | const userSchema = new Schema({
5 | firstName:String,
6 | lastName:String,
7 | username:{type:String,required:true},
8 | password:{type:String,required:true}
9 | });
10 |
11 |
12 | userSchema.pre("save",async function(next){
13 | const user = this;
14 | if(!user.isModified('password')) return next();
15 | let salt = await bcrypt.genSalt(10);
16 | let hash = await bcrypt.hash(user.password,salt);
17 | user.password = hash;
18 | next();
19 | });
20 |
21 |
22 | userSchema.methods.comparePassword = async function (password){
23 | return bcrypt.compare(password,this.password);
24 | }
25 |
26 |
27 |
28 |
29 | const User = mongoose.model("User",userSchema);
30 |
31 |
32 | module.exports = User;
33 |
34 |
--------------------------------------------------------------------------------
/dodo-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "todo-app-work-folder",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "server.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "dev": "nodemon start server.js",
9 | "start": "node server.js"
10 | },
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "bcrypt": "^5.1.1",
15 | "cors": "^2.8.5",
16 | "dotenv": "^16.3.1",
17 | "express": "^4.18.2",
18 | "jsonwebtoken": "^9.0.2",
19 | "mongoose": "^7.6.1"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/dodo-app/routes/ToDoRoutes.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const {createToDo, getAllToDo,deleteToDo,updateToDo} = require('../controllers/toDoController');
3 | const authenticateToken = require('../middleware/authJwt');
4 | const router = express.Router();
5 |
6 |
7 | router.post('/create-to-do',authenticateToken,createToDo)
8 | router.get('/get-all-to-do/:userId',authenticateToken,getAllToDo);
9 | router.delete('/delete-to-do/:id',authenticateToken,deleteToDo);
10 | router.patch('/update-to-do/:id',authenticateToken,updateToDo);
11 |
12 |
13 |
14 | module.exports = router;
15 |
--------------------------------------------------------------------------------
/dodo-app/routes/authRoutes.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const AuthController = require('../controllers/AuthController');
3 | const router = express.Router();
4 |
5 |
6 | router.post('/register',AuthController.registerUser)
7 | router.post('/login',AuthController.loginUser)
8 |
9 |
10 | module.exports = router;
11 |
--------------------------------------------------------------------------------
/dodo-app/server.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const app = express();
3 | const cors = require('cors');
4 | const mongoose = require('mongoose');
5 | const authRoutes = require('./routes/authRoutes');
6 | const toDoRoutes = require('./routes/ToDoRoutes');
7 | require('dotenv').config();
8 |
9 | const PORT = process.env.PORT || 5000;
10 |
11 | app.use(cors());
12 | app.use(express.json());
13 |
14 | app.use('/api',authRoutes);
15 | app.use('/api/todo',toDoRoutes);
16 | mongoose.connect(process.env.DB_URL).then((result)=>{
17 | console.log("DB Connected Successfully!");
18 | }).catch(err=>{
19 | console.log(err);
20 | })
21 |
22 | app.listen(PORT,()=>{
23 | console.log(`Server started at port ${PORT}`);
24 | })
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/google-oauth-passport-js/auth.js:
--------------------------------------------------------------------------------
1 | const passport = require ('passport');
2 | const GoogleStrategy = require ('passport-google-oauth2').Strategy;
3 | require ('dotenv').config ();
4 | passport.use (
5 | new GoogleStrategy (
6 | {
7 | clientID: process.env.GOOGLE_CLIENT_ID,
8 | clientSecret: process.env.GOOGLE_CLIENT_SECRET,
9 | callbackURL: 'http://localhost:5000/auth/google/callback',
10 | passReqToCallback: true,
11 | },
12 | function (request, accessToken, refreshToken, profile, done) {
13 | done (null, profile);
14 | }
15 | )
16 | );
17 |
18 | passport.serializeUser ((user, done) => {
19 | done (null, user);
20 | });
21 |
22 | passport.deserializeUser ((user, done) => {
23 | done (null, user);
24 | });
25 |
--------------------------------------------------------------------------------
/google-oauth-passport-js/client/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Google OAuth2
8 |
9 |
10 | Google Oauth 2 with Passportjs
11 | Login with Google
12 |
13 |
--------------------------------------------------------------------------------
/google-oauth-passport-js/index.js:
--------------------------------------------------------------------------------
1 | const express = require ('express');
2 | const passport = require ('passport');
3 | const session = require ('express-session');
4 | const path = require ('path');
5 | const app = express ();
6 | require ('./auth');
7 | app.use (express.json ());
8 | app.use (express.static (path.join (__dirname, 'client')));
9 |
10 | function isLoggedIn (req, res, next) {
11 | req.user ? next () : res.sendStatus (401);
12 | }
13 |
14 | app.get ('/', (req, res) => {
15 | res.sendFile ('index.html');
16 | });
17 |
18 | app.use (
19 | session ({
20 | secret: 'mysecret',
21 | resave: false,
22 | saveUninitialized: true,
23 | cookie: {secure: false},
24 | })
25 | );
26 |
27 | app.use (passport.initialize ());
28 | app.use (passport.session ());
29 | app.get (
30 | '/auth/google',
31 | passport.authenticate ('google', {
32 | scope: ['email', 'profile'],
33 | })
34 | );
35 |
36 | app.get (
37 | '/auth/google/callback',
38 | passport.authenticate ('google', {
39 | successRedirect: '/auth/protected',
40 | failureRedirect: '/auth/google/failure',
41 | })
42 | );
43 |
44 | app.get ('/auth/google/failure', (req, res) => {
45 | res.send ('Something went wrong!');
46 | });
47 |
48 | app.get ('/auth/protected', isLoggedIn, (req, res) => {
49 | let name = req.user.displayName;
50 | res.send (`Hello ${name}`);
51 | });
52 |
53 | app.use ('/auth/logout', (req, res) => {
54 | req.session.destroy ();
55 | res.send ('See you again!');
56 | });
57 |
58 | app.listen (5000, () => {
59 | console.log ('Listening on port 5000');
60 | });
61 |
--------------------------------------------------------------------------------
/google-oauth-passport-js/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "work-folder",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "accepts": {
8 | "version": "1.3.8",
9 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
10 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
11 | "requires": {
12 | "mime-types": "~2.1.34",
13 | "negotiator": "0.6.3"
14 | }
15 | },
16 | "array-flatten": {
17 | "version": "1.1.1",
18 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
19 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
20 | },
21 | "base64url": {
22 | "version": "3.0.1",
23 | "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz",
24 | "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A=="
25 | },
26 | "body-parser": {
27 | "version": "1.20.1",
28 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
29 | "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
30 | "requires": {
31 | "bytes": "3.1.2",
32 | "content-type": "~1.0.4",
33 | "debug": "2.6.9",
34 | "depd": "2.0.0",
35 | "destroy": "1.2.0",
36 | "http-errors": "2.0.0",
37 | "iconv-lite": "0.4.24",
38 | "on-finished": "2.4.1",
39 | "qs": "6.11.0",
40 | "raw-body": "2.5.1",
41 | "type-is": "~1.6.18",
42 | "unpipe": "1.0.0"
43 | }
44 | },
45 | "bytes": {
46 | "version": "3.1.2",
47 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
48 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="
49 | },
50 | "call-bind": {
51 | "version": "1.0.2",
52 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
53 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
54 | "requires": {
55 | "function-bind": "^1.1.1",
56 | "get-intrinsic": "^1.0.2"
57 | }
58 | },
59 | "content-disposition": {
60 | "version": "0.5.4",
61 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
62 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
63 | "requires": {
64 | "safe-buffer": "5.2.1"
65 | }
66 | },
67 | "content-type": {
68 | "version": "1.0.4",
69 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
70 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
71 | },
72 | "cookie": {
73 | "version": "0.5.0",
74 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
75 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw=="
76 | },
77 | "cookie-signature": {
78 | "version": "1.0.6",
79 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
80 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
81 | },
82 | "debug": {
83 | "version": "2.6.9",
84 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
85 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
86 | "requires": {
87 | "ms": "2.0.0"
88 | }
89 | },
90 | "depd": {
91 | "version": "2.0.0",
92 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
93 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="
94 | },
95 | "destroy": {
96 | "version": "1.2.0",
97 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
98 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="
99 | },
100 | "dotenv": {
101 | "version": "16.0.3",
102 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz",
103 | "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ=="
104 | },
105 | "ee-first": {
106 | "version": "1.1.1",
107 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
108 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
109 | },
110 | "encodeurl": {
111 | "version": "1.0.2",
112 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
113 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="
114 | },
115 | "escape-html": {
116 | "version": "1.0.3",
117 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
118 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
119 | },
120 | "etag": {
121 | "version": "1.8.1",
122 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
123 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="
124 | },
125 | "express": {
126 | "version": "4.18.2",
127 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
128 | "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
129 | "requires": {
130 | "accepts": "~1.3.8",
131 | "array-flatten": "1.1.1",
132 | "body-parser": "1.20.1",
133 | "content-disposition": "0.5.4",
134 | "content-type": "~1.0.4",
135 | "cookie": "0.5.0",
136 | "cookie-signature": "1.0.6",
137 | "debug": "2.6.9",
138 | "depd": "2.0.0",
139 | "encodeurl": "~1.0.2",
140 | "escape-html": "~1.0.3",
141 | "etag": "~1.8.1",
142 | "finalhandler": "1.2.0",
143 | "fresh": "0.5.2",
144 | "http-errors": "2.0.0",
145 | "merge-descriptors": "1.0.1",
146 | "methods": "~1.1.2",
147 | "on-finished": "2.4.1",
148 | "parseurl": "~1.3.3",
149 | "path-to-regexp": "0.1.7",
150 | "proxy-addr": "~2.0.7",
151 | "qs": "6.11.0",
152 | "range-parser": "~1.2.1",
153 | "safe-buffer": "5.2.1",
154 | "send": "0.18.0",
155 | "serve-static": "1.15.0",
156 | "setprototypeof": "1.2.0",
157 | "statuses": "2.0.1",
158 | "type-is": "~1.6.18",
159 | "utils-merge": "1.0.1",
160 | "vary": "~1.1.2"
161 | }
162 | },
163 | "express-session": {
164 | "version": "1.17.3",
165 | "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.17.3.tgz",
166 | "integrity": "sha512-4+otWXlShYlG1Ma+2Jnn+xgKUZTMJ5QD3YvfilX3AcocOAbIkVylSWEklzALe/+Pu4qV6TYBj5GwOBFfdKqLBw==",
167 | "requires": {
168 | "cookie": "0.4.2",
169 | "cookie-signature": "1.0.6",
170 | "debug": "2.6.9",
171 | "depd": "~2.0.0",
172 | "on-headers": "~1.0.2",
173 | "parseurl": "~1.3.3",
174 | "safe-buffer": "5.2.1",
175 | "uid-safe": "~2.1.5"
176 | },
177 | "dependencies": {
178 | "cookie": {
179 | "version": "0.4.2",
180 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
181 | "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA=="
182 | }
183 | }
184 | },
185 | "finalhandler": {
186 | "version": "1.2.0",
187 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
188 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
189 | "requires": {
190 | "debug": "2.6.9",
191 | "encodeurl": "~1.0.2",
192 | "escape-html": "~1.0.3",
193 | "on-finished": "2.4.1",
194 | "parseurl": "~1.3.3",
195 | "statuses": "2.0.1",
196 | "unpipe": "~1.0.0"
197 | }
198 | },
199 | "forwarded": {
200 | "version": "0.2.0",
201 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
202 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="
203 | },
204 | "fresh": {
205 | "version": "0.5.2",
206 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
207 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="
208 | },
209 | "function-bind": {
210 | "version": "1.1.1",
211 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
212 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
213 | },
214 | "get-intrinsic": {
215 | "version": "1.2.0",
216 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
217 | "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
218 | "requires": {
219 | "function-bind": "^1.1.1",
220 | "has": "^1.0.3",
221 | "has-symbols": "^1.0.3"
222 | }
223 | },
224 | "has": {
225 | "version": "1.0.3",
226 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
227 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
228 | "requires": {
229 | "function-bind": "^1.1.1"
230 | }
231 | },
232 | "has-symbols": {
233 | "version": "1.0.3",
234 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
235 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
236 | },
237 | "http-errors": {
238 | "version": "2.0.0",
239 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
240 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
241 | "requires": {
242 | "depd": "2.0.0",
243 | "inherits": "2.0.4",
244 | "setprototypeof": "1.2.0",
245 | "statuses": "2.0.1",
246 | "toidentifier": "1.0.1"
247 | }
248 | },
249 | "iconv-lite": {
250 | "version": "0.4.24",
251 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
252 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
253 | "requires": {
254 | "safer-buffer": ">= 2.1.2 < 3"
255 | }
256 | },
257 | "inherits": {
258 | "version": "2.0.4",
259 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
260 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
261 | },
262 | "ipaddr.js": {
263 | "version": "1.9.1",
264 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
265 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
266 | },
267 | "media-typer": {
268 | "version": "0.3.0",
269 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
270 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ=="
271 | },
272 | "merge-descriptors": {
273 | "version": "1.0.1",
274 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
275 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
276 | },
277 | "methods": {
278 | "version": "1.1.2",
279 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
280 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w=="
281 | },
282 | "mime": {
283 | "version": "1.6.0",
284 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
285 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
286 | },
287 | "mime-db": {
288 | "version": "1.52.0",
289 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
290 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
291 | },
292 | "mime-types": {
293 | "version": "2.1.35",
294 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
295 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
296 | "requires": {
297 | "mime-db": "1.52.0"
298 | }
299 | },
300 | "ms": {
301 | "version": "2.0.0",
302 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
303 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
304 | },
305 | "negotiator": {
306 | "version": "0.6.3",
307 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
308 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
309 | },
310 | "oauth": {
311 | "version": "0.9.15",
312 | "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz",
313 | "integrity": "sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA=="
314 | },
315 | "object-inspect": {
316 | "version": "1.12.3",
317 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",
318 | "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g=="
319 | },
320 | "on-finished": {
321 | "version": "2.4.1",
322 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
323 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
324 | "requires": {
325 | "ee-first": "1.1.1"
326 | }
327 | },
328 | "on-headers": {
329 | "version": "1.0.2",
330 | "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
331 | "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA=="
332 | },
333 | "parseurl": {
334 | "version": "1.3.3",
335 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
336 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
337 | },
338 | "passport": {
339 | "version": "0.6.0",
340 | "resolved": "https://registry.npmjs.org/passport/-/passport-0.6.0.tgz",
341 | "integrity": "sha512-0fe+p3ZnrWRW74fe8+SvCyf4a3Pb2/h7gFkQ8yTJpAO50gDzlfjZUZTO1k5Eg9kUct22OxHLqDZoKUWRHOh9ug==",
342 | "requires": {
343 | "passport-strategy": "1.x.x",
344 | "pause": "0.0.1",
345 | "utils-merge": "^1.0.1"
346 | }
347 | },
348 | "passport-google-oauth2": {
349 | "version": "0.2.0",
350 | "resolved": "https://registry.npmjs.org/passport-google-oauth2/-/passport-google-oauth2-0.2.0.tgz",
351 | "integrity": "sha512-62EdPtbfVdc55nIXi0p1WOa/fFMM8v/M8uQGnbcXA4OexZWCnfsEi3wo2buag+Is5oqpuHzOtI64JpHk0Xi5RQ==",
352 | "requires": {
353 | "passport-oauth2": "^1.1.2"
354 | }
355 | },
356 | "passport-oauth2": {
357 | "version": "1.6.1",
358 | "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.6.1.tgz",
359 | "integrity": "sha512-ZbV43Hq9d/SBSYQ22GOiglFsjsD1YY/qdiptA+8ej+9C1dL1TVB+mBE5kDH/D4AJo50+2i8f4bx0vg4/yDDZCQ==",
360 | "requires": {
361 | "base64url": "3.x.x",
362 | "oauth": "0.9.x",
363 | "passport-strategy": "1.x.x",
364 | "uid2": "0.0.x",
365 | "utils-merge": "1.x.x"
366 | }
367 | },
368 | "passport-strategy": {
369 | "version": "1.0.0",
370 | "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz",
371 | "integrity": "sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA=="
372 | },
373 | "path-to-regexp": {
374 | "version": "0.1.7",
375 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
376 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
377 | },
378 | "pause": {
379 | "version": "0.0.1",
380 | "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz",
381 | "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg=="
382 | },
383 | "proxy-addr": {
384 | "version": "2.0.7",
385 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
386 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
387 | "requires": {
388 | "forwarded": "0.2.0",
389 | "ipaddr.js": "1.9.1"
390 | }
391 | },
392 | "qs": {
393 | "version": "6.11.0",
394 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
395 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
396 | "requires": {
397 | "side-channel": "^1.0.4"
398 | }
399 | },
400 | "random-bytes": {
401 | "version": "1.0.0",
402 | "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz",
403 | "integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ=="
404 | },
405 | "range-parser": {
406 | "version": "1.2.1",
407 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
408 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
409 | },
410 | "raw-body": {
411 | "version": "2.5.1",
412 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
413 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
414 | "requires": {
415 | "bytes": "3.1.2",
416 | "http-errors": "2.0.0",
417 | "iconv-lite": "0.4.24",
418 | "unpipe": "1.0.0"
419 | }
420 | },
421 | "safe-buffer": {
422 | "version": "5.2.1",
423 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
424 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
425 | },
426 | "safer-buffer": {
427 | "version": "2.1.2",
428 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
429 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
430 | },
431 | "send": {
432 | "version": "0.18.0",
433 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
434 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
435 | "requires": {
436 | "debug": "2.6.9",
437 | "depd": "2.0.0",
438 | "destroy": "1.2.0",
439 | "encodeurl": "~1.0.2",
440 | "escape-html": "~1.0.3",
441 | "etag": "~1.8.1",
442 | "fresh": "0.5.2",
443 | "http-errors": "2.0.0",
444 | "mime": "1.6.0",
445 | "ms": "2.1.3",
446 | "on-finished": "2.4.1",
447 | "range-parser": "~1.2.1",
448 | "statuses": "2.0.1"
449 | },
450 | "dependencies": {
451 | "ms": {
452 | "version": "2.1.3",
453 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
454 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
455 | }
456 | }
457 | },
458 | "serve-static": {
459 | "version": "1.15.0",
460 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
461 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
462 | "requires": {
463 | "encodeurl": "~1.0.2",
464 | "escape-html": "~1.0.3",
465 | "parseurl": "~1.3.3",
466 | "send": "0.18.0"
467 | }
468 | },
469 | "setprototypeof": {
470 | "version": "1.2.0",
471 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
472 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
473 | },
474 | "side-channel": {
475 | "version": "1.0.4",
476 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
477 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
478 | "requires": {
479 | "call-bind": "^1.0.0",
480 | "get-intrinsic": "^1.0.2",
481 | "object-inspect": "^1.9.0"
482 | }
483 | },
484 | "statuses": {
485 | "version": "2.0.1",
486 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
487 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="
488 | },
489 | "toidentifier": {
490 | "version": "1.0.1",
491 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
492 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
493 | },
494 | "type-is": {
495 | "version": "1.6.18",
496 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
497 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
498 | "requires": {
499 | "media-typer": "0.3.0",
500 | "mime-types": "~2.1.24"
501 | }
502 | },
503 | "uid-safe": {
504 | "version": "2.1.5",
505 | "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",
506 | "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==",
507 | "requires": {
508 | "random-bytes": "~1.0.0"
509 | }
510 | },
511 | "uid2": {
512 | "version": "0.0.4",
513 | "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.4.tgz",
514 | "integrity": "sha512-IevTus0SbGwQzYh3+fRsAMTVVPOoIVufzacXcHPmdlle1jUpq7BRL+mw3dgeLanvGZdwwbWhRV6XrcFNdBmjWA=="
515 | },
516 | "unpipe": {
517 | "version": "1.0.0",
518 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
519 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="
520 | },
521 | "utils-merge": {
522 | "version": "1.0.1",
523 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
524 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA=="
525 | },
526 | "vary": {
527 | "version": "1.1.2",
528 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
529 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
530 | }
531 | }
532 | }
533 |
--------------------------------------------------------------------------------
/google-oauth-passport-js/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "work-folder",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "dev": "nodemon index.js"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "dotenv": "^16.0.3",
13 | "express": "^4.18.2",
14 | "express-session": "^1.17.3",
15 | "passport": "^0.6.0",
16 | "passport-google-oauth2": "^0.2.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/mern-tutorial/backend/models/SingleBlog.js:
--------------------------------------------------------------------------------
1 | const mongoose = require ('mongoose');
2 |
3 | const SingleBlog = new mongoose.Schema (
4 | {
5 | title: {
6 | type: String,
7 | },
8 | category: {
9 | type: String,
10 | },
11 | description: {
12 | type: String,
13 | },
14 | },
15 | {
16 | timestamps: true,
17 | }
18 | );
19 |
20 | module.exports = mongoose.model ('SingleBlog', SingleBlog);
21 |
--------------------------------------------------------------------------------
/mern-tutorial/backend/models/index.js:
--------------------------------------------------------------------------------
1 | const mongoose = require ('mongoose');
2 | mongoose.Promise = global.Promise;
3 |
4 | let db = {};
5 |
6 | db.mongoose = mongoose;
7 |
8 | db.SingleBlog = require ('./SingleBlog');
9 |
10 | module.exports = db;
11 |
--------------------------------------------------------------------------------
/mern-tutorial/backend/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "backend",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "@types/node": {
8 | "version": "18.7.6",
9 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.6.tgz",
10 | "integrity": "sha512-EdxgKRXgYsNITy5mjjXjVE/CS8YENSdhiagGrLqjG0pvA2owgJ6i4l7wy/PFZGC0B1/H20lWKN7ONVDNYDZm7A=="
11 | },
12 | "@types/webidl-conversions": {
13 | "version": "6.1.1",
14 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz",
15 | "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
16 | },
17 | "@types/whatwg-url": {
18 | "version": "8.2.2",
19 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz",
20 | "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==",
21 | "requires": {
22 | "@types/node": "*",
23 | "@types/webidl-conversions": "*"
24 | }
25 | },
26 | "accepts": {
27 | "version": "1.3.8",
28 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
29 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
30 | "requires": {
31 | "mime-types": "~2.1.34",
32 | "negotiator": "0.6.3"
33 | }
34 | },
35 | "array-flatten": {
36 | "version": "1.1.1",
37 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
38 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
39 | },
40 | "base64-js": {
41 | "version": "1.5.1",
42 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
43 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
44 | },
45 | "body-parser": {
46 | "version": "1.20.0",
47 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz",
48 | "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==",
49 | "requires": {
50 | "bytes": "3.1.2",
51 | "content-type": "~1.0.4",
52 | "debug": "2.6.9",
53 | "depd": "2.0.0",
54 | "destroy": "1.2.0",
55 | "http-errors": "2.0.0",
56 | "iconv-lite": "0.4.24",
57 | "on-finished": "2.4.1",
58 | "qs": "6.10.3",
59 | "raw-body": "2.5.1",
60 | "type-is": "~1.6.18",
61 | "unpipe": "1.0.0"
62 | }
63 | },
64 | "bson": {
65 | "version": "4.6.5",
66 | "resolved": "https://registry.npmjs.org/bson/-/bson-4.6.5.tgz",
67 | "integrity": "sha512-uqrgcjyOaZsHfz7ea8zLRCLe1u+QGUSzMZmvXqO24CDW7DWoW1qiN9folSwa7hSneTSgM2ykDIzF5kcQQ8cwNw==",
68 | "requires": {
69 | "buffer": "^5.6.0"
70 | }
71 | },
72 | "buffer": {
73 | "version": "5.7.1",
74 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
75 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
76 | "requires": {
77 | "base64-js": "^1.3.1",
78 | "ieee754": "^1.1.13"
79 | }
80 | },
81 | "bytes": {
82 | "version": "3.1.2",
83 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
84 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="
85 | },
86 | "call-bind": {
87 | "version": "1.0.2",
88 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
89 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
90 | "requires": {
91 | "function-bind": "^1.1.1",
92 | "get-intrinsic": "^1.0.2"
93 | }
94 | },
95 | "content-disposition": {
96 | "version": "0.5.4",
97 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
98 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
99 | "requires": {
100 | "safe-buffer": "5.2.1"
101 | }
102 | },
103 | "content-type": {
104 | "version": "1.0.4",
105 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
106 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
107 | },
108 | "cookie": {
109 | "version": "0.5.0",
110 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
111 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw=="
112 | },
113 | "cookie-signature": {
114 | "version": "1.0.6",
115 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
116 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
117 | },
118 | "cors": {
119 | "version": "2.8.5",
120 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
121 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
122 | "requires": {
123 | "object-assign": "^4",
124 | "vary": "^1"
125 | }
126 | },
127 | "debug": {
128 | "version": "2.6.9",
129 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
130 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
131 | "requires": {
132 | "ms": "2.0.0"
133 | }
134 | },
135 | "denque": {
136 | "version": "2.1.0",
137 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
138 | "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="
139 | },
140 | "depd": {
141 | "version": "2.0.0",
142 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
143 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="
144 | },
145 | "destroy": {
146 | "version": "1.2.0",
147 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
148 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="
149 | },
150 | "ee-first": {
151 | "version": "1.1.1",
152 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
153 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
154 | },
155 | "encodeurl": {
156 | "version": "1.0.2",
157 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
158 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="
159 | },
160 | "escape-html": {
161 | "version": "1.0.3",
162 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
163 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
164 | },
165 | "etag": {
166 | "version": "1.8.1",
167 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
168 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="
169 | },
170 | "express": {
171 | "version": "4.18.1",
172 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz",
173 | "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==",
174 | "requires": {
175 | "accepts": "~1.3.8",
176 | "array-flatten": "1.1.1",
177 | "body-parser": "1.20.0",
178 | "content-disposition": "0.5.4",
179 | "content-type": "~1.0.4",
180 | "cookie": "0.5.0",
181 | "cookie-signature": "1.0.6",
182 | "debug": "2.6.9",
183 | "depd": "2.0.0",
184 | "encodeurl": "~1.0.2",
185 | "escape-html": "~1.0.3",
186 | "etag": "~1.8.1",
187 | "finalhandler": "1.2.0",
188 | "fresh": "0.5.2",
189 | "http-errors": "2.0.0",
190 | "merge-descriptors": "1.0.1",
191 | "methods": "~1.1.2",
192 | "on-finished": "2.4.1",
193 | "parseurl": "~1.3.3",
194 | "path-to-regexp": "0.1.7",
195 | "proxy-addr": "~2.0.7",
196 | "qs": "6.10.3",
197 | "range-parser": "~1.2.1",
198 | "safe-buffer": "5.2.1",
199 | "send": "0.18.0",
200 | "serve-static": "1.15.0",
201 | "setprototypeof": "1.2.0",
202 | "statuses": "2.0.1",
203 | "type-is": "~1.6.18",
204 | "utils-merge": "1.0.1",
205 | "vary": "~1.1.2"
206 | }
207 | },
208 | "finalhandler": {
209 | "version": "1.2.0",
210 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
211 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
212 | "requires": {
213 | "debug": "2.6.9",
214 | "encodeurl": "~1.0.2",
215 | "escape-html": "~1.0.3",
216 | "on-finished": "2.4.1",
217 | "parseurl": "~1.3.3",
218 | "statuses": "2.0.1",
219 | "unpipe": "~1.0.0"
220 | }
221 | },
222 | "forwarded": {
223 | "version": "0.2.0",
224 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
225 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="
226 | },
227 | "fresh": {
228 | "version": "0.5.2",
229 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
230 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="
231 | },
232 | "function-bind": {
233 | "version": "1.1.1",
234 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
235 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
236 | },
237 | "get-intrinsic": {
238 | "version": "1.1.2",
239 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz",
240 | "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==",
241 | "requires": {
242 | "function-bind": "^1.1.1",
243 | "has": "^1.0.3",
244 | "has-symbols": "^1.0.3"
245 | }
246 | },
247 | "has": {
248 | "version": "1.0.3",
249 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
250 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
251 | "requires": {
252 | "function-bind": "^1.1.1"
253 | }
254 | },
255 | "has-symbols": {
256 | "version": "1.0.3",
257 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
258 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
259 | },
260 | "http-errors": {
261 | "version": "2.0.0",
262 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
263 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
264 | "requires": {
265 | "depd": "2.0.0",
266 | "inherits": "2.0.4",
267 | "setprototypeof": "1.2.0",
268 | "statuses": "2.0.1",
269 | "toidentifier": "1.0.1"
270 | }
271 | },
272 | "iconv-lite": {
273 | "version": "0.4.24",
274 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
275 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
276 | "requires": {
277 | "safer-buffer": ">= 2.1.2 < 3"
278 | }
279 | },
280 | "ieee754": {
281 | "version": "1.2.1",
282 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
283 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
284 | },
285 | "inherits": {
286 | "version": "2.0.4",
287 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
288 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
289 | },
290 | "ip": {
291 | "version": "2.0.0",
292 | "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
293 | "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ=="
294 | },
295 | "ipaddr.js": {
296 | "version": "1.9.1",
297 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
298 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
299 | },
300 | "kareem": {
301 | "version": "2.4.1",
302 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.4.1.tgz",
303 | "integrity": "sha512-aJ9opVoXroQUPfovYP5kaj2lM7Jn02Gw13bL0lg9v0V7SaUc0qavPs0Eue7d2DcC3NjqI6QAUElXNsuZSeM+EA=="
304 | },
305 | "media-typer": {
306 | "version": "0.3.0",
307 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
308 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ=="
309 | },
310 | "memory-pager": {
311 | "version": "1.5.0",
312 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
313 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
314 | "optional": true
315 | },
316 | "merge-descriptors": {
317 | "version": "1.0.1",
318 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
319 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
320 | },
321 | "methods": {
322 | "version": "1.1.2",
323 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
324 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w=="
325 | },
326 | "mime": {
327 | "version": "1.6.0",
328 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
329 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
330 | },
331 | "mime-db": {
332 | "version": "1.52.0",
333 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
334 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
335 | },
336 | "mime-types": {
337 | "version": "2.1.35",
338 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
339 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
340 | "requires": {
341 | "mime-db": "1.52.0"
342 | }
343 | },
344 | "mongodb": {
345 | "version": "4.8.1",
346 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.8.1.tgz",
347 | "integrity": "sha512-/NyiM3Ox9AwP5zrfT9TXjRKDJbXlLaUDQ9Rg//2lbg8D2A8GXV0VidYYnA/gfdK6uwbnL4FnAflH7FbGw3TS7w==",
348 | "requires": {
349 | "bson": "^4.6.5",
350 | "denque": "^2.0.1",
351 | "mongodb-connection-string-url": "^2.5.2",
352 | "saslprep": "^1.0.3",
353 | "socks": "^2.6.2"
354 | }
355 | },
356 | "mongodb-connection-string-url": {
357 | "version": "2.5.3",
358 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz",
359 | "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==",
360 | "requires": {
361 | "@types/whatwg-url": "^8.2.1",
362 | "whatwg-url": "^11.0.0"
363 | }
364 | },
365 | "mongoose": {
366 | "version": "6.5.2",
367 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.5.2.tgz",
368 | "integrity": "sha512-3CFDrSLtK2qjM1pZeZpLTUyqPRkc11Iuh74ZrwS4IwEJ3K2PqGnmyPLw7ex4Kzu37ujIMp3MAuiBlUjfrcb6hw==",
369 | "requires": {
370 | "bson": "^4.6.5",
371 | "kareem": "2.4.1",
372 | "mongodb": "4.8.1",
373 | "mpath": "0.9.0",
374 | "mquery": "4.0.3",
375 | "ms": "2.1.3",
376 | "sift": "16.0.0"
377 | },
378 | "dependencies": {
379 | "ms": {
380 | "version": "2.1.3",
381 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
382 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
383 | }
384 | }
385 | },
386 | "mpath": {
387 | "version": "0.9.0",
388 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
389 | "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew=="
390 | },
391 | "mquery": {
392 | "version": "4.0.3",
393 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.3.tgz",
394 | "integrity": "sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA==",
395 | "requires": {
396 | "debug": "4.x"
397 | },
398 | "dependencies": {
399 | "debug": {
400 | "version": "4.3.4",
401 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
402 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
403 | "requires": {
404 | "ms": "2.1.2"
405 | }
406 | },
407 | "ms": {
408 | "version": "2.1.2",
409 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
410 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
411 | }
412 | }
413 | },
414 | "ms": {
415 | "version": "2.0.0",
416 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
417 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
418 | },
419 | "negotiator": {
420 | "version": "0.6.3",
421 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
422 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
423 | },
424 | "object-assign": {
425 | "version": "4.1.1",
426 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
427 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="
428 | },
429 | "object-inspect": {
430 | "version": "1.12.2",
431 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
432 | "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ=="
433 | },
434 | "on-finished": {
435 | "version": "2.4.1",
436 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
437 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
438 | "requires": {
439 | "ee-first": "1.1.1"
440 | }
441 | },
442 | "parseurl": {
443 | "version": "1.3.3",
444 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
445 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
446 | },
447 | "path-to-regexp": {
448 | "version": "0.1.7",
449 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
450 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
451 | },
452 | "proxy-addr": {
453 | "version": "2.0.7",
454 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
455 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
456 | "requires": {
457 | "forwarded": "0.2.0",
458 | "ipaddr.js": "1.9.1"
459 | }
460 | },
461 | "punycode": {
462 | "version": "2.1.1",
463 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
464 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
465 | },
466 | "qs": {
467 | "version": "6.10.3",
468 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
469 | "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
470 | "requires": {
471 | "side-channel": "^1.0.4"
472 | }
473 | },
474 | "range-parser": {
475 | "version": "1.2.1",
476 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
477 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
478 | },
479 | "raw-body": {
480 | "version": "2.5.1",
481 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
482 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
483 | "requires": {
484 | "bytes": "3.1.2",
485 | "http-errors": "2.0.0",
486 | "iconv-lite": "0.4.24",
487 | "unpipe": "1.0.0"
488 | }
489 | },
490 | "safe-buffer": {
491 | "version": "5.2.1",
492 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
493 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
494 | },
495 | "safer-buffer": {
496 | "version": "2.1.2",
497 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
498 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
499 | },
500 | "saslprep": {
501 | "version": "1.0.3",
502 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
503 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
504 | "optional": true,
505 | "requires": {
506 | "sparse-bitfield": "^3.0.3"
507 | }
508 | },
509 | "send": {
510 | "version": "0.18.0",
511 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
512 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
513 | "requires": {
514 | "debug": "2.6.9",
515 | "depd": "2.0.0",
516 | "destroy": "1.2.0",
517 | "encodeurl": "~1.0.2",
518 | "escape-html": "~1.0.3",
519 | "etag": "~1.8.1",
520 | "fresh": "0.5.2",
521 | "http-errors": "2.0.0",
522 | "mime": "1.6.0",
523 | "ms": "2.1.3",
524 | "on-finished": "2.4.1",
525 | "range-parser": "~1.2.1",
526 | "statuses": "2.0.1"
527 | },
528 | "dependencies": {
529 | "ms": {
530 | "version": "2.1.3",
531 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
532 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
533 | }
534 | }
535 | },
536 | "serve-static": {
537 | "version": "1.15.0",
538 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
539 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
540 | "requires": {
541 | "encodeurl": "~1.0.2",
542 | "escape-html": "~1.0.3",
543 | "parseurl": "~1.3.3",
544 | "send": "0.18.0"
545 | }
546 | },
547 | "setprototypeof": {
548 | "version": "1.2.0",
549 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
550 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
551 | },
552 | "side-channel": {
553 | "version": "1.0.4",
554 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
555 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
556 | "requires": {
557 | "call-bind": "^1.0.0",
558 | "get-intrinsic": "^1.0.2",
559 | "object-inspect": "^1.9.0"
560 | }
561 | },
562 | "sift": {
563 | "version": "16.0.0",
564 | "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz",
565 | "integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ=="
566 | },
567 | "smart-buffer": {
568 | "version": "4.2.0",
569 | "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
570 | "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="
571 | },
572 | "socks": {
573 | "version": "2.7.0",
574 | "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz",
575 | "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==",
576 | "requires": {
577 | "ip": "^2.0.0",
578 | "smart-buffer": "^4.2.0"
579 | }
580 | },
581 | "sparse-bitfield": {
582 | "version": "3.0.3",
583 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
584 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
585 | "optional": true,
586 | "requires": {
587 | "memory-pager": "^1.0.2"
588 | }
589 | },
590 | "statuses": {
591 | "version": "2.0.1",
592 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
593 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="
594 | },
595 | "toidentifier": {
596 | "version": "1.0.1",
597 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
598 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
599 | },
600 | "tr46": {
601 | "version": "3.0.0",
602 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
603 | "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
604 | "requires": {
605 | "punycode": "^2.1.1"
606 | }
607 | },
608 | "type-is": {
609 | "version": "1.6.18",
610 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
611 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
612 | "requires": {
613 | "media-typer": "0.3.0",
614 | "mime-types": "~2.1.24"
615 | }
616 | },
617 | "unpipe": {
618 | "version": "1.0.0",
619 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
620 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="
621 | },
622 | "utils-merge": {
623 | "version": "1.0.1",
624 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
625 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA=="
626 | },
627 | "vary": {
628 | "version": "1.1.2",
629 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
630 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
631 | },
632 | "webidl-conversions": {
633 | "version": "7.0.0",
634 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
635 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="
636 | },
637 | "whatwg-url": {
638 | "version": "11.0.0",
639 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
640 | "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
641 | "requires": {
642 | "tr46": "^3.0.0",
643 | "webidl-conversions": "^7.0.0"
644 | }
645 | }
646 | }
647 | }
648 |
--------------------------------------------------------------------------------
/mern-tutorial/backend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "backend",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "server.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "start": "nodemon server.js"
9 | },
10 | "author": "codersarts",
11 | "license": "ISC",
12 | "dependencies": {
13 | "cors": "^2.8.5",
14 | "express": "^4.18.1",
15 | "mongodb": "^4.8.1",
16 | "mongoose": "^6.5.2"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/mern-tutorial/backend/server.js:
--------------------------------------------------------------------------------
1 | const express = require ('express');
2 |
3 | const app = express ();
4 | const PORT = 5000;
5 | const cors = require ('cors');
6 |
7 | app.use (cors ());
8 |
9 | app.use (express.json ());
10 | app.use (express.urlencoded ({extended: false}));
11 |
12 | const url = 'mongodb://localhost:27017/mongooseBlog';
13 |
14 | const db = require ('./models');
15 | const {SingleBlog} = db;
16 |
17 | db.mongoose
18 | .connect (url, {useNewUrlParser: true})
19 | .then (() => {
20 | console.log (`Connected with mongodb ${url}`);
21 | })
22 | .catch (err => {
23 | console.log (err);
24 | });
25 |
26 | app.post ('/create-new-blog', async (req, res) => {
27 | let data = {
28 | title: req.body.title,
29 | description: req.body.description,
30 | category: req.body.category,
31 | };
32 |
33 | try {
34 | const blog = new SingleBlog (data);
35 | const result = await blog.save ();
36 | console.log (result);
37 | res.send ({message: 'Successfully created Blog!'});
38 | } catch (err) {
39 | console.log (err);
40 | res.send (err);
41 | }
42 | });
43 |
44 | app.get ('/get-all-blogs', async (req, res) => {
45 | try {
46 | const result = await SingleBlog.find ({});
47 |
48 | console.log (result);
49 | res.send (result);
50 | } catch (err) {
51 | console.log (err);
52 | res.send (err);
53 | }
54 | });
55 |
56 | app.listen (PORT, () => {
57 | console.log (`Server is listening on ${PORT}`);
58 | });
59 |
--------------------------------------------------------------------------------
/mern-tutorial/frontend/.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 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/mern-tutorial/frontend/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Create React App
2 |
3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4 |
5 | ## Available Scripts
6 |
7 | In the project directory, you can run:
8 |
9 | ### `npm start`
10 |
11 | Runs the app in the development mode.\
12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
13 |
14 | The page will reload when you make changes.\
15 | You may also see any lint errors in the console.
16 |
17 | ### `npm test`
18 |
19 | Launches the test runner in the interactive watch mode.\
20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21 |
22 | ### `npm run build`
23 |
24 | Builds the app for production to the `build` folder.\
25 | It correctly bundles React in production mode and optimizes the build for the best performance.
26 |
27 | The build is minified and the filenames include the hashes.\
28 | Your app is ready to be deployed!
29 |
30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31 |
32 | ### `npm run eject`
33 |
34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!**
35 |
36 | 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.
37 |
38 | 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.
39 |
40 | 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.
41 |
42 | ## Learn More
43 |
44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45 |
46 | To learn React, check out the [React documentation](https://reactjs.org/).
47 |
48 | ### Code Splitting
49 |
50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51 |
52 | ### Analyzing the Bundle Size
53 |
54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55 |
56 | ### Making a Progressive Web App
57 |
58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59 |
60 | ### Advanced Configuration
61 |
62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63 |
64 | ### Deployment
65 |
66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67 |
68 | ### `npm run build` fails to minify
69 |
70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
71 |
--------------------------------------------------------------------------------
/mern-tutorial/frontend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "client",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.16.5",
7 | "@testing-library/react": "^13.3.0",
8 | "@testing-library/user-event": "^13.5.0",
9 | "axios": "^0.27.2",
10 | "react": "^18.2.0",
11 | "react-dom": "^18.2.0",
12 | "react-router": "^6.3.0",
13 | "react-router-dom": "^6.3.0",
14 | "react-scripts": "5.0.1",
15 | "web-vitals": "^2.1.4"
16 | },
17 | "scripts": {
18 | "start": "react-scripts start",
19 | "build": "react-scripts build",
20 | "test": "react-scripts test",
21 | "eject": "react-scripts eject"
22 | },
23 | "eslintConfig": {
24 | "extends": [
25 | "react-app",
26 | "react-app/jest"
27 | ]
28 | },
29 | "browserslist": {
30 | "production": [
31 | ">0.2%",
32 | "not dead",
33 | "not op_mini all"
34 | ],
35 | "development": [
36 | "last 1 chrome version",
37 | "last 1 firefox version",
38 | "last 1 safari version"
39 | ]
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/mern-tutorial/frontend/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/mern-tutorial/frontend/public/favicon.ico
--------------------------------------------------------------------------------
/mern-tutorial/frontend/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
27 | React App
28 |
29 |
30 | You need to enable JavaScript to run this app.
31 |
32 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/mern-tutorial/frontend/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/mern-tutorial/frontend/public/logo192.png
--------------------------------------------------------------------------------
/mern-tutorial/frontend/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/mern-tutorial/frontend/public/logo512.png
--------------------------------------------------------------------------------
/mern-tutorial/frontend/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 |
--------------------------------------------------------------------------------
/mern-tutorial/frontend/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/mern-tutorial/frontend/src/App.css:
--------------------------------------------------------------------------------
1 | .primaryBtn{
2 | padding:10px;
3 | background-color: rgb(0, 132, 255);
4 | color:white;
5 | border:none;
6 | margin:10px;
7 | cursor: pointer;
8 | }
9 |
10 | .primaryBtn:hover{
11 | background-color: rgb(3, 101, 194);
12 | }
13 |
14 | .cardGroup{
15 | display: flex;
16 | flex-wrap: wrap;
17 | }
18 |
19 | .card{
20 | width:300px;
21 | margin:15px;
22 | padding:10px;
23 | border: 1px solid lightgray;
24 | }
25 |
26 | .card p{
27 | color:rgb(73, 72, 72);
28 | }
29 |
30 | .card small{
31 | background: rgb(101, 131, 228);
32 | padding:5px 10px;
33 | font-weight: bold;
34 | color: white;
35 | border-radius: 5px;
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/mern-tutorial/frontend/src/App.js:
--------------------------------------------------------------------------------
1 | import { Route, Routes } from 'react-router';
2 | import './App.css';
3 | import Blogs from './Pages/Blogs';
4 | import Home from './Pages/Home';
5 |
6 | function App () {
7 | return (
8 | <>
9 |
10 | } />
11 | } />
12 |
13 | >
14 | );
15 | }
16 |
17 | export default App;
18 |
--------------------------------------------------------------------------------
/mern-tutorial/frontend/src/Pages/Blogs.jsx:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 | import React, { useState,useEffect } from 'react';
3 | import { Link } from 'react-router-dom';
4 |
5 | function Blogs () {
6 | const [allBlogs,setAllBlogs] = useState([]);
7 |
8 | useEffect(()=>{
9 | let isMounted =true;
10 | const getAllBlogs = async ()=>{
11 | try{
12 | const response = await axios.get('http://localhost:5000/get-all-blogs');
13 | // console.log(response);
14 | setAllBlogs(response.data);
15 | }catch(err){
16 | console.log(err)
17 | }
18 | }
19 |
20 | if(isMounted){
21 | getAllBlogs();
22 | }
23 |
24 | return ()=>{
25 | isMounted = false;
26 | }
27 |
28 | },[])
29 |
30 | return(<>
31 | All Blogs
32 | Home
33 |
34 | {allBlogs.map(item=>{
35 | return(
36 |
37 |
{item.title}
38 |
{item.category}
39 |
{item.description}
40 |
41 | )
42 | })}
43 |
44 |
45 | >);
46 | }
47 |
48 | export default Blogs;
49 |
--------------------------------------------------------------------------------
/mern-tutorial/frontend/src/Pages/Home.jsx:
--------------------------------------------------------------------------------
1 | import React, {useState} from 'react';
2 | import './home.css';
3 | import axios from 'axios';
4 | import {Link} from 'react-router-dom';
5 |
6 | function Home () {
7 | const [title, setTitle] = useState ('');
8 | const [category, setCategory] = useState ('');
9 | const [description, setDescription] = useState ('');
10 |
11 | const handleTitle = e => {
12 | // console.log (e.target.value);
13 | setTitle (e.target.value);
14 | };
15 |
16 | const handleCategoryChange = e => {
17 | setCategory (e.target.value);
18 | };
19 |
20 | const handleDescriptionChange = e => {
21 | setDescription (e.target.value);
22 | };
23 |
24 | const handleSubmit = async e => {
25 | e.preventDefault ();
26 | let data = {
27 | title: title,
28 | category: category,
29 | description: description,
30 | };
31 | // console.log (data);
32 | try {
33 | const response = await axios.post (
34 | 'http://localhost:5000/create-new-blog',
35 | data
36 | );
37 | console.log (response);
38 | if (response) {
39 | setTitle ('');
40 | setCategory ('');
41 | setDescription ('');
42 | }
43 | } catch (err) {
44 | console.log (err);
45 | }
46 | };
47 |
48 | return (
49 |
50 |
Home
51 |
All Blogs
52 |
90 |
91 |
92 | );
93 | }
94 |
95 | export default Home;
96 |
--------------------------------------------------------------------------------
/mern-tutorial/frontend/src/Pages/home.css:
--------------------------------------------------------------------------------
1 | form{
2 | padding: 1rem;
3 | border:1px solid rgb(46, 45, 45);
4 | margin-left: auto;
5 | margin-right: auto;
6 | display:block;
7 | width:50%;
8 |
9 | }
10 |
11 | .form-control{
12 | background-color: whitesmoke;
13 | width:90%;
14 | padding:10px;
15 | margin:10px;
16 | display: block;
17 | border:none;
18 | }
19 |
20 | label{
21 | font-weight: bold;
22 | }
--------------------------------------------------------------------------------
/mern-tutorial/frontend/src/components/Navbar.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | function Navbar () {
4 | return Navbar ;
5 | }
6 |
7 | export default Navbar;
8 |
--------------------------------------------------------------------------------
/mern-tutorial/frontend/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/mern-tutorial/frontend/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import './index.css';
4 | import App from './App';
5 | import {BrowserRouter} from 'react-router-dom';
6 |
7 | const root = ReactDOM.createRoot (document.getElementById ('root'));
8 | root.render (
9 |
10 |
11 |
12 | );
13 |
--------------------------------------------------------------------------------
/nextjs-intro/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals"
3 | }
4 |
--------------------------------------------------------------------------------
/nextjs-intro/.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 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 | .pnpm-debug.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
--------------------------------------------------------------------------------
/nextjs-intro/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | First, run the development server:
6 |
7 | ```bash
8 | npm run dev
9 | # or
10 | yarn dev
11 | ```
12 |
13 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
14 |
15 | You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
16 |
17 | [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
18 |
19 | The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
20 |
21 | ## Learn More
22 |
23 | To learn more about Next.js, take a look at the following resources:
24 |
25 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
26 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
27 |
28 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
29 |
30 | ## Deploy on Vercel
31 |
32 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
33 |
34 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
35 |
--------------------------------------------------------------------------------
/nextjs-intro/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | reactStrictMode: true,
4 | }
5 |
6 | module.exports = nextConfig
7 |
--------------------------------------------------------------------------------
/nextjs-intro/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nextjs-intro",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "next": "12.1.6",
13 | "react": "18.2.0",
14 | "react-dom": "18.2.0"
15 | },
16 | "devDependencies": {
17 | "eslint": "8.18.0",
18 | "eslint-config-next": "12.1.6"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/nextjs-intro/pages/Login.js:
--------------------------------------------------------------------------------
1 | import Head from "next/head";
2 | import styles from '../styles/Login.module.css'
3 |
4 | function Login () {
5 | return (
6 | <>
7 |
8 | Login
9 |
10 | Login
11 | >
12 |
13 | );
14 | }
15 |
16 | export default Login;
17 |
--------------------------------------------------------------------------------
/nextjs-intro/pages/_app.js:
--------------------------------------------------------------------------------
1 | import '../styles/globals.css'
2 |
3 | function MyApp({ Component, pageProps }) {
4 | return
5 | }
6 |
7 | export default MyApp
8 |
--------------------------------------------------------------------------------
/nextjs-intro/pages/api/hello.js:
--------------------------------------------------------------------------------
1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2 |
3 | export default function handler(req, res) {
4 | res.status(200).json({ name: 'John Doe' })
5 | }
6 |
--------------------------------------------------------------------------------
/nextjs-intro/pages/courses/web-development.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | function web () {
4 | return web-development ;
5 | }
6 |
7 | export default web;
8 |
--------------------------------------------------------------------------------
/nextjs-intro/pages/index.js:
--------------------------------------------------------------------------------
1 | import styles from '../styles/Home.module.css';
2 | import Link from 'next/link';
3 | import Head from 'next/head';
4 | import Image from 'next/image';
5 | import nature from '../public/nature.jpg';
6 |
7 | export default function Home () {
8 | return (
9 |
10 |
11 |
Home
12 |
13 |
14 | Hello Nextjs
15 |
16 | Login
17 |
18 |
19 |
26 |
27 |
28 | );
29 | }
30 |
--------------------------------------------------------------------------------
/nextjs-intro/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/nextjs-intro/public/favicon.ico
--------------------------------------------------------------------------------
/nextjs-intro/public/nature.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/nextjs-intro/public/nature.jpg
--------------------------------------------------------------------------------
/nextjs-intro/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/nextjs-intro/styles/Home.module.css:
--------------------------------------------------------------------------------
1 | .container {
2 | padding: 0 2rem;
3 | }
4 |
5 | .main {
6 | min-height: 100vh;
7 | padding: 4rem 0;
8 | flex: 1;
9 | display: flex;
10 | flex-direction: column;
11 | justify-content: center;
12 | align-items: center;
13 | }
14 |
15 | .heading1{
16 | color:blue;
17 | }
18 |
19 | .footer {
20 | display: flex;
21 | flex: 1;
22 | padding: 2rem 0;
23 | border-top: 1px solid #eaeaea;
24 | justify-content: center;
25 | align-items: center;
26 | }
27 |
28 | .footer a {
29 | display: flex;
30 | justify-content: center;
31 | align-items: center;
32 | flex-grow: 1;
33 | }
34 |
35 | .title a {
36 | color: #0070f3;
37 | text-decoration: none;
38 | }
39 |
40 | .title a:hover,
41 | .title a:focus,
42 | .title a:active {
43 | text-decoration: underline;
44 | }
45 |
46 | .title {
47 | margin: 0;
48 | line-height: 1.15;
49 | font-size: 4rem;
50 | }
51 |
52 | .title,
53 | .description {
54 | text-align: center;
55 | }
56 |
57 | .description {
58 | margin: 4rem 0;
59 | line-height: 1.5;
60 | font-size: 1.5rem;
61 | }
62 |
63 | .code {
64 | background: #fafafa;
65 | border-radius: 5px;
66 | padding: 0.75rem;
67 | font-size: 1.1rem;
68 | font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
69 | Bitstream Vera Sans Mono, Courier New, monospace;
70 | }
71 |
72 | .grid {
73 | display: flex;
74 | align-items: center;
75 | justify-content: center;
76 | flex-wrap: wrap;
77 | max-width: 800px;
78 | }
79 |
80 | .card {
81 | margin: 1rem;
82 | padding: 1.5rem;
83 | text-align: left;
84 | color: inherit;
85 | text-decoration: none;
86 | border: 1px solid #eaeaea;
87 | border-radius: 10px;
88 | transition: color 0.15s ease, border-color 0.15s ease;
89 | max-width: 300px;
90 | }
91 |
92 | .card:hover,
93 | .card:focus,
94 | .card:active {
95 | color: #0070f3;
96 | border-color: #0070f3;
97 | }
98 |
99 | .card h2 {
100 | margin: 0 0 1rem 0;
101 | font-size: 1.5rem;
102 | }
103 |
104 | .card p {
105 | margin: 0;
106 | font-size: 1.25rem;
107 | line-height: 1.5;
108 | }
109 |
110 | .logo {
111 | height: 1em;
112 | margin-left: 0.5rem;
113 | }
114 |
115 | @media (max-width: 600px) {
116 | .grid {
117 | width: 100%;
118 | flex-direction: column;
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/nextjs-intro/styles/Login.module.css:
--------------------------------------------------------------------------------
1 | .heading1{
2 | color: red;
3 | }
--------------------------------------------------------------------------------
/nextjs-intro/styles/globals.css:
--------------------------------------------------------------------------------
1 | html,
2 | body {
3 | padding: 0;
4 | margin: 0;
5 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
6 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
7 | }
8 |
9 | a {
10 | color: inherit;
11 | text-decoration: none;
12 | }
13 |
14 | * {
15 | box-sizing: border-box;
16 | }
17 |
--------------------------------------------------------------------------------
/test1:
--------------------------------------------------------------------------------
1 | Hello this is my first file creating in branch as contributor and
2 | commiting diretly to branch.
3 |
--------------------------------------------------------------------------------
/todo-app/.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 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/todo-app/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Create React App
2 |
3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4 |
5 | ## Available Scripts
6 |
7 | In the project directory, you can run:
8 |
9 | ### `npm start`
10 |
11 | Runs the app in the development mode.\
12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
13 |
14 | The page will reload when you make changes.\
15 | You may also see any lint errors in the console.
16 |
17 | ### `npm test`
18 |
19 | Launches the test runner in the interactive watch mode.\
20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21 |
22 | ### `npm run build`
23 |
24 | Builds the app for production to the `build` folder.\
25 | It correctly bundles React in production mode and optimizes the build for the best performance.
26 |
27 | The build is minified and the filenames include the hashes.\
28 | Your app is ready to be deployed!
29 |
30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31 |
32 | ### `npm run eject`
33 |
34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!**
35 |
36 | 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.
37 |
38 | 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.
39 |
40 | 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.
41 |
42 | ## Learn More
43 |
44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45 |
46 | To learn React, check out the [React documentation](https://reactjs.org/).
47 |
48 | ### Code Splitting
49 |
50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51 |
52 | ### Analyzing the Bundle Size
53 |
54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55 |
56 | ### Making a Progressive Web App
57 |
58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59 |
60 | ### Advanced Configuration
61 |
62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63 |
64 | ### Deployment
65 |
66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67 |
68 | ### `npm run build` fails to minify
69 |
70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
71 |
--------------------------------------------------------------------------------
/todo-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "to-do-app",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.16.4",
7 | "@testing-library/react": "^13.3.0",
8 | "@testing-library/user-event": "^13.5.0",
9 | "react": "^18.2.0",
10 | "react-dom": "^18.2.0",
11 | "react-icons": "^4.4.0",
12 | "react-scripts": "5.0.1",
13 | "web-vitals": "^2.1.4"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "eject": "react-scripts eject"
20 | },
21 | "eslintConfig": {
22 | "extends": [
23 | "react-app",
24 | "react-app/jest"
25 | ]
26 | },
27 | "browserslist": {
28 | "production": [
29 | ">0.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 |
--------------------------------------------------------------------------------
/todo-app/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/todo-app/public/favicon.ico
--------------------------------------------------------------------------------
/todo-app/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
27 | React App
28 |
29 |
30 | You need to enable JavaScript to run this app.
31 |
32 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/todo-app/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/todo-app/public/logo192.png
--------------------------------------------------------------------------------
/todo-app/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodersArts/Web-Development/70835b65d16f3a2ad8615550603508000282cfb1/todo-app/public/logo512.png
--------------------------------------------------------------------------------
/todo-app/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 |
--------------------------------------------------------------------------------
/todo-app/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/todo-app/src/App.css:
--------------------------------------------------------------------------------
1 | body{
2 | background-color: #1f1e1e;
3 | color:white;
4 | overflow: hidden;
5 | }
6 |
7 | h1{
8 | text-align: center;
9 | }
10 |
11 | .todo-wrapper{
12 | background: #353434;
13 | padding: 2%;
14 | width: fit-content;
15 | margin-left: auto;
16 | margin-right: auto;
17 | margin-top: 3%;
18 | max-height: 80vh;
19 | overflow-y: auto;
20 | box-shadow: 0px 5px 7px rgb(27, 27, 27);
21 |
22 | }
23 |
24 | .todo-input{
25 | display: flex;
26 | align-items: center;
27 | justify-content: center;
28 | border-bottom: 1px solid rgb(78, 78, 78);
29 | padding-bottom: 25px;
30 | margin-bottom: 25px;
31 | }
32 |
33 | .todo-input-item{
34 | display: flex;
35 | flex-direction: column;
36 | align-items: flex-start;
37 | margin-right: 25px;
38 | }
39 |
40 | .todo-input-item label{
41 | font-weight: bold;
42 | margin-bottom: 10px;
43 | }
44 |
45 | .todo-input-item input{
46 | padding: 8px;
47 | border: none;
48 | width: 250px;
49 | }
50 |
51 | .todo-input-item input:focus{
52 | outline: 2px solid rgb(0,230,122);
53 | }
54 |
55 | .primaryBtn{
56 | background-color: rgb(0,230,122);
57 | color: white;
58 | border:none;
59 | border-radius: 0px;
60 | margin-top: 25px;
61 | padding: 10px;
62 | width: 60px;
63 | cursor: pointer;
64 | }
65 |
66 | .primaryBtn:hover{
67 | background-color: rgb(4, 196, 106);
68 | }
69 |
70 |
71 | .secondaryBtn{
72 | background-color: rgb(71, 71, 71);
73 | color: white;
74 | border:none;
75 | border-radius: 0px;
76 | margin-top: 25px;
77 | padding: 10px;
78 | width: fit-content;
79 | cursor: pointer;
80 |
81 | }
82 |
83 | .active{
84 | background-color: rgb(0,230,122);
85 | }
86 |
87 | .todo-list{
88 | display: flex;
89 | flex-direction: column;
90 |
91 | }
92 |
93 | .btn-area{
94 | margin-bottom: 15px;
95 | }
96 |
97 | .todo-list-item{
98 | background-color: #414040;
99 | display: flex;
100 | justify-content: space-between;
101 | align-items: center;
102 | padding: 25px;
103 | padding-bottom: 10px;
104 | padding-top: 10px;
105 | margin-bottom: 10px;
106 | box-shadow: 0px 3px 5px rgb(43, 42, 42);
107 | }
108 |
109 | .todo-list-item h3{
110 | font-size: 25px;
111 | color: rgb(0,230,122);
112 | font-weight: bold;
113 | margin: 0;
114 | }
115 |
116 | .todo-list-item p{
117 | font-size: 14px;
118 | color: rgb(161, 161, 161);
119 | margin-top: 8px;
120 | }
121 |
122 | .icon{
123 | font-size: 35px;
124 | cursor: pointer;
125 | }
126 |
127 | .icon:hover{
128 | color: red;
129 | }
130 |
131 | .check-icon{
132 | font-size: 25px;
133 | margin-left: 10px;
134 | color:rgb(0,230,122);
135 | cursor: pointer;
136 | }
137 |
138 | .check-icon:hover{
139 | color: rgb(4, 196, 106);
140 | }
141 |
142 | .edit__wrapper{
143 | background-color: #414040;
144 | padding: 10px;
145 | display: flex;
146 | flex-direction: column;
147 | }
148 |
149 | .edit__wrapper input,.edit__wrapper textarea{
150 | border: 1px solid lightgray;
151 | padding: 10px;
152 | margin: 5px;
153 | border-radius: 3px;
154 | }
155 |
156 | .edit__wrapper .primaryBtn{
157 | margin-left: auto;
158 | margin-right: auto;
159 | padding: 10px;
160 | font-size: 16px;
161 | width:fit-content;
162 | }
--------------------------------------------------------------------------------
/todo-app/src/App.js:
--------------------------------------------------------------------------------
1 | import React, {useState, useEffect} from 'react';
2 | import './App.css';
3 | import {AiOutlineDelete, AiOutlineEdit} from 'react-icons/ai';
4 | import {BsCheckLg} from 'react-icons/bs';
5 |
6 | function App () {
7 | const [isCompleteScreen, setIsCompleteScreen] = useState (false);
8 | const [allTodos, setTodos] = useState ([]);
9 | const [newTitle, setNewTitle] = useState ('');
10 | const [newDescription, setNewDescription] = useState ('');
11 | const [completedTodos, setCompletedTodos] = useState ([]);
12 | const [currentEdit,setCurrentEdit] = useState("");
13 | const [currentEditedItem,setCurrentEditedItem] = useState("");
14 |
15 | const handleAddTodo = () => {
16 | let newTodoItem = {
17 | title: newTitle,
18 | description: newDescription,
19 | };
20 |
21 | let updatedTodoArr = [...allTodos];
22 | updatedTodoArr.push (newTodoItem);
23 | setTodos (updatedTodoArr);
24 | localStorage.setItem ('todolist', JSON.stringify (updatedTodoArr));
25 | };
26 |
27 | const handleDeleteTodo = index => {
28 | let reducedTodo = [...allTodos];
29 | reducedTodo.splice (index);
30 |
31 | localStorage.setItem ('todolist', JSON.stringify (reducedTodo));
32 | setTodos (reducedTodo);
33 | };
34 |
35 | const handleComplete = index => {
36 | let now = new Date ();
37 | let dd = now.getDate ();
38 | let mm = now.getMonth () + 1;
39 | let yyyy = now.getFullYear ();
40 | let h = now.getHours ();
41 | let m = now.getMinutes ();
42 | let s = now.getSeconds ();
43 | let completedOn =
44 | dd + '-' + mm + '-' + yyyy + ' at ' + h + ':' + m + ':' + s;
45 |
46 | let filteredItem = {
47 | ...allTodos[index],
48 | completedOn: completedOn,
49 | };
50 |
51 | let updatedCompletedArr = [...completedTodos];
52 | updatedCompletedArr.push (filteredItem);
53 | setCompletedTodos (updatedCompletedArr);
54 | handleDeleteTodo (index);
55 | localStorage.setItem (
56 | 'completedTodos',
57 | JSON.stringify (updatedCompletedArr)
58 | );
59 | };
60 |
61 | const handleDeleteCompletedTodo = index => {
62 | let reducedTodo = [...completedTodos];
63 | reducedTodo.splice (index);
64 |
65 | localStorage.setItem ('completedTodos', JSON.stringify (reducedTodo));
66 | setCompletedTodos (reducedTodo);
67 | };
68 |
69 | useEffect (() => {
70 | let savedTodo = JSON.parse (localStorage.getItem ('todolist'));
71 | let savedCompletedTodo = JSON.parse (
72 | localStorage.getItem ('completedTodos')
73 | );
74 | if (savedTodo) {
75 | setTodos (savedTodo);
76 | }
77 |
78 | if (savedCompletedTodo) {
79 | setCompletedTodos (savedCompletedTodo);
80 | }
81 | }, []);
82 |
83 |
84 | const handleEdit = (ind,item)=>{
85 | console.log(ind);
86 | setCurrentEdit(ind);
87 | setCurrentEditedItem(item);
88 | }
89 |
90 | const handleUpdateTitle = (value)=>{
91 | setCurrentEditedItem((prev)=>{
92 | return {...prev,title:value}
93 | })
94 | }
95 |
96 | const handleUpdateDescription = (value)=>{
97 | setCurrentEditedItem((prev)=>{
98 | return {...prev,description:value}
99 | })
100 | }
101 |
102 | const handleUpdateToDo = ()=>{
103 | let newToDo = [...allTodos];
104 | newToDo[currentEdit] = currentEditedItem;
105 | setTodos(newToDo);
106 | setCurrentEdit("");
107 | }
108 |
109 |
110 |
111 | return (
112 |
113 |
My Todos
114 |
115 |
116 |
117 |
118 | Title
119 | setNewTitle (e.target.value)}
123 | placeholder="What's the task title?"
124 | />
125 |
126 |
127 | Description
128 | setNewDescription (e.target.value)}
132 | placeholder="What's the task description?"
133 | />
134 |
135 |
136 |
141 | Add
142 |
143 |
144 |
145 |
146 |
147 | setIsCompleteScreen (false)}
150 | >
151 | Todo
152 |
153 | setIsCompleteScreen (true)}
156 | >
157 | Completed
158 |
159 |
160 |
161 |
162 |
163 | {isCompleteScreen === false &&
164 | allTodos.map ((item, index) => {
165 | if(currentEdit===index){
166 | return(
167 |
168 | handleUpdateTitle(e.target.value)}
170 | value={currentEditedItem.title} />
171 | handleUpdateDescription(e.target.value)}
174 | value={currentEditedItem.description} />
175 |
180 | Update
181 |
182 |
183 | )
184 | }else{
185 | return (
186 |
187 |
188 |
{item.title}
189 |
{item.description}
190 |
191 |
192 |
193 |
handleDeleteTodo (index)}
196 | title="Delete?"
197 | />
198 | handleComplete (index)}
201 | title="Complete?"
202 | />
203 | handleEdit (index,item)}
205 | title="Edit?" />
206 |
207 |
208 |
209 | );
210 | }
211 |
212 | })}
213 |
214 | {isCompleteScreen === true &&
215 | completedTodos.map ((item, index) => {
216 | return (
217 |
218 |
219 |
{item.title}
220 |
{item.description}
221 |
Completed on: {item.completedOn}
222 |
223 |
224 |
225 |
handleDeleteCompletedTodo (index)}
228 | title="Delete?"
229 | />
230 |
231 |
232 |
233 | );
234 | })}
235 |
236 |
237 |
238 |
239 | );
240 | }
241 |
242 | export default App;
243 |
--------------------------------------------------------------------------------
/todo-app/src/App.test.js:
--------------------------------------------------------------------------------
1 | import { render, screen } from '@testing-library/react';
2 | import App from './App';
3 |
4 | test('renders learn react link', () => {
5 | render( );
6 | const linkElement = screen.getByText(/learn react/i);
7 | expect(linkElement).toBeInTheDocument();
8 | });
9 |
--------------------------------------------------------------------------------
/todo-app/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/todo-app/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import './index.css';
4 | import App from './App';
5 | import reportWebVitals from './reportWebVitals';
6 |
7 | const root = ReactDOM.createRoot(document.getElementById('root'));
8 | root.render(
9 |
10 |
11 |
12 | );
13 |
14 | // If you want to start measuring performance in your app, pass a function
15 | // to log results (for example: reportWebVitals(console.log))
16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17 | reportWebVitals();
18 |
--------------------------------------------------------------------------------
/todo-app/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/todo-app/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';
6 |
--------------------------------------------------------------------------------