Telegram Web
๐Ÿ’ก JavaScript is full of hidden Web API gems you probably arenโ€™t using.

From observing elements to copying content, this carousel breaks down underrated APIs that level up your frontend.
โค4
ู…ูู‡ูˆู… ุงู„ู€ Middleware ููŠ Next.js ๐Ÿ’ก
.
.
ุฃูƒูŠุฏ ู‚ุงุจู„ุช ุณูŠู†ุงุฑูŠูˆ ุฅู†ูƒ ู…ุญุชุงุฌ ุชุชุญูƒู… ููŠ ุงู„ู€ requests ุงู„ู„ูŠ ุฏุงุฎู„ุฉ ู„ู…ูˆู‚ุนูƒ ุฃูˆ ุชุนู…ู„ checks ู…ุนูŠู†ุฉ ู‚ุจู„ ู…ุง ุงู„ู€ user ูŠุดูˆู ุงู„ู€ page. ู…ุซู„ู‹ุง:

- ู…ุญุชุงุฌ ุชู…ู†ุน user ู…ุด ุนุงู…ู„ login ุฅู†ู‡ ูŠุฏุฎู„ ุตูุญุฉ ู…ุนูŠู†ุฉ.
- ุฃูˆ ุชุนู…ู„ redirect ู„ูˆ user ู…ุด ุนู†ุฏู‡ ุตู„ุงุญูŠุงุช.
- ุฃูˆ ุญุชู‰ ุชุถูŠู headers ุฃูˆ ุชุนู…ู„ logging ู„ูƒู„ request.

ุงู„ุญุชุฉ ุฏูŠ ููŠ ุฃูŠ app ุจุชุจู‚ู‰ critical ุฌุฏู‹ุงุŒ ู„ุฃู†ูƒ ุณุงุนุงุช ู…ุญุชุงุฌ layer ูƒุฏู‡ ููŠ ุงู„ู†ุต ุจูŠู† request ุงู„ู€ user ูˆุงู„ู€ response ุงู„ู„ูŠ ุฑุงุฌุน. ูˆู‡ู†ุง ูŠูŠุฌูŠ ุฏูˆุฑ ุงู„ู€ Middleware...

โ€”โ€”โ€”

๐Ÿ”ฅ ูŠุนู†ูŠ ุฅูŠู‡ MiddlewareุŸ

ุงู„ู€ Middleware ุจุจุณุงุทุฉ ุนุจุงุฑุฉ ุนู† function ุจุชุชู†ูุฐ ู‚ุจู„ ู…ุง ุงู„ู€ request ูŠูˆุตู„ ู„ู„ู€ route.

ูŠุนู†ูŠ ู‡ูˆ ูˆุงู‚ู ูƒู€ ุญุงุฑุณ ุงู„ุจูˆุงุจุฉ: ุฃูŠ request ู„ุงุฒู… ูŠุนุฏูŠ ู…ู†ู‡ ุงู„ุฃูˆู„ุŒ ูˆุณุงุนุชู‡ุง ุฃู†ุช ุชู‚ุฏุฑ:

- ุชุบูŠุฑ ููŠ ุงู„ู€ request ุฃูˆ ุงู„ู€ response.
- ุชุนู…ู„ redirect ุฃูˆ rewrite.
- ุชู…ู†ุน requests ู…ุนูŠู†ุฉ.
- ุฃูˆ ุญุชู‰ ุชุถูŠู logic ุฒูŠ ุงู„ู€ authentication, logging, A/B testing, rate limitingโ€ฆ ุฅู„ุฎ.

โ€”โ€”โ€”

๐Ÿ“Œ ุฅุฒุงูŠ ุงู„ู€ Middleware ุจูŠุดุชุบู„ ููŠ Next.jsุŸ

ููŠ Next.js 13 (ูˆุงู„ู€ App Router)ุŒ ู„ูˆ ุนุงูŠุฒ ุชุนู…ู„ Middleware ุจุชุถูŠู ู…ู„ู ุจุงุณู…:

middleware.ts or middleware.js

ููŠ ุงู„ู€ root ุจุชุงุน ุงู„ู€ project.

