├── essablog
├── README.md
├── jsconfig.json
├── next.config.js
├── package-lock.json
├── package.json
├── pages
│ ├── [id].js
│ ├── _app.js
│ ├── _document.js
│ ├── aboutme.js
│ ├── api
│ │ └── hello.js
│ ├── index.js
│ ├── muhammed.js
│ ├── posts
│ │ ├── [postid].js
│ │ └── index.js
│ ├── services
│ │ ├── [cars]
│ │ │ └── [carid].js
│ │ └── index.js
│ └── users.js
├── public
│ ├── favicon.ico
│ ├── next.svg
│ ├── thirteen.svg
│ └── vercel.svg
└── styles
│ ├── Home.module.css
│ └── globals.css
├── myapi
├── README.md
├── jsconfig.json
├── next.config.js
├── package-lock.json
├── package.json
├── pages
│ ├── _app.js
│ ├── _document.js
│ ├── api
│ │ └── hello.js
│ ├── index.js
│ └── posts
│ │ ├── [id].js
│ │ └── index.js
├── public
│ ├── favicon.ico
│ ├── next.svg
│ ├── thirteen.svg
│ └── vercel.svg
└── styles
│ ├── Home.module.css
│ └── globals.css
├── mycrud
├── README.md
├── components
│ ├── Footer.js
│ ├── Header.js
│ ├── MainLayout.js
│ └── PostItem.js
├── jsconfig.json
├── models
│ └── Post.js
├── next.config.js
├── package-lock.json
├── package.json
├── pages
│ ├── 404.js
│ ├── _app.js
│ ├── _document.js
│ ├── api
│ │ ├── hello.js
│ │ └── posts
│ │ │ ├── [id].js
│ │ │ └── index.js
│ ├── index.js
│ └── posts
│ │ ├── [id].js
│ │ ├── addpost.js
│ │ └── index.js
├── public
│ ├── favicon.ico
│ ├── myimage.png
│ ├── next.svg
│ ├── thirteen.svg
│ └── vercel.svg
├── styles
│ ├── Home.module.css
│ └── globals.css
└── utils
│ ├── config.js
│ └── connectDB.js
├── mylayout
├── README.md
├── components
│ ├── Footer.js
│ ├── Header.js
│ └── mainLayout.js
├── jsconfig.json
├── next.config.js
├── package-lock.json
├── package.json
├── pages
│ ├── _app.js
│ ├── _document.js
│ ├── api
│ │ └── hello.js
│ ├── contactus.js
│ ├── index.js
│ └── users.js
├── public
│ ├── favicon.ico
│ ├── next.svg
│ ├── thirteen.svg
│ └── vercel.svg
└── styles
│ ├── Home.module.css
│ ├── Index.module.css
│ └── globals.css
└── mymongodata
├── README.md
├── jsconfig.json
├── models
└── Post.js
├── next.config.js
├── package-lock.json
├── package.json
├── pages
├── _app.js
├── _document.js
├── api
│ ├── hello.js
│ └── posts
│ │ ├── [id].js
│ │ └── index.js
└── index.js
├── public
├── favicon.ico
├── next.svg
├── thirteen.svg
└── vercel.svg
├── styles
├── Home.module.css
└── globals.css
└── utils
└── dbConnect.js
/essablog/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 | # or
12 | pnpm dev
13 | ```
14 |
15 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
16 |
17 | You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
18 |
19 | [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`.
20 |
21 | 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.
22 |
23 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
24 |
25 | ## Learn More
26 |
27 | To learn more about Next.js, take a look at the following resources:
28 |
29 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
30 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
31 |
32 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
33 |
34 | ## Deploy on Vercel
35 |
36 | 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.
37 |
38 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
39 |
--------------------------------------------------------------------------------
/essablog/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "paths": {
4 | "@/*": ["./*"]
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/essablog/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | reactStrictMode: true,
4 | }
5 |
6 | module.exports = nextConfig
7 |
--------------------------------------------------------------------------------
/essablog/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "essablog",
3 | "version": "0.1.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "essablog",
9 | "version": "0.1.0",
10 | "dependencies": {
11 | "next": "13.2.4",
12 | "react": "18.2.0",
13 | "react-dom": "18.2.0"
14 | }
15 | },
16 | "node_modules/@next/env": {
17 | "version": "13.2.4",
18 | "resolved": "https://registry.npmjs.org/@next/env/-/env-13.2.4.tgz",
19 | "integrity": "sha512-+Mq3TtpkeeKFZanPturjcXt+KHfKYnLlX6jMLyCrmpq6OOs4i1GqBOAauSkii9QeKCMTYzGppar21JU57b/GEA=="
20 | },
21 | "node_modules/@next/swc-android-arm-eabi": {
22 | "version": "13.2.4",
23 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.4.tgz",
24 | "integrity": "sha512-DWlalTSkLjDU11MY11jg17O1gGQzpRccM9Oes2yTqj2DpHndajrXHGxj9HGtJ+idq2k7ImUdJVWS2h2l/EDJOw==",
25 | "cpu": [
26 | "arm"
27 | ],
28 | "optional": true,
29 | "os": [
30 | "android"
31 | ],
32 | "engines": {
33 | "node": ">= 10"
34 | }
35 | },
36 | "node_modules/@next/swc-android-arm64": {
37 | "version": "13.2.4",
38 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.2.4.tgz",
39 | "integrity": "sha512-sRavmUImUCf332Gy+PjIfLkMhiRX1Ez4SI+3vFDRs1N5eXp+uNzjFUK/oLMMOzk6KFSkbiK/3Wt8+dHQR/flNg==",
40 | "cpu": [
41 | "arm64"
42 | ],
43 | "optional": true,
44 | "os": [
45 | "android"
46 | ],
47 | "engines": {
48 | "node": ">= 10"
49 | }
50 | },
51 | "node_modules/@next/swc-darwin-arm64": {
52 | "version": "13.2.4",
53 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.4.tgz",
54 | "integrity": "sha512-S6vBl+OrInP47TM3LlYx65betocKUUlTZDDKzTiRDbsRESeyIkBtZ6Qi5uT2zQs4imqllJznVjFd1bXLx3Aa6A==",
55 | "cpu": [
56 | "arm64"
57 | ],
58 | "optional": true,
59 | "os": [
60 | "darwin"
61 | ],
62 | "engines": {
63 | "node": ">= 10"
64 | }
65 | },
66 | "node_modules/@next/swc-darwin-x64": {
67 | "version": "13.2.4",
68 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.4.tgz",
69 | "integrity": "sha512-a6LBuoYGcFOPGd4o8TPo7wmv5FnMr+Prz+vYHopEDuhDoMSHOnC+v+Ab4D7F0NMZkvQjEJQdJS3rqgFhlZmKlw==",
70 | "cpu": [
71 | "x64"
72 | ],
73 | "optional": true,
74 | "os": [
75 | "darwin"
76 | ],
77 | "engines": {
78 | "node": ">= 10"
79 | }
80 | },
81 | "node_modules/@next/swc-freebsd-x64": {
82 | "version": "13.2.4",
83 | "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.4.tgz",
84 | "integrity": "sha512-kkbzKVZGPaXRBPisoAQkh3xh22r+TD+5HwoC5bOkALraJ0dsOQgSMAvzMXKsN3tMzJUPS0tjtRf1cTzrQ0I5vQ==",
85 | "cpu": [
86 | "x64"
87 | ],
88 | "optional": true,
89 | "os": [
90 | "freebsd"
91 | ],
92 | "engines": {
93 | "node": ">= 10"
94 | }
95 | },
96 | "node_modules/@next/swc-linux-arm-gnueabihf": {
97 | "version": "13.2.4",
98 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.4.tgz",
99 | "integrity": "sha512-7qA1++UY0fjprqtjBZaOA6cas/7GekpjVsZn/0uHvquuITFCdKGFCsKNBx3S0Rpxmx6WYo0GcmhNRM9ru08BGg==",
100 | "cpu": [
101 | "arm"
102 | ],
103 | "optional": true,
104 | "os": [
105 | "linux"
106 | ],
107 | "engines": {
108 | "node": ">= 10"
109 | }
110 | },
111 | "node_modules/@next/swc-linux-arm64-gnu": {
112 | "version": "13.2.4",
113 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.4.tgz",
114 | "integrity": "sha512-xzYZdAeq883MwXgcwc72hqo/F/dwUxCukpDOkx/j1HTq/J0wJthMGjinN9wH5bPR98Mfeh1MZJ91WWPnZOedOg==",
115 | "cpu": [
116 | "arm64"
117 | ],
118 | "optional": true,
119 | "os": [
120 | "linux"
121 | ],
122 | "engines": {
123 | "node": ">= 10"
124 | }
125 | },
126 | "node_modules/@next/swc-linux-arm64-musl": {
127 | "version": "13.2.4",
128 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.4.tgz",
129 | "integrity": "sha512-8rXr3WfmqSiYkb71qzuDP6I6R2T2tpkmf83elDN8z783N9nvTJf2E7eLx86wu2OJCi4T05nuxCsh4IOU3LQ5xw==",
130 | "cpu": [
131 | "arm64"
132 | ],
133 | "optional": true,
134 | "os": [
135 | "linux"
136 | ],
137 | "engines": {
138 | "node": ">= 10"
139 | }
140 | },
141 | "node_modules/@next/swc-linux-x64-gnu": {
142 | "version": "13.2.4",
143 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.4.tgz",
144 | "integrity": "sha512-Ngxh51zGSlYJ4EfpKG4LI6WfquulNdtmHg1yuOYlaAr33KyPJp4HeN/tivBnAHcZkoNy0hh/SbwDyCnz5PFJQQ==",
145 | "cpu": [
146 | "x64"
147 | ],
148 | "optional": true,
149 | "os": [
150 | "linux"
151 | ],
152 | "engines": {
153 | "node": ">= 10"
154 | }
155 | },
156 | "node_modules/@next/swc-linux-x64-musl": {
157 | "version": "13.2.4",
158 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.4.tgz",
159 | "integrity": "sha512-gOvwIYoSxd+j14LOcvJr+ekd9fwYT1RyMAHOp7znA10+l40wkFiMONPLWiZuHxfRk+Dy7YdNdDh3ImumvL6VwA==",
160 | "cpu": [
161 | "x64"
162 | ],
163 | "optional": true,
164 | "os": [
165 | "linux"
166 | ],
167 | "engines": {
168 | "node": ">= 10"
169 | }
170 | },
171 | "node_modules/@next/swc-win32-arm64-msvc": {
172 | "version": "13.2.4",
173 | "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.4.tgz",
174 | "integrity": "sha512-q3NJzcfClgBm4HvdcnoEncmztxrA5GXqKeiZ/hADvC56pwNALt3ngDC6t6qr1YW9V/EPDxCYeaX4zYxHciW4Dw==",
175 | "cpu": [
176 | "arm64"
177 | ],
178 | "optional": true,
179 | "os": [
180 | "win32"
181 | ],
182 | "engines": {
183 | "node": ">= 10"
184 | }
185 | },
186 | "node_modules/@next/swc-win32-ia32-msvc": {
187 | "version": "13.2.4",
188 | "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.4.tgz",
189 | "integrity": "sha512-/eZ5ncmHUYtD2fc6EUmAIZlAJnVT2YmxDsKs1Ourx0ttTtvtma/WKlMV5NoUsyOez0f9ExLyOpeCoz5aj+MPXw==",
190 | "cpu": [
191 | "ia32"
192 | ],
193 | "optional": true,
194 | "os": [
195 | "win32"
196 | ],
197 | "engines": {
198 | "node": ">= 10"
199 | }
200 | },
201 | "node_modules/@next/swc-win32-x64-msvc": {
202 | "version": "13.2.4",
203 | "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.4.tgz",
204 | "integrity": "sha512-0MffFmyv7tBLlji01qc0IaPP/LVExzvj7/R5x1Jph1bTAIj4Vu81yFQWHHQAP6r4ff9Ukj1mBK6MDNVXm7Tcvw==",
205 | "cpu": [
206 | "x64"
207 | ],
208 | "optional": true,
209 | "os": [
210 | "win32"
211 | ],
212 | "engines": {
213 | "node": ">= 10"
214 | }
215 | },
216 | "node_modules/@swc/helpers": {
217 | "version": "0.4.14",
218 | "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz",
219 | "integrity": "sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==",
220 | "dependencies": {
221 | "tslib": "^2.4.0"
222 | }
223 | },
224 | "node_modules/caniuse-lite": {
225 | "version": "1.0.30001468",
226 | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001468.tgz",
227 | "integrity": "sha512-zgAo8D5kbOyUcRAgSmgyuvBkjrGk5CGYG5TYgFdpQv+ywcyEpo1LOWoG8YmoflGnh+V+UsNuKYedsoYs0hzV5A==",
228 | "funding": [
229 | {
230 | "type": "opencollective",
231 | "url": "https://opencollective.com/browserslist"
232 | },
233 | {
234 | "type": "tidelift",
235 | "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
236 | }
237 | ]
238 | },
239 | "node_modules/client-only": {
240 | "version": "0.0.1",
241 | "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
242 | "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
243 | },
244 | "node_modules/js-tokens": {
245 | "version": "4.0.0",
246 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
247 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
248 | },
249 | "node_modules/loose-envify": {
250 | "version": "1.4.0",
251 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
252 | "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
253 | "dependencies": {
254 | "js-tokens": "^3.0.0 || ^4.0.0"
255 | },
256 | "bin": {
257 | "loose-envify": "cli.js"
258 | }
259 | },
260 | "node_modules/nanoid": {
261 | "version": "3.3.4",
262 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
263 | "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
264 | "bin": {
265 | "nanoid": "bin/nanoid.cjs"
266 | },
267 | "engines": {
268 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
269 | }
270 | },
271 | "node_modules/next": {
272 | "version": "13.2.4",
273 | "resolved": "https://registry.npmjs.org/next/-/next-13.2.4.tgz",
274 | "integrity": "sha512-g1I30317cThkEpvzfXujf0O4wtaQHtDCLhlivwlTJ885Ld+eOgcz7r3TGQzeU+cSRoNHtD8tsJgzxVdYojFssw==",
275 | "dependencies": {
276 | "@next/env": "13.2.4",
277 | "@swc/helpers": "0.4.14",
278 | "caniuse-lite": "^1.0.30001406",
279 | "postcss": "8.4.14",
280 | "styled-jsx": "5.1.1"
281 | },
282 | "bin": {
283 | "next": "dist/bin/next"
284 | },
285 | "engines": {
286 | "node": ">=14.6.0"
287 | },
288 | "optionalDependencies": {
289 | "@next/swc-android-arm-eabi": "13.2.4",
290 | "@next/swc-android-arm64": "13.2.4",
291 | "@next/swc-darwin-arm64": "13.2.4",
292 | "@next/swc-darwin-x64": "13.2.4",
293 | "@next/swc-freebsd-x64": "13.2.4",
294 | "@next/swc-linux-arm-gnueabihf": "13.2.4",
295 | "@next/swc-linux-arm64-gnu": "13.2.4",
296 | "@next/swc-linux-arm64-musl": "13.2.4",
297 | "@next/swc-linux-x64-gnu": "13.2.4",
298 | "@next/swc-linux-x64-musl": "13.2.4",
299 | "@next/swc-win32-arm64-msvc": "13.2.4",
300 | "@next/swc-win32-ia32-msvc": "13.2.4",
301 | "@next/swc-win32-x64-msvc": "13.2.4"
302 | },
303 | "peerDependencies": {
304 | "@opentelemetry/api": "^1.4.0",
305 | "fibers": ">= 3.1.0",
306 | "node-sass": "^6.0.0 || ^7.0.0",
307 | "react": "^18.2.0",
308 | "react-dom": "^18.2.0",
309 | "sass": "^1.3.0"
310 | },
311 | "peerDependenciesMeta": {
312 | "@opentelemetry/api": {
313 | "optional": true
314 | },
315 | "fibers": {
316 | "optional": true
317 | },
318 | "node-sass": {
319 | "optional": true
320 | },
321 | "sass": {
322 | "optional": true
323 | }
324 | }
325 | },
326 | "node_modules/picocolors": {
327 | "version": "1.0.0",
328 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
329 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
330 | },
331 | "node_modules/postcss": {
332 | "version": "8.4.14",
333 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
334 | "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
335 | "funding": [
336 | {
337 | "type": "opencollective",
338 | "url": "https://opencollective.com/postcss/"
339 | },
340 | {
341 | "type": "tidelift",
342 | "url": "https://tidelift.com/funding/github/npm/postcss"
343 | }
344 | ],
345 | "dependencies": {
346 | "nanoid": "^3.3.4",
347 | "picocolors": "^1.0.0",
348 | "source-map-js": "^1.0.2"
349 | },
350 | "engines": {
351 | "node": "^10 || ^12 || >=14"
352 | }
353 | },
354 | "node_modules/react": {
355 | "version": "18.2.0",
356 | "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
357 | "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
358 | "dependencies": {
359 | "loose-envify": "^1.1.0"
360 | },
361 | "engines": {
362 | "node": ">=0.10.0"
363 | }
364 | },
365 | "node_modules/react-dom": {
366 | "version": "18.2.0",
367 | "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
368 | "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
369 | "dependencies": {
370 | "loose-envify": "^1.1.0",
371 | "scheduler": "^0.23.0"
372 | },
373 | "peerDependencies": {
374 | "react": "^18.2.0"
375 | }
376 | },
377 | "node_modules/scheduler": {
378 | "version": "0.23.0",
379 | "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
380 | "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
381 | "dependencies": {
382 | "loose-envify": "^1.1.0"
383 | }
384 | },
385 | "node_modules/source-map-js": {
386 | "version": "1.0.2",
387 | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
388 | "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
389 | "engines": {
390 | "node": ">=0.10.0"
391 | }
392 | },
393 | "node_modules/styled-jsx": {
394 | "version": "5.1.1",
395 | "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
396 | "integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==",
397 | "dependencies": {
398 | "client-only": "0.0.1"
399 | },
400 | "engines": {
401 | "node": ">= 12.0.0"
402 | },
403 | "peerDependencies": {
404 | "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0"
405 | },
406 | "peerDependenciesMeta": {
407 | "@babel/core": {
408 | "optional": true
409 | },
410 | "babel-plugin-macros": {
411 | "optional": true
412 | }
413 | }
414 | },
415 | "node_modules/tslib": {
416 | "version": "2.5.0",
417 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
418 | "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
419 | }
420 | }
421 | }
422 |
--------------------------------------------------------------------------------
/essablog/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "essablog",
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": "13.2.4",
13 | "react": "18.2.0",
14 | "react-dom": "18.2.0"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/essablog/pages/[id].js:
--------------------------------------------------------------------------------
1 | import { useRouter } from 'next/router'
2 |
3 |
4 | export default function myID() {
5 |
6 | const router = useRouter()
7 |
8 | return(
9 | <>
10 |
ID page {router.query.id}
11 | >
12 | )
13 |
14 | }
--------------------------------------------------------------------------------
/essablog/pages/_app.js:
--------------------------------------------------------------------------------
1 | import '@/styles/globals.css'
2 |
3 | export default function App({ Component, pageProps }) {
4 | return
5 | }
6 |
--------------------------------------------------------------------------------
/essablog/pages/_document.js:
--------------------------------------------------------------------------------
1 | import { Html, Head, Main, NextScript } from 'next/document'
2 |
3 | export default function Document() {
4 | return (
5 |
6 |
8 |
9 |
10 |
11 |
12 | )
13 | }
14 |
--------------------------------------------------------------------------------
/essablog/pages/aboutme.js:
--------------------------------------------------------------------------------
1 | export default function aboutMe() {
2 |
3 | return(
4 | <>
5 | About me page
6 | >
7 | )
8 |
9 | }
--------------------------------------------------------------------------------
/essablog/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 |
--------------------------------------------------------------------------------
/essablog/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 | import { useRouter } from 'next/router'
3 |
4 | export default function Home() {
5 |
6 | const router = useRouter()
7 | const studentname = 'muhammedhameed'
8 | const studentNo = '234234234'
9 |
10 | return (
11 | <>
12 | Hello Muhammed Essa
13 |
14 |
15 | muhammed
16 | about me
17 | Users
18 |
19 |
20 |
21 | >
22 |
23 |
24 | )
25 | }
26 |
--------------------------------------------------------------------------------
/essablog/pages/muhammed.js:
--------------------------------------------------------------------------------
1 | export default function Hameed() {
2 | return (
3 | <>
4 | Muhammed Page
5 | >
6 | )
7 | }
--------------------------------------------------------------------------------
/essablog/pages/posts/[postid].js:
--------------------------------------------------------------------------------
1 | import { useRouter } from 'next/router'
2 |
3 | export default function postID() {
4 | const router = useRouter()
5 | return(
6 | <>
7 | Post number : {router.query.postid}
8 | >
9 | )
10 |
11 | }
--------------------------------------------------------------------------------
/essablog/pages/posts/index.js:
--------------------------------------------------------------------------------
1 | export default function index() {
2 |
3 | return(
4 | <>
5 | Posts page
6 | >
7 | )
8 |
9 | }
--------------------------------------------------------------------------------
/essablog/pages/services/[cars]/[carid].js:
--------------------------------------------------------------------------------
1 | import { useRouter } from 'next/router'
2 |
3 | export default function carid() {
4 | const router = useRouter()
5 | return(
6 | <>
7 | Car type : {router.query.cars}
8 | car number : {router.query.carid}
9 |
10 |
11 |
12 | >
13 | )
14 |
15 | }
--------------------------------------------------------------------------------
/essablog/pages/services/index.js:
--------------------------------------------------------------------------------
1 | export default function index() {
2 |
3 | return(
4 | <>
5 | Services page
6 | >
7 | )
8 |
9 | }
--------------------------------------------------------------------------------
/essablog/pages/users.js:
--------------------------------------------------------------------------------
1 | export default function users() {
2 |
3 | return(
4 | <>
5 | Users page
6 | >
7 | )
8 |
9 | }
--------------------------------------------------------------------------------
/essablog/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/next-js-tutorial/5513d2176b1f0741c3acd7fc655fd75f366e1b89/essablog/public/favicon.ico
--------------------------------------------------------------------------------
/essablog/public/next.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/essablog/public/thirteen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/essablog/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/essablog/styles/Home.module.css:
--------------------------------------------------------------------------------
1 | .main {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: space-between;
5 | align-items: center;
6 | padding: 6rem;
7 | min-height: 100vh;
8 | }
9 |
10 | .description {
11 | display: inherit;
12 | justify-content: inherit;
13 | align-items: inherit;
14 | font-size: 0.85rem;
15 | max-width: var(--max-width);
16 | width: 100%;
17 | z-index: 2;
18 | font-family: var(--font-mono);
19 | }
20 |
21 | .description a {
22 | display: flex;
23 | justify-content: center;
24 | align-items: center;
25 | gap: 0.5rem;
26 | }
27 |
28 | .description p {
29 | position: relative;
30 | margin: 0;
31 | padding: 1rem;
32 | background-color: rgba(var(--callout-rgb), 0.5);
33 | border: 1px solid rgba(var(--callout-border-rgb), 0.3);
34 | border-radius: var(--border-radius);
35 | }
36 |
37 | .code {
38 | font-weight: 700;
39 | font-family: var(--font-mono);
40 | }
41 |
42 | .grid {
43 | display: grid;
44 | grid-template-columns: repeat(4, minmax(25%, auto));
45 | width: var(--max-width);
46 | max-width: 100%;
47 | }
48 |
49 | .card {
50 | padding: 1rem 1.2rem;
51 | border-radius: var(--border-radius);
52 | background: rgba(var(--card-rgb), 0);
53 | border: 1px solid rgba(var(--card-border-rgb), 0);
54 | transition: background 200ms, border 200ms;
55 | }
56 |
57 | .card span {
58 | display: inline-block;
59 | transition: transform 200ms;
60 | }
61 |
62 | .card h2 {
63 | font-weight: 600;
64 | margin-bottom: 0.7rem;
65 | }
66 |
67 | .card p {
68 | margin: 0;
69 | opacity: 0.6;
70 | font-size: 0.9rem;
71 | line-height: 1.5;
72 | max-width: 30ch;
73 | }
74 |
75 | .center {
76 | display: flex;
77 | justify-content: center;
78 | align-items: center;
79 | position: relative;
80 | padding: 4rem 0;
81 | }
82 |
83 | .center::before {
84 | background: var(--secondary-glow);
85 | border-radius: 50%;
86 | width: 480px;
87 | height: 360px;
88 | margin-left: -400px;
89 | }
90 |
91 | .center::after {
92 | background: var(--primary-glow);
93 | width: 240px;
94 | height: 180px;
95 | z-index: -1;
96 | }
97 |
98 | .center::before,
99 | .center::after {
100 | content: '';
101 | left: 50%;
102 | position: absolute;
103 | filter: blur(45px);
104 | transform: translateZ(0);
105 | }
106 |
107 | .logo,
108 | .thirteen {
109 | position: relative;
110 | }
111 |
112 | .thirteen {
113 | display: flex;
114 | justify-content: center;
115 | align-items: center;
116 | width: 75px;
117 | height: 75px;
118 | padding: 25px 10px;
119 | margin-left: 16px;
120 | transform: translateZ(0);
121 | border-radius: var(--border-radius);
122 | overflow: hidden;
123 | box-shadow: 0px 2px 8px -1px #0000001a;
124 | }
125 |
126 | .thirteen::before,
127 | .thirteen::after {
128 | content: '';
129 | position: absolute;
130 | z-index: -1;
131 | }
132 |
133 | /* Conic Gradient Animation */
134 | .thirteen::before {
135 | animation: 6s rotate linear infinite;
136 | width: 200%;
137 | height: 200%;
138 | background: var(--tile-border);
139 | }
140 |
141 | /* Inner Square */
142 | .thirteen::after {
143 | inset: 0;
144 | padding: 1px;
145 | border-radius: var(--border-radius);
146 | background: linear-gradient(
147 | to bottom right,
148 | rgba(var(--tile-start-rgb), 1),
149 | rgba(var(--tile-end-rgb), 1)
150 | );
151 | background-clip: content-box;
152 | }
153 |
154 | /* Enable hover only on non-touch devices */
155 | @media (hover: hover) and (pointer: fine) {
156 | .card:hover {
157 | background: rgba(var(--card-rgb), 0.1);
158 | border: 1px solid rgba(var(--card-border-rgb), 0.15);
159 | }
160 |
161 | .card:hover span {
162 | transform: translateX(4px);
163 | }
164 | }
165 |
166 | @media (prefers-reduced-motion) {
167 | .thirteen::before {
168 | animation: none;
169 | }
170 |
171 | .card:hover span {
172 | transform: none;
173 | }
174 | }
175 |
176 | /* Mobile */
177 | @media (max-width: 700px) {
178 | .content {
179 | padding: 4rem;
180 | }
181 |
182 | .grid {
183 | grid-template-columns: 1fr;
184 | margin-bottom: 120px;
185 | max-width: 320px;
186 | text-align: center;
187 | }
188 |
189 | .card {
190 | padding: 1rem 2.5rem;
191 | }
192 |
193 | .card h2 {
194 | margin-bottom: 0.5rem;
195 | }
196 |
197 | .center {
198 | padding: 8rem 0 6rem;
199 | }
200 |
201 | .center::before {
202 | transform: none;
203 | height: 300px;
204 | }
205 |
206 | .description {
207 | font-size: 0.8rem;
208 | }
209 |
210 | .description a {
211 | padding: 1rem;
212 | }
213 |
214 | .description p,
215 | .description div {
216 | display: flex;
217 | justify-content: center;
218 | position: fixed;
219 | width: 100%;
220 | }
221 |
222 | .description p {
223 | align-items: center;
224 | inset: 0 0 auto;
225 | padding: 2rem 1rem 1.4rem;
226 | border-radius: 0;
227 | border: none;
228 | border-bottom: 1px solid rgba(var(--callout-border-rgb), 0.25);
229 | background: linear-gradient(
230 | to bottom,
231 | rgba(var(--background-start-rgb), 1),
232 | rgba(var(--callout-rgb), 0.5)
233 | );
234 | background-clip: padding-box;
235 | backdrop-filter: blur(24px);
236 | }
237 |
238 | .description div {
239 | align-items: flex-end;
240 | pointer-events: none;
241 | inset: auto 0 0;
242 | padding: 2rem;
243 | height: 200px;
244 | background: linear-gradient(
245 | to bottom,
246 | transparent 0%,
247 | rgb(var(--background-end-rgb)) 40%
248 | );
249 | z-index: 1;
250 | }
251 | }
252 |
253 | /* Tablet and Smaller Desktop */
254 | @media (min-width: 701px) and (max-width: 1120px) {
255 | .grid {
256 | grid-template-columns: repeat(2, 50%);
257 | }
258 | }
259 |
260 | @media (prefers-color-scheme: dark) {
261 | .vercelLogo {
262 | filter: invert(1);
263 | }
264 |
265 | .logo,
266 | .thirteen img {
267 | filter: invert(1) drop-shadow(0 0 0.3rem #ffffff70);
268 | }
269 | }
270 |
271 | @keyframes rotate {
272 | from {
273 | transform: rotate(360deg);
274 | }
275 | to {
276 | transform: rotate(0deg);
277 | }
278 | }
279 |
--------------------------------------------------------------------------------
/essablog/styles/globals.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/next-js-tutorial/5513d2176b1f0741c3acd7fc655fd75f366e1b89/essablog/styles/globals.css
--------------------------------------------------------------------------------
/myapi/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 | # or
12 | pnpm dev
13 | ```
14 |
15 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
16 |
17 | You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
18 |
19 | [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`.
20 |
21 | 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.
22 |
23 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
24 |
25 | ## Learn More
26 |
27 | To learn more about Next.js, take a look at the following resources:
28 |
29 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
30 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
31 |
32 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
33 |
34 | ## Deploy on Vercel
35 |
36 | 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.
37 |
38 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
39 |
--------------------------------------------------------------------------------
/myapi/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "paths": {
4 | "@/*": ["./*"]
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/myapi/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | reactStrictMode: true,
4 | }
5 |
6 | module.exports = nextConfig
7 |
--------------------------------------------------------------------------------
/myapi/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "myapi",
3 | "version": "0.1.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "myapi",
9 | "version": "0.1.0",
10 | "dependencies": {
11 | "axios": "^1.3.4",
12 | "next": "13.2.4",
13 | "react": "18.2.0",
14 | "react-dom": "18.2.0"
15 | }
16 | },
17 | "node_modules/@next/env": {
18 | "version": "13.2.4",
19 | "resolved": "https://registry.npmjs.org/@next/env/-/env-13.2.4.tgz",
20 | "integrity": "sha512-+Mq3TtpkeeKFZanPturjcXt+KHfKYnLlX6jMLyCrmpq6OOs4i1GqBOAauSkii9QeKCMTYzGppar21JU57b/GEA=="
21 | },
22 | "node_modules/@next/swc-android-arm-eabi": {
23 | "version": "13.2.4",
24 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.4.tgz",
25 | "integrity": "sha512-DWlalTSkLjDU11MY11jg17O1gGQzpRccM9Oes2yTqj2DpHndajrXHGxj9HGtJ+idq2k7ImUdJVWS2h2l/EDJOw==",
26 | "cpu": [
27 | "arm"
28 | ],
29 | "optional": true,
30 | "os": [
31 | "android"
32 | ],
33 | "engines": {
34 | "node": ">= 10"
35 | }
36 | },
37 | "node_modules/@next/swc-android-arm64": {
38 | "version": "13.2.4",
39 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.2.4.tgz",
40 | "integrity": "sha512-sRavmUImUCf332Gy+PjIfLkMhiRX1Ez4SI+3vFDRs1N5eXp+uNzjFUK/oLMMOzk6KFSkbiK/3Wt8+dHQR/flNg==",
41 | "cpu": [
42 | "arm64"
43 | ],
44 | "optional": true,
45 | "os": [
46 | "android"
47 | ],
48 | "engines": {
49 | "node": ">= 10"
50 | }
51 | },
52 | "node_modules/@next/swc-darwin-arm64": {
53 | "version": "13.2.4",
54 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.4.tgz",
55 | "integrity": "sha512-S6vBl+OrInP47TM3LlYx65betocKUUlTZDDKzTiRDbsRESeyIkBtZ6Qi5uT2zQs4imqllJznVjFd1bXLx3Aa6A==",
56 | "cpu": [
57 | "arm64"
58 | ],
59 | "optional": true,
60 | "os": [
61 | "darwin"
62 | ],
63 | "engines": {
64 | "node": ">= 10"
65 | }
66 | },
67 | "node_modules/@next/swc-darwin-x64": {
68 | "version": "13.2.4",
69 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.4.tgz",
70 | "integrity": "sha512-a6LBuoYGcFOPGd4o8TPo7wmv5FnMr+Prz+vYHopEDuhDoMSHOnC+v+Ab4D7F0NMZkvQjEJQdJS3rqgFhlZmKlw==",
71 | "cpu": [
72 | "x64"
73 | ],
74 | "optional": true,
75 | "os": [
76 | "darwin"
77 | ],
78 | "engines": {
79 | "node": ">= 10"
80 | }
81 | },
82 | "node_modules/@next/swc-freebsd-x64": {
83 | "version": "13.2.4",
84 | "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.4.tgz",
85 | "integrity": "sha512-kkbzKVZGPaXRBPisoAQkh3xh22r+TD+5HwoC5bOkALraJ0dsOQgSMAvzMXKsN3tMzJUPS0tjtRf1cTzrQ0I5vQ==",
86 | "cpu": [
87 | "x64"
88 | ],
89 | "optional": true,
90 | "os": [
91 | "freebsd"
92 | ],
93 | "engines": {
94 | "node": ">= 10"
95 | }
96 | },
97 | "node_modules/@next/swc-linux-arm-gnueabihf": {
98 | "version": "13.2.4",
99 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.4.tgz",
100 | "integrity": "sha512-7qA1++UY0fjprqtjBZaOA6cas/7GekpjVsZn/0uHvquuITFCdKGFCsKNBx3S0Rpxmx6WYo0GcmhNRM9ru08BGg==",
101 | "cpu": [
102 | "arm"
103 | ],
104 | "optional": true,
105 | "os": [
106 | "linux"
107 | ],
108 | "engines": {
109 | "node": ">= 10"
110 | }
111 | },
112 | "node_modules/@next/swc-linux-arm64-gnu": {
113 | "version": "13.2.4",
114 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.4.tgz",
115 | "integrity": "sha512-xzYZdAeq883MwXgcwc72hqo/F/dwUxCukpDOkx/j1HTq/J0wJthMGjinN9wH5bPR98Mfeh1MZJ91WWPnZOedOg==",
116 | "cpu": [
117 | "arm64"
118 | ],
119 | "optional": true,
120 | "os": [
121 | "linux"
122 | ],
123 | "engines": {
124 | "node": ">= 10"
125 | }
126 | },
127 | "node_modules/@next/swc-linux-arm64-musl": {
128 | "version": "13.2.4",
129 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.4.tgz",
130 | "integrity": "sha512-8rXr3WfmqSiYkb71qzuDP6I6R2T2tpkmf83elDN8z783N9nvTJf2E7eLx86wu2OJCi4T05nuxCsh4IOU3LQ5xw==",
131 | "cpu": [
132 | "arm64"
133 | ],
134 | "optional": true,
135 | "os": [
136 | "linux"
137 | ],
138 | "engines": {
139 | "node": ">= 10"
140 | }
141 | },
142 | "node_modules/@next/swc-linux-x64-gnu": {
143 | "version": "13.2.4",
144 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.4.tgz",
145 | "integrity": "sha512-Ngxh51zGSlYJ4EfpKG4LI6WfquulNdtmHg1yuOYlaAr33KyPJp4HeN/tivBnAHcZkoNy0hh/SbwDyCnz5PFJQQ==",
146 | "cpu": [
147 | "x64"
148 | ],
149 | "optional": true,
150 | "os": [
151 | "linux"
152 | ],
153 | "engines": {
154 | "node": ">= 10"
155 | }
156 | },
157 | "node_modules/@next/swc-linux-x64-musl": {
158 | "version": "13.2.4",
159 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.4.tgz",
160 | "integrity": "sha512-gOvwIYoSxd+j14LOcvJr+ekd9fwYT1RyMAHOp7znA10+l40wkFiMONPLWiZuHxfRk+Dy7YdNdDh3ImumvL6VwA==",
161 | "cpu": [
162 | "x64"
163 | ],
164 | "optional": true,
165 | "os": [
166 | "linux"
167 | ],
168 | "engines": {
169 | "node": ">= 10"
170 | }
171 | },
172 | "node_modules/@next/swc-win32-arm64-msvc": {
173 | "version": "13.2.4",
174 | "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.4.tgz",
175 | "integrity": "sha512-q3NJzcfClgBm4HvdcnoEncmztxrA5GXqKeiZ/hADvC56pwNALt3ngDC6t6qr1YW9V/EPDxCYeaX4zYxHciW4Dw==",
176 | "cpu": [
177 | "arm64"
178 | ],
179 | "optional": true,
180 | "os": [
181 | "win32"
182 | ],
183 | "engines": {
184 | "node": ">= 10"
185 | }
186 | },
187 | "node_modules/@next/swc-win32-ia32-msvc": {
188 | "version": "13.2.4",
189 | "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.4.tgz",
190 | "integrity": "sha512-/eZ5ncmHUYtD2fc6EUmAIZlAJnVT2YmxDsKs1Ourx0ttTtvtma/WKlMV5NoUsyOez0f9ExLyOpeCoz5aj+MPXw==",
191 | "cpu": [
192 | "ia32"
193 | ],
194 | "optional": true,
195 | "os": [
196 | "win32"
197 | ],
198 | "engines": {
199 | "node": ">= 10"
200 | }
201 | },
202 | "node_modules/@next/swc-win32-x64-msvc": {
203 | "version": "13.2.4",
204 | "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.4.tgz",
205 | "integrity": "sha512-0MffFmyv7tBLlji01qc0IaPP/LVExzvj7/R5x1Jph1bTAIj4Vu81yFQWHHQAP6r4ff9Ukj1mBK6MDNVXm7Tcvw==",
206 | "cpu": [
207 | "x64"
208 | ],
209 | "optional": true,
210 | "os": [
211 | "win32"
212 | ],
213 | "engines": {
214 | "node": ">= 10"
215 | }
216 | },
217 | "node_modules/@swc/helpers": {
218 | "version": "0.4.14",
219 | "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz",
220 | "integrity": "sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==",
221 | "dependencies": {
222 | "tslib": "^2.4.0"
223 | }
224 | },
225 | "node_modules/asynckit": {
226 | "version": "0.4.0",
227 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
228 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
229 | },
230 | "node_modules/axios": {
231 | "version": "1.3.4",
232 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz",
233 | "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==",
234 | "dependencies": {
235 | "follow-redirects": "^1.15.0",
236 | "form-data": "^4.0.0",
237 | "proxy-from-env": "^1.1.0"
238 | }
239 | },
240 | "node_modules/caniuse-lite": {
241 | "version": "1.0.30001468",
242 | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001468.tgz",
243 | "integrity": "sha512-zgAo8D5kbOyUcRAgSmgyuvBkjrGk5CGYG5TYgFdpQv+ywcyEpo1LOWoG8YmoflGnh+V+UsNuKYedsoYs0hzV5A==",
244 | "funding": [
245 | {
246 | "type": "opencollective",
247 | "url": "https://opencollective.com/browserslist"
248 | },
249 | {
250 | "type": "tidelift",
251 | "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
252 | }
253 | ]
254 | },
255 | "node_modules/client-only": {
256 | "version": "0.0.1",
257 | "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
258 | "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
259 | },
260 | "node_modules/combined-stream": {
261 | "version": "1.0.8",
262 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
263 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
264 | "dependencies": {
265 | "delayed-stream": "~1.0.0"
266 | },
267 | "engines": {
268 | "node": ">= 0.8"
269 | }
270 | },
271 | "node_modules/delayed-stream": {
272 | "version": "1.0.0",
273 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
274 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
275 | "engines": {
276 | "node": ">=0.4.0"
277 | }
278 | },
279 | "node_modules/follow-redirects": {
280 | "version": "1.15.2",
281 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
282 | "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
283 | "funding": [
284 | {
285 | "type": "individual",
286 | "url": "https://github.com/sponsors/RubenVerborgh"
287 | }
288 | ],
289 | "engines": {
290 | "node": ">=4.0"
291 | },
292 | "peerDependenciesMeta": {
293 | "debug": {
294 | "optional": true
295 | }
296 | }
297 | },
298 | "node_modules/form-data": {
299 | "version": "4.0.0",
300 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
301 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
302 | "dependencies": {
303 | "asynckit": "^0.4.0",
304 | "combined-stream": "^1.0.8",
305 | "mime-types": "^2.1.12"
306 | },
307 | "engines": {
308 | "node": ">= 6"
309 | }
310 | },
311 | "node_modules/js-tokens": {
312 | "version": "4.0.0",
313 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
314 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
315 | },
316 | "node_modules/loose-envify": {
317 | "version": "1.4.0",
318 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
319 | "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
320 | "dependencies": {
321 | "js-tokens": "^3.0.0 || ^4.0.0"
322 | },
323 | "bin": {
324 | "loose-envify": "cli.js"
325 | }
326 | },
327 | "node_modules/mime-db": {
328 | "version": "1.52.0",
329 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
330 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
331 | "engines": {
332 | "node": ">= 0.6"
333 | }
334 | },
335 | "node_modules/mime-types": {
336 | "version": "2.1.35",
337 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
338 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
339 | "dependencies": {
340 | "mime-db": "1.52.0"
341 | },
342 | "engines": {
343 | "node": ">= 0.6"
344 | }
345 | },
346 | "node_modules/nanoid": {
347 | "version": "3.3.4",
348 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
349 | "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
350 | "bin": {
351 | "nanoid": "bin/nanoid.cjs"
352 | },
353 | "engines": {
354 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
355 | }
356 | },
357 | "node_modules/next": {
358 | "version": "13.2.4",
359 | "resolved": "https://registry.npmjs.org/next/-/next-13.2.4.tgz",
360 | "integrity": "sha512-g1I30317cThkEpvzfXujf0O4wtaQHtDCLhlivwlTJ885Ld+eOgcz7r3TGQzeU+cSRoNHtD8tsJgzxVdYojFssw==",
361 | "dependencies": {
362 | "@next/env": "13.2.4",
363 | "@swc/helpers": "0.4.14",
364 | "caniuse-lite": "^1.0.30001406",
365 | "postcss": "8.4.14",
366 | "styled-jsx": "5.1.1"
367 | },
368 | "bin": {
369 | "next": "dist/bin/next"
370 | },
371 | "engines": {
372 | "node": ">=14.6.0"
373 | },
374 | "optionalDependencies": {
375 | "@next/swc-android-arm-eabi": "13.2.4",
376 | "@next/swc-android-arm64": "13.2.4",
377 | "@next/swc-darwin-arm64": "13.2.4",
378 | "@next/swc-darwin-x64": "13.2.4",
379 | "@next/swc-freebsd-x64": "13.2.4",
380 | "@next/swc-linux-arm-gnueabihf": "13.2.4",
381 | "@next/swc-linux-arm64-gnu": "13.2.4",
382 | "@next/swc-linux-arm64-musl": "13.2.4",
383 | "@next/swc-linux-x64-gnu": "13.2.4",
384 | "@next/swc-linux-x64-musl": "13.2.4",
385 | "@next/swc-win32-arm64-msvc": "13.2.4",
386 | "@next/swc-win32-ia32-msvc": "13.2.4",
387 | "@next/swc-win32-x64-msvc": "13.2.4"
388 | },
389 | "peerDependencies": {
390 | "@opentelemetry/api": "^1.4.0",
391 | "fibers": ">= 3.1.0",
392 | "node-sass": "^6.0.0 || ^7.0.0",
393 | "react": "^18.2.0",
394 | "react-dom": "^18.2.0",
395 | "sass": "^1.3.0"
396 | },
397 | "peerDependenciesMeta": {
398 | "@opentelemetry/api": {
399 | "optional": true
400 | },
401 | "fibers": {
402 | "optional": true
403 | },
404 | "node-sass": {
405 | "optional": true
406 | },
407 | "sass": {
408 | "optional": true
409 | }
410 | }
411 | },
412 | "node_modules/picocolors": {
413 | "version": "1.0.0",
414 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
415 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
416 | },
417 | "node_modules/postcss": {
418 | "version": "8.4.14",
419 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
420 | "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
421 | "funding": [
422 | {
423 | "type": "opencollective",
424 | "url": "https://opencollective.com/postcss/"
425 | },
426 | {
427 | "type": "tidelift",
428 | "url": "https://tidelift.com/funding/github/npm/postcss"
429 | }
430 | ],
431 | "dependencies": {
432 | "nanoid": "^3.3.4",
433 | "picocolors": "^1.0.0",
434 | "source-map-js": "^1.0.2"
435 | },
436 | "engines": {
437 | "node": "^10 || ^12 || >=14"
438 | }
439 | },
440 | "node_modules/proxy-from-env": {
441 | "version": "1.1.0",
442 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
443 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
444 | },
445 | "node_modules/react": {
446 | "version": "18.2.0",
447 | "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
448 | "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
449 | "dependencies": {
450 | "loose-envify": "^1.1.0"
451 | },
452 | "engines": {
453 | "node": ">=0.10.0"
454 | }
455 | },
456 | "node_modules/react-dom": {
457 | "version": "18.2.0",
458 | "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
459 | "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
460 | "dependencies": {
461 | "loose-envify": "^1.1.0",
462 | "scheduler": "^0.23.0"
463 | },
464 | "peerDependencies": {
465 | "react": "^18.2.0"
466 | }
467 | },
468 | "node_modules/scheduler": {
469 | "version": "0.23.0",
470 | "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
471 | "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
472 | "dependencies": {
473 | "loose-envify": "^1.1.0"
474 | }
475 | },
476 | "node_modules/source-map-js": {
477 | "version": "1.0.2",
478 | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
479 | "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
480 | "engines": {
481 | "node": ">=0.10.0"
482 | }
483 | },
484 | "node_modules/styled-jsx": {
485 | "version": "5.1.1",
486 | "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
487 | "integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==",
488 | "dependencies": {
489 | "client-only": "0.0.1"
490 | },
491 | "engines": {
492 | "node": ">= 12.0.0"
493 | },
494 | "peerDependencies": {
495 | "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0"
496 | },
497 | "peerDependenciesMeta": {
498 | "@babel/core": {
499 | "optional": true
500 | },
501 | "babel-plugin-macros": {
502 | "optional": true
503 | }
504 | }
505 | },
506 | "node_modules/tslib": {
507 | "version": "2.5.0",
508 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
509 | "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
510 | }
511 | }
512 | }
513 |
--------------------------------------------------------------------------------
/myapi/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "myapi",
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 | "axios": "^1.3.4",
13 | "next": "13.2.4",
14 | "react": "18.2.0",
15 | "react-dom": "18.2.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/myapi/pages/_app.js:
--------------------------------------------------------------------------------
1 | //import '@/styles/globals.css'
2 |
3 | export default function App({ Component, pageProps }) {
4 | return
5 | }
6 |
--------------------------------------------------------------------------------
/myapi/pages/_document.js:
--------------------------------------------------------------------------------
1 | import { Html, Head, Main, NextScript } from 'next/document'
2 |
3 | export default function Document() {
4 | return (
5 |
6 |
8 |
9 |
10 |
11 |
12 | )
13 | }
14 |
--------------------------------------------------------------------------------
/myapi/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 |
--------------------------------------------------------------------------------
/myapi/pages/index.js:
--------------------------------------------------------------------------------
1 | import Head from 'next/head'
2 | import Image from 'next/image'
3 | import { Inter } from 'next/font/google'
4 | import styles from '@/styles/Home.module.css'
5 |
6 | const inter = Inter({ subsets: ['latin'] })
7 |
8 | export default function Home() {
9 | return (
10 | <>
11 | Index
12 | >
13 | )
14 | }
15 |
--------------------------------------------------------------------------------
/myapi/pages/posts/[id].js:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 |
3 | export default function Posts({post}) {
4 | return (
5 | <>
6 | Posts page
7 |
8 |
userId : {post.userId}
9 | id: {post.id}
10 | title : {post.title}
11 | body: {post.body}
12 |
13 | >
14 | )
15 | }
16 |
17 |
18 | export async function getServerSideProps(context) {
19 |
20 | try {
21 | const response = await axios.get(`https://jsonplaceholder.typicode.com/posts/${context.query.id}`)
22 | console.log(response.data)
23 |
24 | return {
25 | props: {post:response.data}, // will be passed to the page component as props
26 | }
27 |
28 | } catch (error) {
29 | console.log(error)
30 | }
31 |
32 |
33 | }
34 |
35 |
36 |
--------------------------------------------------------------------------------
/myapi/pages/posts/index.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 |
3 | export default function Posts({posts}) {
4 | return (
5 | <>
6 | Posts page
7 |
8 | {posts.map(
9 | (post)=>{
10 | return
{post.title}
11 | }
12 | )}
13 |
14 | >
15 | )
16 | }
17 |
18 |
19 | export async function getStaticProps() {
20 |
21 | try {
22 | const response = await axios.get('https://jsonplaceholder.typicode.com/posts')
23 | console.log(response.data)
24 |
25 | return {
26 | props: {posts:response.data}, // will be passed to the page component as props
27 | }
28 |
29 | } catch (error) {
30 | console.log(error)
31 | }
32 |
33 |
34 | }
35 |
36 |
37 |
--------------------------------------------------------------------------------
/myapi/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/next-js-tutorial/5513d2176b1f0741c3acd7fc655fd75f366e1b89/myapi/public/favicon.ico
--------------------------------------------------------------------------------
/myapi/public/next.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/myapi/public/thirteen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/myapi/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/myapi/styles/Home.module.css:
--------------------------------------------------------------------------------
1 | .main {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: space-between;
5 | align-items: center;
6 | padding: 6rem;
7 | min-height: 100vh;
8 | }
9 |
10 | .description {
11 | display: inherit;
12 | justify-content: inherit;
13 | align-items: inherit;
14 | font-size: 0.85rem;
15 | max-width: var(--max-width);
16 | width: 100%;
17 | z-index: 2;
18 | font-family: var(--font-mono);
19 | }
20 |
21 | .description a {
22 | display: flex;
23 | justify-content: center;
24 | align-items: center;
25 | gap: 0.5rem;
26 | }
27 |
28 | .description p {
29 | position: relative;
30 | margin: 0;
31 | padding: 1rem;
32 | background-color: rgba(var(--callout-rgb), 0.5);
33 | border: 1px solid rgba(var(--callout-border-rgb), 0.3);
34 | border-radius: var(--border-radius);
35 | }
36 |
37 | .code {
38 | font-weight: 700;
39 | font-family: var(--font-mono);
40 | }
41 |
42 | .grid {
43 | display: grid;
44 | grid-template-columns: repeat(4, minmax(25%, auto));
45 | width: var(--max-width);
46 | max-width: 100%;
47 | }
48 |
49 | .card {
50 | padding: 1rem 1.2rem;
51 | border-radius: var(--border-radius);
52 | background: rgba(var(--card-rgb), 0);
53 | border: 1px solid rgba(var(--card-border-rgb), 0);
54 | transition: background 200ms, border 200ms;
55 | }
56 |
57 | .card span {
58 | display: inline-block;
59 | transition: transform 200ms;
60 | }
61 |
62 | .card h2 {
63 | font-weight: 600;
64 | margin-bottom: 0.7rem;
65 | }
66 |
67 | .card p {
68 | margin: 0;
69 | opacity: 0.6;
70 | font-size: 0.9rem;
71 | line-height: 1.5;
72 | max-width: 30ch;
73 | }
74 |
75 | .center {
76 | display: flex;
77 | justify-content: center;
78 | align-items: center;
79 | position: relative;
80 | padding: 4rem 0;
81 | }
82 |
83 | .center::before {
84 | background: var(--secondary-glow);
85 | border-radius: 50%;
86 | width: 480px;
87 | height: 360px;
88 | margin-left: -400px;
89 | }
90 |
91 | .center::after {
92 | background: var(--primary-glow);
93 | width: 240px;
94 | height: 180px;
95 | z-index: -1;
96 | }
97 |
98 | .center::before,
99 | .center::after {
100 | content: '';
101 | left: 50%;
102 | position: absolute;
103 | filter: blur(45px);
104 | transform: translateZ(0);
105 | }
106 |
107 | .logo,
108 | .thirteen {
109 | position: relative;
110 | }
111 |
112 | .thirteen {
113 | display: flex;
114 | justify-content: center;
115 | align-items: center;
116 | width: 75px;
117 | height: 75px;
118 | padding: 25px 10px;
119 | margin-left: 16px;
120 | transform: translateZ(0);
121 | border-radius: var(--border-radius);
122 | overflow: hidden;
123 | box-shadow: 0px 2px 8px -1px #0000001a;
124 | }
125 |
126 | .thirteen::before,
127 | .thirteen::after {
128 | content: '';
129 | position: absolute;
130 | z-index: -1;
131 | }
132 |
133 | /* Conic Gradient Animation */
134 | .thirteen::before {
135 | animation: 6s rotate linear infinite;
136 | width: 200%;
137 | height: 200%;
138 | background: var(--tile-border);
139 | }
140 |
141 | /* Inner Square */
142 | .thirteen::after {
143 | inset: 0;
144 | padding: 1px;
145 | border-radius: var(--border-radius);
146 | background: linear-gradient(
147 | to bottom right,
148 | rgba(var(--tile-start-rgb), 1),
149 | rgba(var(--tile-end-rgb), 1)
150 | );
151 | background-clip: content-box;
152 | }
153 |
154 | /* Enable hover only on non-touch devices */
155 | @media (hover: hover) and (pointer: fine) {
156 | .card:hover {
157 | background: rgba(var(--card-rgb), 0.1);
158 | border: 1px solid rgba(var(--card-border-rgb), 0.15);
159 | }
160 |
161 | .card:hover span {
162 | transform: translateX(4px);
163 | }
164 | }
165 |
166 | @media (prefers-reduced-motion) {
167 | .thirteen::before {
168 | animation: none;
169 | }
170 |
171 | .card:hover span {
172 | transform: none;
173 | }
174 | }
175 |
176 | /* Mobile */
177 | @media (max-width: 700px) {
178 | .content {
179 | padding: 4rem;
180 | }
181 |
182 | .grid {
183 | grid-template-columns: 1fr;
184 | margin-bottom: 120px;
185 | max-width: 320px;
186 | text-align: center;
187 | }
188 |
189 | .card {
190 | padding: 1rem 2.5rem;
191 | }
192 |
193 | .card h2 {
194 | margin-bottom: 0.5rem;
195 | }
196 |
197 | .center {
198 | padding: 8rem 0 6rem;
199 | }
200 |
201 | .center::before {
202 | transform: none;
203 | height: 300px;
204 | }
205 |
206 | .description {
207 | font-size: 0.8rem;
208 | }
209 |
210 | .description a {
211 | padding: 1rem;
212 | }
213 |
214 | .description p,
215 | .description div {
216 | display: flex;
217 | justify-content: center;
218 | position: fixed;
219 | width: 100%;
220 | }
221 |
222 | .description p {
223 | align-items: center;
224 | inset: 0 0 auto;
225 | padding: 2rem 1rem 1.4rem;
226 | border-radius: 0;
227 | border: none;
228 | border-bottom: 1px solid rgba(var(--callout-border-rgb), 0.25);
229 | background: linear-gradient(
230 | to bottom,
231 | rgba(var(--background-start-rgb), 1),
232 | rgba(var(--callout-rgb), 0.5)
233 | );
234 | background-clip: padding-box;
235 | backdrop-filter: blur(24px);
236 | }
237 |
238 | .description div {
239 | align-items: flex-end;
240 | pointer-events: none;
241 | inset: auto 0 0;
242 | padding: 2rem;
243 | height: 200px;
244 | background: linear-gradient(
245 | to bottom,
246 | transparent 0%,
247 | rgb(var(--background-end-rgb)) 40%
248 | );
249 | z-index: 1;
250 | }
251 | }
252 |
253 | /* Tablet and Smaller Desktop */
254 | @media (min-width: 701px) and (max-width: 1120px) {
255 | .grid {
256 | grid-template-columns: repeat(2, 50%);
257 | }
258 | }
259 |
260 | @media (prefers-color-scheme: dark) {
261 | .vercelLogo {
262 | filter: invert(1);
263 | }
264 |
265 | .logo,
266 | .thirteen img {
267 | filter: invert(1) drop-shadow(0 0 0.3rem #ffffff70);
268 | }
269 | }
270 |
271 | @keyframes rotate {
272 | from {
273 | transform: rotate(360deg);
274 | }
275 | to {
276 | transform: rotate(0deg);
277 | }
278 | }
279 |
--------------------------------------------------------------------------------
/myapi/styles/globals.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --max-width: 1100px;
3 | --border-radius: 12px;
4 | --font-mono: ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono',
5 | 'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro',
6 | 'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;
7 |
8 | --foreground-rgb: 0, 0, 0;
9 | --background-start-rgb: 214, 219, 220;
10 | --background-end-rgb: 255, 255, 255;
11 |
12 | --primary-glow: conic-gradient(
13 | from 180deg at 50% 50%,
14 | #16abff33 0deg,
15 | #0885ff33 55deg,
16 | #54d6ff33 120deg,
17 | #0071ff33 160deg,
18 | transparent 360deg
19 | );
20 | --secondary-glow: radial-gradient(
21 | rgba(255, 255, 255, 1),
22 | rgba(255, 255, 255, 0)
23 | );
24 |
25 | --tile-start-rgb: 239, 245, 249;
26 | --tile-end-rgb: 228, 232, 233;
27 | --tile-border: conic-gradient(
28 | #00000080,
29 | #00000040,
30 | #00000030,
31 | #00000020,
32 | #00000010,
33 | #00000010,
34 | #00000080
35 | );
36 |
37 | --callout-rgb: 238, 240, 241;
38 | --callout-border-rgb: 172, 175, 176;
39 | --card-rgb: 180, 185, 188;
40 | --card-border-rgb: 131, 134, 135;
41 | }
42 |
43 | @media (prefers-color-scheme: dark) {
44 | :root {
45 | --foreground-rgb: 255, 255, 255;
46 | --background-start-rgb: 0, 0, 0;
47 | --background-end-rgb: 0, 0, 0;
48 |
49 | --primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
50 | --secondary-glow: linear-gradient(
51 | to bottom right,
52 | rgba(1, 65, 255, 0),
53 | rgba(1, 65, 255, 0),
54 | rgba(1, 65, 255, 0.3)
55 | );
56 |
57 | --tile-start-rgb: 2, 13, 46;
58 | --tile-end-rgb: 2, 5, 19;
59 | --tile-border: conic-gradient(
60 | #ffffff80,
61 | #ffffff40,
62 | #ffffff30,
63 | #ffffff20,
64 | #ffffff10,
65 | #ffffff10,
66 | #ffffff80
67 | );
68 |
69 | --callout-rgb: 20, 20, 20;
70 | --callout-border-rgb: 108, 108, 108;
71 | --card-rgb: 100, 100, 100;
72 | --card-border-rgb: 200, 200, 200;
73 | }
74 | }
75 |
76 | * {
77 | box-sizing: border-box;
78 | padding: 0;
79 | margin: 0;
80 | }
81 |
82 | html,
83 | body {
84 | max-width: 100vw;
85 | overflow-x: hidden;
86 | }
87 |
88 | body {
89 | color: rgb(var(--foreground-rgb));
90 | background: linear-gradient(
91 | to bottom,
92 | transparent,
93 | rgb(var(--background-end-rgb))
94 | )
95 | rgb(var(--background-start-rgb));
96 | }
97 |
98 | a {
99 | color: inherit;
100 | text-decoration: none;
101 | }
102 |
103 | @media (prefers-color-scheme: dark) {
104 | html {
105 | color-scheme: dark;
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/mycrud/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 | # or
12 | pnpm dev
13 | ```
14 |
15 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
16 |
17 | You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
18 |
19 | [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`.
20 |
21 | 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.
22 |
23 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
24 |
25 | ## Learn More
26 |
27 | To learn more about Next.js, take a look at the following resources:
28 |
29 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
30 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
31 |
32 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
33 |
34 | ## Deploy on Vercel
35 |
36 | 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.
37 |
38 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
39 |
--------------------------------------------------------------------------------
/mycrud/components/Footer.js:
--------------------------------------------------------------------------------
1 | export default function Footer() {
2 | return (
3 | <>
4 |
5 |
6 |
7 |
8 |
9 | Muhammed Essa copyright 2023
10 |
11 |
12 | >
13 | )
14 | }
--------------------------------------------------------------------------------
/mycrud/components/Header.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default function Header() {
4 | return (
5 | <>
6 |
23 | >
24 | )
25 | }
--------------------------------------------------------------------------------
/mycrud/components/MainLayout.js:
--------------------------------------------------------------------------------
1 | import Footer from "./Footer"
2 | import Header from "./Header"
3 |
4 |
5 |
6 | export default function MainLayout(props) {
7 | return (
8 | <>
9 |
10 | {props.children}
11 |
12 | >
13 | )
14 | }
--------------------------------------------------------------------------------
/mycrud/components/PostItem.js:
--------------------------------------------------------------------------------
1 | import domain from '@/utils/config'
2 | import axios from 'axios'
3 | import { useRouter } from 'next/router'
4 |
5 | export default function PostItem({ post }) {
6 |
7 | const router = useRouter()
8 |
9 |
10 | async function deletePost() {
11 | try {
12 | await axios.delete(`${domain}/posts/${post._id}` )
13 | alert('Post deleted successfully')
14 | router.push('/posts')
15 |
16 | } catch (error) {
17 | res.status(400).json({ status: 'Error somthing went wrong !' })
18 | console.log(error)
19 | }
20 | }
21 |
22 |
23 |
24 | return (
25 | <>
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |

35 |
36 |
{post.title}
37 |
{post.details}
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | >
52 | )
53 | }
--------------------------------------------------------------------------------
/mycrud/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "paths": {
4 | "@/*": ["./*"]
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/mycrud/models/Post.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose')
2 |
3 | const postSchema = new mongoose.Schema({
4 | title : String ,
5 | imageurl :String,
6 | details:String
7 | })
8 |
9 | export default mongoose.models.Post || mongoose.model('Post',postSchema )
10 |
--------------------------------------------------------------------------------
/mycrud/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | reactStrictMode: true,
4 | }
5 |
6 | module.exports = nextConfig
7 |
--------------------------------------------------------------------------------
/mycrud/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mycrud",
3 | "version": "0.1.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "mycrud",
9 | "version": "0.1.0",
10 | "dependencies": {
11 | "axios": "^1.3.4",
12 | "boostrap": "^2.0.0",
13 | "bootstrap": "^5.2.3",
14 | "mongoose": "^7.0.2",
15 | "next": "13.2.4",
16 | "next-connect": "^0.13.0",
17 | "react": "18.2.0",
18 | "react-bootstrap": "^2.7.2",
19 | "react-dom": "18.2.0"
20 | }
21 | },
22 | "node_modules/@babel/runtime": {
23 | "version": "7.21.0",
24 | "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz",
25 | "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==",
26 | "dependencies": {
27 | "regenerator-runtime": "^0.13.11"
28 | },
29 | "engines": {
30 | "node": ">=6.9.0"
31 | }
32 | },
33 | "node_modules/@next/env": {
34 | "version": "13.2.4",
35 | "resolved": "https://registry.npmjs.org/@next/env/-/env-13.2.4.tgz",
36 | "integrity": "sha512-+Mq3TtpkeeKFZanPturjcXt+KHfKYnLlX6jMLyCrmpq6OOs4i1GqBOAauSkii9QeKCMTYzGppar21JU57b/GEA=="
37 | },
38 | "node_modules/@next/swc-android-arm-eabi": {
39 | "version": "13.2.4",
40 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.4.tgz",
41 | "integrity": "sha512-DWlalTSkLjDU11MY11jg17O1gGQzpRccM9Oes2yTqj2DpHndajrXHGxj9HGtJ+idq2k7ImUdJVWS2h2l/EDJOw==",
42 | "cpu": [
43 | "arm"
44 | ],
45 | "optional": true,
46 | "os": [
47 | "android"
48 | ],
49 | "engines": {
50 | "node": ">= 10"
51 | }
52 | },
53 | "node_modules/@next/swc-android-arm64": {
54 | "version": "13.2.4",
55 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.2.4.tgz",
56 | "integrity": "sha512-sRavmUImUCf332Gy+PjIfLkMhiRX1Ez4SI+3vFDRs1N5eXp+uNzjFUK/oLMMOzk6KFSkbiK/3Wt8+dHQR/flNg==",
57 | "cpu": [
58 | "arm64"
59 | ],
60 | "optional": true,
61 | "os": [
62 | "android"
63 | ],
64 | "engines": {
65 | "node": ">= 10"
66 | }
67 | },
68 | "node_modules/@next/swc-darwin-arm64": {
69 | "version": "13.2.4",
70 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.4.tgz",
71 | "integrity": "sha512-S6vBl+OrInP47TM3LlYx65betocKUUlTZDDKzTiRDbsRESeyIkBtZ6Qi5uT2zQs4imqllJznVjFd1bXLx3Aa6A==",
72 | "cpu": [
73 | "arm64"
74 | ],
75 | "optional": true,
76 | "os": [
77 | "darwin"
78 | ],
79 | "engines": {
80 | "node": ">= 10"
81 | }
82 | },
83 | "node_modules/@next/swc-darwin-x64": {
84 | "version": "13.2.4",
85 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.4.tgz",
86 | "integrity": "sha512-a6LBuoYGcFOPGd4o8TPo7wmv5FnMr+Prz+vYHopEDuhDoMSHOnC+v+Ab4D7F0NMZkvQjEJQdJS3rqgFhlZmKlw==",
87 | "cpu": [
88 | "x64"
89 | ],
90 | "optional": true,
91 | "os": [
92 | "darwin"
93 | ],
94 | "engines": {
95 | "node": ">= 10"
96 | }
97 | },
98 | "node_modules/@next/swc-freebsd-x64": {
99 | "version": "13.2.4",
100 | "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.4.tgz",
101 | "integrity": "sha512-kkbzKVZGPaXRBPisoAQkh3xh22r+TD+5HwoC5bOkALraJ0dsOQgSMAvzMXKsN3tMzJUPS0tjtRf1cTzrQ0I5vQ==",
102 | "cpu": [
103 | "x64"
104 | ],
105 | "optional": true,
106 | "os": [
107 | "freebsd"
108 | ],
109 | "engines": {
110 | "node": ">= 10"
111 | }
112 | },
113 | "node_modules/@next/swc-linux-arm-gnueabihf": {
114 | "version": "13.2.4",
115 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.4.tgz",
116 | "integrity": "sha512-7qA1++UY0fjprqtjBZaOA6cas/7GekpjVsZn/0uHvquuITFCdKGFCsKNBx3S0Rpxmx6WYo0GcmhNRM9ru08BGg==",
117 | "cpu": [
118 | "arm"
119 | ],
120 | "optional": true,
121 | "os": [
122 | "linux"
123 | ],
124 | "engines": {
125 | "node": ">= 10"
126 | }
127 | },
128 | "node_modules/@next/swc-linux-arm64-gnu": {
129 | "version": "13.2.4",
130 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.4.tgz",
131 | "integrity": "sha512-xzYZdAeq883MwXgcwc72hqo/F/dwUxCukpDOkx/j1HTq/J0wJthMGjinN9wH5bPR98Mfeh1MZJ91WWPnZOedOg==",
132 | "cpu": [
133 | "arm64"
134 | ],
135 | "optional": true,
136 | "os": [
137 | "linux"
138 | ],
139 | "engines": {
140 | "node": ">= 10"
141 | }
142 | },
143 | "node_modules/@next/swc-linux-arm64-musl": {
144 | "version": "13.2.4",
145 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.4.tgz",
146 | "integrity": "sha512-8rXr3WfmqSiYkb71qzuDP6I6R2T2tpkmf83elDN8z783N9nvTJf2E7eLx86wu2OJCi4T05nuxCsh4IOU3LQ5xw==",
147 | "cpu": [
148 | "arm64"
149 | ],
150 | "optional": true,
151 | "os": [
152 | "linux"
153 | ],
154 | "engines": {
155 | "node": ">= 10"
156 | }
157 | },
158 | "node_modules/@next/swc-linux-x64-gnu": {
159 | "version": "13.2.4",
160 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.4.tgz",
161 | "integrity": "sha512-Ngxh51zGSlYJ4EfpKG4LI6WfquulNdtmHg1yuOYlaAr33KyPJp4HeN/tivBnAHcZkoNy0hh/SbwDyCnz5PFJQQ==",
162 | "cpu": [
163 | "x64"
164 | ],
165 | "optional": true,
166 | "os": [
167 | "linux"
168 | ],
169 | "engines": {
170 | "node": ">= 10"
171 | }
172 | },
173 | "node_modules/@next/swc-linux-x64-musl": {
174 | "version": "13.2.4",
175 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.4.tgz",
176 | "integrity": "sha512-gOvwIYoSxd+j14LOcvJr+ekd9fwYT1RyMAHOp7znA10+l40wkFiMONPLWiZuHxfRk+Dy7YdNdDh3ImumvL6VwA==",
177 | "cpu": [
178 | "x64"
179 | ],
180 | "optional": true,
181 | "os": [
182 | "linux"
183 | ],
184 | "engines": {
185 | "node": ">= 10"
186 | }
187 | },
188 | "node_modules/@next/swc-win32-arm64-msvc": {
189 | "version": "13.2.4",
190 | "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.4.tgz",
191 | "integrity": "sha512-q3NJzcfClgBm4HvdcnoEncmztxrA5GXqKeiZ/hADvC56pwNALt3ngDC6t6qr1YW9V/EPDxCYeaX4zYxHciW4Dw==",
192 | "cpu": [
193 | "arm64"
194 | ],
195 | "optional": true,
196 | "os": [
197 | "win32"
198 | ],
199 | "engines": {
200 | "node": ">= 10"
201 | }
202 | },
203 | "node_modules/@next/swc-win32-ia32-msvc": {
204 | "version": "13.2.4",
205 | "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.4.tgz",
206 | "integrity": "sha512-/eZ5ncmHUYtD2fc6EUmAIZlAJnVT2YmxDsKs1Ourx0ttTtvtma/WKlMV5NoUsyOez0f9ExLyOpeCoz5aj+MPXw==",
207 | "cpu": [
208 | "ia32"
209 | ],
210 | "optional": true,
211 | "os": [
212 | "win32"
213 | ],
214 | "engines": {
215 | "node": ">= 10"
216 | }
217 | },
218 | "node_modules/@next/swc-win32-x64-msvc": {
219 | "version": "13.2.4",
220 | "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.4.tgz",
221 | "integrity": "sha512-0MffFmyv7tBLlji01qc0IaPP/LVExzvj7/R5x1Jph1bTAIj4Vu81yFQWHHQAP6r4ff9Ukj1mBK6MDNVXm7Tcvw==",
222 | "cpu": [
223 | "x64"
224 | ],
225 | "optional": true,
226 | "os": [
227 | "win32"
228 | ],
229 | "engines": {
230 | "node": ">= 10"
231 | }
232 | },
233 | "node_modules/@popperjs/core": {
234 | "version": "2.11.6",
235 | "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz",
236 | "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==",
237 | "funding": {
238 | "type": "opencollective",
239 | "url": "https://opencollective.com/popperjs"
240 | }
241 | },
242 | "node_modules/@react-aria/ssr": {
243 | "version": "3.5.0",
244 | "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.5.0.tgz",
245 | "integrity": "sha512-h0MJdSWOd1qObLnJ8mprU31wI8tmKFJMuwT22MpWq6psisOOZaga6Ml4u6Ee6M6duWWISjXvqO4Sb/J0PBA+nQ==",
246 | "dependencies": {
247 | "@swc/helpers": "^0.4.14"
248 | },
249 | "peerDependencies": {
250 | "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
251 | }
252 | },
253 | "node_modules/@restart/hooks": {
254 | "version": "0.4.9",
255 | "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.4.9.tgz",
256 | "integrity": "sha512-3BekqcwB6Umeya+16XPooARn4qEPW6vNvwYnlofIYe6h9qG1/VeD7UvShCWx11eFz5ELYmwIEshz+MkPX3wjcQ==",
257 | "dependencies": {
258 | "dequal": "^2.0.2"
259 | },
260 | "peerDependencies": {
261 | "react": ">=16.8.0"
262 | }
263 | },
264 | "node_modules/@restart/ui": {
265 | "version": "1.6.2",
266 | "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.6.2.tgz",
267 | "integrity": "sha512-hcYs8PwpmHEtwjihLVn2Jr89yrYajfhxN5HtTq3HA9U3+feg1SC3swBM8/qibMTCFsXWToEEtzJMV+LWE+Qjpg==",
268 | "dependencies": {
269 | "@babel/runtime": "^7.21.0",
270 | "@popperjs/core": "^2.11.6",
271 | "@react-aria/ssr": "^3.5.0",
272 | "@restart/hooks": "^0.4.9",
273 | "@types/warning": "^3.0.0",
274 | "dequal": "^2.0.3",
275 | "dom-helpers": "^5.2.0",
276 | "uncontrollable": "^8.0.0",
277 | "warning": "^4.0.3"
278 | },
279 | "peerDependencies": {
280 | "react": ">=16.14.0",
281 | "react-dom": ">=16.14.0"
282 | }
283 | },
284 | "node_modules/@restart/ui/node_modules/uncontrollable": {
285 | "version": "8.0.0",
286 | "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-8.0.0.tgz",
287 | "integrity": "sha512-a954G/0JyXoZdpt0YIzTfoQyWtRS1VvygOBsHttCtZL8jDTKd6vQlUo811y46XnWoXIqQ36QKi3cSEdPuFADkA==",
288 | "dependencies": {
289 | "@types/react": ">=18.0.28"
290 | },
291 | "peerDependencies": {
292 | "react": ">=17.0.0"
293 | }
294 | },
295 | "node_modules/@swc/helpers": {
296 | "version": "0.4.14",
297 | "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz",
298 | "integrity": "sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==",
299 | "dependencies": {
300 | "tslib": "^2.4.0"
301 | }
302 | },
303 | "node_modules/@types/node": {
304 | "version": "18.15.5",
305 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.5.tgz",
306 | "integrity": "sha512-Ark2WDjjZO7GmvsyFFf81MXuGTA/d6oP38anyxWOL6EREyBKAxKoFHwBhaZxCfLRLpO8JgVXwqOwSwa7jRcjew=="
307 | },
308 | "node_modules/@types/prop-types": {
309 | "version": "15.7.5",
310 | "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",
311 | "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w=="
312 | },
313 | "node_modules/@types/react": {
314 | "version": "18.0.28",
315 | "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.28.tgz",
316 | "integrity": "sha512-RD0ivG1kEztNBdoAK7lekI9M+azSnitIn85h4iOiaLjaTrMjzslhaqCGaI4IyCJ1RljWiLCEu4jyrLLgqxBTew==",
317 | "dependencies": {
318 | "@types/prop-types": "*",
319 | "@types/scheduler": "*",
320 | "csstype": "^3.0.2"
321 | }
322 | },
323 | "node_modules/@types/react-transition-group": {
324 | "version": "4.4.5",
325 | "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.5.tgz",
326 | "integrity": "sha512-juKD/eiSM3/xZYzjuzH6ZwpP+/lejltmiS3QEzV/vmb/Q8+HfDmxu+Baga8UEMGBqV88Nbg4l2hY/K2DkyaLLA==",
327 | "dependencies": {
328 | "@types/react": "*"
329 | }
330 | },
331 | "node_modules/@types/scheduler": {
332 | "version": "0.16.2",
333 | "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz",
334 | "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew=="
335 | },
336 | "node_modules/@types/warning": {
337 | "version": "3.0.0",
338 | "resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz",
339 | "integrity": "sha512-t/Tvs5qR47OLOr+4E9ckN8AmP2Tf16gWq+/qA4iUGS/OOyHVO8wv2vjJuX8SNOUTJyWb+2t7wJm6cXILFnOROA=="
340 | },
341 | "node_modules/@types/webidl-conversions": {
342 | "version": "7.0.0",
343 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
344 | "integrity": "sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog=="
345 | },
346 | "node_modules/@types/whatwg-url": {
347 | "version": "8.2.2",
348 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz",
349 | "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==",
350 | "dependencies": {
351 | "@types/node": "*",
352 | "@types/webidl-conversions": "*"
353 | }
354 | },
355 | "node_modules/asynckit": {
356 | "version": "0.4.0",
357 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
358 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
359 | },
360 | "node_modules/axios": {
361 | "version": "1.3.4",
362 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz",
363 | "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==",
364 | "dependencies": {
365 | "follow-redirects": "^1.15.0",
366 | "form-data": "^4.0.0",
367 | "proxy-from-env": "^1.1.0"
368 | }
369 | },
370 | "node_modules/boostrap": {
371 | "version": "2.0.0",
372 | "resolved": "https://registry.npmjs.org/boostrap/-/boostrap-2.0.0.tgz",
373 | "integrity": "sha512-JEeFMOweKeGXEM9rt95eaVISOkluG9aKcl0jQCETOVH9jynCZxuBZe2oWgcWJpj5wqYWZl625SnW7OgHT2Ineg==",
374 | "deprecated": "Package no longer supported. Contact support@npmjs.com for more info."
375 | },
376 | "node_modules/bootstrap": {
377 | "version": "5.2.3",
378 | "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.3.tgz",
379 | "integrity": "sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==",
380 | "funding": [
381 | {
382 | "type": "github",
383 | "url": "https://github.com/sponsors/twbs"
384 | },
385 | {
386 | "type": "opencollective",
387 | "url": "https://opencollective.com/bootstrap"
388 | }
389 | ],
390 | "peerDependencies": {
391 | "@popperjs/core": "^2.11.6"
392 | }
393 | },
394 | "node_modules/bson": {
395 | "version": "5.1.0",
396 | "resolved": "https://registry.npmjs.org/bson/-/bson-5.1.0.tgz",
397 | "integrity": "sha512-FEecNHkhYRBe7X9KDkdG12xNuz5VHGeH6mCE0B5sBmYtiR/Ux/9vUH/v4NUoBCDr6NuEhvahjoLiiRogptVW0A==",
398 | "engines": {
399 | "node": ">=14.20.1"
400 | }
401 | },
402 | "node_modules/caniuse-lite": {
403 | "version": "1.0.30001469",
404 | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001469.tgz",
405 | "integrity": "sha512-Rcp7221ScNqQPP3W+lVOYDyjdR6dC+neEQCttoNr5bAyz54AboB4iwpnWgyi8P4YUsPybVzT4LgWiBbI3drL4g==",
406 | "funding": [
407 | {
408 | "type": "opencollective",
409 | "url": "https://opencollective.com/browserslist"
410 | },
411 | {
412 | "type": "tidelift",
413 | "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
414 | }
415 | ]
416 | },
417 | "node_modules/classnames": {
418 | "version": "2.3.2",
419 | "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz",
420 | "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw=="
421 | },
422 | "node_modules/client-only": {
423 | "version": "0.0.1",
424 | "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
425 | "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
426 | },
427 | "node_modules/combined-stream": {
428 | "version": "1.0.8",
429 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
430 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
431 | "dependencies": {
432 | "delayed-stream": "~1.0.0"
433 | },
434 | "engines": {
435 | "node": ">= 0.8"
436 | }
437 | },
438 | "node_modules/csstype": {
439 | "version": "3.1.1",
440 | "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",
441 | "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="
442 | },
443 | "node_modules/debug": {
444 | "version": "4.3.4",
445 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
446 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
447 | "dependencies": {
448 | "ms": "2.1.2"
449 | },
450 | "engines": {
451 | "node": ">=6.0"
452 | },
453 | "peerDependenciesMeta": {
454 | "supports-color": {
455 | "optional": true
456 | }
457 | }
458 | },
459 | "node_modules/debug/node_modules/ms": {
460 | "version": "2.1.2",
461 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
462 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
463 | },
464 | "node_modules/delayed-stream": {
465 | "version": "1.0.0",
466 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
467 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
468 | "engines": {
469 | "node": ">=0.4.0"
470 | }
471 | },
472 | "node_modules/dequal": {
473 | "version": "2.0.3",
474 | "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
475 | "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
476 | "engines": {
477 | "node": ">=6"
478 | }
479 | },
480 | "node_modules/dom-helpers": {
481 | "version": "5.2.1",
482 | "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz",
483 | "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==",
484 | "dependencies": {
485 | "@babel/runtime": "^7.8.7",
486 | "csstype": "^3.0.2"
487 | }
488 | },
489 | "node_modules/follow-redirects": {
490 | "version": "1.15.2",
491 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
492 | "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
493 | "funding": [
494 | {
495 | "type": "individual",
496 | "url": "https://github.com/sponsors/RubenVerborgh"
497 | }
498 | ],
499 | "engines": {
500 | "node": ">=4.0"
501 | },
502 | "peerDependenciesMeta": {
503 | "debug": {
504 | "optional": true
505 | }
506 | }
507 | },
508 | "node_modules/form-data": {
509 | "version": "4.0.0",
510 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
511 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
512 | "dependencies": {
513 | "asynckit": "^0.4.0",
514 | "combined-stream": "^1.0.8",
515 | "mime-types": "^2.1.12"
516 | },
517 | "engines": {
518 | "node": ">= 6"
519 | }
520 | },
521 | "node_modules/invariant": {
522 | "version": "2.2.4",
523 | "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
524 | "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
525 | "dependencies": {
526 | "loose-envify": "^1.0.0"
527 | }
528 | },
529 | "node_modules/ip": {
530 | "version": "2.0.0",
531 | "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
532 | "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ=="
533 | },
534 | "node_modules/js-tokens": {
535 | "version": "4.0.0",
536 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
537 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
538 | },
539 | "node_modules/kareem": {
540 | "version": "2.5.1",
541 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz",
542 | "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==",
543 | "engines": {
544 | "node": ">=12.0.0"
545 | }
546 | },
547 | "node_modules/loose-envify": {
548 | "version": "1.4.0",
549 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
550 | "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
551 | "dependencies": {
552 | "js-tokens": "^3.0.0 || ^4.0.0"
553 | },
554 | "bin": {
555 | "loose-envify": "cli.js"
556 | }
557 | },
558 | "node_modules/memory-pager": {
559 | "version": "1.5.0",
560 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
561 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
562 | "optional": true
563 | },
564 | "node_modules/mime-db": {
565 | "version": "1.52.0",
566 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
567 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
568 | "engines": {
569 | "node": ">= 0.6"
570 | }
571 | },
572 | "node_modules/mime-types": {
573 | "version": "2.1.35",
574 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
575 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
576 | "dependencies": {
577 | "mime-db": "1.52.0"
578 | },
579 | "engines": {
580 | "node": ">= 0.6"
581 | }
582 | },
583 | "node_modules/mongodb": {
584 | "version": "5.1.0",
585 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.1.0.tgz",
586 | "integrity": "sha512-qgKb7y+EI90y4weY3z5+lIgm8wmexbonz0GalHkSElQXVKtRuwqXuhXKccyvIjXCJVy9qPV82zsinY0W1FBnJw==",
587 | "dependencies": {
588 | "bson": "^5.0.1",
589 | "mongodb-connection-string-url": "^2.6.0",
590 | "socks": "^2.7.1"
591 | },
592 | "engines": {
593 | "node": ">=14.20.1"
594 | },
595 | "optionalDependencies": {
596 | "saslprep": "^1.0.3"
597 | },
598 | "peerDependencies": {
599 | "@aws-sdk/credential-providers": "^3.201.0",
600 | "mongodb-client-encryption": "^2.3.0",
601 | "snappy": "^7.2.2"
602 | },
603 | "peerDependenciesMeta": {
604 | "@aws-sdk/credential-providers": {
605 | "optional": true
606 | },
607 | "mongodb-client-encryption": {
608 | "optional": true
609 | },
610 | "snappy": {
611 | "optional": true
612 | }
613 | }
614 | },
615 | "node_modules/mongodb-connection-string-url": {
616 | "version": "2.6.0",
617 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz",
618 | "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==",
619 | "dependencies": {
620 | "@types/whatwg-url": "^8.2.1",
621 | "whatwg-url": "^11.0.0"
622 | }
623 | },
624 | "node_modules/mongoose": {
625 | "version": "7.0.2",
626 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.0.2.tgz",
627 | "integrity": "sha512-whX+5lAOLOs6VXRr9w+6m5qb8m/IXWLLb9+0/HRUh2TiIYtTt7UvajK92zW6wllCjBkrrnz/MDIOTCWMbs8K4g==",
628 | "dependencies": {
629 | "bson": "^5.0.1",
630 | "kareem": "2.5.1",
631 | "mongodb": "5.1.0",
632 | "mpath": "0.9.0",
633 | "mquery": "5.0.0",
634 | "ms": "2.1.3",
635 | "sift": "16.0.1"
636 | },
637 | "engines": {
638 | "node": ">=14.0.0"
639 | },
640 | "funding": {
641 | "type": "opencollective",
642 | "url": "https://opencollective.com/mongoose"
643 | }
644 | },
645 | "node_modules/mpath": {
646 | "version": "0.9.0",
647 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
648 | "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==",
649 | "engines": {
650 | "node": ">=4.0.0"
651 | }
652 | },
653 | "node_modules/mquery": {
654 | "version": "5.0.0",
655 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz",
656 | "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==",
657 | "dependencies": {
658 | "debug": "4.x"
659 | },
660 | "engines": {
661 | "node": ">=14.0.0"
662 | }
663 | },
664 | "node_modules/ms": {
665 | "version": "2.1.3",
666 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
667 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
668 | },
669 | "node_modules/nanoid": {
670 | "version": "3.3.4",
671 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
672 | "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
673 | "bin": {
674 | "nanoid": "bin/nanoid.cjs"
675 | },
676 | "engines": {
677 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
678 | }
679 | },
680 | "node_modules/next": {
681 | "version": "13.2.4",
682 | "resolved": "https://registry.npmjs.org/next/-/next-13.2.4.tgz",
683 | "integrity": "sha512-g1I30317cThkEpvzfXujf0O4wtaQHtDCLhlivwlTJ885Ld+eOgcz7r3TGQzeU+cSRoNHtD8tsJgzxVdYojFssw==",
684 | "dependencies": {
685 | "@next/env": "13.2.4",
686 | "@swc/helpers": "0.4.14",
687 | "caniuse-lite": "^1.0.30001406",
688 | "postcss": "8.4.14",
689 | "styled-jsx": "5.1.1"
690 | },
691 | "bin": {
692 | "next": "dist/bin/next"
693 | },
694 | "engines": {
695 | "node": ">=14.6.0"
696 | },
697 | "optionalDependencies": {
698 | "@next/swc-android-arm-eabi": "13.2.4",
699 | "@next/swc-android-arm64": "13.2.4",
700 | "@next/swc-darwin-arm64": "13.2.4",
701 | "@next/swc-darwin-x64": "13.2.4",
702 | "@next/swc-freebsd-x64": "13.2.4",
703 | "@next/swc-linux-arm-gnueabihf": "13.2.4",
704 | "@next/swc-linux-arm64-gnu": "13.2.4",
705 | "@next/swc-linux-arm64-musl": "13.2.4",
706 | "@next/swc-linux-x64-gnu": "13.2.4",
707 | "@next/swc-linux-x64-musl": "13.2.4",
708 | "@next/swc-win32-arm64-msvc": "13.2.4",
709 | "@next/swc-win32-ia32-msvc": "13.2.4",
710 | "@next/swc-win32-x64-msvc": "13.2.4"
711 | },
712 | "peerDependencies": {
713 | "@opentelemetry/api": "^1.4.0",
714 | "fibers": ">= 3.1.0",
715 | "node-sass": "^6.0.0 || ^7.0.0",
716 | "react": "^18.2.0",
717 | "react-dom": "^18.2.0",
718 | "sass": "^1.3.0"
719 | },
720 | "peerDependenciesMeta": {
721 | "@opentelemetry/api": {
722 | "optional": true
723 | },
724 | "fibers": {
725 | "optional": true
726 | },
727 | "node-sass": {
728 | "optional": true
729 | },
730 | "sass": {
731 | "optional": true
732 | }
733 | }
734 | },
735 | "node_modules/next-connect": {
736 | "version": "0.13.0",
737 | "resolved": "https://registry.npmjs.org/next-connect/-/next-connect-0.13.0.tgz",
738 | "integrity": "sha512-f2G4edY01XomjCECSrgOpb/zzQinJO6Whd8Zds0+rLUYhj5cLwkh6FVvZsQCSSbxSc4k9nCwNuk5NLIhvO1gUA==",
739 | "dependencies": {
740 | "trouter": "^3.2.0"
741 | }
742 | },
743 | "node_modules/object-assign": {
744 | "version": "4.1.1",
745 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
746 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
747 | "engines": {
748 | "node": ">=0.10.0"
749 | }
750 | },
751 | "node_modules/picocolors": {
752 | "version": "1.0.0",
753 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
754 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
755 | },
756 | "node_modules/postcss": {
757 | "version": "8.4.14",
758 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
759 | "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
760 | "funding": [
761 | {
762 | "type": "opencollective",
763 | "url": "https://opencollective.com/postcss/"
764 | },
765 | {
766 | "type": "tidelift",
767 | "url": "https://tidelift.com/funding/github/npm/postcss"
768 | }
769 | ],
770 | "dependencies": {
771 | "nanoid": "^3.3.4",
772 | "picocolors": "^1.0.0",
773 | "source-map-js": "^1.0.2"
774 | },
775 | "engines": {
776 | "node": "^10 || ^12 || >=14"
777 | }
778 | },
779 | "node_modules/prop-types": {
780 | "version": "15.8.1",
781 | "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
782 | "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
783 | "dependencies": {
784 | "loose-envify": "^1.4.0",
785 | "object-assign": "^4.1.1",
786 | "react-is": "^16.13.1"
787 | }
788 | },
789 | "node_modules/prop-types-extra": {
790 | "version": "1.1.1",
791 | "resolved": "https://registry.npmjs.org/prop-types-extra/-/prop-types-extra-1.1.1.tgz",
792 | "integrity": "sha512-59+AHNnHYCdiC+vMwY52WmvP5dM3QLeoumYuEyceQDi9aEhtwN9zIQ2ZNo25sMyXnbh32h+P1ezDsUpUH3JAew==",
793 | "dependencies": {
794 | "react-is": "^16.3.2",
795 | "warning": "^4.0.0"
796 | },
797 | "peerDependencies": {
798 | "react": ">=0.14.0"
799 | }
800 | },
801 | "node_modules/proxy-from-env": {
802 | "version": "1.1.0",
803 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
804 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
805 | },
806 | "node_modules/punycode": {
807 | "version": "2.3.0",
808 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
809 | "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
810 | "engines": {
811 | "node": ">=6"
812 | }
813 | },
814 | "node_modules/react": {
815 | "version": "18.2.0",
816 | "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
817 | "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
818 | "dependencies": {
819 | "loose-envify": "^1.1.0"
820 | },
821 | "engines": {
822 | "node": ">=0.10.0"
823 | }
824 | },
825 | "node_modules/react-bootstrap": {
826 | "version": "2.7.2",
827 | "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.7.2.tgz",
828 | "integrity": "sha512-WDSln+mG4RLLFO01stkj2bEx/3MF4YihK9D/dWnHaSxOiQZLbhhlf95D2Jb20X3t2m7vMxRe888FVrfLJoGmmA==",
829 | "dependencies": {
830 | "@babel/runtime": "^7.17.2",
831 | "@restart/hooks": "^0.4.6",
832 | "@restart/ui": "^1.4.1",
833 | "@types/react-transition-group": "^4.4.4",
834 | "classnames": "^2.3.1",
835 | "dom-helpers": "^5.2.1",
836 | "invariant": "^2.2.4",
837 | "prop-types": "^15.8.1",
838 | "prop-types-extra": "^1.1.0",
839 | "react-transition-group": "^4.4.2",
840 | "uncontrollable": "^7.2.1",
841 | "warning": "^4.0.3"
842 | },
843 | "peerDependencies": {
844 | "@types/react": ">=16.14.8",
845 | "react": ">=16.14.0",
846 | "react-dom": ">=16.14.0"
847 | },
848 | "peerDependenciesMeta": {
849 | "@types/react": {
850 | "optional": true
851 | }
852 | }
853 | },
854 | "node_modules/react-dom": {
855 | "version": "18.2.0",
856 | "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
857 | "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
858 | "dependencies": {
859 | "loose-envify": "^1.1.0",
860 | "scheduler": "^0.23.0"
861 | },
862 | "peerDependencies": {
863 | "react": "^18.2.0"
864 | }
865 | },
866 | "node_modules/react-is": {
867 | "version": "16.13.1",
868 | "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
869 | "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
870 | },
871 | "node_modules/react-lifecycles-compat": {
872 | "version": "3.0.4",
873 | "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
874 | "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
875 | },
876 | "node_modules/react-transition-group": {
877 | "version": "4.4.5",
878 | "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz",
879 | "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==",
880 | "dependencies": {
881 | "@babel/runtime": "^7.5.5",
882 | "dom-helpers": "^5.0.1",
883 | "loose-envify": "^1.4.0",
884 | "prop-types": "^15.6.2"
885 | },
886 | "peerDependencies": {
887 | "react": ">=16.6.0",
888 | "react-dom": ">=16.6.0"
889 | }
890 | },
891 | "node_modules/regenerator-runtime": {
892 | "version": "0.13.11",
893 | "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
894 | "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
895 | },
896 | "node_modules/regexparam": {
897 | "version": "1.3.0",
898 | "resolved": "https://registry.npmjs.org/regexparam/-/regexparam-1.3.0.tgz",
899 | "integrity": "sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g==",
900 | "engines": {
901 | "node": ">=6"
902 | }
903 | },
904 | "node_modules/saslprep": {
905 | "version": "1.0.3",
906 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
907 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
908 | "optional": true,
909 | "dependencies": {
910 | "sparse-bitfield": "^3.0.3"
911 | },
912 | "engines": {
913 | "node": ">=6"
914 | }
915 | },
916 | "node_modules/scheduler": {
917 | "version": "0.23.0",
918 | "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
919 | "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
920 | "dependencies": {
921 | "loose-envify": "^1.1.0"
922 | }
923 | },
924 | "node_modules/sift": {
925 | "version": "16.0.1",
926 | "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz",
927 | "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ=="
928 | },
929 | "node_modules/smart-buffer": {
930 | "version": "4.2.0",
931 | "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
932 | "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
933 | "engines": {
934 | "node": ">= 6.0.0",
935 | "npm": ">= 3.0.0"
936 | }
937 | },
938 | "node_modules/socks": {
939 | "version": "2.7.1",
940 | "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz",
941 | "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==",
942 | "dependencies": {
943 | "ip": "^2.0.0",
944 | "smart-buffer": "^4.2.0"
945 | },
946 | "engines": {
947 | "node": ">= 10.13.0",
948 | "npm": ">= 3.0.0"
949 | }
950 | },
951 | "node_modules/source-map-js": {
952 | "version": "1.0.2",
953 | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
954 | "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
955 | "engines": {
956 | "node": ">=0.10.0"
957 | }
958 | },
959 | "node_modules/sparse-bitfield": {
960 | "version": "3.0.3",
961 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
962 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
963 | "optional": true,
964 | "dependencies": {
965 | "memory-pager": "^1.0.2"
966 | }
967 | },
968 | "node_modules/styled-jsx": {
969 | "version": "5.1.1",
970 | "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
971 | "integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==",
972 | "dependencies": {
973 | "client-only": "0.0.1"
974 | },
975 | "engines": {
976 | "node": ">= 12.0.0"
977 | },
978 | "peerDependencies": {
979 | "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0"
980 | },
981 | "peerDependenciesMeta": {
982 | "@babel/core": {
983 | "optional": true
984 | },
985 | "babel-plugin-macros": {
986 | "optional": true
987 | }
988 | }
989 | },
990 | "node_modules/tr46": {
991 | "version": "3.0.0",
992 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
993 | "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
994 | "dependencies": {
995 | "punycode": "^2.1.1"
996 | },
997 | "engines": {
998 | "node": ">=12"
999 | }
1000 | },
1001 | "node_modules/trouter": {
1002 | "version": "3.2.1",
1003 | "resolved": "https://registry.npmjs.org/trouter/-/trouter-3.2.1.tgz",
1004 | "integrity": "sha512-oY3CmIiEYOe1YMEzh++I67lrNOUldtCeuLL0vRPydvQLHZpSJ03B5dgDFlpFsiriMq6e//NDjjopjUzXOztHow==",
1005 | "dependencies": {
1006 | "regexparam": "^1.3.0"
1007 | },
1008 | "engines": {
1009 | "node": ">=6"
1010 | }
1011 | },
1012 | "node_modules/tslib": {
1013 | "version": "2.5.0",
1014 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
1015 | "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
1016 | },
1017 | "node_modules/uncontrollable": {
1018 | "version": "7.2.1",
1019 | "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-7.2.1.tgz",
1020 | "integrity": "sha512-svtcfoTADIB0nT9nltgjujTi7BzVmwjZClOmskKu/E8FW9BXzg9os8OLr4f8Dlnk0rYWJIWr4wv9eKUXiQvQwQ==",
1021 | "dependencies": {
1022 | "@babel/runtime": "^7.6.3",
1023 | "@types/react": ">=16.9.11",
1024 | "invariant": "^2.2.4",
1025 | "react-lifecycles-compat": "^3.0.4"
1026 | },
1027 | "peerDependencies": {
1028 | "react": ">=15.0.0"
1029 | }
1030 | },
1031 | "node_modules/warning": {
1032 | "version": "4.0.3",
1033 | "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
1034 | "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
1035 | "dependencies": {
1036 | "loose-envify": "^1.0.0"
1037 | }
1038 | },
1039 | "node_modules/webidl-conversions": {
1040 | "version": "7.0.0",
1041 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
1042 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
1043 | "engines": {
1044 | "node": ">=12"
1045 | }
1046 | },
1047 | "node_modules/whatwg-url": {
1048 | "version": "11.0.0",
1049 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
1050 | "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
1051 | "dependencies": {
1052 | "tr46": "^3.0.0",
1053 | "webidl-conversions": "^7.0.0"
1054 | },
1055 | "engines": {
1056 | "node": ">=12"
1057 | }
1058 | }
1059 | }
1060 | }
1061 |
--------------------------------------------------------------------------------
/mycrud/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mycrud",
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 | "axios": "^1.3.4",
13 | "boostrap": "^2.0.0",
14 | "bootstrap": "^5.2.3",
15 | "mongoose": "^7.0.2",
16 | "next": "13.2.4",
17 | "next-connect": "^0.13.0",
18 | "react": "18.2.0",
19 | "react-bootstrap": "^2.7.2",
20 | "react-dom": "18.2.0"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/mycrud/pages/404.js:
--------------------------------------------------------------------------------
1 | import Image from 'next/image'
2 | import myimage from '../public/myimage.png'
3 | export default function NotFound() {
4 |
5 | return (
6 | <>
7 | Sorry not found !
8 |
9 |
15 |
16 | >
17 | )
18 | }
--------------------------------------------------------------------------------
/mycrud/pages/_app.js:
--------------------------------------------------------------------------------
1 | import MainLayout from "@/components/MainLayout"
2 | import 'bootstrap/dist/css/bootstrap.css'
3 | //import '@/styles/globals.css'
4 |
5 |
6 | export default function App({ Component, pageProps }) {
7 | return
8 |
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/mycrud/pages/_document.js:
--------------------------------------------------------------------------------
1 | import { Html, Head, Main, NextScript } from 'next/document'
2 |
3 | export default function Document() {
4 | return (
5 |
6 |
8 |
9 |
10 |
11 |
12 | )
13 | }
14 |
--------------------------------------------------------------------------------
/mycrud/pages/api/hello.js:
--------------------------------------------------------------------------------
1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2 |
3 | import connectDB from "@/utils/connectDB"
4 |
5 | connectDB()
6 |
7 |
8 | export default function handler(req, res) {
9 | res.status(200).json({ name: 'John Doe' })
10 | }
11 |
--------------------------------------------------------------------------------
/mycrud/pages/api/posts/[id].js:
--------------------------------------------------------------------------------
1 | import Post from "@/models/Post"
2 | import connectDB from "@/utils/connectDB"
3 | import nc from "next-connect"
4 |
5 |
6 | connectDB()
7 |
8 | const handler = nc().get(async(req,res)=>{
9 |
10 | try {
11 | const post = await Post.findOne({_id:req.query.id})
12 | res.send( post )
13 |
14 | } catch (error) {
15 | res.status(400).json({ status: 'Error somthing went wrong !' })
16 | console.log(error)
17 | }
18 | }).put(async(req,res)=>{
19 |
20 | try {
21 | const post = await Post.findOne({_id:req.query.id})
22 | post.title = req.body.title
23 | post.imageurl= req.body.imageurl
24 | post.details= req.body.details
25 | await post.save()
26 |
27 | res.send( 'Post has been updated Successfully !' )
28 |
29 | } catch (error) {
30 | res.status(400).json({ status: 'Error somthing went wrong !' })
31 | console.log(error)
32 | }
33 | }).delete(async(req,res)=>{
34 |
35 | try {
36 | const post = await Post.findOneAndDelete({_id:req.query.id})
37 |
38 | res.send( 'Post has been deleted Successfully !' )
39 |
40 | } catch (error) {
41 | res.status(400).json({ status: 'Error somthing went wrong !' })
42 | console.log(error)
43 | }
44 | })
45 |
46 | export default handler
47 |
--------------------------------------------------------------------------------
/mycrud/pages/api/posts/index.js:
--------------------------------------------------------------------------------
1 | import Post from "@/models/Post"
2 | import connectDB from "@/utils/connectDB"
3 | import nc from "next-connect"
4 |
5 |
6 | connectDB()
7 |
8 | const handler = nc().post(async(req,res)=>{
9 | const {title , imageurl , details } = req.body
10 | try {
11 | const newpost = new Post({title , imageurl , details})
12 | await newpost.save()
13 | res.status(200).json({ status: '1 Post has been added Successfully !' })
14 |
15 | } catch (error) {
16 | res.status(400).json({ status: 'Error somthing went wrong !' })
17 | console.log(error)
18 | }
19 | }).get(async(req,res)=>{
20 |
21 | try {
22 | const posts = await Post.find({})
23 | res.send( posts )
24 |
25 | } catch (error) {
26 | res.status(400).json({ status: 'Error somthing went wrong !' })
27 | console.log(error)
28 | }
29 | })
30 |
31 | export default handler
32 |
--------------------------------------------------------------------------------
/mycrud/pages/index.js:
--------------------------------------------------------------------------------
1 | import Head from 'next/head'
2 | import Image from 'next/image'
3 | import styles from '@/styles/Home.module.css'
4 |
5 | export default function Home() {
6 | return (
7 | <>
8 | Index page
9 | >
10 | )
11 | }
12 |
--------------------------------------------------------------------------------
/mycrud/pages/posts/[id].js:
--------------------------------------------------------------------------------
1 | import axios from "axios"
2 | import { useRouter } from 'next/router'
3 | import domain from "@/utils/config"
4 | import { useState } from "react"
5 |
6 |
7 | export default function postID({post}) {
8 |
9 | const [title,settitle] = useState(post.title)
10 | const [imageurl,setimageurl] = useState(post.imageurl)
11 | const [details,setdetails] = useState(post.details)
12 |
13 | async function updatePost() {
14 |
15 | const postUpdate = {
16 | title,
17 | imageurl,
18 | details
19 | }
20 | try {
21 | await axios.put(`${domain}/posts/${post._id}`,postUpdate )
22 | alert('Post updated successfully')
23 | } catch (error) {
24 | alert(error)
25 | console.log(error)
26 | }
27 |
28 | }
29 |
30 | return (
31 | <>
32 | Update post
33 |
34 |
35 |
36 |
37 | {settitle(e.target.value)} }
40 | placeholder="title"/>
41 |
42 |
43 |
44 |
45 | {setimageurl(e.target.value)} }
48 | placeholder="image url"/>
49 |
50 |
51 |
52 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | >
72 | )
73 | }
74 |
75 |
76 | export async function getServerSideProps(context) {
77 |
78 | const response = await axios.get(`${domain}/posts/${context.query.id}`)
79 | return {
80 | props: {
81 | post : response.data
82 | }, // will be passed to the page component as props
83 | }
84 | }
--------------------------------------------------------------------------------
/mycrud/pages/posts/addpost.js:
--------------------------------------------------------------------------------
1 |
2 | import domain from "@/utils/config"
3 | import axios from "axios"
4 | import { useState } from "react"
5 |
6 |
7 |
8 |
9 | export default function AddPost() {
10 |
11 |
12 | const [title,settitle] = useState('')
13 | const [imageurl,setimageurl] = useState('')
14 | const [details,setdetails] = useState('')
15 |
16 | async function addPost() {
17 |
18 | const post = {
19 | title,
20 | imageurl,
21 | details
22 | }
23 | console.log(post)
24 | try {
25 | await axios.post(`${domain}/posts`,post )
26 | alert('Post added successfully')
27 | } catch (error) {
28 | console.log(error)
29 | }
30 | }
31 |
32 | return (
33 | <>
34 | Add post page
35 |
36 |
37 |
38 |
39 | {settitle(e.target.value)} }
42 | placeholder="title"/>
43 |
44 |
45 |
46 |
47 | {setimageurl(e.target.value)} }
50 | placeholder="image url"/>
51 |
52 |
53 |
54 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | >
74 | )
75 | }
--------------------------------------------------------------------------------
/mycrud/pages/posts/index.js:
--------------------------------------------------------------------------------
1 | import PostItem from "@/components/PostItem"
2 | import domain from "@/utils/config"
3 | import axios from "axios"
4 |
5 |
6 |
7 | export default function Index({ postData }) {
8 |
9 | //console.log(postData)
10 |
11 | const posts = postData.map( (post)=>{
12 | return
13 | }
14 |
15 | )
16 |
17 | return (
18 | <>
19 | {posts}
20 | >
21 | )
22 | }
23 |
24 |
25 | export async function getStaticProps() {
26 | const response = await axios.get(`${domain}/posts`)
27 | return {
28 | props: {
29 | postData: response.data
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/mycrud/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/next-js-tutorial/5513d2176b1f0741c3acd7fc655fd75f366e1b89/mycrud/public/favicon.ico
--------------------------------------------------------------------------------
/mycrud/public/myimage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/next-js-tutorial/5513d2176b1f0741c3acd7fc655fd75f366e1b89/mycrud/public/myimage.png
--------------------------------------------------------------------------------
/mycrud/public/next.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mycrud/public/thirteen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mycrud/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mycrud/styles/Home.module.css:
--------------------------------------------------------------------------------
1 | .main {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: space-between;
5 | align-items: center;
6 | padding: 6rem;
7 | min-height: 100vh;
8 | }
9 |
10 | .description {
11 | display: inherit;
12 | justify-content: inherit;
13 | align-items: inherit;
14 | font-size: 0.85rem;
15 | max-width: var(--max-width);
16 | width: 100%;
17 | z-index: 2;
18 | font-family: var(--font-mono);
19 | }
20 |
21 | .description a {
22 | display: flex;
23 | justify-content: center;
24 | align-items: center;
25 | gap: 0.5rem;
26 | }
27 |
28 | .description p {
29 | position: relative;
30 | margin: 0;
31 | padding: 1rem;
32 | background-color: rgba(var(--callout-rgb), 0.5);
33 | border: 1px solid rgba(var(--callout-border-rgb), 0.3);
34 | border-radius: var(--border-radius);
35 | }
36 |
37 | .code {
38 | font-weight: 700;
39 | font-family: var(--font-mono);
40 | }
41 |
42 | .grid {
43 | display: grid;
44 | grid-template-columns: repeat(4, minmax(25%, auto));
45 | width: var(--max-width);
46 | max-width: 100%;
47 | }
48 |
49 | .card {
50 | padding: 1rem 1.2rem;
51 | border-radius: var(--border-radius);
52 | background: rgba(var(--card-rgb), 0);
53 | border: 1px solid rgba(var(--card-border-rgb), 0);
54 | transition: background 200ms, border 200ms;
55 | }
56 |
57 | .card span {
58 | display: inline-block;
59 | transition: transform 200ms;
60 | }
61 |
62 | .card h2 {
63 | font-weight: 600;
64 | margin-bottom: 0.7rem;
65 | }
66 |
67 | .card p {
68 | margin: 0;
69 | opacity: 0.6;
70 | font-size: 0.9rem;
71 | line-height: 1.5;
72 | max-width: 30ch;
73 | }
74 |
75 | .center {
76 | display: flex;
77 | justify-content: center;
78 | align-items: center;
79 | position: relative;
80 | padding: 4rem 0;
81 | }
82 |
83 | .center::before {
84 | background: var(--secondary-glow);
85 | border-radius: 50%;
86 | width: 480px;
87 | height: 360px;
88 | margin-left: -400px;
89 | }
90 |
91 | .center::after {
92 | background: var(--primary-glow);
93 | width: 240px;
94 | height: 180px;
95 | z-index: -1;
96 | }
97 |
98 | .center::before,
99 | .center::after {
100 | content: '';
101 | left: 50%;
102 | position: absolute;
103 | filter: blur(45px);
104 | transform: translateZ(0);
105 | }
106 |
107 | .logo,
108 | .thirteen {
109 | position: relative;
110 | }
111 |
112 | .thirteen {
113 | display: flex;
114 | justify-content: center;
115 | align-items: center;
116 | width: 75px;
117 | height: 75px;
118 | padding: 25px 10px;
119 | margin-left: 16px;
120 | transform: translateZ(0);
121 | border-radius: var(--border-radius);
122 | overflow: hidden;
123 | box-shadow: 0px 2px 8px -1px #0000001a;
124 | }
125 |
126 | .thirteen::before,
127 | .thirteen::after {
128 | content: '';
129 | position: absolute;
130 | z-index: -1;
131 | }
132 |
133 | /* Conic Gradient Animation */
134 | .thirteen::before {
135 | animation: 6s rotate linear infinite;
136 | width: 200%;
137 | height: 200%;
138 | background: var(--tile-border);
139 | }
140 |
141 | /* Inner Square */
142 | .thirteen::after {
143 | inset: 0;
144 | padding: 1px;
145 | border-radius: var(--border-radius);
146 | background: linear-gradient(
147 | to bottom right,
148 | rgba(var(--tile-start-rgb), 1),
149 | rgba(var(--tile-end-rgb), 1)
150 | );
151 | background-clip: content-box;
152 | }
153 |
154 | /* Enable hover only on non-touch devices */
155 | @media (hover: hover) and (pointer: fine) {
156 | .card:hover {
157 | background: rgba(var(--card-rgb), 0.1);
158 | border: 1px solid rgba(var(--card-border-rgb), 0.15);
159 | }
160 |
161 | .card:hover span {
162 | transform: translateX(4px);
163 | }
164 | }
165 |
166 | @media (prefers-reduced-motion) {
167 | .thirteen::before {
168 | animation: none;
169 | }
170 |
171 | .card:hover span {
172 | transform: none;
173 | }
174 | }
175 |
176 | /* Mobile */
177 | @media (max-width: 700px) {
178 | .content {
179 | padding: 4rem;
180 | }
181 |
182 | .grid {
183 | grid-template-columns: 1fr;
184 | margin-bottom: 120px;
185 | max-width: 320px;
186 | text-align: center;
187 | }
188 |
189 | .card {
190 | padding: 1rem 2.5rem;
191 | }
192 |
193 | .card h2 {
194 | margin-bottom: 0.5rem;
195 | }
196 |
197 | .center {
198 | padding: 8rem 0 6rem;
199 | }
200 |
201 | .center::before {
202 | transform: none;
203 | height: 300px;
204 | }
205 |
206 | .description {
207 | font-size: 0.8rem;
208 | }
209 |
210 | .description a {
211 | padding: 1rem;
212 | }
213 |
214 | .description p,
215 | .description div {
216 | display: flex;
217 | justify-content: center;
218 | position: fixed;
219 | width: 100%;
220 | }
221 |
222 | .description p {
223 | align-items: center;
224 | inset: 0 0 auto;
225 | padding: 2rem 1rem 1.4rem;
226 | border-radius: 0;
227 | border: none;
228 | border-bottom: 1px solid rgba(var(--callout-border-rgb), 0.25);
229 | background: linear-gradient(
230 | to bottom,
231 | rgba(var(--background-start-rgb), 1),
232 | rgba(var(--callout-rgb), 0.5)
233 | );
234 | background-clip: padding-box;
235 | backdrop-filter: blur(24px);
236 | }
237 |
238 | .description div {
239 | align-items: flex-end;
240 | pointer-events: none;
241 | inset: auto 0 0;
242 | padding: 2rem;
243 | height: 200px;
244 | background: linear-gradient(
245 | to bottom,
246 | transparent 0%,
247 | rgb(var(--background-end-rgb)) 40%
248 | );
249 | z-index: 1;
250 | }
251 | }
252 |
253 | /* Tablet and Smaller Desktop */
254 | @media (min-width: 701px) and (max-width: 1120px) {
255 | .grid {
256 | grid-template-columns: repeat(2, 50%);
257 | }
258 | }
259 |
260 | @media (prefers-color-scheme: dark) {
261 | .vercelLogo {
262 | filter: invert(1);
263 | }
264 |
265 | .logo,
266 | .thirteen img {
267 | filter: invert(1) drop-shadow(0 0 0.3rem #ffffff70);
268 | }
269 | }
270 |
271 | @keyframes rotate {
272 | from {
273 | transform: rotate(360deg);
274 | }
275 | to {
276 | transform: rotate(0deg);
277 | }
278 | }
279 |
--------------------------------------------------------------------------------
/mycrud/styles/globals.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --max-width: 1100px;
3 | --border-radius: 12px;
4 | --font-mono: ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono',
5 | 'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro',
6 | 'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;
7 |
8 | --foreground-rgb: 0, 0, 0;
9 | --background-start-rgb: 214, 219, 220;
10 | --background-end-rgb: 255, 255, 255;
11 |
12 | --primary-glow: conic-gradient(
13 | from 180deg at 50% 50%,
14 | #16abff33 0deg,
15 | #0885ff33 55deg,
16 | #54d6ff33 120deg,
17 | #0071ff33 160deg,
18 | transparent 360deg
19 | );
20 | --secondary-glow: radial-gradient(
21 | rgba(255, 255, 255, 1),
22 | rgba(255, 255, 255, 0)
23 | );
24 |
25 | --tile-start-rgb: 239, 245, 249;
26 | --tile-end-rgb: 228, 232, 233;
27 | --tile-border: conic-gradient(
28 | #00000080,
29 | #00000040,
30 | #00000030,
31 | #00000020,
32 | #00000010,
33 | #00000010,
34 | #00000080
35 | );
36 |
37 | --callout-rgb: 238, 240, 241;
38 | --callout-border-rgb: 172, 175, 176;
39 | --card-rgb: 180, 185, 188;
40 | --card-border-rgb: 131, 134, 135;
41 | }
42 |
43 | @media (prefers-color-scheme: dark) {
44 | :root {
45 | --foreground-rgb: 255, 255, 255;
46 | --background-start-rgb: 0, 0, 0;
47 | --background-end-rgb: 0, 0, 0;
48 |
49 | --primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
50 | --secondary-glow: linear-gradient(
51 | to bottom right,
52 | rgba(1, 65, 255, 0),
53 | rgba(1, 65, 255, 0),
54 | rgba(1, 65, 255, 0.3)
55 | );
56 |
57 | --tile-start-rgb: 2, 13, 46;
58 | --tile-end-rgb: 2, 5, 19;
59 | --tile-border: conic-gradient(
60 | #ffffff80,
61 | #ffffff40,
62 | #ffffff30,
63 | #ffffff20,
64 | #ffffff10,
65 | #ffffff10,
66 | #ffffff80
67 | );
68 |
69 | --callout-rgb: 20, 20, 20;
70 | --callout-border-rgb: 108, 108, 108;
71 | --card-rgb: 100, 100, 100;
72 | --card-border-rgb: 200, 200, 200;
73 | }
74 | }
75 |
76 | * {
77 | box-sizing: border-box;
78 | padding: 0;
79 | margin: 0;
80 | }
81 |
82 | html,
83 | body {
84 | max-width: 100vw;
85 | overflow-x: hidden;
86 | }
87 |
88 | body {
89 | color: rgb(var(--foreground-rgb));
90 | background: linear-gradient(
91 | to bottom,
92 | transparent,
93 | rgb(var(--background-end-rgb))
94 | )
95 | rgb(var(--background-start-rgb));
96 | }
97 |
98 | a {
99 | color: inherit;
100 | text-decoration: none;
101 | }
102 |
103 | @media (prefers-color-scheme: dark) {
104 | html {
105 | color-scheme: dark;
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/mycrud/utils/config.js:
--------------------------------------------------------------------------------
1 | var domain;
2 |
3 | if (process.env.NODE_ENV === 'production') {
4 |
5 | } else {
6 | domain= 'http://localhost:3000/api'
7 | }
8 |
9 | export default domain
--------------------------------------------------------------------------------
/mycrud/utils/connectDB.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose')
2 |
3 | async function connectDB() {
4 |
5 | try {
6 | await mongoose.connect('mongodb+srv://muhammed:muhammed@cluster0.57e3zjb.mongodb.net/test',
7 | {useUnifiedTopology:true, useNewUrlParser:true})
8 |
9 | console.log('DB Connected Successfully !')
10 | } catch (error) {
11 | console.log(error)
12 | }
13 |
14 | }
15 |
16 | export default connectDB
--------------------------------------------------------------------------------
/mylayout/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 | # or
12 | pnpm dev
13 | ```
14 |
15 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
16 |
17 | You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
18 |
19 | [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`.
20 |
21 | 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.
22 |
23 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
24 |
25 | ## Learn More
26 |
27 | To learn more about Next.js, take a look at the following resources:
28 |
29 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
30 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
31 |
32 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
33 |
34 | ## Deploy on Vercel
35 |
36 | 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.
37 |
38 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
39 |
--------------------------------------------------------------------------------
/mylayout/components/Footer.js:
--------------------------------------------------------------------------------
1 | export default function Footer() {
2 | return (
3 | <>
4 |
5 |
6 |
Footer section
7 |
8 | >
9 | )
10 | }
--------------------------------------------------------------------------------
/mylayout/components/Header.js:
--------------------------------------------------------------------------------
1 | export default function Header() {
2 | return (
3 | <>
4 |
5 |
Header section 1
6 |
7 |
8 | >
9 | )
10 | }
--------------------------------------------------------------------------------
/mylayout/components/mainLayout.js:
--------------------------------------------------------------------------------
1 | import Footer from "./Footer"
2 | import Header from "./Header"
3 |
4 |
5 | export default function MainLayout(props) {
6 | return (
7 | <>
8 |
9 | {props.children}
10 |
11 | >
12 | )
13 | }
--------------------------------------------------------------------------------
/mylayout/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "paths": {
4 | "@/*": ["./*"]
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/mylayout/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | reactStrictMode: true,
4 | }
5 |
6 | module.exports = nextConfig
7 |
--------------------------------------------------------------------------------
/mylayout/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mylayout",
3 | "version": "0.1.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "mylayout",
9 | "version": "0.1.0",
10 | "dependencies": {
11 | "next": "13.2.4",
12 | "react": "18.2.0",
13 | "react-dom": "18.2.0"
14 | }
15 | },
16 | "node_modules/@next/env": {
17 | "version": "13.2.4",
18 | "resolved": "https://registry.npmjs.org/@next/env/-/env-13.2.4.tgz",
19 | "integrity": "sha512-+Mq3TtpkeeKFZanPturjcXt+KHfKYnLlX6jMLyCrmpq6OOs4i1GqBOAauSkii9QeKCMTYzGppar21JU57b/GEA=="
20 | },
21 | "node_modules/@next/swc-android-arm-eabi": {
22 | "version": "13.2.4",
23 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.4.tgz",
24 | "integrity": "sha512-DWlalTSkLjDU11MY11jg17O1gGQzpRccM9Oes2yTqj2DpHndajrXHGxj9HGtJ+idq2k7ImUdJVWS2h2l/EDJOw==",
25 | "cpu": [
26 | "arm"
27 | ],
28 | "optional": true,
29 | "os": [
30 | "android"
31 | ],
32 | "engines": {
33 | "node": ">= 10"
34 | }
35 | },
36 | "node_modules/@next/swc-android-arm64": {
37 | "version": "13.2.4",
38 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.2.4.tgz",
39 | "integrity": "sha512-sRavmUImUCf332Gy+PjIfLkMhiRX1Ez4SI+3vFDRs1N5eXp+uNzjFUK/oLMMOzk6KFSkbiK/3Wt8+dHQR/flNg==",
40 | "cpu": [
41 | "arm64"
42 | ],
43 | "optional": true,
44 | "os": [
45 | "android"
46 | ],
47 | "engines": {
48 | "node": ">= 10"
49 | }
50 | },
51 | "node_modules/@next/swc-darwin-arm64": {
52 | "version": "13.2.4",
53 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.4.tgz",
54 | "integrity": "sha512-S6vBl+OrInP47TM3LlYx65betocKUUlTZDDKzTiRDbsRESeyIkBtZ6Qi5uT2zQs4imqllJznVjFd1bXLx3Aa6A==",
55 | "cpu": [
56 | "arm64"
57 | ],
58 | "optional": true,
59 | "os": [
60 | "darwin"
61 | ],
62 | "engines": {
63 | "node": ">= 10"
64 | }
65 | },
66 | "node_modules/@next/swc-darwin-x64": {
67 | "version": "13.2.4",
68 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.4.tgz",
69 | "integrity": "sha512-a6LBuoYGcFOPGd4o8TPo7wmv5FnMr+Prz+vYHopEDuhDoMSHOnC+v+Ab4D7F0NMZkvQjEJQdJS3rqgFhlZmKlw==",
70 | "cpu": [
71 | "x64"
72 | ],
73 | "optional": true,
74 | "os": [
75 | "darwin"
76 | ],
77 | "engines": {
78 | "node": ">= 10"
79 | }
80 | },
81 | "node_modules/@next/swc-freebsd-x64": {
82 | "version": "13.2.4",
83 | "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.4.tgz",
84 | "integrity": "sha512-kkbzKVZGPaXRBPisoAQkh3xh22r+TD+5HwoC5bOkALraJ0dsOQgSMAvzMXKsN3tMzJUPS0tjtRf1cTzrQ0I5vQ==",
85 | "cpu": [
86 | "x64"
87 | ],
88 | "optional": true,
89 | "os": [
90 | "freebsd"
91 | ],
92 | "engines": {
93 | "node": ">= 10"
94 | }
95 | },
96 | "node_modules/@next/swc-linux-arm-gnueabihf": {
97 | "version": "13.2.4",
98 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.4.tgz",
99 | "integrity": "sha512-7qA1++UY0fjprqtjBZaOA6cas/7GekpjVsZn/0uHvquuITFCdKGFCsKNBx3S0Rpxmx6WYo0GcmhNRM9ru08BGg==",
100 | "cpu": [
101 | "arm"
102 | ],
103 | "optional": true,
104 | "os": [
105 | "linux"
106 | ],
107 | "engines": {
108 | "node": ">= 10"
109 | }
110 | },
111 | "node_modules/@next/swc-linux-arm64-gnu": {
112 | "version": "13.2.4",
113 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.4.tgz",
114 | "integrity": "sha512-xzYZdAeq883MwXgcwc72hqo/F/dwUxCukpDOkx/j1HTq/J0wJthMGjinN9wH5bPR98Mfeh1MZJ91WWPnZOedOg==",
115 | "cpu": [
116 | "arm64"
117 | ],
118 | "optional": true,
119 | "os": [
120 | "linux"
121 | ],
122 | "engines": {
123 | "node": ">= 10"
124 | }
125 | },
126 | "node_modules/@next/swc-linux-arm64-musl": {
127 | "version": "13.2.4",
128 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.4.tgz",
129 | "integrity": "sha512-8rXr3WfmqSiYkb71qzuDP6I6R2T2tpkmf83elDN8z783N9nvTJf2E7eLx86wu2OJCi4T05nuxCsh4IOU3LQ5xw==",
130 | "cpu": [
131 | "arm64"
132 | ],
133 | "optional": true,
134 | "os": [
135 | "linux"
136 | ],
137 | "engines": {
138 | "node": ">= 10"
139 | }
140 | },
141 | "node_modules/@next/swc-linux-x64-gnu": {
142 | "version": "13.2.4",
143 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.4.tgz",
144 | "integrity": "sha512-Ngxh51zGSlYJ4EfpKG4LI6WfquulNdtmHg1yuOYlaAr33KyPJp4HeN/tivBnAHcZkoNy0hh/SbwDyCnz5PFJQQ==",
145 | "cpu": [
146 | "x64"
147 | ],
148 | "optional": true,
149 | "os": [
150 | "linux"
151 | ],
152 | "engines": {
153 | "node": ">= 10"
154 | }
155 | },
156 | "node_modules/@next/swc-linux-x64-musl": {
157 | "version": "13.2.4",
158 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.4.tgz",
159 | "integrity": "sha512-gOvwIYoSxd+j14LOcvJr+ekd9fwYT1RyMAHOp7znA10+l40wkFiMONPLWiZuHxfRk+Dy7YdNdDh3ImumvL6VwA==",
160 | "cpu": [
161 | "x64"
162 | ],
163 | "optional": true,
164 | "os": [
165 | "linux"
166 | ],
167 | "engines": {
168 | "node": ">= 10"
169 | }
170 | },
171 | "node_modules/@next/swc-win32-arm64-msvc": {
172 | "version": "13.2.4",
173 | "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.4.tgz",
174 | "integrity": "sha512-q3NJzcfClgBm4HvdcnoEncmztxrA5GXqKeiZ/hADvC56pwNALt3ngDC6t6qr1YW9V/EPDxCYeaX4zYxHciW4Dw==",
175 | "cpu": [
176 | "arm64"
177 | ],
178 | "optional": true,
179 | "os": [
180 | "win32"
181 | ],
182 | "engines": {
183 | "node": ">= 10"
184 | }
185 | },
186 | "node_modules/@next/swc-win32-ia32-msvc": {
187 | "version": "13.2.4",
188 | "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.4.tgz",
189 | "integrity": "sha512-/eZ5ncmHUYtD2fc6EUmAIZlAJnVT2YmxDsKs1Ourx0ttTtvtma/WKlMV5NoUsyOez0f9ExLyOpeCoz5aj+MPXw==",
190 | "cpu": [
191 | "ia32"
192 | ],
193 | "optional": true,
194 | "os": [
195 | "win32"
196 | ],
197 | "engines": {
198 | "node": ">= 10"
199 | }
200 | },
201 | "node_modules/@next/swc-win32-x64-msvc": {
202 | "version": "13.2.4",
203 | "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.4.tgz",
204 | "integrity": "sha512-0MffFmyv7tBLlji01qc0IaPP/LVExzvj7/R5x1Jph1bTAIj4Vu81yFQWHHQAP6r4ff9Ukj1mBK6MDNVXm7Tcvw==",
205 | "cpu": [
206 | "x64"
207 | ],
208 | "optional": true,
209 | "os": [
210 | "win32"
211 | ],
212 | "engines": {
213 | "node": ">= 10"
214 | }
215 | },
216 | "node_modules/@swc/helpers": {
217 | "version": "0.4.14",
218 | "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz",
219 | "integrity": "sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==",
220 | "dependencies": {
221 | "tslib": "^2.4.0"
222 | }
223 | },
224 | "node_modules/caniuse-lite": {
225 | "version": "1.0.30001468",
226 | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001468.tgz",
227 | "integrity": "sha512-zgAo8D5kbOyUcRAgSmgyuvBkjrGk5CGYG5TYgFdpQv+ywcyEpo1LOWoG8YmoflGnh+V+UsNuKYedsoYs0hzV5A==",
228 | "funding": [
229 | {
230 | "type": "opencollective",
231 | "url": "https://opencollective.com/browserslist"
232 | },
233 | {
234 | "type": "tidelift",
235 | "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
236 | }
237 | ]
238 | },
239 | "node_modules/client-only": {
240 | "version": "0.0.1",
241 | "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
242 | "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
243 | },
244 | "node_modules/js-tokens": {
245 | "version": "4.0.0",
246 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
247 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
248 | },
249 | "node_modules/loose-envify": {
250 | "version": "1.4.0",
251 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
252 | "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
253 | "dependencies": {
254 | "js-tokens": "^3.0.0 || ^4.0.0"
255 | },
256 | "bin": {
257 | "loose-envify": "cli.js"
258 | }
259 | },
260 | "node_modules/nanoid": {
261 | "version": "3.3.4",
262 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
263 | "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
264 | "bin": {
265 | "nanoid": "bin/nanoid.cjs"
266 | },
267 | "engines": {
268 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
269 | }
270 | },
271 | "node_modules/next": {
272 | "version": "13.2.4",
273 | "resolved": "https://registry.npmjs.org/next/-/next-13.2.4.tgz",
274 | "integrity": "sha512-g1I30317cThkEpvzfXujf0O4wtaQHtDCLhlivwlTJ885Ld+eOgcz7r3TGQzeU+cSRoNHtD8tsJgzxVdYojFssw==",
275 | "dependencies": {
276 | "@next/env": "13.2.4",
277 | "@swc/helpers": "0.4.14",
278 | "caniuse-lite": "^1.0.30001406",
279 | "postcss": "8.4.14",
280 | "styled-jsx": "5.1.1"
281 | },
282 | "bin": {
283 | "next": "dist/bin/next"
284 | },
285 | "engines": {
286 | "node": ">=14.6.0"
287 | },
288 | "optionalDependencies": {
289 | "@next/swc-android-arm-eabi": "13.2.4",
290 | "@next/swc-android-arm64": "13.2.4",
291 | "@next/swc-darwin-arm64": "13.2.4",
292 | "@next/swc-darwin-x64": "13.2.4",
293 | "@next/swc-freebsd-x64": "13.2.4",
294 | "@next/swc-linux-arm-gnueabihf": "13.2.4",
295 | "@next/swc-linux-arm64-gnu": "13.2.4",
296 | "@next/swc-linux-arm64-musl": "13.2.4",
297 | "@next/swc-linux-x64-gnu": "13.2.4",
298 | "@next/swc-linux-x64-musl": "13.2.4",
299 | "@next/swc-win32-arm64-msvc": "13.2.4",
300 | "@next/swc-win32-ia32-msvc": "13.2.4",
301 | "@next/swc-win32-x64-msvc": "13.2.4"
302 | },
303 | "peerDependencies": {
304 | "@opentelemetry/api": "^1.4.0",
305 | "fibers": ">= 3.1.0",
306 | "node-sass": "^6.0.0 || ^7.0.0",
307 | "react": "^18.2.0",
308 | "react-dom": "^18.2.0",
309 | "sass": "^1.3.0"
310 | },
311 | "peerDependenciesMeta": {
312 | "@opentelemetry/api": {
313 | "optional": true
314 | },
315 | "fibers": {
316 | "optional": true
317 | },
318 | "node-sass": {
319 | "optional": true
320 | },
321 | "sass": {
322 | "optional": true
323 | }
324 | }
325 | },
326 | "node_modules/picocolors": {
327 | "version": "1.0.0",
328 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
329 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
330 | },
331 | "node_modules/postcss": {
332 | "version": "8.4.14",
333 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
334 | "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
335 | "funding": [
336 | {
337 | "type": "opencollective",
338 | "url": "https://opencollective.com/postcss/"
339 | },
340 | {
341 | "type": "tidelift",
342 | "url": "https://tidelift.com/funding/github/npm/postcss"
343 | }
344 | ],
345 | "dependencies": {
346 | "nanoid": "^3.3.4",
347 | "picocolors": "^1.0.0",
348 | "source-map-js": "^1.0.2"
349 | },
350 | "engines": {
351 | "node": "^10 || ^12 || >=14"
352 | }
353 | },
354 | "node_modules/react": {
355 | "version": "18.2.0",
356 | "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
357 | "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
358 | "dependencies": {
359 | "loose-envify": "^1.1.0"
360 | },
361 | "engines": {
362 | "node": ">=0.10.0"
363 | }
364 | },
365 | "node_modules/react-dom": {
366 | "version": "18.2.0",
367 | "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
368 | "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
369 | "dependencies": {
370 | "loose-envify": "^1.1.0",
371 | "scheduler": "^0.23.0"
372 | },
373 | "peerDependencies": {
374 | "react": "^18.2.0"
375 | }
376 | },
377 | "node_modules/scheduler": {
378 | "version": "0.23.0",
379 | "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
380 | "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
381 | "dependencies": {
382 | "loose-envify": "^1.1.0"
383 | }
384 | },
385 | "node_modules/source-map-js": {
386 | "version": "1.0.2",
387 | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
388 | "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
389 | "engines": {
390 | "node": ">=0.10.0"
391 | }
392 | },
393 | "node_modules/styled-jsx": {
394 | "version": "5.1.1",
395 | "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
396 | "integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==",
397 | "dependencies": {
398 | "client-only": "0.0.1"
399 | },
400 | "engines": {
401 | "node": ">= 12.0.0"
402 | },
403 | "peerDependencies": {
404 | "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0"
405 | },
406 | "peerDependenciesMeta": {
407 | "@babel/core": {
408 | "optional": true
409 | },
410 | "babel-plugin-macros": {
411 | "optional": true
412 | }
413 | }
414 | },
415 | "node_modules/tslib": {
416 | "version": "2.5.0",
417 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
418 | "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
419 | }
420 | }
421 | }
422 |
--------------------------------------------------------------------------------
/mylayout/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mylayout",
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": "13.2.4",
13 | "react": "18.2.0",
14 | "react-dom": "18.2.0"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/mylayout/pages/_app.js:
--------------------------------------------------------------------------------
1 | import '@/styles/globals.css'
2 |
3 | import MainLayout from "@/components/mainLayout"
4 | import Head from 'next/head'
5 |
6 |
7 | export default function App({ Component, pageProps }) {
8 | return (
9 |
10 |
11 |
12 |
13 | MUhammed Essa
14 |
15 |
16 |
17 |
18 | )
19 | }
20 |
--------------------------------------------------------------------------------
/mylayout/pages/_document.js:
--------------------------------------------------------------------------------
1 | import { Html, Head, Main, NextScript } from 'next/document'
2 |
3 | export default function Document() {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | )
13 | }
14 |
--------------------------------------------------------------------------------
/mylayout/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 |
--------------------------------------------------------------------------------
/mylayout/pages/contactus.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | export default function Contact() {
4 | return (
5 | <>
6 |
7 | Contact US page
8 |
9 | >
10 | )
11 | }
--------------------------------------------------------------------------------
/mylayout/pages/index.js:
--------------------------------------------------------------------------------
1 | import indexStyle from '@/styles/Index.module.css'
2 |
3 |
4 | export default function Home() {
5 | return (
6 | <>
7 |
8 | Hello this is index page
9 | Iam still in index page
10 | This color index page
11 |
12 | >
13 | )
14 | }
15 |
--------------------------------------------------------------------------------
/mylayout/pages/users.js:
--------------------------------------------------------------------------------
1 | export default function Users() {
2 | return (
3 | <>
4 |
5 | Users page
6 |
7 |
8 | >
9 | )
10 | }
--------------------------------------------------------------------------------
/mylayout/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/next-js-tutorial/5513d2176b1f0741c3acd7fc655fd75f366e1b89/mylayout/public/favicon.ico
--------------------------------------------------------------------------------
/mylayout/public/next.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mylayout/public/thirteen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mylayout/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mylayout/styles/Home.module.css:
--------------------------------------------------------------------------------
1 | .main {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: space-between;
5 | align-items: center;
6 | padding: 6rem;
7 | min-height: 100vh;
8 | }
9 |
10 | .description {
11 | display: inherit;
12 | justify-content: inherit;
13 | align-items: inherit;
14 | font-size: 0.85rem;
15 | max-width: var(--max-width);
16 | width: 100%;
17 | z-index: 2;
18 | font-family: var(--font-mono);
19 | }
20 |
21 | .description a {
22 | display: flex;
23 | justify-content: center;
24 | align-items: center;
25 | gap: 0.5rem;
26 | }
27 |
28 | .description p {
29 | position: relative;
30 | margin: 0;
31 | padding: 1rem;
32 | background-color: rgba(var(--callout-rgb), 0.5);
33 | border: 1px solid rgba(var(--callout-border-rgb), 0.3);
34 | border-radius: var(--border-radius);
35 | }
36 |
37 | .code {
38 | font-weight: 700;
39 | font-family: var(--font-mono);
40 | }
41 |
42 | .grid {
43 | display: grid;
44 | grid-template-columns: repeat(4, minmax(25%, auto));
45 | width: var(--max-width);
46 | max-width: 100%;
47 | }
48 |
49 | .card {
50 | padding: 1rem 1.2rem;
51 | border-radius: var(--border-radius);
52 | background: rgba(var(--card-rgb), 0);
53 | border: 1px solid rgba(var(--card-border-rgb), 0);
54 | transition: background 200ms, border 200ms;
55 | }
56 |
57 | .card span {
58 | display: inline-block;
59 | transition: transform 200ms;
60 | }
61 |
62 | .card h2 {
63 | font-weight: 600;
64 | margin-bottom: 0.7rem;
65 | }
66 |
67 | .card p {
68 | margin: 0;
69 | opacity: 0.6;
70 | font-size: 0.9rem;
71 | line-height: 1.5;
72 | max-width: 30ch;
73 | }
74 |
75 | .center {
76 | display: flex;
77 | justify-content: center;
78 | align-items: center;
79 | position: relative;
80 | padding: 4rem 0;
81 | }
82 |
83 | .center::before {
84 | background: var(--secondary-glow);
85 | border-radius: 50%;
86 | width: 480px;
87 | height: 360px;
88 | margin-left: -400px;
89 | }
90 |
91 | .center::after {
92 | background: var(--primary-glow);
93 | width: 240px;
94 | height: 180px;
95 | z-index: -1;
96 | }
97 |
98 | .center::before,
99 | .center::after {
100 | content: '';
101 | left: 50%;
102 | position: absolute;
103 | filter: blur(45px);
104 | transform: translateZ(0);
105 | }
106 |
107 | .logo,
108 | .thirteen {
109 | position: relative;
110 | }
111 |
112 | .thirteen {
113 | display: flex;
114 | justify-content: center;
115 | align-items: center;
116 | width: 75px;
117 | height: 75px;
118 | padding: 25px 10px;
119 | margin-left: 16px;
120 | transform: translateZ(0);
121 | border-radius: var(--border-radius);
122 | overflow: hidden;
123 | box-shadow: 0px 2px 8px -1px #0000001a;
124 | }
125 |
126 | .thirteen::before,
127 | .thirteen::after {
128 | content: '';
129 | position: absolute;
130 | z-index: -1;
131 | }
132 |
133 | /* Conic Gradient Animation */
134 | .thirteen::before {
135 | animation: 6s rotate linear infinite;
136 | width: 200%;
137 | height: 200%;
138 | background: var(--tile-border);
139 | }
140 |
141 | /* Inner Square */
142 | .thirteen::after {
143 | inset: 0;
144 | padding: 1px;
145 | border-radius: var(--border-radius);
146 | background: linear-gradient(
147 | to bottom right,
148 | rgba(var(--tile-start-rgb), 1),
149 | rgba(var(--tile-end-rgb), 1)
150 | );
151 | background-clip: content-box;
152 | }
153 |
154 | /* Enable hover only on non-touch devices */
155 | @media (hover: hover) and (pointer: fine) {
156 | .card:hover {
157 | background: rgba(var(--card-rgb), 0.1);
158 | border: 1px solid rgba(var(--card-border-rgb), 0.15);
159 | }
160 |
161 | .card:hover span {
162 | transform: translateX(4px);
163 | }
164 | }
165 |
166 | @media (prefers-reduced-motion) {
167 | .thirteen::before {
168 | animation: none;
169 | }
170 |
171 | .card:hover span {
172 | transform: none;
173 | }
174 | }
175 |
176 | /* Mobile */
177 | @media (max-width: 700px) {
178 | .content {
179 | padding: 4rem;
180 | }
181 |
182 | .grid {
183 | grid-template-columns: 1fr;
184 | margin-bottom: 120px;
185 | max-width: 320px;
186 | text-align: center;
187 | }
188 |
189 | .card {
190 | padding: 1rem 2.5rem;
191 | }
192 |
193 | .card h2 {
194 | margin-bottom: 0.5rem;
195 | }
196 |
197 | .center {
198 | padding: 8rem 0 6rem;
199 | }
200 |
201 | .center::before {
202 | transform: none;
203 | height: 300px;
204 | }
205 |
206 | .description {
207 | font-size: 0.8rem;
208 | }
209 |
210 | .description a {
211 | padding: 1rem;
212 | }
213 |
214 | .description p,
215 | .description div {
216 | display: flex;
217 | justify-content: center;
218 | position: fixed;
219 | width: 100%;
220 | }
221 |
222 | .description p {
223 | align-items: center;
224 | inset: 0 0 auto;
225 | padding: 2rem 1rem 1.4rem;
226 | border-radius: 0;
227 | border: none;
228 | border-bottom: 1px solid rgba(var(--callout-border-rgb), 0.25);
229 | background: linear-gradient(
230 | to bottom,
231 | rgba(var(--background-start-rgb), 1),
232 | rgba(var(--callout-rgb), 0.5)
233 | );
234 | background-clip: padding-box;
235 | backdrop-filter: blur(24px);
236 | }
237 |
238 | .description div {
239 | align-items: flex-end;
240 | pointer-events: none;
241 | inset: auto 0 0;
242 | padding: 2rem;
243 | height: 200px;
244 | background: linear-gradient(
245 | to bottom,
246 | transparent 0%,
247 | rgb(var(--background-end-rgb)) 40%
248 | );
249 | z-index: 1;
250 | }
251 | }
252 |
253 | /* Tablet and Smaller Desktop */
254 | @media (min-width: 701px) and (max-width: 1120px) {
255 | .grid {
256 | grid-template-columns: repeat(2, 50%);
257 | }
258 | }
259 |
260 | @media (prefers-color-scheme: dark) {
261 | .vercelLogo {
262 | filter: invert(1);
263 | }
264 |
265 | .logo,
266 | .thirteen img {
267 | filter: invert(1) drop-shadow(0 0 0.3rem #ffffff70);
268 | }
269 | }
270 |
271 | @keyframes rotate {
272 | from {
273 | transform: rotate(360deg);
274 | }
275 | to {
276 | transform: rotate(0deg);
277 | }
278 | }
279 |
--------------------------------------------------------------------------------
/mylayout/styles/Index.module.css:
--------------------------------------------------------------------------------
1 | .myinfo{
2 | background-color:rgb(37, 178, 77);
3 | }
4 |
5 | .h1{
6 | color:rgb(7, 48, 48);
7 | }
--------------------------------------------------------------------------------
/mylayout/styles/globals.css:
--------------------------------------------------------------------------------
1 | body{
2 | background-color: darkorange;
3 | }
4 |
5 | .header{
6 | background-color:rgb(105, 37, 178);
7 | }
8 |
9 |
10 | .footer{
11 | background-color:rgb(178, 37, 72);
12 | }
13 |
14 | h1{
15 | color: aqua;
16 | }
--------------------------------------------------------------------------------
/mymongodata/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 | # or
12 | pnpm dev
13 | ```
14 |
15 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
16 |
17 | You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
18 |
19 | [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`.
20 |
21 | 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.
22 |
23 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
24 |
25 | ## Learn More
26 |
27 | To learn more about Next.js, take a look at the following resources:
28 |
29 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
30 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
31 |
32 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
33 |
34 | ## Deploy on Vercel
35 |
36 | 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.
37 |
38 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
39 |
--------------------------------------------------------------------------------
/mymongodata/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "paths": {
4 | "@/*": ["./*"]
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/mymongodata/models/Post.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 |
3 |
4 | const postSchema = new mongoose.Schema({
5 | title : String,
6 | details: String,
7 | user: String,
8 | age: Number
9 | })
10 |
11 |
12 | export default mongoose.models.Post || mongoose.model('Post',postSchema )
--------------------------------------------------------------------------------
/mymongodata/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | reactStrictMode: true,
4 | }
5 |
6 | module.exports = nextConfig
7 |
--------------------------------------------------------------------------------
/mymongodata/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mymongodata",
3 | "version": "0.1.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "mymongodata",
9 | "version": "0.1.0",
10 | "dependencies": {
11 | "mongoose": "^7.0.2",
12 | "next": "13.2.4",
13 | "next-connect": "^0.13.0",
14 | "react": "18.2.0",
15 | "react-dom": "18.2.0"
16 | }
17 | },
18 | "node_modules/@next/env": {
19 | "version": "13.2.4",
20 | "resolved": "https://registry.npmjs.org/@next/env/-/env-13.2.4.tgz",
21 | "integrity": "sha512-+Mq3TtpkeeKFZanPturjcXt+KHfKYnLlX6jMLyCrmpq6OOs4i1GqBOAauSkii9QeKCMTYzGppar21JU57b/GEA=="
22 | },
23 | "node_modules/@next/swc-android-arm-eabi": {
24 | "version": "13.2.4",
25 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.4.tgz",
26 | "integrity": "sha512-DWlalTSkLjDU11MY11jg17O1gGQzpRccM9Oes2yTqj2DpHndajrXHGxj9HGtJ+idq2k7ImUdJVWS2h2l/EDJOw==",
27 | "cpu": [
28 | "arm"
29 | ],
30 | "optional": true,
31 | "os": [
32 | "android"
33 | ],
34 | "engines": {
35 | "node": ">= 10"
36 | }
37 | },
38 | "node_modules/@next/swc-android-arm64": {
39 | "version": "13.2.4",
40 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.2.4.tgz",
41 | "integrity": "sha512-sRavmUImUCf332Gy+PjIfLkMhiRX1Ez4SI+3vFDRs1N5eXp+uNzjFUK/oLMMOzk6KFSkbiK/3Wt8+dHQR/flNg==",
42 | "cpu": [
43 | "arm64"
44 | ],
45 | "optional": true,
46 | "os": [
47 | "android"
48 | ],
49 | "engines": {
50 | "node": ">= 10"
51 | }
52 | },
53 | "node_modules/@next/swc-darwin-arm64": {
54 | "version": "13.2.4",
55 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.4.tgz",
56 | "integrity": "sha512-S6vBl+OrInP47TM3LlYx65betocKUUlTZDDKzTiRDbsRESeyIkBtZ6Qi5uT2zQs4imqllJznVjFd1bXLx3Aa6A==",
57 | "cpu": [
58 | "arm64"
59 | ],
60 | "optional": true,
61 | "os": [
62 | "darwin"
63 | ],
64 | "engines": {
65 | "node": ">= 10"
66 | }
67 | },
68 | "node_modules/@next/swc-darwin-x64": {
69 | "version": "13.2.4",
70 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.4.tgz",
71 | "integrity": "sha512-a6LBuoYGcFOPGd4o8TPo7wmv5FnMr+Prz+vYHopEDuhDoMSHOnC+v+Ab4D7F0NMZkvQjEJQdJS3rqgFhlZmKlw==",
72 | "cpu": [
73 | "x64"
74 | ],
75 | "optional": true,
76 | "os": [
77 | "darwin"
78 | ],
79 | "engines": {
80 | "node": ">= 10"
81 | }
82 | },
83 | "node_modules/@next/swc-freebsd-x64": {
84 | "version": "13.2.4",
85 | "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.4.tgz",
86 | "integrity": "sha512-kkbzKVZGPaXRBPisoAQkh3xh22r+TD+5HwoC5bOkALraJ0dsOQgSMAvzMXKsN3tMzJUPS0tjtRf1cTzrQ0I5vQ==",
87 | "cpu": [
88 | "x64"
89 | ],
90 | "optional": true,
91 | "os": [
92 | "freebsd"
93 | ],
94 | "engines": {
95 | "node": ">= 10"
96 | }
97 | },
98 | "node_modules/@next/swc-linux-arm-gnueabihf": {
99 | "version": "13.2.4",
100 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.4.tgz",
101 | "integrity": "sha512-7qA1++UY0fjprqtjBZaOA6cas/7GekpjVsZn/0uHvquuITFCdKGFCsKNBx3S0Rpxmx6WYo0GcmhNRM9ru08BGg==",
102 | "cpu": [
103 | "arm"
104 | ],
105 | "optional": true,
106 | "os": [
107 | "linux"
108 | ],
109 | "engines": {
110 | "node": ">= 10"
111 | }
112 | },
113 | "node_modules/@next/swc-linux-arm64-gnu": {
114 | "version": "13.2.4",
115 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.4.tgz",
116 | "integrity": "sha512-xzYZdAeq883MwXgcwc72hqo/F/dwUxCukpDOkx/j1HTq/J0wJthMGjinN9wH5bPR98Mfeh1MZJ91WWPnZOedOg==",
117 | "cpu": [
118 | "arm64"
119 | ],
120 | "optional": true,
121 | "os": [
122 | "linux"
123 | ],
124 | "engines": {
125 | "node": ">= 10"
126 | }
127 | },
128 | "node_modules/@next/swc-linux-arm64-musl": {
129 | "version": "13.2.4",
130 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.4.tgz",
131 | "integrity": "sha512-8rXr3WfmqSiYkb71qzuDP6I6R2T2tpkmf83elDN8z783N9nvTJf2E7eLx86wu2OJCi4T05nuxCsh4IOU3LQ5xw==",
132 | "cpu": [
133 | "arm64"
134 | ],
135 | "optional": true,
136 | "os": [
137 | "linux"
138 | ],
139 | "engines": {
140 | "node": ">= 10"
141 | }
142 | },
143 | "node_modules/@next/swc-linux-x64-gnu": {
144 | "version": "13.2.4",
145 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.4.tgz",
146 | "integrity": "sha512-Ngxh51zGSlYJ4EfpKG4LI6WfquulNdtmHg1yuOYlaAr33KyPJp4HeN/tivBnAHcZkoNy0hh/SbwDyCnz5PFJQQ==",
147 | "cpu": [
148 | "x64"
149 | ],
150 | "optional": true,
151 | "os": [
152 | "linux"
153 | ],
154 | "engines": {
155 | "node": ">= 10"
156 | }
157 | },
158 | "node_modules/@next/swc-linux-x64-musl": {
159 | "version": "13.2.4",
160 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.4.tgz",
161 | "integrity": "sha512-gOvwIYoSxd+j14LOcvJr+ekd9fwYT1RyMAHOp7znA10+l40wkFiMONPLWiZuHxfRk+Dy7YdNdDh3ImumvL6VwA==",
162 | "cpu": [
163 | "x64"
164 | ],
165 | "optional": true,
166 | "os": [
167 | "linux"
168 | ],
169 | "engines": {
170 | "node": ">= 10"
171 | }
172 | },
173 | "node_modules/@next/swc-win32-arm64-msvc": {
174 | "version": "13.2.4",
175 | "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.4.tgz",
176 | "integrity": "sha512-q3NJzcfClgBm4HvdcnoEncmztxrA5GXqKeiZ/hADvC56pwNALt3ngDC6t6qr1YW9V/EPDxCYeaX4zYxHciW4Dw==",
177 | "cpu": [
178 | "arm64"
179 | ],
180 | "optional": true,
181 | "os": [
182 | "win32"
183 | ],
184 | "engines": {
185 | "node": ">= 10"
186 | }
187 | },
188 | "node_modules/@next/swc-win32-ia32-msvc": {
189 | "version": "13.2.4",
190 | "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.4.tgz",
191 | "integrity": "sha512-/eZ5ncmHUYtD2fc6EUmAIZlAJnVT2YmxDsKs1Ourx0ttTtvtma/WKlMV5NoUsyOez0f9ExLyOpeCoz5aj+MPXw==",
192 | "cpu": [
193 | "ia32"
194 | ],
195 | "optional": true,
196 | "os": [
197 | "win32"
198 | ],
199 | "engines": {
200 | "node": ">= 10"
201 | }
202 | },
203 | "node_modules/@next/swc-win32-x64-msvc": {
204 | "version": "13.2.4",
205 | "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.4.tgz",
206 | "integrity": "sha512-0MffFmyv7tBLlji01qc0IaPP/LVExzvj7/R5x1Jph1bTAIj4Vu81yFQWHHQAP6r4ff9Ukj1mBK6MDNVXm7Tcvw==",
207 | "cpu": [
208 | "x64"
209 | ],
210 | "optional": true,
211 | "os": [
212 | "win32"
213 | ],
214 | "engines": {
215 | "node": ">= 10"
216 | }
217 | },
218 | "node_modules/@swc/helpers": {
219 | "version": "0.4.14",
220 | "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz",
221 | "integrity": "sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==",
222 | "dependencies": {
223 | "tslib": "^2.4.0"
224 | }
225 | },
226 | "node_modules/@types/node": {
227 | "version": "18.15.5",
228 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.5.tgz",
229 | "integrity": "sha512-Ark2WDjjZO7GmvsyFFf81MXuGTA/d6oP38anyxWOL6EREyBKAxKoFHwBhaZxCfLRLpO8JgVXwqOwSwa7jRcjew=="
230 | },
231 | "node_modules/@types/webidl-conversions": {
232 | "version": "7.0.0",
233 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
234 | "integrity": "sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog=="
235 | },
236 | "node_modules/@types/whatwg-url": {
237 | "version": "8.2.2",
238 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz",
239 | "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==",
240 | "dependencies": {
241 | "@types/node": "*",
242 | "@types/webidl-conversions": "*"
243 | }
244 | },
245 | "node_modules/bson": {
246 | "version": "5.1.0",
247 | "resolved": "https://registry.npmjs.org/bson/-/bson-5.1.0.tgz",
248 | "integrity": "sha512-FEecNHkhYRBe7X9KDkdG12xNuz5VHGeH6mCE0B5sBmYtiR/Ux/9vUH/v4NUoBCDr6NuEhvahjoLiiRogptVW0A==",
249 | "engines": {
250 | "node": ">=14.20.1"
251 | }
252 | },
253 | "node_modules/caniuse-lite": {
254 | "version": "1.0.30001468",
255 | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001468.tgz",
256 | "integrity": "sha512-zgAo8D5kbOyUcRAgSmgyuvBkjrGk5CGYG5TYgFdpQv+ywcyEpo1LOWoG8YmoflGnh+V+UsNuKYedsoYs0hzV5A==",
257 | "funding": [
258 | {
259 | "type": "opencollective",
260 | "url": "https://opencollective.com/browserslist"
261 | },
262 | {
263 | "type": "tidelift",
264 | "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
265 | }
266 | ]
267 | },
268 | "node_modules/client-only": {
269 | "version": "0.0.1",
270 | "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
271 | "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
272 | },
273 | "node_modules/debug": {
274 | "version": "4.3.4",
275 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
276 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
277 | "dependencies": {
278 | "ms": "2.1.2"
279 | },
280 | "engines": {
281 | "node": ">=6.0"
282 | },
283 | "peerDependenciesMeta": {
284 | "supports-color": {
285 | "optional": true
286 | }
287 | }
288 | },
289 | "node_modules/debug/node_modules/ms": {
290 | "version": "2.1.2",
291 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
292 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
293 | },
294 | "node_modules/ip": {
295 | "version": "2.0.0",
296 | "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
297 | "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ=="
298 | },
299 | "node_modules/js-tokens": {
300 | "version": "4.0.0",
301 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
302 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
303 | },
304 | "node_modules/kareem": {
305 | "version": "2.5.1",
306 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz",
307 | "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==",
308 | "engines": {
309 | "node": ">=12.0.0"
310 | }
311 | },
312 | "node_modules/loose-envify": {
313 | "version": "1.4.0",
314 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
315 | "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
316 | "dependencies": {
317 | "js-tokens": "^3.0.0 || ^4.0.0"
318 | },
319 | "bin": {
320 | "loose-envify": "cli.js"
321 | }
322 | },
323 | "node_modules/memory-pager": {
324 | "version": "1.5.0",
325 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
326 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
327 | "optional": true
328 | },
329 | "node_modules/mongodb": {
330 | "version": "5.1.0",
331 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.1.0.tgz",
332 | "integrity": "sha512-qgKb7y+EI90y4weY3z5+lIgm8wmexbonz0GalHkSElQXVKtRuwqXuhXKccyvIjXCJVy9qPV82zsinY0W1FBnJw==",
333 | "dependencies": {
334 | "bson": "^5.0.1",
335 | "mongodb-connection-string-url": "^2.6.0",
336 | "socks": "^2.7.1"
337 | },
338 | "engines": {
339 | "node": ">=14.20.1"
340 | },
341 | "optionalDependencies": {
342 | "saslprep": "^1.0.3"
343 | },
344 | "peerDependencies": {
345 | "@aws-sdk/credential-providers": "^3.201.0",
346 | "mongodb-client-encryption": "^2.3.0",
347 | "snappy": "^7.2.2"
348 | },
349 | "peerDependenciesMeta": {
350 | "@aws-sdk/credential-providers": {
351 | "optional": true
352 | },
353 | "mongodb-client-encryption": {
354 | "optional": true
355 | },
356 | "snappy": {
357 | "optional": true
358 | }
359 | }
360 | },
361 | "node_modules/mongodb-connection-string-url": {
362 | "version": "2.6.0",
363 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz",
364 | "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==",
365 | "dependencies": {
366 | "@types/whatwg-url": "^8.2.1",
367 | "whatwg-url": "^11.0.0"
368 | }
369 | },
370 | "node_modules/mongoose": {
371 | "version": "7.0.2",
372 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.0.2.tgz",
373 | "integrity": "sha512-whX+5lAOLOs6VXRr9w+6m5qb8m/IXWLLb9+0/HRUh2TiIYtTt7UvajK92zW6wllCjBkrrnz/MDIOTCWMbs8K4g==",
374 | "dependencies": {
375 | "bson": "^5.0.1",
376 | "kareem": "2.5.1",
377 | "mongodb": "5.1.0",
378 | "mpath": "0.9.0",
379 | "mquery": "5.0.0",
380 | "ms": "2.1.3",
381 | "sift": "16.0.1"
382 | },
383 | "engines": {
384 | "node": ">=14.0.0"
385 | },
386 | "funding": {
387 | "type": "opencollective",
388 | "url": "https://opencollective.com/mongoose"
389 | }
390 | },
391 | "node_modules/mpath": {
392 | "version": "0.9.0",
393 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
394 | "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==",
395 | "engines": {
396 | "node": ">=4.0.0"
397 | }
398 | },
399 | "node_modules/mquery": {
400 | "version": "5.0.0",
401 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz",
402 | "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==",
403 | "dependencies": {
404 | "debug": "4.x"
405 | },
406 | "engines": {
407 | "node": ">=14.0.0"
408 | }
409 | },
410 | "node_modules/ms": {
411 | "version": "2.1.3",
412 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
413 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
414 | },
415 | "node_modules/nanoid": {
416 | "version": "3.3.4",
417 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
418 | "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
419 | "bin": {
420 | "nanoid": "bin/nanoid.cjs"
421 | },
422 | "engines": {
423 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
424 | }
425 | },
426 | "node_modules/next": {
427 | "version": "13.2.4",
428 | "resolved": "https://registry.npmjs.org/next/-/next-13.2.4.tgz",
429 | "integrity": "sha512-g1I30317cThkEpvzfXujf0O4wtaQHtDCLhlivwlTJ885Ld+eOgcz7r3TGQzeU+cSRoNHtD8tsJgzxVdYojFssw==",
430 | "dependencies": {
431 | "@next/env": "13.2.4",
432 | "@swc/helpers": "0.4.14",
433 | "caniuse-lite": "^1.0.30001406",
434 | "postcss": "8.4.14",
435 | "styled-jsx": "5.1.1"
436 | },
437 | "bin": {
438 | "next": "dist/bin/next"
439 | },
440 | "engines": {
441 | "node": ">=14.6.0"
442 | },
443 | "optionalDependencies": {
444 | "@next/swc-android-arm-eabi": "13.2.4",
445 | "@next/swc-android-arm64": "13.2.4",
446 | "@next/swc-darwin-arm64": "13.2.4",
447 | "@next/swc-darwin-x64": "13.2.4",
448 | "@next/swc-freebsd-x64": "13.2.4",
449 | "@next/swc-linux-arm-gnueabihf": "13.2.4",
450 | "@next/swc-linux-arm64-gnu": "13.2.4",
451 | "@next/swc-linux-arm64-musl": "13.2.4",
452 | "@next/swc-linux-x64-gnu": "13.2.4",
453 | "@next/swc-linux-x64-musl": "13.2.4",
454 | "@next/swc-win32-arm64-msvc": "13.2.4",
455 | "@next/swc-win32-ia32-msvc": "13.2.4",
456 | "@next/swc-win32-x64-msvc": "13.2.4"
457 | },
458 | "peerDependencies": {
459 | "@opentelemetry/api": "^1.4.0",
460 | "fibers": ">= 3.1.0",
461 | "node-sass": "^6.0.0 || ^7.0.0",
462 | "react": "^18.2.0",
463 | "react-dom": "^18.2.0",
464 | "sass": "^1.3.0"
465 | },
466 | "peerDependenciesMeta": {
467 | "@opentelemetry/api": {
468 | "optional": true
469 | },
470 | "fibers": {
471 | "optional": true
472 | },
473 | "node-sass": {
474 | "optional": true
475 | },
476 | "sass": {
477 | "optional": true
478 | }
479 | }
480 | },
481 | "node_modules/next-connect": {
482 | "version": "0.13.0",
483 | "resolved": "https://registry.npmjs.org/next-connect/-/next-connect-0.13.0.tgz",
484 | "integrity": "sha512-f2G4edY01XomjCECSrgOpb/zzQinJO6Whd8Zds0+rLUYhj5cLwkh6FVvZsQCSSbxSc4k9nCwNuk5NLIhvO1gUA==",
485 | "dependencies": {
486 | "trouter": "^3.2.0"
487 | }
488 | },
489 | "node_modules/picocolors": {
490 | "version": "1.0.0",
491 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
492 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
493 | },
494 | "node_modules/postcss": {
495 | "version": "8.4.14",
496 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
497 | "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
498 | "funding": [
499 | {
500 | "type": "opencollective",
501 | "url": "https://opencollective.com/postcss/"
502 | },
503 | {
504 | "type": "tidelift",
505 | "url": "https://tidelift.com/funding/github/npm/postcss"
506 | }
507 | ],
508 | "dependencies": {
509 | "nanoid": "^3.3.4",
510 | "picocolors": "^1.0.0",
511 | "source-map-js": "^1.0.2"
512 | },
513 | "engines": {
514 | "node": "^10 || ^12 || >=14"
515 | }
516 | },
517 | "node_modules/punycode": {
518 | "version": "2.3.0",
519 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
520 | "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
521 | "engines": {
522 | "node": ">=6"
523 | }
524 | },
525 | "node_modules/react": {
526 | "version": "18.2.0",
527 | "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
528 | "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
529 | "dependencies": {
530 | "loose-envify": "^1.1.0"
531 | },
532 | "engines": {
533 | "node": ">=0.10.0"
534 | }
535 | },
536 | "node_modules/react-dom": {
537 | "version": "18.2.0",
538 | "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
539 | "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
540 | "dependencies": {
541 | "loose-envify": "^1.1.0",
542 | "scheduler": "^0.23.0"
543 | },
544 | "peerDependencies": {
545 | "react": "^18.2.0"
546 | }
547 | },
548 | "node_modules/regexparam": {
549 | "version": "1.3.0",
550 | "resolved": "https://registry.npmjs.org/regexparam/-/regexparam-1.3.0.tgz",
551 | "integrity": "sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g==",
552 | "engines": {
553 | "node": ">=6"
554 | }
555 | },
556 | "node_modules/saslprep": {
557 | "version": "1.0.3",
558 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
559 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
560 | "optional": true,
561 | "dependencies": {
562 | "sparse-bitfield": "^3.0.3"
563 | },
564 | "engines": {
565 | "node": ">=6"
566 | }
567 | },
568 | "node_modules/scheduler": {
569 | "version": "0.23.0",
570 | "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
571 | "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
572 | "dependencies": {
573 | "loose-envify": "^1.1.0"
574 | }
575 | },
576 | "node_modules/sift": {
577 | "version": "16.0.1",
578 | "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz",
579 | "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ=="
580 | },
581 | "node_modules/smart-buffer": {
582 | "version": "4.2.0",
583 | "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
584 | "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
585 | "engines": {
586 | "node": ">= 6.0.0",
587 | "npm": ">= 3.0.0"
588 | }
589 | },
590 | "node_modules/socks": {
591 | "version": "2.7.1",
592 | "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz",
593 | "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==",
594 | "dependencies": {
595 | "ip": "^2.0.0",
596 | "smart-buffer": "^4.2.0"
597 | },
598 | "engines": {
599 | "node": ">= 10.13.0",
600 | "npm": ">= 3.0.0"
601 | }
602 | },
603 | "node_modules/source-map-js": {
604 | "version": "1.0.2",
605 | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
606 | "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
607 | "engines": {
608 | "node": ">=0.10.0"
609 | }
610 | },
611 | "node_modules/sparse-bitfield": {
612 | "version": "3.0.3",
613 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
614 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
615 | "optional": true,
616 | "dependencies": {
617 | "memory-pager": "^1.0.2"
618 | }
619 | },
620 | "node_modules/styled-jsx": {
621 | "version": "5.1.1",
622 | "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
623 | "integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==",
624 | "dependencies": {
625 | "client-only": "0.0.1"
626 | },
627 | "engines": {
628 | "node": ">= 12.0.0"
629 | },
630 | "peerDependencies": {
631 | "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0"
632 | },
633 | "peerDependenciesMeta": {
634 | "@babel/core": {
635 | "optional": true
636 | },
637 | "babel-plugin-macros": {
638 | "optional": true
639 | }
640 | }
641 | },
642 | "node_modules/tr46": {
643 | "version": "3.0.0",
644 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
645 | "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
646 | "dependencies": {
647 | "punycode": "^2.1.1"
648 | },
649 | "engines": {
650 | "node": ">=12"
651 | }
652 | },
653 | "node_modules/trouter": {
654 | "version": "3.2.1",
655 | "resolved": "https://registry.npmjs.org/trouter/-/trouter-3.2.1.tgz",
656 | "integrity": "sha512-oY3CmIiEYOe1YMEzh++I67lrNOUldtCeuLL0vRPydvQLHZpSJ03B5dgDFlpFsiriMq6e//NDjjopjUzXOztHow==",
657 | "dependencies": {
658 | "regexparam": "^1.3.0"
659 | },
660 | "engines": {
661 | "node": ">=6"
662 | }
663 | },
664 | "node_modules/tslib": {
665 | "version": "2.5.0",
666 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
667 | "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
668 | },
669 | "node_modules/webidl-conversions": {
670 | "version": "7.0.0",
671 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
672 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
673 | "engines": {
674 | "node": ">=12"
675 | }
676 | },
677 | "node_modules/whatwg-url": {
678 | "version": "11.0.0",
679 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
680 | "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
681 | "dependencies": {
682 | "tr46": "^3.0.0",
683 | "webidl-conversions": "^7.0.0"
684 | },
685 | "engines": {
686 | "node": ">=12"
687 | }
688 | }
689 | }
690 | }
691 |
--------------------------------------------------------------------------------
/mymongodata/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mymongodata",
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 | "mongoose": "^7.0.2",
13 | "next": "13.2.4",
14 | "next-connect": "^0.13.0",
15 | "react": "18.2.0",
16 | "react-dom": "18.2.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/mymongodata/pages/_app.js:
--------------------------------------------------------------------------------
1 | //import '@/styles/globals.css'
2 |
3 | export default function App({ Component, pageProps }) {
4 | return
5 | }
6 |
--------------------------------------------------------------------------------
/mymongodata/pages/_document.js:
--------------------------------------------------------------------------------
1 | import { Html, Head, Main, NextScript } from 'next/document'
2 |
3 | export default function Document() {
4 | return (
5 |
6 |
8 |
9 |
10 |
11 |
12 | )
13 | }
14 |
--------------------------------------------------------------------------------
/mymongodata/pages/api/hello.js:
--------------------------------------------------------------------------------
1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2 |
3 | import dbConnect from "@/utils/dbConnect"
4 |
5 |
6 | dbConnect()
7 |
8 |
9 | export default function handler(req, res) {
10 | res.status(200).json({ name: 'John Doe' })
11 | }
12 |
--------------------------------------------------------------------------------
/mymongodata/pages/api/posts/[id].js:
--------------------------------------------------------------------------------
1 | import Post from "@/models/Post";
2 | import dbConnect from "@/utils/dbConnect";
3 | import nc from "next-connect";
4 |
5 | dbConnect()
6 |
7 |
8 | const handler = nc().delete(async(req, res) => {
9 |
10 | try {
11 | const posts = await Post.findOneAndDelete({_id: req.query.id})
12 | res.send('Deleted !');
13 | } catch (error) {
14 | return res.status(400).json({message:'Sorry something went wrong !'});
15 | }
16 |
17 |
18 | }) .put(async (req, res) => {
19 |
20 | try {
21 | const post = await Post.findOne({_id: req.query.id})
22 | post.title = req.body.title
23 | post.details= req.body.details
24 | post.user= req.body.user
25 | post.age= req.body.age
26 | await post.save()
27 | res.send('Updated !');
28 | } catch (error) {
29 | return res.status(400).json({message:'Sorry something went wrong !'});
30 | }
31 |
32 |
33 | })
34 |
35 | export default handler
--------------------------------------------------------------------------------
/mymongodata/pages/api/posts/index.js:
--------------------------------------------------------------------------------
1 | import Post from "@/models/Post";
2 | import dbConnect from "@/utils/dbConnect";
3 | import nc from "next-connect";
4 |
5 | dbConnect()
6 |
7 |
8 | const handler = nc().get(async(req, res) => {
9 |
10 | try {
11 | const posts = await Post.find({})
12 | res.send(posts);
13 | } catch (error) {
14 | return res.status(400).json({message:'Sorry something went wrong !'});
15 | }
16 |
17 |
18 | }).post(async(req, res) => {
19 | const {title,details,user,age} = req.body
20 | const newpost = new Post({title,details,user,age})
21 | try {
22 | await newpost.save()
23 | res.send('New post added !');
24 | } catch (error) {
25 | return res.status(400).json({message:'Sorry something went wrong !'});
26 | }
27 | })
28 |
29 |
30 |
31 | export default handler
--------------------------------------------------------------------------------
/mymongodata/pages/index.js:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | export default function Home() {
5 | return (
6 | <>
7 | Hello Database
8 | >
9 | )
10 | }
11 |
--------------------------------------------------------------------------------
/mymongodata/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/next-js-tutorial/5513d2176b1f0741c3acd7fc655fd75f366e1b89/mymongodata/public/favicon.ico
--------------------------------------------------------------------------------
/mymongodata/public/next.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mymongodata/public/thirteen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mymongodata/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mymongodata/styles/Home.module.css:
--------------------------------------------------------------------------------
1 | .main {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: space-between;
5 | align-items: center;
6 | padding: 6rem;
7 | min-height: 100vh;
8 | }
9 |
10 | .description {
11 | display: inherit;
12 | justify-content: inherit;
13 | align-items: inherit;
14 | font-size: 0.85rem;
15 | max-width: var(--max-width);
16 | width: 100%;
17 | z-index: 2;
18 | font-family: var(--font-mono);
19 | }
20 |
21 | .description a {
22 | display: flex;
23 | justify-content: center;
24 | align-items: center;
25 | gap: 0.5rem;
26 | }
27 |
28 | .description p {
29 | position: relative;
30 | margin: 0;
31 | padding: 1rem;
32 | background-color: rgba(var(--callout-rgb), 0.5);
33 | border: 1px solid rgba(var(--callout-border-rgb), 0.3);
34 | border-radius: var(--border-radius);
35 | }
36 |
37 | .code {
38 | font-weight: 700;
39 | font-family: var(--font-mono);
40 | }
41 |
42 | .grid {
43 | display: grid;
44 | grid-template-columns: repeat(4, minmax(25%, auto));
45 | width: var(--max-width);
46 | max-width: 100%;
47 | }
48 |
49 | .card {
50 | padding: 1rem 1.2rem;
51 | border-radius: var(--border-radius);
52 | background: rgba(var(--card-rgb), 0);
53 | border: 1px solid rgba(var(--card-border-rgb), 0);
54 | transition: background 200ms, border 200ms;
55 | }
56 |
57 | .card span {
58 | display: inline-block;
59 | transition: transform 200ms;
60 | }
61 |
62 | .card h2 {
63 | font-weight: 600;
64 | margin-bottom: 0.7rem;
65 | }
66 |
67 | .card p {
68 | margin: 0;
69 | opacity: 0.6;
70 | font-size: 0.9rem;
71 | line-height: 1.5;
72 | max-width: 30ch;
73 | }
74 |
75 | .center {
76 | display: flex;
77 | justify-content: center;
78 | align-items: center;
79 | position: relative;
80 | padding: 4rem 0;
81 | }
82 |
83 | .center::before {
84 | background: var(--secondary-glow);
85 | border-radius: 50%;
86 | width: 480px;
87 | height: 360px;
88 | margin-left: -400px;
89 | }
90 |
91 | .center::after {
92 | background: var(--primary-glow);
93 | width: 240px;
94 | height: 180px;
95 | z-index: -1;
96 | }
97 |
98 | .center::before,
99 | .center::after {
100 | content: '';
101 | left: 50%;
102 | position: absolute;
103 | filter: blur(45px);
104 | transform: translateZ(0);
105 | }
106 |
107 | .logo,
108 | .thirteen {
109 | position: relative;
110 | }
111 |
112 | .thirteen {
113 | display: flex;
114 | justify-content: center;
115 | align-items: center;
116 | width: 75px;
117 | height: 75px;
118 | padding: 25px 10px;
119 | margin-left: 16px;
120 | transform: translateZ(0);
121 | border-radius: var(--border-radius);
122 | overflow: hidden;
123 | box-shadow: 0px 2px 8px -1px #0000001a;
124 | }
125 |
126 | .thirteen::before,
127 | .thirteen::after {
128 | content: '';
129 | position: absolute;
130 | z-index: -1;
131 | }
132 |
133 | /* Conic Gradient Animation */
134 | .thirteen::before {
135 | animation: 6s rotate linear infinite;
136 | width: 200%;
137 | height: 200%;
138 | background: var(--tile-border);
139 | }
140 |
141 | /* Inner Square */
142 | .thirteen::after {
143 | inset: 0;
144 | padding: 1px;
145 | border-radius: var(--border-radius);
146 | background: linear-gradient(
147 | to bottom right,
148 | rgba(var(--tile-start-rgb), 1),
149 | rgba(var(--tile-end-rgb), 1)
150 | );
151 | background-clip: content-box;
152 | }
153 |
154 | /* Enable hover only on non-touch devices */
155 | @media (hover: hover) and (pointer: fine) {
156 | .card:hover {
157 | background: rgba(var(--card-rgb), 0.1);
158 | border: 1px solid rgba(var(--card-border-rgb), 0.15);
159 | }
160 |
161 | .card:hover span {
162 | transform: translateX(4px);
163 | }
164 | }
165 |
166 | @media (prefers-reduced-motion) {
167 | .thirteen::before {
168 | animation: none;
169 | }
170 |
171 | .card:hover span {
172 | transform: none;
173 | }
174 | }
175 |
176 | /* Mobile */
177 | @media (max-width: 700px) {
178 | .content {
179 | padding: 4rem;
180 | }
181 |
182 | .grid {
183 | grid-template-columns: 1fr;
184 | margin-bottom: 120px;
185 | max-width: 320px;
186 | text-align: center;
187 | }
188 |
189 | .card {
190 | padding: 1rem 2.5rem;
191 | }
192 |
193 | .card h2 {
194 | margin-bottom: 0.5rem;
195 | }
196 |
197 | .center {
198 | padding: 8rem 0 6rem;
199 | }
200 |
201 | .center::before {
202 | transform: none;
203 | height: 300px;
204 | }
205 |
206 | .description {
207 | font-size: 0.8rem;
208 | }
209 |
210 | .description a {
211 | padding: 1rem;
212 | }
213 |
214 | .description p,
215 | .description div {
216 | display: flex;
217 | justify-content: center;
218 | position: fixed;
219 | width: 100%;
220 | }
221 |
222 | .description p {
223 | align-items: center;
224 | inset: 0 0 auto;
225 | padding: 2rem 1rem 1.4rem;
226 | border-radius: 0;
227 | border: none;
228 | border-bottom: 1px solid rgba(var(--callout-border-rgb), 0.25);
229 | background: linear-gradient(
230 | to bottom,
231 | rgba(var(--background-start-rgb), 1),
232 | rgba(var(--callout-rgb), 0.5)
233 | );
234 | background-clip: padding-box;
235 | backdrop-filter: blur(24px);
236 | }
237 |
238 | .description div {
239 | align-items: flex-end;
240 | pointer-events: none;
241 | inset: auto 0 0;
242 | padding: 2rem;
243 | height: 200px;
244 | background: linear-gradient(
245 | to bottom,
246 | transparent 0%,
247 | rgb(var(--background-end-rgb)) 40%
248 | );
249 | z-index: 1;
250 | }
251 | }
252 |
253 | /* Tablet and Smaller Desktop */
254 | @media (min-width: 701px) and (max-width: 1120px) {
255 | .grid {
256 | grid-template-columns: repeat(2, 50%);
257 | }
258 | }
259 |
260 | @media (prefers-color-scheme: dark) {
261 | .vercelLogo {
262 | filter: invert(1);
263 | }
264 |
265 | .logo,
266 | .thirteen img {
267 | filter: invert(1) drop-shadow(0 0 0.3rem #ffffff70);
268 | }
269 | }
270 |
271 | @keyframes rotate {
272 | from {
273 | transform: rotate(360deg);
274 | }
275 | to {
276 | transform: rotate(0deg);
277 | }
278 | }
279 |
--------------------------------------------------------------------------------
/mymongodata/styles/globals.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --max-width: 1100px;
3 | --border-radius: 12px;
4 | --font-mono: ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono',
5 | 'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro',
6 | 'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;
7 |
8 | --foreground-rgb: 0, 0, 0;
9 | --background-start-rgb: 214, 219, 220;
10 | --background-end-rgb: 255, 255, 255;
11 |
12 | --primary-glow: conic-gradient(
13 | from 180deg at 50% 50%,
14 | #16abff33 0deg,
15 | #0885ff33 55deg,
16 | #54d6ff33 120deg,
17 | #0071ff33 160deg,
18 | transparent 360deg
19 | );
20 | --secondary-glow: radial-gradient(
21 | rgba(255, 255, 255, 1),
22 | rgba(255, 255, 255, 0)
23 | );
24 |
25 | --tile-start-rgb: 239, 245, 249;
26 | --tile-end-rgb: 228, 232, 233;
27 | --tile-border: conic-gradient(
28 | #00000080,
29 | #00000040,
30 | #00000030,
31 | #00000020,
32 | #00000010,
33 | #00000010,
34 | #00000080
35 | );
36 |
37 | --callout-rgb: 238, 240, 241;
38 | --callout-border-rgb: 172, 175, 176;
39 | --card-rgb: 180, 185, 188;
40 | --card-border-rgb: 131, 134, 135;
41 | }
42 |
43 | @media (prefers-color-scheme: dark) {
44 | :root {
45 | --foreground-rgb: 255, 255, 255;
46 | --background-start-rgb: 0, 0, 0;
47 | --background-end-rgb: 0, 0, 0;
48 |
49 | --primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
50 | --secondary-glow: linear-gradient(
51 | to bottom right,
52 | rgba(1, 65, 255, 0),
53 | rgba(1, 65, 255, 0),
54 | rgba(1, 65, 255, 0.3)
55 | );
56 |
57 | --tile-start-rgb: 2, 13, 46;
58 | --tile-end-rgb: 2, 5, 19;
59 | --tile-border: conic-gradient(
60 | #ffffff80,
61 | #ffffff40,
62 | #ffffff30,
63 | #ffffff20,
64 | #ffffff10,
65 | #ffffff10,
66 | #ffffff80
67 | );
68 |
69 | --callout-rgb: 20, 20, 20;
70 | --callout-border-rgb: 108, 108, 108;
71 | --card-rgb: 100, 100, 100;
72 | --card-border-rgb: 200, 200, 200;
73 | }
74 | }
75 |
76 | * {
77 | box-sizing: border-box;
78 | padding: 0;
79 | margin: 0;
80 | }
81 |
82 | html,
83 | body {
84 | max-width: 100vw;
85 | overflow-x: hidden;
86 | }
87 |
88 | body {
89 | color: rgb(var(--foreground-rgb));
90 | background: linear-gradient(
91 | to bottom,
92 | transparent,
93 | rgb(var(--background-end-rgb))
94 | )
95 | rgb(var(--background-start-rgb));
96 | }
97 |
98 | a {
99 | color: inherit;
100 | text-decoration: none;
101 | }
102 |
103 | @media (prefers-color-scheme: dark) {
104 | html {
105 | color-scheme: dark;
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/mymongodata/utils/dbConnect.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 |
3 | export default async function dbConnect() {
4 | try {
5 | await mongoose.connect('mongodb+srv://muhammed:muhammed@cluster0.57e3zjb.mongodb.net/test' ,
6 | {useUnifiedTopology:true , useNewUrlParser:true});
7 |
8 | console.log('Connected successfully !')
9 |
10 | } catch (error) {
11 | console.log(error)
12 | }
13 | }
14 |
15 |
--------------------------------------------------------------------------------