ุงู„ู€ function ุงู„ุฃุณุงุณูŠุฉ ุจุชูƒูˆู† ูƒุฏู‡:

import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'

export function middleware(req: NextRequest) {
// Example: check if user is authenticated
const token = req.cookies.get('token')

if (!token) {
return NextResponse.redirect(new URL('/login', req.url))
}

return NextResponse.next()
}

export const config = {
matcher: ['/dashboard/:path*'],
}


โœ… ุงู„ู„ูŠ ุจูŠุญุตู„ ู‡ู†ุง:

- ุฃูŠ request ุฏุงุฎู„ ุนู„ู‰ /dashboard/* ู„ุงุฒู… ูŠุนุฏูŠ ู…ู† ุงู„ู€ middleware.
- ู„ูˆ ู…ููŠุด token: ูŠุชุนู…ู„ redirect ุนู„ู‰ /login.
- ู„ูˆ ููŠู‡ token: ูŠูƒู…ู„ ุนุงุฏูŠ.

โ€”โ€”โ€”

โšก๏ธ ุฃู‡ู… ู…ู…ูŠุฒุงุช ุงู„ู€ Middleware ููŠ Next.js:

1- ุงู„ู€ Edge Runtime:
ุจูŠุชู†ูุฐ ุนู„ู‰ ุงู„ู€ Edge (Cloudflare Workers/Akamaiโ€ฆ ุฅู„ุฎ) ูŠุนู†ูŠ ultra fast ูˆู…ุด ู…ุญุชุงุฌ server ุชู‚ูŠู„.

2- ุงู„ู€ Lightweight:
ู…ุด ู…ุนู…ูˆู„ ุฅู†ู‡ ูŠุดูŠู„ logic ุชู‚ูŠู„ ุฌุฏู‹ุงุŒ ู‡ูˆ ุจุณ layer ุณุฑูŠุนุฉ ู„ู„ู€ requests.

3- ุงู„ู€ Selective Matching:
ุชู‚ุฏุฑ ุชุญุฏุฏ routes ู…ุนูŠู†ุฉ ุจุณ ุงู„ู„ูŠ ุชุนุฏูŠ ู…ู† ุงู„ู€ middleware ุนู† ุทุฑูŠู‚ ุงู„ู€ matcher.

4- ุนู†ุฏู‡ Use Cases ู…ุชู†ูˆุนุฉ:

- Authentication & Authorization.
- Redirects & Rewrites.
- A/B Testing
- Bot Protection.
- Internationalization

โ€”โ€”โ€”

ุฎู„ูŠ ุจุงู„ูƒ ุฅู† ุงู„ู€ Middleware ู…ุด ู…ูƒุงู† ุชุญุท ููŠู‡ ูƒู„ ุงู„ู€ business logic ุจุชุงุนูƒุŒ ู‡ูˆ ู…ุนู…ูˆู„ ู„ู„ุญุงุฌุงุช ุงู„ู„ูŠ ู…ุญุชุงุฌุฉ ุชุชู†ูุฐ ุจุณุฑุนุฉ ูˆู‚ุจู„ ู…ุง ุงู„ู€ request ูŠุฑูˆุญ ู„ู„ู€ route.

ูŠุนู†ูŠ authentication, headers, redirectsโ€ฆ ุญุงุฌุงุช ูƒุฏู‡. ู„ูƒู† ุงู„ู€ heavy logic ู…ูƒุงู†ู‡ุง ู…ุด ู‡ู†ุง.

โ€”โ€”โ€”

ูˆูู‚ูƒู… ุงู„ู„ู‡ ู„ูƒู„ ุฎูŠุฑ ๐ŸŒฟ
โค8
DevOps Full Course | Build and Deploy a Scalable Production Ready API


Learn DevOps fast in this crash course covering Git & GitHub, CI/CD pipelines, Docker, Kubernetes, IaC, and API deployment. Everything you need to automate dev and deployment.

โ€”โ€”โ€”

https://youtu.be/H5FAxTBuNM8
โค5๐Ÿคฃ1
Design Patterns Cheat Sheet ๐Ÿ’ฏ


The cheat sheet briefly explains each pattern and how to use it.
โค3๐Ÿคฃ1
ุงุณุฃู„ู†ูŠ ุนู† ุฃูŠ ุดูŠุก ู…ู† ุฎู„ุงู„ ุญุณุงุจูŠ ููŠ ู‚ุจูŠู„ุฉ ๐Ÿ‘‡๐Ÿป

https://qabilah.com/profile/alisamir/professional-profile?target=ask-me-anything
โค3๐Ÿคฃ1
ูƒูˆุฑุณ React.js ู…ู…ุชุงุฒ ๐Ÿ’ฏ
.
.
React Full Course - Beginner to Pro (React 19, 2025)

1. React Basics, JSX
2. Components, Props, Start the Chatbot Project
3. State, Event Handlers, Chatbot Project Features
4. CSS with React, Hooks, Finish Chatbot Project
5. Proper React Setup with Vite
6. React Router, Git, Start the E-commerce Project
7. React with Backend, Data Fetching, Load E-commerce Project Data
8. Data Mutation, Update E-commerce Project Data
9. Automated Tests in React with Vitest
10. Deploy React to the Internet, Intro to AWS
11. React 19 Updates
12. TypeScript with React
13. AI with React
.
.
https://youtu.be/TtPXvEcE11E
โค10๐Ÿคฃ1
CI/CD Simplified Visual Guide ๐Ÿ’ก


Whether you're a developer, a DevOps specialist, a tester, or involved in any modern IT role, CI/CD pipelines have become an integral part of the software development process.
โค4๐Ÿคฃ1
ุจู„ุงุด ุชุณุชุฎุฏู… git pull โš ๏ธ
.
.

ุจูุถู„ ุงู„ู„ู‡ ุชู… ู†ุดุฑ ู…ู‚ุงู„ ุฌุฏูŠุฏ ุนู„ู‰ ู…ุฏูˆู†ุฉ Level Up Coding ุนู„ู‰ ู…ู†ุตุฉ Medium โœ…

ุดุฑุญ ู…ุจุณุท ูˆูˆุงุถุญ ู„ู„ูุฑู‚ ุจูŠู†:

- git pull
- git pull --rebase
.
.
Git Pull vs. Git Pull โ€” Rebase: A Complete Guide for Developers ๐Ÿ’ฏ

โ€”โ€”โ€”

ุงู„ู…ู‚ุงู„ ูƒุงู…ู„ ู‡ู†ุง ๐Ÿ‘‡

https://medium.com/gitconnected/git-pull-vs-git-pull-rebase-a-complete-guide-for-developers-e209ce0df18c

โ€”โ€”โ€”

ูˆูู‚ูƒู… ุงู„ู„ู‡ ู„ูƒู„ ุฎูŠุฑ ๐ŸŒฟ
โค7๐Ÿ‘1๐Ÿคฃ1
ุฃู‡ู… ุจุฏุงุฆู„ ุงู„ู€ localStorage ๐Ÿ’ก
.
.
ุฎู„ุงู„ ุฑุญู„ุชูƒ ููŠ ุนุงู„ู… ุงู„ู€ Front-End ู„ุงุฒู… ููŠ ูˆู‚ุช ู…ู† ุงู„ุฃูˆู‚ุงุช ู‡ุชุญุชุงุฌ ุชุฎุฒู† ุจูŠุงู†ุงุช ุนู†ุฏ ุงู„ู€ Client Side (ูŠุนู†ูŠ ุนู†ุฏ ุงู„ู…ุณุชุฎุฏู…).

ุฃุจุณุท ุญุงุฌุฉ ูƒู„ู†ุง ุนุฑูู†ุงู‡ุง ููŠ ุงู„ุฃูˆู„ ู‡ูŠ ุงู„ู€ localStorage. ุณู‡ู„ุฉ ุฌุฏู‹ุง ูˆุงู„ูƒูˆุฏ ุจุณูŠุทุŒ ูˆูƒู…ุงู† ุนุจุงุฑุฉ ุนู† key/valueุŒ ุจุณ ุงู„ุญู‚ูŠู‚ุฉ ุฅู† localStorage ู…ุด ุฏุงูŠู…ู‹ุง ุฃุญุณู† ุญู„.

ู„ูŠู‡ุŸ ๐Ÿ‘‡

- ุงู„ู€ size ู…ุญุฏูˆุฏ (ุชู‚ุฑูŠุจู‹ุง 5MB).
- ูƒู„ ุญุงุฌุฉ ุจุชุชุฎุฒู† ูƒู€ string.
- ู…ููŠู‡ุงุด ุฃูŠ ู†ูˆุน ู…ู† ุงู„ู€ security (ู…ู…ูƒู† ุฃูŠ ุญุฏ ูŠู‚ุฑุฃู‡ุง).
- ู…ุด scalable ู„ูˆ ุจุชุชุนุงู…ู„ ู…ุน data ูƒุจูŠุฑุฉ.

ุนู„ุดุงู† ูƒุฏู‡ ุชุนุงู„ ู†ุฏุฑุฏุด ุดูˆูŠุฉ ุนู† 4 ุจุฏุงุฆู„ ู„ู„ู€ localStorage ู…ู…ูƒู† ุชุณุงุนุฏูƒ ููŠ ุจุนุถ ุงู„ุณูŠู†ุงุฑูŠูˆู‡ุงุช ุงู„ู…ุฎุชู„ูุฉ...

โ€”โ€”โ€”

๐Ÿ“Œ ุงู„ู€ IndexedDB

- ุฏูŠ ุนุจุงุฑุฉ ุนู† database ูƒุงู…ู„ุฉ ุฏุงุฎู„ ุงู„ู€ browser.
- ุจุชุฎู„ูŠูƒ ุชุฎุฒู† structured data (objectsุŒ arraysโ€ฆ) ู…ุด ู…ุฌุฑุฏ strings.
- ุจุชุชุนุงู…ู„ ู…ุนุงู‡ุง ุนู† ุทุฑูŠู‚ APIs ุฃูˆ libraries ุฒูŠ Dexie.js ุนุดุงู† ุชุณู‡ู‘ู„ ุงู„ู…ูˆุถูˆุน.
- ู…ู†ุงุณุจุฉ ุฌุฏู‹ุง ู„ูˆ ุนู†ุฏูƒ data ูƒุจูŠุฑุฉ ุฃูˆ offline apps ุฒูŠ Note Apps ุฃูˆ Todo Apps.
- ุฃุณุฑุน ุจูƒุชูŠุฑ ููŠ ุงู„ู€ queries ู…ู† localStorage.

โ€”โ€”โ€”

๐Ÿ“Œ ุงู„ู€ sessionStorage

- ู†ูุณ ููƒุฑุฉ localStorage ุจุงู„ุถุจุท ู„ูƒู† ุงู„ูุฑู‚ ุฅู†ู‡ุง ุจุชุชู…ุณุญ ุฃูˆู„ ู…ุง ุงู„ู€ tab ุชุชู‚ูู„.
- ู…ู†ุงุณุจุฉ ู„ุญุงุฌุงุช temporary ุฒูŠ tokens ุฃุซู†ุงุก ุงู„ู€ session ุฃูˆ data ู…ุด ู…ู‡ู…ุฉ ุชุญุชูุธ ุจู‡ุง ุจุนุฏ ู…ุง ุงู„ูŠูˆุฒุฑ ูŠู‚ูู„ ุงู„ุตูุญุฉ.
- ุญุฌู…ู‡ุง ุจุฑุถู‡ ู…ุญุฏูˆุฏ ุฒูŠ localStorage.

โ€”โ€”โ€”

๐Ÿ“Œ ุงู„ู€ Cookies

- ุฃู‚ุฏู… ูˆุฃุดู‡ุฑ ุทุฑูŠู‚ุฉ ู„ุชุฎุฒูŠู† ุงู„ุจูŠุงู†ุงุช ููŠ ุงู„ู€ browser.
- ู…ูŠุฒุชู‡ุง ุฅู†ู‡ุง ุจุชุชุจุนุช ุชู„ู‚ุงุฆูŠ ู…ุน ูƒู„ HTTP Request ู„ู„ู€ server.
- ู…ู†ุงุณุจุฉ ุฌุฏู‹ุง ู„ู„ู€ authentication (ุฒูŠ ุงู„ู€ JWT tokens ุฃูˆ session IDs).
- ุจุณ ุนูŠุจู‡ุง ุฅู†ู‡ุง ุตุบูŠุฑุฉ (ุญูˆุงู„ูŠ 4KB) ูˆุฃูŠ data ุฒูŠุงุฏุฉ ู…ู…ูƒู† ุชู‚ู„ู„ ุณุฑุนุฉ ุงู„ู€ requests.
- ู„ุงุฒู… ุชุณุชุฎุฏู…ู‡ุง ู„ู„ุญุงุฌุงุช ุงู„ุฎููŠูุฉ ูˆุงู„ู…ู‡ู…ุฉ ุจุณ.

โ€”โ€”โ€”

๐Ÿ“Œ ุงู„ู€ Service Workers + Cache API

- ุฏู‡ ุญู„ advanced ุดูˆูŠุฉุŒ ุจูŠุณุชุฎุฏู… ุงู„ู€ Service Workers ู…ุน Cache API.
- ุจูŠุฎู„ูŠูƒ ุชุฎุฒู† responses ูƒุงู…ู„ุฉ ู…ู† ุงู„ู€ network (ุฒูŠ HTML, CSS, JS, Images).
- ู…ู…ุชุงุฒ ู„ู„ู€ Progressive Web Apps (PWA) ุนุดุงู† ุชุดุชุบู„ offline.
- ุชู‚ุฏุฑ ุชุชุญูƒู… ููŠ caching strategy (ู…ุซู„ู‹ุง: Network First, Cache Firstโ€ฆ).
- ู…ููŠุฏ ุฌุฏู‹ุง ู„ู„ุฃุฏุงุก (performance) ูˆุชุญุณูŠู† ุชุฌุฑุจุฉ ุงู„ู…ุณุชุฎุฏู….

โ€”โ€”โ€”

๐Ÿ’ก ุงู„ุฎู„ุงุตุฉ:

- ู„ูˆ data ูƒุจูŠุฑุฉ: ุงุณุชุฎุฏู… IndexedDB.
- ู„ูˆ data ุจุณูŠุทุฉ ูˆู…ุคู‚ุชุฉ: sessionStorage.
- ู„ูˆ ุนุงูŠุฒ data ุชุชุจุนุช ู„ู„ู€ server: ุงุณุชุฎุฏู… Cookies.
- ู„ูˆ ุจุชุจู†ูŠ PWA ุฃูˆ ู…ุญุชุงุฌ caching ู‚ูˆูŠ: ุงุณุชุฎุฏู… Service Workers + Cache API.

ููƒุฑ ุฏุงูŠู…ู‹ุง ู‚ุจู„ ู…ุง ุชุณุชุฎุฏู… localStorage: ู‡ู„ ู‡ูˆ ูุนู„ู‹ุง ุงู„ุญู„ ุงู„ู…ู†ุงุณุจุŸ ูˆู„ุง ููŠ ุจุฏูŠู„ ุฃูุถู„ ูŠุณุงุนุฏูƒ ู…ู† ู†ุงุญูŠุฉ ุงู„ุฃุฏุงุก ูˆุงู„ุฃู…ุงู†ุŸ

โ€”โ€”โ€”

ูˆูู‚ูƒู… ุงู„ู„ู‡ ู„ูƒู„ ุฎูŠุฑ ๐ŸŒฟ
โค13๐Ÿ‘1๐Ÿคฃ1
React Portals Made Simple ๐Ÿ’ฏ

Tired of z-index headaches when building modals in React?


React Portals let you render modals into separate roots, solving stacking context problems once and for all.
โค3๐Ÿคฃ1
JavaScript Array Methods โœ…
โค8๐Ÿคฃ1
2025/10/18 21:58:08
Back to Top
HTML Embed Code: