{"id":25247,"date":"2026-06-12T08:00:26","date_gmt":"2026-06-12T08:00:26","guid":{"rendered":"https:\/\/umang.pk\/2026\/06\/12\/%d9%81%d9%84%d9%b9%d8%b1-%d8%b3%db%92-%d8%a8%db%8c%da%a9-%d8%a7%db%8c%d9%86%da%88-%d8%aa%da%a9-%da%88%d8%a7%d8%b1%d9%b9-%d8%a7%d9%88%d8%b1-%da%88%d8%a7%d8%b1%d9%b9-%d9%81%d8%b1%d8%a7%da%af-%da%a9\/"},"modified":"2026-06-12T08:00:26","modified_gmt":"2026-06-12T08:00:26","slug":"%d9%81%d9%84%d9%b9%d8%b1-%d8%b3%db%92-%d8%a8%db%8c%da%a9-%d8%a7%db%8c%d9%86%da%88-%d8%aa%da%a9-%da%88%d8%a7%d8%b1%d9%b9-%d8%a7%d9%88%d8%b1-%da%88%d8%a7%d8%b1%d9%b9-%d9%81%d8%b1%d8%a7%da%af-%da%a9","status":"publish","type":"post","link":"https:\/\/umang.pk\/en_us\/2026\/06\/12\/%d9%81%d9%84%d9%b9%d8%b1-%d8%b3%db%92-%d8%a8%db%8c%da%a9-%d8%a7%db%8c%d9%86%da%88-%d8%aa%da%a9-%da%88%d8%a7%d8%b1%d9%b9-%d8%a7%d9%88%d8%b1-%da%88%d8%a7%d8%b1%d9%b9-%d9%81%d8%b1%d8%a7%da%af-%da%a9\/","title":{"rendered":"\u0641\u0644\u0679\u0631 \u0633\u06d2 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u062a\u06a9: \u0688\u0627\u0631\u0679 \u0627\u0648\u0631 \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u06a9\u06d2 \u0633\u0627\u062a\u06be \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u06af\u0631\u06cc\u0688 REST APIs \u06a9\u06cc\u0633\u06d2 \u0628\u0646\u0627\u0626\u06cc\u06ba"},"content":{"rendered":"\n<div id=\"\">\n<p>\u0688\u0627\u0631\u0679 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0633\u067e\u06cc\u06a9\u0679\u0631\u0645 \u067e\u0631 \u0645\u0648\u062c\u0648\u062f \u06c1\u06cc\u06ba\u06d4 \u06a9\u0645 \u0633\u06d2 \u06a9\u0645 \u0627\u062e\u062a\u062a\u0627\u0645 \u067e\u0631 \u0634\u06cc\u0644\u0641 \u06c1\u06d2\u060c \u062e\u0627\u0645 \u0642\u062f\u06cc\u0645 \u0627\u0648\u0631 \u0645\u06a9\u0645\u0644 \u06a9\u0646\u0679\u0631\u0648\u0644 \u06a9\u06d2 \u0633\u0627\u062a\u06be\u06d4 \u06c1\u0631 \u0686\u06cc\u0632 \u06a9\u0648 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u062c\u0648\u0691\u06cc\u06ba\u06d4 \u0628\u0627\u0644\u06a9\u0644 \u0622\u062e\u0631 \u0645\u06cc\u06ba \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u06a9\u0648\u0688 \u062c\u0646\u0631\u06cc\u0634\u0646 \u0627\u0648\u0631 \u0645\u0644\u06a9\u06cc\u062a\u06cc \u0642\u0648\u0627\u0646\u06cc\u0646 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u06cc\u06a9 \u0645\u06a9\u0645\u0644 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u06c1\u06d2\u06d4 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 \u0633\u0627\u062e\u062a\u06cc \u0641\u06cc\u0635\u0644\u06d2 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u0628\u06cc\u0686 \u0645\u06cc\u06ba \u06a9\u06c1\u06cc\u06ba \u06af\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0628\u06c1\u062a \u0633\u06d2 \u0641\u0644\u0679\u0631 \u0627\u0646\u062c\u06cc\u0646\u0626\u0631\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06cc\u06c1 \u0642\u062f\u0631\u062a\u06cc \u0634\u06a9\u0644 \u06c1\u06d2\u06d4<\/p>\n<p>\u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u0627\u06cc\u06a9 \u062a\u06cc\u0632\u060c \u06a9\u0645 \u0633\u06d2 \u06a9\u0645 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u06c1\u06d2 \u062c\u0648 \u0634\u06cc\u0644\u0641 \u06a9\u06d2 \u0627\u0648\u067e\u0631 \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u060c \u062c\u0648 \u0627\u0635\u0644 \u0645\u06cc\u06ba \u0648\u06cc\u0631\u06cc \u06af\u0688 \u0648\u06cc\u0646\u0686\u0631\u0632 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06c1 \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u062a\u06be\u0627 \u0627\u0648\u0631 \u0627\u0628 \u0622\u0632\u0627\u062f\u0627\u0646\u06c1 \u0637\u0648\u0631 \u067e\u0631 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 Next.js \u0627\u0648\u0631 Remix \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0645\u0642\u0628\u0648\u0644 \u06a9\u0631\u062f\u06c1 \u0641\u0627\u0626\u0644 \u067e\u0631 \u0645\u0628\u0646\u06cc \u0631\u0648\u0679\u0646\u06af \u0645\u0627\u0688\u0644 \u06a9\u0648 \u0644\u06cc\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0627\u06cc\u06a9 \u0635\u0627\u0641 CLI \u0645\u06cc\u06ba \u0644\u067e\u06cc\u0679\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0688\u0648\u06cc\u0644\u067e\u0645\u0646\u0679 \u0633\u0631\u0648\u0631\u0632\u060c \u06c1\u0627\u0679 \u0631\u06cc \u0644\u0648\u0688\u0632\u060c \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u0628\u0644\u0688\u0632\u060c \u0627\u0648\u0631 Docker \u062a\u062e\u0644\u06cc\u0642 \u06a9\u0648 \u0628\u0627\u06a9\u0633 \u0633\u06d2 \u0628\u0627\u06c1\u0631 \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0628\u0633 \u0627\u067e\u0646\u06d2 \u067e\u0627\u062a\u06be\/\u0688\u0627\u0626\u0631\u06cc\u06a9\u0679\u0631\u06cc \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0688\u0627\u0631\u0679 \u0641\u0627\u0626\u0644 \u0644\u06a9\u06be\u06cc\u06ba \u0627\u0648\u0631 \u0627\u06cc\u06a9 onRequest \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0627 \u0627\u062e\u0631\u0627\u062c \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 Dart Frog \u0622\u067e \u06a9\u06d2 \u0644\u06cc\u06d2 \u0631\u0648\u0679\u0646\u06af \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u06d2 \u06af\u0627\u06d4 \u06a9\u0648\u0626\u06cc \u0631\u0648\u0679\u0631 \u06a9\u0646\u0641\u06cc\u06af\u0631\u06cc\u0634\u0646 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u060c \u06a9\u0648\u0626\u06cc \u06c1\u06cc\u0646\u0688\u0644\u0631 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u060c \u06a9\u0648\u0626\u06cc \u0645\u0627\u0624\u0646\u0679 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0641\u0627\u0626\u0644 \u0633\u0633\u0679\u0645 \u0631\u0648\u0679\u0631 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0633 \u0622\u0631\u0679\u06cc\u06a9\u0644 \u0645\u06cc\u06ba\u060c \u0622\u067e \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u06a9\u0648 \u0635\u0627\u0631\u0641 \u0627\u0648\u0631 \u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u0645\u06cc\u0646\u062c\u0645\u0646\u0679 REST API \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba \u06af\u06d2 (\u0627\u0648\u067e\u0631 \u0644\u0646\u06a9 \u06a9\u0631\u062f\u06c1 \u0622\u0631\u0679\u06cc\u06a9\u0644 \u0645\u06cc\u06ba \u0648\u06c1\u06cc \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2)\u060c \u0627\u0633\u06d2 PostgreSQL \u0633\u06d2 \u062c\u0648\u0691\u06cc\u06ba \u06af\u06d2\u060c JWT \u062a\u0635\u062f\u06cc\u0642 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u060c \u0627\u0648\u0631 \u0627\u0633\u06d2 Fly.io \u067e\u0631 \u062a\u0639\u06cc\u0646\u0627\u062a \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u06d4<\/p>\n<p>\u0622\u062e\u0631 \u062a\u06a9\u060c \u0622\u067e \u06a9\u0648 Dart Frog \u06a9\u06d2 \u0631\u0648\u0679\u0646\u06af \u0645\u0627\u0688\u0644 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u06af\u06c1\u0631\u06cc \u0633\u0645\u062c\u06be \u06c1\u0648 \u06af\u06cc \u0627\u0648\u0631 \u0627\u0633 \u06a9\u06cc \u0648\u0627\u0636\u062d \u062a\u0635\u0648\u06cc\u0631 \u06c1\u0648 \u06af\u06cc \u06a9\u06c1 \u06cc\u06c1 Shelf \u0627\u0648\u0631 Serverpod \u06a9\u06d2 \u0645\u0642\u0627\u0628\u0644\u06d2 \u0645\u06cc\u06ba \u06a9\u06c1\u0627\u06ba \u0641\u0679 \u0628\u06cc\u0679\u06be\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-table-of-contents\">\u0627\u0646\u0688\u06cc\u06a9\u0633<\/h2>\n<h2 id=\"heading-prerequisites\">\u0634\u0631\u0637\u06cc\u06ba<\/h2>\n<p>\u0634\u0631\u0648\u0639 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u0622\u067e \u06a9\u06d2 \u067e\u0627\u0633 \u06c1\u0648\u0646\u0627 \u0636\u0631\u0648\u0631\u06cc \u06c1\u06d2:<\/p>\n<ul>\n<li>\n<p>\u0688\u0627\u0631\u0679 \u0627\u0648\u0631 \u0641\u0644\u0679\u0631 \u06a9\u06cc \u0646\u0634\u0648\u0648\u0646\u0645\u0627 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0622\u0631\u0627\u0645 \u062f\u06c1 \u0648\u0627\u0642\u0641\u06cc\u062a<\/p>\n<\/li>\n<li>\n<p>REST API \u06a9\u06d2 \u062a\u0635\u0648\u0631\u0627\u062a\u060c \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u06a9\u0627\u062a\u060c HTTP \u0637\u0631\u06cc\u0642\u0648\u06ba \u0627\u0648\u0631 \u0627\u0633\u0679\u06cc\u0679\u0633 \u06a9\u0648\u0688\u0632 \u06a9\u0648 \u0633\u0645\u062c\u06be\u0646\u0627\u06d4<\/p>\n<\/li>\n<li>\n<p>\u0688\u0648\u06a9\u0631 \u0688\u06cc\u0633\u06a9 \u0679\u0627\u067e \u0627\u0646\u0633\u0679\u0627\u0644 \u0627\u0648\u0631 \u0686\u0644 \u0631\u06c1\u0627 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<li>\n<p>\u062a\u0642\u0633\u06cc\u0645 \u06a9\u06d2 \u0644\u06cc\u06d2 Fly.io \u0627\u06a9\u0627\u0624\u0646\u0679<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"heading-how-dart-frog-differs-from-shelf-and-serverpod\">\u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u0634\u06cc\u0644\u0641 \u0627\u0648\u0631 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0633\u06d2 \u06a9\u06cc\u0633\u06d2 \u0645\u062e\u062a\u0644\u0641 \u06c1\u06d2\u06d4<\/h2>\n<p>\u06cc\u06c1 \u0633\u0645\u062c\u06be\u0646\u0627 \u06a9\u06c1 \u062f\u06cc\u06af\u0631 \u062f\u0648 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9\u0633 \u06a9\u06d2 \u0633\u0644\u0633\u0644\u06d2 \u0645\u06cc\u06ba \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u06a9\u06c1\u0627\u06ba \u06a9\u06be\u0691\u0627 \u06c1\u06d2 \u0622\u067e \u06a9\u0648 \u06c1\u0631 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0635\u062d\u06cc\u062d \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0631\u0646\u06d2 \u0645\u06cc\u06ba \u0645\u062f\u062f \u0645\u0644\u06d2 \u06af\u06cc\u06d4<\/p>\n<p>\u0634\u06cc\u0644\u0641 \u0627\u06cc\u06a9 \u0631\u0648\u0679\u0631 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u06c1\u06cc\u0646\u0688\u0644\u0631 \u06a9\u0648 \u062f\u0633\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0645\u0627\u0624\u0646\u0679 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0641\u0648\u0644\u0688\u0631 \u06a9\u06cc \u0633\u0627\u062e\u062a \u06a9\u0627 URL \u0688\u06be\u0627\u0646\u0686\u06d2 \u0633\u06d2 \u06a9\u0648\u0626\u06cc \u062a\u0639\u0644\u0642 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0641\u06cc\u0635\u0644\u06c1 \u06a9\u0631\u06cc\u06ba \u06a9\u06c1 \u06a9\u06cc\u0627 \u06a9\u06c1\u0627\u06ba \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>Serverpod \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u06a9\u0644\u0627\u0633 \u06a9\u06d2 \u0646\u0627\u0645 \u0627\u0648\u0631 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u06d2 \u0646\u0627\u0645 \u0633\u06d2 \u0627\u06cc\u06a9 \u0631\u0627\u0633\u062a\u06c1 \u062a\u06cc\u0627\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u062c\u0628 \u0622\u067e \u06a9\u0644\u0627\u0633 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u062c\u0646\u0631\u06cc\u0679\u0631 \u0686\u0644\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 URL \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0627\u062e\u0630 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4<\/p>\n<p>\u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u0641\u0627\u0626\u0644 \u0633\u0633\u0679\u0645 \u06a9\u0648 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u06cc\u0648 \u0622\u0631 \u0627\u06cc\u0644 \u0688\u06be\u0627\u0646\u0686\u06d2 \u0645\u06cc\u06ba \u0646\u0642\u0634 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 routes\/users\/index.dart \u0645\u06cc\u06ba \u0641\u0627\u0626\u0644 \/users \u0627\u06cc\u0646\u0688 \u067e\u0648\u0627\u0626\u0646\u0679 \u0628\u0646 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4 \u067e\u0627\u062a\u06be\/\u0635\u0627\u0631\u0641\u06cc\u0646\/ \u0645\u06cc\u06ba \u0641\u0627\u0626\u0644\u06cc\u06ba[id].dart \/users\/:id \u0628\u0646 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u06a9\u0648\u0626\u06cc \u062a\u0631\u062a\u06cc\u0628\u060c \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u06cc\u0627 \u062a\u062e\u0644\u06cc\u0642 \u06a9\u06d2 \u0645\u0631\u0627\u062d\u0644 \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4 \u0641\u0627\u0626\u0644 \u0631\u0627\u0633\u062a\u06c1 \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u0645\u0627\u0688\u0644 Flutter \u0627\u0646\u062c\u06cc\u0646\u0626\u0631\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0641\u0648\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0628\u062f\u06cc\u06c1\u06cc \u0645\u062d\u0633\u0648\u0633 \u06a9\u0631\u06d2 \u06af\u0627 \u062c\u0646\u06c1\u0648\u06ba \u0646\u06d2 Next.js \u06cc\u0627 \u06a9\u0648\u0626\u06cc \u062c\u062f\u06cc\u062f \u0648\u06cc\u0628 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0627 \u06c1\u06d2\u06d4 \u0679\u06cc\u0645 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u062a\u0634\u0631\u06cc\u0641 \u0644\u0627\u0646\u0627 \u0628\u06be\u06cc \u0628\u06c1\u062a \u0622\u0633\u0627\u0646 \u06c1\u06d2\u06d4 \u062c\u0628 \u0622\u067e \u0641\u0648\u0644\u0688\u0631 \u06a9\u06d2 \u0688\u06be\u0627\u0646\u0686\u06d2 \u06a9\u0648 \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0622\u067e \u0641\u0648\u0631\u0627\u064b \u0628\u062a\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u06a9\u0648\u0646 \u0633\u06d2 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0627\u06cc\u06a9 \u0627\u0648\u0631 \u0628\u0691\u0627 \u0641\u0631\u0642 RequestContext \u06c1\u06d2\u06d4 \u062c\u0628 \u0634\u06cc\u0644\u0641 \u06a9\u0633\u06cc \u06c1\u06cc\u0646\u0688\u0644\u0631 \u06a9\u0648 \u062e\u0627\u0645 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0628\u06be\u06cc\u062c\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u0627\u0633\u06d2 \u0627\u06cc\u06a9 RequestContext \u0645\u06cc\u06ba \u0644\u067e\u06cc\u0679 \u062f\u06cc\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u06a9\u06c1 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0627\u0648\u0631 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0627\u0646\u062c\u06a9\u0634\u0646 \u06a9\u06cc \u06af\u0626\u06cc \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0642\u062f\u0631 \u06a9\u0648 \u067e\u0627\u0633 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u06a9\u0627 \u0627\u0646\u062d\u0635\u0627\u0631 \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646 \u0645\u06cc\u06a9\u0627\u0646\u0632\u0645 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u06cc\u06c1 \u062e\u0648\u0628\u0635\u0648\u0631\u062a \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-installing-dart-frog\">\u0688\u0627\u0631\u0679 \u0645\u06cc\u0691\u06a9 \u06a9\u06cc \u062a\u0646\u0635\u06cc\u0628<\/h2>\n<p>\u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u0633\u06cc \u0627\u06cc\u0644 \u0622\u0626\u06cc \u0627\u0646\u0633\u0679\u0627\u0644 \u06a9\u0631\u06cc\u06ba:<\/p>\n<pre><code class=\"language-bash\">dart pub global activate dart_frog_cli\n<\/code><\/pre>\n<p>\u062a\u0646\u0635\u06cc\u0628 \u06a9\u06cc \u062a\u0635\u062f\u06cc\u0642 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-bash\">dart_frog --version\n<\/code><\/pre>\n<h2 id=\"heading-creating-the-project\">\u0627\u06cc\u06a9 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0628\u0646\u0627\u0626\u06cc\u06ba<\/h2>\n<pre><code class=\"language-bash\">dart_frog create user_profile_api\ncd user_profile_api\n<\/code><\/pre>\n<p>\u06c1\u0627\u0679 \u0631\u06cc \u0644\u0648\u0688 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0688\u0648\u06cc\u0644\u067e\u0645\u0646\u0679 \u0633\u0631\u0648\u0631 \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-bash\">dart_frog dev\n<\/code><\/pre>\n<p>\u0627\u06af\u0631 \u0622\u067e http:\/\/localhost:8080 \u067e\u0631 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u0622\u067e \u06a9\u0648 \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0637\u06d2 \u0634\u062f\u06c1 \u0627\u0633\u062a\u0642\u0628\u0627\u0644 \u06a9\u0627 \u062c\u0648\u0627\u0628 \u0646\u0638\u0631 \u0622\u0626\u06d2 \u06af\u0627\u06d4 \u0688\u0648\u06cc\u0644\u067e\u0645\u0646\u0679 \u0633\u0631\u0648\u0631 \u0641\u0627\u0626\u0644 \u06a9\u06cc \u062a\u0628\u062f\u06cc\u0644\u06cc\u0648\u06ba \u06a9\u0648 \u062f\u06cc\u06a9\u06be\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0627\u0646\u06c1\u06cc\u06ba \u062f\u0648\u0628\u0627\u0631\u06c1 \u0644\u0648\u0688 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u062a\u0639\u0645\u06cc\u0631 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0634\u0631\u0648\u0639 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-understanding-the-project-structure\">\u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u06cc \u0633\u0627\u062e\u062a \u06a9\u0648 \u0633\u0645\u062c\u06be\u06cc\u06ba\u06d4<\/h2>\n<pre><code class=\"language-plaintext\">user_profile_api\/\n  routes\/\n    index.dart              \u2190 GET \/\n  pubspec.yaml\n  analysis_options.yaml\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0645\u06a9\u0645\u0644 \u0627\u0628\u062a\u062f\u0627\u0626\u06cc \u0688\u06be\u0627\u0646\u0686\u06c1 \u06c1\u06d2\u06d4 \u0635\u0627\u0641 \u0627\u0648\u0631 \u06a9\u0645 \u0633\u06d2 \u06a9\u0645\u06d4 \u06c1\u0645 \u062c\u0648 \u06a9\u0686\u06be \u0628\u06be\u06cc \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba \u06af\u06d2 \u0648\u06c1 \u06cc\u06c1\u0627\u06ba \u0633\u06d2 \u067e\u06be\u06cc\u0644 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4<\/p>\n<p>API \u06a9\u06cc \u062a\u0639\u0645\u06cc\u0631 \u06a9\u06d2 \u0628\u0639\u062f\u060c \u0645\u062c\u0645\u0648\u0639\u06cc \u0688\u06be\u0627\u0646\u0686\u06c1 \u0645\u0646\u062f\u0631\u062c\u06c1 \u0630\u06cc\u0644 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-plaintext\">user_profile_api\/\n  routes\/\n    _middleware.dart         \u2190 global middleware pipeline\n    index.dart               \u2190 GET \/\n    auth\/\n      login.dart             \u2190 POST \/auth\/login\n      register.dart          \u2190 POST \/auth\/register\n    users\/\n      index.dart             \u2190 GET \/users\n      [id].dart              \u2190 GET, PUT, DELETE \/users\/:id\n      [id]\/\n        profile.dart         \u2190 GET, POST, PUT \/users\/:id\/profile\n  lib\/\n    config\/\n      database.dart\n      env.dart\n    models\/\n      user.dart\n      profile.dart\n    repositories\/\n      user_repository.dart\n      profile_repository.dart\n    services\/\n      auth_service.dart\n    middleware\/\n      auth_middleware.dart\n      error_middleware.dart\n  pubspec.yaml\n<\/code><\/pre>\n<p>\u0631\u0648\u0679\u0633\/ \u0641\u0648\u0644\u0688\u0631 \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u0627 \u062f\u0644 \u06c1\u06d2\u06d4 lib\/\u0641\u0648\u0644\u0688\u0631 \u0631\u0648\u0679\u0646\u06af \u062f\u0631\u0622\u0645\u062f \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u0645\u0627\u0645 \u0645\u0634\u062a\u0631\u06a9\u06c1 \u0645\u0646\u0637\u0642 \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0639\u0644\u06cc\u062d\u062f\u06af\u06cc \u0648\u0627\u0636\u062d \u0627\u0648\u0631 \u062c\u0627\u0646 \u0628\u0648\u062c\u06be \u06a9\u0631 \u06c1\u06d2\u06d4 \u0631\u0648\u0679\u0646\u06af \u06a9\u06d2 \u0645\u0633\u0627\u0626\u0644 \u0631\u0648\u0679\u0633\/ \u0645\u06cc\u06ba \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u06a9\u0627\u0631\u0648\u0628\u0627\u0631\u06cc \u0645\u0646\u0637\u0642 lib\/ \u0645\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-dart-frog-core-concepts\">\u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u06a9\u0644\u06cc\u062f\u06cc \u062a\u0635\u0648\u0631\u0627\u062a<\/h2>\n<h3 id=\"heading-file-based-routing\">\u0641\u0627\u0626\u0644 \u067e\u0631 \u0645\u0628\u0646\u06cc \u0631\u0648\u0679\u0646\u06af<\/h3>\n<p>\u0631\u0648\u0679\u0633\/ \u0688\u0627\u0626\u0631\u06a9\u0679\u0631\u06cc \u0645\u06cc\u06ba \u062a\u0645\u0627\u0645 .dart \u0641\u0627\u0626\u0644\u06cc\u06ba \u0631\u0648\u0679\u0633 \u06c1\u06cc\u06ba\u06d4 \u0641\u0627\u0626\u0644 \u06a9\u0627 \u0631\u0627\u0633\u062a\u06c1 URL \u06a9\u06d2 \u0631\u0627\u0633\u062a\u06d2 \u06a9\u0627 \u062a\u0639\u06cc\u0646 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<table>\n<thead>\n<tr>\n<th>\u0641\u0627\u0626\u0644<\/th>\n<th>URL<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>path\/index.dart<\/td>\n<td>\/<\/td>\n<\/tr>\n<tr>\n<td>path\/users\/index.dart<\/td>\n<td>\/\u0635\u0627\u0631\u0641<\/td>\n<\/tr>\n<tr>\n<td>\u0631\u0627\u0633\u062a\u06c1\/\u0635\u0627\u0631\u0641\/[id].dart<\/td>\n<td>\/user\/:ID<\/td>\n<\/tr>\n<tr>\n<td>path\/auth\/login.dart<\/td>\n<td>\/\u062a\u0648\u062b\u06cc\u0642\/\u0644\u0627\u06af \u0627\u0646<\/td>\n<\/tr>\n<tr>\n<td>\u0631\u0627\u0633\u062a\u06c1\/\u0635\u0627\u0631\u0641\/[id]\/profile.dart<\/td>\n<td>\/user\/:ID\/profile<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u06c1\u0631 \u0631\u0648\u0679 \u0641\u0627\u0626\u0644 \u06a9\u0648 \u0627\u06cc\u06a9 onRequest \u0641\u0646\u06a9\u0634\u0646 \u0627\u06cc\u06a9\u0633\u067e\u0648\u0631\u0679 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">import 'package:dart_frog\/dart_frog.dart';\n\nFuture<response> onRequest(RequestContext context) async {\n  return Response.json(body: {'message': 'Hello from Dart Frog'});\n}\n<\/response><\/code><\/pre>\n<p>\u06cc\u06c1 \u0633\u0627\u0631\u06cc \u0688\u06cc\u0644 \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u0641\u0646\u06a9\u0634\u0646\u060c \u0627\u06cc\u06a9 \u0641\u0627\u0626\u0644\u060c \u0627\u06cc\u06a9 \u0631\u0627\u0633\u062a\u06c1\u06d4 \u062c\u0628 \u0622\u067e \u0688\u0627\u0631\u0679_\u0641\u0631\u0648\u06af \u062f\u06cc\u0648 \u06cc\u0627 \u0688\u0627\u0631\u0679_\u0641\u0631\u0648\u06af \u0628\u0644\u0688 \u0686\u0644\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0627\u0646\u062f\u0631\u0648\u0646\u06cc \u0631\u0648\u0679\u0646\u06af \u06af\u0644\u0648 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-the-requestcontext\">RequestContext<\/h3>\n<p>RequestContext \u0627\u06cc\u06a9 \u0627\u06cc\u0633\u06cc \u0686\u06cc\u0632 \u06c1\u06d2 \u062c\u0648 \u062a\u0645\u0627\u0645 \u0631\u0648\u0679 \u06c1\u06cc\u0646\u0688\u0644\u0631\u0632 \u0627\u0648\u0631 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u06a9\u0648 \u0628\u06be\u06cc\u062c\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0635\u0631\u0641 \u0627\u06cc\u06a9 HTTP \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u06d2\u06d4 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u0627\u0648\u0631 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06c1 \u062f\u0627\u062e\u0644 \u06a9\u0631\u062f\u06c1 \u062a\u0645\u0627\u0645 \u0627\u0642\u062f\u0627\u0631 \u06a9\u06d2 \u0644\u0626\u06d2 \u0627\u06cc\u06a9 \u06a9\u0646\u0679\u06cc\u0646\u0631\u06d4<\/p>\n<pre><code class=\"language-dart\">Future<response> onRequest(RequestContext context) async {\n  \/\/ The raw HTTP request\n  final request = context.request;\n\n  \/\/ HTTP method\n  print(request.method); \/\/ GET, POST, etc.\n\n  \/\/ Path parameters (for dynamic routes like [id].dart)\n  final id = context.request.uri.pathSegments.last;\n\n  \/\/ Query parameters\n  final page = request.uri.queryParameters['page'];\n\n  \/\/ Request body\n  final body = await request.json() as Map<string dynamic=\"\">;\n\n  \/\/ Values injected by middleware\n  final db = context.read<databaseconnection>();\n  final currentUser = context.read<authenticateduser>();\n\n  return Response.json(body: {'ok': true});\n}\n<\/authenticateduser><\/databaseconnection><\/string><\/response><\/code><\/pre>\n<p>context.read() \u0627\u0646\u062d\u0635\u0627\u0631 \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646 \u0645\u06cc\u06a9\u0627\u0646\u0632\u0645 \u06c1\u06d2\u06d4 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u0627\u0642\u062f\u0627\u0631 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0631\u0627\u0633\u062a\u06d2 \u0627\u0646\u06c1\u06cc\u06ba \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0631\u0627\u0633\u062a\u06c1 \u0635\u0627\u0641 \u0627\u0648\u0631 \u0642\u0627\u0628\u0644 \u0622\u0632\u0645\u0627\u0626\u0634 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4 \u0631\u0648\u0679 \u06c1\u06cc\u0646\u0688\u0644\u0631 \u0646\u06c1\u06cc\u06ba \u062c\u0627\u0646\u062a\u0627 \u06a9\u06c1 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u0646\u06a9\u0634\u0646 \u06a9\u06cc\u0633\u06d2 \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0633\u06cc\u0627\u0642 \u0648 \u0633\u0628\u0627\u0642 \u0633\u06d2 \u067e\u0691\u06be\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-middleware-and-dependency-injection\">\u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u0627\u0648\u0631 \u0627\u0646\u062d\u0635\u0627\u0631 \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646<\/h3>\n<p>\u06a9\u0648\u0626\u06cc \u0631\u0627\u0633\u062a\u06c1 \u0646\u06c1\u06cc\u06ba <code>_middleware.dart<\/code> \u0622\u0644 \u067e\u0627\u062a\u06be\u0632 \u0641\u0648\u0644\u0688\u0631 \u0645\u06cc\u06ba \u0645\u0648\u062c\u0648\u062f \u0641\u0627\u0626\u0644\u06cc\u06ba \u0627\u0633 \u0641\u0648\u0644\u0688\u0631 \u0627\u0648\u0631 \u0627\u0633 \u06a9\u06d2 \u0633\u0628 \u0641\u0648\u0644\u0688\u0631\u0632 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u0631\u0627\u0633\u062a\u0648\u06ba \u067e\u0631 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u06a9\u0627 \u0627\u0637\u0644\u0627\u0642 \u06a9\u0631\u06cc\u06ba \u06af\u06cc\u06d4 \u06a9\u0648\u0626\u06cc \u0631\u0627\u0633\u062a\u06c1 \u0646\u06c1\u06cc\u06ba <code>_middleware.dart<\/code> \u0631\u0648\u0679 \u067e\u0627\u062a\u06be\/\u0633\u0637\u062d \u067e\u0631 \u06cc\u06c1 \u0639\u0627\u0644\u0645\u06cc \u0633\u0637\u062d \u067e\u0631 \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u06a9\u0627 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u0633\u06cc\u0627\u0642 \u0648 \u0633\u0628\u0627\u0642 \u0645\u06cc\u06ba \u0627\u0642\u062f\u0627\u0631 \u06a9\u0648 \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0646\u0646\u062f\u06c1 \u067e\u06cc\u0679\u0631\u0646 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">import 'package:dart_frog\/dart_frog.dart';\n\nHandler middleware(Handler handler) {\n  return handler.use(\n    provider<databaseconnection>(\n      (context) => DatabaseConnection.instance,\n    ),\n  );\n}\n<\/databaseconnection><\/code><\/pre>\n<p>\u0627\u06cc\u06a9 \u06c1\u06cc \u0641\u0648\u0644\u0688\u0631 \u06cc\u0627 \u0633\u0628 \u0641\u0648\u0644\u0688\u0631 \u0645\u06cc\u06ba \u0645\u0648\u062c\u0648\u062f \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0631\u0627\u0633\u062a\u06d2 \u06a9\u0648 context.read() \u067e\u0631 \u06a9\u0627\u0644 \u06a9\u0631\u06a9\u06d2 \u062c\u0648\u0691\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u06a9\u0648\u0626\u06cc \u0639\u0627\u0644\u0645\u06cc \u0633\u0646\u06af\u0644\u0679\u0646 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u0627\u0648\u0631 \u06a9\u0648\u0626\u06cc \u062f\u0633\u062a\u06cc \u067e\u0627\u0633\u0646\u06af \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0633\u06cc\u0627\u0642 \u0648 \u0633\u0628\u0627\u0642 \u0627\u0633 \u06a9\u0648 \u067e\u06c1\u0646\u0686\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u06a9\u06d2 \u0641\u0646\u06a9\u0634\u0646\u0632 \u062a\u0635\u062f\u06cc\u0642 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0648\u0632\u0648\u06ba \u06c1\u06cc\u06ba \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0648\u06c1 \u0631\u0648\u0679 \u06c1\u06cc\u0646\u0688\u0644\u0631 \u062a\u06a9 \u067e\u06c1\u0646\u0686\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u06a9\u0648 \u0631\u0648\u06a9 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">Handler middleware(Handler handler) {\n  return (context) async {\n    final authHeader = context.request.headers['authorization'];\n\n    if (authHeader == null) {\n      return Response.json(\n        statusCode: 401,\n        body: {'error': 'Authorization required'},\n      );\n    }\n\n    \/\/ Verify token and inject user\n    final user = verifyToken(authHeader);\n    return handler(context.provide<authenticateduser>(() => user));\n  };\n}\n<\/authenticateduser><\/code><\/pre>\n<h3 id=\"heading-dynamic-routes\">\u0645\u062a\u062d\u0631\u06a9 \u0631\u0627\u0633\u062a\u06c1<\/h3>\n<p>\u0646\u0627\u0645 \u06a9\u06cc \u0641\u0627\u0626\u0644 [id].dart \u0633\u0646\u06af\u0644 \u067e\u0627\u062a\u06be \u0633\u06cc\u06af\u0645\u0646\u0679 \u0633\u06d2 \u0645\u06cc\u0644 \u06a9\u06be\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u06c1\u06cc\u0646\u0688\u0644\u0631 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u060c URL \u0633\u06d2 \u067e\u06cc\u0631\u0627\u0645\u06cc\u0679\u0631\u0632 \u0646\u06a9\u0627\u0644\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">Future<response> onRequest(RequestContext context, String id) async {\n  \/\/ id is automatically passed as a parameter for dynamic routes\n  return Response.json(body: {'userId': id});\n}\n<\/response><\/code><\/pre>\n<p>Dart Frog \u0645\u062a\u062d\u0631\u06a9 \u0631\u0648\u0679 \u067e\u06cc\u0631\u0627\u0645\u06cc\u0679\u0631\u0632 \u06a9\u0648 onRequest \u06a9\u06d2 \u0627\u0636\u0627\u0641\u06cc \u062f\u0644\u0627\u0626\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u067e\u0627\u0633 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u06cc\u0648 \u0622\u0631 \u0627\u06cc\u0644 \u0633\u06d2 \u062f\u0633\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u062a\u062c\u0632\u06cc\u06c1 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0635\u0627\u0641 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-setting-up-the-database\">\u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628\u0627\u062a<\/h2>\n<h3 id=\"heading-docker-compose-for-postgresql\">\u067e\u0648\u0633\u0679\u06af\u0631\u06cc \u0627\u06cc\u0633 \u06a9\u06cc\u0648 \u0627\u06cc\u0644 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0688\u0627\u06a9\u0631 \u06a9\u0645\u067e\u0648\u0632<\/h3>\n<p>\u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0631\u0648\u0679 \u0645\u06cc\u06ba docker-compose.yml \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-yaml\">version: '3.8'\n\nservices:\n  postgres:\n    image: postgres:16-alpine\n    container_name: user_profile_db\n    environment:\n      POSTGRES_DB: user_profile_api\n      POSTGRES_USER: dart_user\n      POSTGRES_PASSWORD: dart_password\n    ports:\n      - \"5432:5432\"\n    volumes:\n      - postgres_data:\/var\/lib\/postgresql\/data\n    healthcheck:\n      test: [\"CMD-SHELL\", \"pg_isready -U dart_user -d user_profile_api\"]\n      interval: 5s\n      timeout: 5s\n      retries: 5\n\nvolumes:\n  postgres_data:\n<\/code><\/pre>\n<p>\u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-bash\">docker compose up -d\n<\/code><\/pre>\n<h3 id=\"heading-environment-configuration\">\u0645\u0627\u062d\u0648\u0644\u06cc\u0627\u062a \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628<\/h3>\n<p>pubspec.yaml \u0645\u06cc\u06ba \u0627\u0646\u062d\u0635\u0627\u0631 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-yaml\">dependencies:\n  dart_frog: ^1.4.0\n  dart_frog_auth: ^0.1.0\n  postgres: ^3.3.0\n  dart_jsonwebtoken: ^2.12.0\n  bcrypt: ^1.1.3\n  dotenv: ^4.1.0\n\ndev_dependencies:\n  dart_frog_cli: ^1.2.0\n  test: ^1.24.0\n  dart_frog_test: ^0.1.0\n<\/code><\/pre>\n<p>\u0686\u0644\u0627\u0626\u06cc\u06ba \u0688\u0627\u0631\u0679 \u067e\u0628 \u062d\u0627\u0635\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p>env \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-plaintext\">DB_HOST=localhost\nDB_PORT=5432\nDB_NAME=user_profile_api\nDB_USER=dart_user\nDB_PASSWORD=dart_password\nJWT_SECRET=your_super_secret_key_change_this_in_production\nJWT_EXPIRY_HOURS=24\nPORT=8080\n<\/code><\/pre>\n<p>lib\/config\/env.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'package:dotenv\/dotenv.dart';\n\nclass Env {\n  static late final DotEnv _env;\n\n  static void load() {\n    _env = DotEnv(includePlatformEnvironment: true)..load();\n  }\n\n  static String get dbHost => _env['DB_HOST'] ?? 'localhost';\n  static int get dbPort => int.parse(_env['DB_PORT'] ?? '5432');\n  static String get dbName => _env['DB_NAME'] ?? 'user_profile_api';\n  static String get dbUser => _env['DB_USER'] ?? 'dart_user';\n  static String get dbPassword => _env['DB_PASSWORD'] ?? '';\n  static String get jwtSecret => _env['JWT_SECRET'] ?? '';\n  static int get jwtExpiryHours =>\n      int.parse(_env['JWT_EXPIRY_HOURS'] ?? '24');\n}\n<\/code><\/pre>\n<h3 id=\"heading-database-connection-manager\">\u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u0646\u06a9\u0634\u0646 \u0645\u06cc\u0646\u06cc\u062c\u0631<\/h3>\n<p>lib\/config\/database.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'package:postgres\/postgres.dart';\nimport 'env.dart';\n\nclass Database {\n  static Connection? _connection;\n\n  static Future<connection> get connection async {\n    if (_connection != null) return _connection!;\n    _connection = await Connection.open(\n      Endpoint(\n        host: Env.dbHost,\n        port: Env.dbPort,\n        database: Env.dbName,\n        username: Env.dbUser,\n        password: Env.dbPassword,\n      ),\n      settings: const ConnectionSettings(sslMode: SslMode.disable),\n    );\n    print('Database connected');\n    return _connection!;\n  }\n\n  static Future<void> runMigrations() async {\n    final conn = await connection;\n    await conn.execute('''\n      CREATE TABLE IF NOT EXISTS users (\n        id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n        email VARCHAR(255) UNIQUE NOT NULL,\n        password_hash VARCHAR(255) NOT NULL,\n        first_name VARCHAR(100) NOT NULL,\n        last_name VARCHAR(100) NOT NULL,\n        is_active BOOLEAN DEFAULT TRUE,\n        created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),\n        updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()\n      );\n\n      CREATE INDEX IF NOT EXISTS idx_users_email ON users(email);\n\n      CREATE TABLE IF NOT EXISTS profiles (\n        id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n        user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,\n        bio TEXT,\n        avatar_url VARCHAR(500),\n        phone VARCHAR(20),\n        location VARCHAR(255),\n        website VARCHAR(500),\n        created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),\n        updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),\n        UNIQUE(user_id)\n      );\n\n      CREATE INDEX IF NOT EXISTS idx_profiles_user_id ON profiles(user_id);\n    ''');\n    print('Migrations applied');\n  }\n}\n<\/void><\/connection><\/code><\/pre>\n<h3 id=\"heading-migrations\">\u0646\u0642\u0644 \u0645\u06a9\u0627\u0646\u06cc<\/h3>\n<p>\u0688\u0627\u0631\u0679 \u0641\u0631\u0648\u06af \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0645\u06cc\u0646 \u0688\u0627\u0631\u0679 \u0627\u0646\u0679\u0631\u06cc \u067e\u0648\u0627\u0626\u0646\u0679 \u06c1\u06d2 \u062c\u0648 \u0688\u0627\u0631\u0679_\u0641\u0631\u0648\u06af \u06a9\u06cc \u062a\u0639\u0645\u06cc\u0631 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4 \u062a\u0631\u0642\u06cc\u0627\u062a\u06cc \u0633\u0631\u0648\u0631\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u067e\u0631\u0627\u062c\u06cc\u06a9\u0679 \u06a9\u06d2 \u062f\u0627\u062e\u0644\u06d2 \u06a9\u06d2 \u0645\u0642\u0627\u0645 \u067e\u0631 \u0645\u0646\u062a\u0642\u0644\u06cc \u0628\u06c1\u062a\u0631\u06cc\u0646 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u0686\u0644\u0627\u0626\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0631\u0648\u0679 \u0645\u06cc\u06ba main.dart \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">import 'dart:io';\nimport 'package:dart_frog\/dart_frog.dart';\nimport 'lib\/config\/database.dart';\nimport 'lib\/config\/env.dart';\n\nFuture<httpserver> run(Handler handler, InternetAddress ip, int port) async {\n  Env.load();\n  await Database.runMigrations();\n  return serve(handler, ip, port);\n}\n<\/httpserver><\/code><\/pre>\n<p>\u06cc\u06c1 \u0627\u06cc\u06af\u0632\u06cc\u06a9\u06cc\u0648\u0634\u0646 \u0641\u0646\u06a9\u0634\u0646 \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u06a9\u0627 \u0633\u0631\u0648\u0631 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u06c1\u06a9 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0633\u0631\u0648\u0631 \u06a9\u06cc \u062c\u0627\u0646\u0628 \u0633\u06d2 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u06a9\u0648 \u0642\u0628\u0648\u0644 \u06a9\u0631\u0646\u06d2\u060c \u0645\u0627\u062d\u0648\u0644\u06cc\u0627\u062a\u06cc \u0645\u062a\u063a\u06cc\u0631\u0627\u062a \u06a9\u0648 \u0644\u0648\u0688 \u06a9\u0631\u0646\u06d2 \u0627\u0648\u0631 \u0645\u0646\u062a\u0642\u0644\u06cc \u06a9\u0648 \u0686\u0644\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0635\u062d\u06cc\u062d \u062c\u06af\u06c1 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0686\u0644\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-defining-the-models\">\u0645\u0627\u0688\u0644 \u06a9\u06cc \u062a\u0639\u0631\u06cc\u0641<\/h2>\n<p>\u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u06cc \u062a\u06c1\u06c1 \u062a\u06cc\u0627\u0631 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f\u060c \u06c1\u0645\u06cc\u06ba \u0622\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0627\u0648\u0631 \u062c\u0627\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0688\u06cc\u0679\u0627 \u06a9\u06cc \u0646\u0645\u0627\u0626\u0646\u062f\u06af\u06cc \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0688\u0627\u0631\u0679 \u06a9\u0644\u0627\u0633\u0632 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u0648\u0632\u0631 \u0645\u0627\u0688\u0644 \u06cc\u0648\u0632\u0631 \u0679\u06cc\u0628\u0644 \u067e\u0631 \u0646\u0642\u0634\u06c1 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u06cc \u0642\u0637\u0627\u0631\u0648\u06ba \u0627\u0648\u0631 \u0688\u0627\u0631\u0679 \u0622\u0628\u062c\u06cc\u06a9\u0679 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u062a\u0628\u0627\u062f\u0644\u0648\u06ba \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u062a\u0627 \u06c1\u06d2\u06d4 \u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u0645\u0627\u0688\u0644 \u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u0679\u06cc\u0628\u0644 \u06a9\u06d2 \u0644\u0626\u06d2 \u0627\u06cc\u06a9 \u06c1\u06cc \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u062f\u0648\u0646\u0648\u06ba \u0645\u0627\u0688\u0644 \u0627\u06cc\u06a9 \u06c1\u06cc \u0637\u0631\u0632 \u06a9\u06cc \u067e\u06cc\u0631\u0648\u06cc \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u0639\u0646\u06cc \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0633\u06d2 \u067e\u0691\u06be\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u0641\u06cc\u06a9\u0679\u0631\u06cc \u06a9\u0646\u0633\u0679\u0631\u06a9\u0679\u0631 \u0627\u0648\u0631 <code>toJson<\/code> \u06a9\u0644\u0627\u0626\u0646\u0679 \u06a9\u0648 \u0688\u06cc\u0679\u0627 \u0648\u0627\u067e\u0633 \u06a9\u06cc\u0633\u06d2 \u0628\u06be\u06cc\u062c\u06cc\u06ba\u06d4<\/p>\n<p>\u0628\u0631\u0627\u06c1 \u06a9\u0631\u0645 \u0627\u0633 \u06a9\u0627 \u062d\u0648\u0627\u0644\u06c1 \u062f\u06cc\u06ba\u06d4 <code>toJson<\/code> \u0635\u0627\u0631\u0641 \u0645\u0627\u0688\u0644 \u062c\u0627\u0646 \u0628\u0648\u062c\u06be \u06a9\u0631 \u067e\u0627\u0633 \u0648\u0631\u0688 \u06c1\u06cc\u0634 \u06a9\u0648 \u062e\u0627\u0631\u062c \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 API \u06a9\u06d2 \u062c\u0648\u0627\u0628\u0627\u062a \u0645\u06cc\u06ba \u0627\u0633\u0646\u0627\u062f\u06cc \u0688\u06cc\u0679\u0627 \u0648\u0627\u067e\u0633 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0627 \u062c\u0627\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4<\/p>\n<p>lib\/models\/user.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">class User {\n  const User({\n    required this.id,\n    required this.email,\n    required this.passwordHash,\n    required this.firstName,\n    required this.lastName,\n    required this.isActive,\n    required this.createdAt,\n    required this.updatedAt,\n  });\n\n  final String id;\n  final String email;\n  final String passwordHash;\n  final String firstName;\n  final String lastName;\n  final bool isActive;\n  final DateTime createdAt;\n  final DateTime updatedAt;\n\n  factory User.fromRow(Map<string dynamic=\"\"> row) => User(\n        id: row['id'] as String,\n        email: row['email'] as String,\n        passwordHash: row['password_hash'] as String,\n        firstName: row['first_name'] as String,\n        lastName: row['last_name'] as String,\n        isActive: row['is_active'] as bool,\n        createdAt: row['created_at'] as DateTime,\n        updatedAt: row['updated_at'] as DateTime,\n      );\n\n  Map<string dynamic=\"\"> toJson() => {\n        'id': id,\n        'email': email,\n        'firstName': firstName,\n        'lastName': lastName,\n        'isActive': isActive,\n        'createdAt': createdAt.toIso8601String(),\n        'updatedAt': updatedAt.toIso8601String(),\n      };\n}\n<\/string><\/string><\/code><\/pre>\n<p>lib\/models\/profile.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">class Profile {\n  const Profile({\n    required this.id,\n    required this.userId,\n    this.bio,\n    this.avatarUrl,\n    this.phone,\n    this.location,\n    this.website,\n    required this.createdAt,\n    required this.updatedAt,\n  });\n\n  final String id;\n  final String userId;\n  final String? bio;\n  final String? avatarUrl;\n  final String? phone;\n  final String? location;\n  final String? website;\n  final DateTime createdAt;\n  final DateTime updatedAt;\n\n  factory Profile.fromRow(Map<string dynamic=\"\"> row) => Profile(\n        id: row['id'] as String,\n        userId: row['user_id'] as String,\n        bio: row['bio'] as String?,\n        avatarUrl: row['avatar_url'] as String?,\n        phone: row['phone'] as String?,\n        location: row['location'] as String?,\n        website: row['website'] as String?,\n        createdAt: row['created_at'] as DateTime,\n        updatedAt: row['updated_at'] as DateTime,\n      );\n\n  Map<string dynamic=\"\"> toJson() => {\n        'id': id,\n        'userId': userId,\n        'bio': bio,\n        'avatarUrl': avatarUrl,\n        'phone': phone,\n        'location': location,\n        'website': website,\n        'createdAt': createdAt.toIso8601String(),\n        'updatedAt': updatedAt.toIso8601String(),\n      };\n}\n<\/string><\/string><\/code><\/pre>\n<h2 id=\"heading-building-the-repositories\">\u0645\u062e\u0632\u0646 \u06a9\u06cc \u062a\u0639\u0645\u06cc\u0631<\/h2>\n<p>\u0630\u062e\u06cc\u0631\u06c1 \u0622\u067e \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0627\u0648\u0631 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0631\u0627\u0628\u0637\u06d2 \u06a9\u0627 \u0648\u0627\u062d\u062f \u0646\u0642\u0637\u06c1 \u06c1\u06d2\u06d4 \u0631\u0648\u0679 \u06c1\u06cc\u0646\u0688\u0644\u0631 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0627\u06cc\u0633 \u06a9\u06cc\u0648 \u0627\u06cc\u0644 \u06a9\u0648 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0644\u06a9\u06be\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u0622\u067e\u0631\u06cc\u0634\u0646\u0632 \u06cc\u06c1\u0627\u06ba \u0645\u0631\u06a9\u0632\u06cc \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0622\u067e \u06a9\u06d2 \u06c1\u06cc\u0646\u0688\u0644\u0631\u0632 \u06a9\u0648 \u0635\u0627\u0641 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0622\u067e \u06a9\u06d2 \u0688\u06cc\u0679\u0627 \u062a\u06a9 \u0631\u0633\u0627\u0626\u06cc \u06a9\u06cc \u0645\u0646\u0637\u0642 \u06a9\u0648 \u0622\u0632\u0627\u062f\u0627\u0646\u06c1 \u0637\u0648\u0631 \u067e\u0631 \u062a\u0644\u0627\u0634 \u06a9\u0631\u0646\u06d2\u060c \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u0646\u06d2 \u0627\u0648\u0631 \u062c\u0627\u0646\u0686\u0646\u06d2 \u0645\u06cc\u06ba \u0622\u0633\u0627\u0646 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>UserRepository \u0635\u0627\u0631\u0641 \u06a9\u06cc \u0645\u06cc\u0632 \u067e\u0631 \u062a\u0645\u0627\u0645 \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc\u0648\u06ba \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u062a\u06cc \u06c1\u06d2\u06d4 ProfileRepository \u067e\u0631\u0648\u0641\u0627\u0626\u0644\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u06be\u06cc \u0627\u06cc\u0633\u0627 \u06c1\u06cc \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u060c userId \u06a9\u0648 \u0628\u0646\u06cc\u0627\u062f\u06cc \u062a\u0644\u0627\u0634 \u06a9\u06cc \u06a9\u0644\u06cc\u062f \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u06cc \u0648\u062c\u06c1 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u067e\u0631\u0648\u0641\u0627\u0626\u0644\u0632 \u062a\u06a9 \u06c1\u0645\u06cc\u0634\u06c1 \u06a9\u0633\u06cc \u0645\u062e\u0635\u0648\u0635 \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u062a\u0646\u0627\u0638\u0631 \u0645\u06cc\u06ba \u0631\u0633\u0627\u0626\u06cc \u062d\u0627\u0635\u0644 \u06a9\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-user-repository\">\u0635\u0627\u0631\u0641 \u0630\u062e\u06cc\u0631\u06c1<\/h3>\n<p>lib\/repositories\/user_repository.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'package:postgres\/postgres.dart';\nimport '..\/config\/database.dart';\nimport '..\/models\/user.dart';\n\nclass UserRepository {\n  Future<connection> get _conn => Database.connection;\n\n  Future<list>> findAll() async {\n    final conn = await _conn;\n    final results = await conn.execute(\n      'SELECT * FROM users WHERE is_active = TRUE ORDER BY created_at DESC',\n    );\n    return results.map((r) => User.fromRow(r.toColumnMap())).toList();\n  }\n\n  Future<user> findById(String id) async {\n    final conn = await _conn;\n    final results = await conn.execute(\n      Sql.named('SELECT * FROM users WHERE id = @id AND is_active = TRUE'),\n      parameters: {'id': id},\n    );\n    if (results.isEmpty) return null;\n    return User.fromRow(results.first.toColumnMap());\n  }\n\n  Future<user> findByEmail(String email) async {\n    final conn = await _conn;\n    final results = await conn.execute(\n      Sql.named('SELECT * FROM users WHERE email = @email'),\n      parameters: {'email': email},\n    );\n    if (results.isEmpty) return null;\n    return User.fromRow(results.first.toColumnMap());\n  }\n\n  Future<user> create({\n    required String email,\n    required String passwordHash,\n    required String firstName,\n    required String lastName,\n  }) async {\n    final conn = await _conn;\n    final results = await conn.execute(\n      Sql.named('''\n        INSERT INTO users (email, password_hash, first_name, last_name)\n        VALUES (@email, @passwordHash, @firstName, @lastName)\n        RETURNING *\n      '''),\n      parameters: {\n        'email': email,\n        'passwordHash': passwordHash,\n        'firstName': firstName,\n        'lastName': lastName,\n      },\n    );\n    return User.fromRow(results.first.toColumnMap());\n  }\n\n  Future<user> update({\n    required String id,\n    String? firstName,\n    String? lastName,\n  }) async {\n    final conn = await _conn;\n    final results = await conn.execute(\n      Sql.named('''\n        UPDATE users\n        SET\n          first_name = COALESCE(@firstName, first_name),\n          last_name  = COALESCE(@lastName, last_name),\n          updated_at = NOW()\n        WHERE id = @id AND is_active = TRUE\n        RETURNING *\n      '''),\n      parameters: {'id': id, 'firstName': firstName, 'lastName': lastName},\n    );\n    if (results.isEmpty) return null;\n    return User.fromRow(results.first.toColumnMap());\n  }\n\n  Future<bool> delete(String id) async {\n    final conn = await _conn;\n    final results = await conn.execute(\n      Sql.named('''\n        UPDATE users SET is_active = FALSE, updated_at = NOW()\n        WHERE id = @id AND is_active = TRUE\n        RETURNING id\n      '''),\n      parameters: {'id': id},\n    );\n    return results.isNotEmpty;\n  }\n}\n<\/bool><\/user><\/user><\/user><\/user><\/list><\/connection><\/code><\/pre>\n<h3 id=\"heading-profile-repository\">\u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u0627\u0633\u0679\u0648\u0631<\/h3>\n<p>lib\/repositories\/profile_repository.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'package:postgres\/postgres.dart';\nimport '..\/config\/database.dart';\nimport '..\/models\/profile.dart';\n\nclass ProfileRepository {\n  Future<connection> get _conn => Database.connection;\n\n  Future<profile> findByUserId(String userId) async {\n    final conn = await _conn;\n    final results = await conn.execute(\n      Sql.named('SELECT * FROM profiles WHERE user_id = @userId'),\n      parameters: {'userId': userId},\n    );\n    if (results.isEmpty) return null;\n    return Profile.fromRow(results.first.toColumnMap());\n  }\n\n  Future<profile> create({\n    required String userId,\n    String? bio,\n    String? avatarUrl,\n    String? phone,\n    String? location,\n    String? website,\n  }) async {\n    final conn = await _conn;\n    final results = await conn.execute(\n      Sql.named('''\n        INSERT INTO profiles (user_id, bio, avatar_url, phone, location, website)\n        VALUES (@userId, @bio, @avatarUrl, @phone, @location, @website)\n        RETURNING *\n      '''),\n      parameters: {\n        'userId': userId,\n        'bio': bio,\n        'avatarUrl': avatarUrl,\n        'phone': phone,\n        'location': location,\n        'website': website,\n      },\n    );\n    return Profile.fromRow(results.first.toColumnMap());\n  }\n\n  Future<profile> update({\n    required String userId,\n    String? bio,\n    String? avatarUrl,\n    String? phone,\n    String? location,\n    String? website,\n  }) async {\n    final conn = await _conn;\n    final results = await conn.execute(\n      Sql.named('''\n        UPDATE profiles\n        SET\n          bio        = COALESCE(@bio, bio),\n          avatar_url = COALESCE(@avatarUrl, avatar_url),\n          phone      = COALESCE(@phone, phone),\n          location   = COALESCE(@location, location),\n          website    = COALESCE(@website, website),\n          updated_at = NOW()\n        WHERE user_id = @userId\n        RETURNING *\n      '''),\n      parameters: {\n        'userId': userId,\n        'bio': bio,\n        'avatarUrl': avatarUrl,\n        'phone': phone,\n        'location': location,\n        'website': website,\n      },\n    );\n    if (results.isEmpty) return null;\n    return Profile.fromRow(results.first.toColumnMap());\n  }\n}\n<\/profile><\/profile><\/profile><\/connection><\/code><\/pre>\n<h2 id=\"heading-authentication-service\">\u062a\u0635\u062f\u06cc\u0642 \u06a9\u06cc \u062e\u062f\u0645\u062a<\/h2>\n<p>\u0627\u0633 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0645\u06cc\u06ba \u062a\u0648\u062b\u06cc\u0642 \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0645 lib\/services\/ \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0633\u0631\u0634\u0627\u0631 AuthService \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1\u0627\u06ba \u0627\u06cc\u06a9 \u0648\u0627\u0636\u062d \u0630\u0645\u06c1 \u062f\u0627\u0631\u06cc \u06c1\u06d2\u06d4 \u06cc\u0639\u0646\u06cc\u060c \u06a9\u0631\u067e\u0679\u0648\u06af\u0631\u0627\u0641\u06a9 \u0622\u067e\u0631\u06cc\u0634\u0646\u0632 \u062c\u0648 \u062a\u0635\u062f\u06cc\u0642 \u06a9\u0648 \u0645\u0636\u0628\u0648\u0637 \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba: \u067e\u0627\u0633 \u0648\u0631\u0688 \u06a9\u0648 \u0627\u0633\u0679\u0648\u0631 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u06c1\u06cc\u0634 \u06a9\u0631\u0646\u0627\u060c \u0644\u0627\u06af \u0627\u0646 \u067e\u0631 \u067e\u0627\u0633 \u0648\u0631\u0688 \u06a9\u06cc \u062a\u0635\u062f\u06cc\u0642 \u06a9\u0631\u0646\u0627\u060c \u06a9\u0627\u0645\u06cc\u0627\u0628\u06cc \u067e\u0631 \u062f\u0633\u062a\u062e\u0637 \u0634\u062f\u06c1 JWT \u0679\u0648\u06a9\u0646 \u0628\u0646\u0627\u0646\u0627\u060c \u0627\u0648\u0631 \u0645\u062d\u0641\u0648\u0638 \u0634\u062f\u06c1 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0645\u06cc\u06ba \u0627\u0633 \u0679\u0648\u06a9\u0646 \u06a9\u06cc \u062a\u0635\u062f\u06cc\u0642 \u06a9\u0631\u0646\u0627\u06d4<\/p>\n<p>\u0627\u0633 \u0645\u0646\u0637\u0642 \u06a9\u0648 \u0631\u0648\u0679 \u06c1\u06cc\u0646\u0688\u0644\u0631\u0632 \u0645\u06cc\u06ba \u062a\u0642\u0633\u06cc\u0645 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0627\u067e\u0646\u06cc \u062e\u062f\u0645\u062a \u0645\u06cc\u06ba \u0631\u06a9\u06be\u0646\u06d2 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u0627\u0633\u06d2 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646 \u0644\u06af\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0627\u067e\u0646\u06cc \u0627\u06cc\u067e \u0645\u06cc\u06ba \u06a9\u06c1\u06cc\u06ba \u0628\u06be\u06cc \u0635\u0627\u0641 \u0633\u062a\u06be\u0631\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>lib\/services\/auth_service.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'package:bcrypt\/bcrypt.dart';\nimport 'package:dart_jsonwebtoken\/dart_jsonwebtoken.dart';\nimport '..\/config\/env.dart';\nimport '..\/models\/user.dart';\n\nclass AuthService {\n  String hashPassword(String password) =>\n      BCrypt.hashpw(password, BCrypt.gensalt());\n\n  bool verifyPassword(String password, String hash) =>\n      BCrypt.checkpw(password, hash);\n\n  String generateToken(User user) {\n    final jwt = JWT({\n      'sub': user.id,\n      'email': user.email,\n      'iat': DateTime.now().millisecondsSinceEpoch ~\/ 1000,\n    });\n    return jwt.sign(\n      SecretKey(Env.jwtSecret),\n      expiresIn: Duration(hours: Env.jwtExpiryHours),\n    );\n  }\n\n  JWT? verifyToken(String token) {\n    try {\n      return JWT.verify(token, SecretKey(Env.jwtSecret));\n    } catch (_) {\n      return null;\n    }\n  }\n}\n<\/code><\/pre>\n<h2 id=\"heading-middleware\">\u0645\u0688\u0644 \u0648\u06cc\u0626\u0631<\/h2>\n<p>\u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u0648\u06c1 \u062c\u06af\u06c1 \u06c1\u06d2 \u062c\u06c1\u0627\u06ba \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u06a9\u0627 \u0627\u0646\u062d\u0635\u0627\u0631 \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646 \u0645\u0627\u0688\u0644 \u0627\u067e\u0646\u0627 \u0633\u0628 \u0633\u06d2 \u0627\u06c1\u0645 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06c1\u0631 \u0631\u0648\u0679 \u06c1\u06cc\u0646\u0688\u0644\u0631 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0631\u06cc\u067e\u0648\u0632\u0679\u0631\u06cc\u0632 \u0627\u0648\u0631 \u062e\u062f\u0645\u0627\u062a \u06a9\u0648 \u0641\u0648\u0631\u06cc \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u0622\u067e \u0627\u0646\u06c1\u06cc\u06ba \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u062a\u062e\u0644\u06cc\u0642 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 RequestContext \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u062a\u0645\u0627\u0645 \u06c1\u06cc\u0646\u0688\u0644\u0631\u0632 \u06a9\u0648 \u0646\u06cc\u0686\u06d2 \u06a9\u06cc \u0637\u0631\u0641 \u062f\u0633\u062a\u06cc\u0627\u0628 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u06cc\u06c1 \u0633\u06cc\u06a9\u0634\u0646 \u062a\u06cc\u0646 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631\u0632 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2: \u0627\u06cc\u06a9 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u062c\u0648 \u0631\u06cc\u067e\u0648\u0632\u0679\u0631\u06cc \u0627\u0648\u0631 \u062a\u0648\u062b\u06cc\u0642 \u06a9\u06cc \u062e\u062f\u0645\u0627\u062a \u06a9\u0648 \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0627\u06cc\u06a9 \u062a\u0635\u062f\u06cc\u0642\u06cc \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u062c\u0648 JWT \u0679\u0648\u06a9\u0646 \u06a9\u06cc \u062a\u0648\u062b\u06cc\u0642 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0631\u0627\u0633\u062a\u06d2 \u06a9\u0648 \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u0627\u06cc\u0631\u0631 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u062c\u0648 \u063a\u06cc\u0631 \u06c1\u06cc\u0646\u0688\u0644 \u0627\u0633\u062a\u062b\u0646\u0627\u0621 \u06a9\u0648 \u067e\u06a9\u0691\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u067e\u0648\u0631\u06d2 API \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0645\u0633\u062a\u0642\u0644 \u063a\u0644\u0637\u06cc \u06a9\u0627 \u062c\u0648\u0627\u0628 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-database-middleware\">\u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631<\/h3>\n<p>lib\/middleware\/database_middleware.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'package:dart_frog\/dart_frog.dart';\nimport '..\/repositories\/user_repository.dart';\nimport '..\/repositories\/profile_repository.dart';\nimport '..\/services\/auth_service.dart';\n\nMiddleware databaseMiddleware() {\n  return (handler) {\n    return handler\n        .use(provider<userrepository>((_) => UserRepository()))\n        .use(provider<profilerepository>((_) => ProfileRepository()))\n        .use(provider<authservice>((_) => AuthService()));\n  };\n}\n<\/authservice><\/profilerepository><\/userrepository><\/code><\/pre>\n<p>\u06cc\u06c1 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u06c1\u0631 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u06d2 \u0633\u06cc\u0627\u0642 \u0648 \u0633\u0628\u0627\u0642 \u0645\u06cc\u06ba \u0627\u0633\u0679\u0648\u0631\u06cc\u062c \u0627\u0648\u0631 \u062a\u0648\u062b\u06cc\u0642 \u06a9\u06cc \u062e\u062f\u0645\u0627\u062a \u06a9\u0648 \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0631\u0627\u0633\u062a\u06c1 \u0627\u0633 \u0637\u0631\u062d \u067e\u0691\u06be\u062a\u0627 \u06c1\u06d2: <code>context.read()<\/code> \u0645\u062c\u06be\u06d2 \u067e\u0631\u0648\u0627\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u06a9\u06c1 \u06cc\u06c1 \u06a9\u06cc\u0633\u06d2 \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u062a\u06be\u0627.<\/p>\n<h3 id=\"heading-auth-middleware\">\u062a\u0648\u062b\u06cc\u0642 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631<\/h3>\n<p>lib\/middleware\/auth_middleware.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'dart:convert';\nimport 'package:dart_frog\/dart_frog.dart';\nimport '..\/services\/auth_service.dart';\n\nMiddleware authMiddleware() {\n  return (handler) {\n    return (context) async {\n      final authHeader = context.request.headers['authorization'];\n\n      if (authHeader == null || !authHeader.startsWith('Bearer ')) {\n        return Response.json(\n          statusCode: 401,\n          body: {'error': 'Authorization header missing or malformed'},\n        );\n      }\n\n      final token = authHeader.substring(7);\n      final authService = context.read<authservice>();\n      final jwt = authService.verifyToken(token);\n\n      if (jwt == null) {\n        return Response.json(\n          statusCode: 401,\n          body: {'error': 'Invalid or expired token'},\n        );\n      }\n\n      final userId = jwt.payload['sub'] as String;\n      final userEmail = jwt.payload['email'] as String;\n\n      return handler(\n        context.provide<map string=\"\">>(\n          () => {'userId': userId, 'userEmail': userEmail},\n        ),\n      );\n    };\n  };\n}\n<\/map><\/authservice><\/code><\/pre>\n<h3 id=\"heading-error-middleware\">\u062e\u0631\u0627\u0628\u06cc \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631<\/h3>\n<p>lib\/middleware\/error_middleware.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'package:dart_frog\/dart_frog.dart';\n\nMiddleware errorMiddleware() {\n  return (handler) {\n    return (context) async {\n      try {\n        return await handler(context);\n      } on FormatException catch (e) {\n        return Response.json(\n          statusCode: 400,\n          body: {'error': 'Invalid request body: ${e.message}'},\n        );\n      } catch (e, stackTrace) {\n        print('Unhandled error: \\(e\\n\\)stackTrace');\n        return Response.json(\n          statusCode: 500,\n          body: {'error': 'An internal server error occurred'},\n        );\n      }\n    };\n  };\n}\n<\/code><\/pre>\n<h2 id=\"heading-building-the-routes\">\u0631\u0627\u0633\u062a\u06d2 \u06a9\u06cc \u062a\u0639\u0645\u06cc\u0631<\/h2>\n<p>\u0627\u0628 \u062c\u0628 \u06a9\u06c1 \u06c1\u0645\u0627\u0631\u06d2 \u067e\u0627\u0633 \u0627\u067e\u0646\u0627 \u0645\u0627\u0688\u0644\u060c \u0631\u06cc\u067e\u0648\u0632\u0679\u0631\u06cc\u060c \u062a\u0648\u062b\u06cc\u0642 \u06a9\u06cc \u062e\u062f\u0645\u062a\u060c \u0627\u0648\u0631 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u0633\u0628\u06be\u06cc \u062a\u06cc\u0627\u0631 \u06c1\u06cc\u06ba\u060c \u06c1\u0645 \u0627\u067e\u0646\u0627 \u0631\u0648\u0679 \u06c1\u06cc\u0646\u0688\u0644\u0631 \u0628\u0646\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u0645\u06cc\u06ba\u060c \u0631\u0648\u0679\u0633\/ \u0641\u0648\u0644\u0688\u0631 \u0645\u06cc\u06ba \u06c1\u0631 \u0641\u0627\u0626\u0644 \u0627\u06cc\u06a9 \u062e\u0648\u062f \u0633\u0627\u062e\u062a\u06c1 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u06c1\u06d2\u06d4 \u0631\u0627\u0633\u062a\u06d2 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0627\u0646\u062d\u0635\u0627\u0631 \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0645 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u0627\u0633\u06d2 \u067e\u0691\u06be\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u067e\u06c1\u0644\u06d2 \u06c1\u06cc \u0633\u06cc\u0627\u0642 \u0648 \u0633\u0628\u0627\u0642 \u0645\u06cc\u06ba \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0645\u0646\u0627\u0633\u0628 \u0627\u0633\u0679\u0648\u0631 \u06cc\u0627 \u0633\u0631\u0648\u0633 \u06a9\u06d2 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0627\u0631 \u06a9\u0648 \u06a9\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u0633\u06cc\u06a9\u0634\u0646 \u0631\u0627\u0633\u062a\u0648\u06ba \u06a9\u06d2 \u062a\u06cc\u0646 \u06af\u0631\u0648\u06c1\u0648\u06ba \u06a9\u0627 \u0627\u062d\u0627\u0637\u06c1 \u06a9\u0631\u062a\u0627 \u06c1\u06d2: \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u0627\u0648\u0631 \u0644\u0627\u06af \u0627\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u0648\u062b\u06cc\u0642 \u06a9\u06d2 \u0631\u0627\u0633\u062a\u06d2\u060c CRUD \u0622\u067e\u0631\u06cc\u0634\u0646\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u0631\u0627\u0633\u062a\u06d2\u060c \u0627\u0648\u0631 \u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u06a9\u06d2 \u0631\u0627\u0633\u062a\u06d2 \u062c\u0648 \u0635\u0627\u0631\u0641 ID \u06a9\u06d2 \u0646\u06cc\u0686\u06d2 \u0631\u06a9\u06be\u06d2 \u06af\u0626\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-auth-routes\">\u0633\u0631\u0679\u06cc\u0641\u06cc\u06a9\u06cc\u0634\u0646 \u06a9\u0627 \u0631\u0627\u0633\u062a\u06c1<\/h3>\n<p>path\/auth\/register.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'package:dart_frog\/dart_frog.dart';\nimport '..\/..\/lib\/repositories\/user_repository.dart';\nimport '..\/..\/lib\/services\/auth_service.dart';\n\nFuture<response> onRequest(RequestContext context) async {\n  if (context.request.method != HttpMethod.post) {\n    return Response.json(statusCode: 405, body: {'error': 'Method not allowed'});\n  }\n\n  final body = await context.request.json() as Map<string dynamic=\"\">;\n  final email = body['email'] as String?;\n  final password = body['password'] as String?;\n  final firstName = body['firstName'] as String?;\n  final lastName = body['lastName'] as String?;\n\n  if (email == null || password == null ||\n      firstName == null || lastName == null) {\n    return Response.json(\n      statusCode: 400,\n      body: {'error': 'email, password, firstName, and lastName are required'},\n    );\n  }\n\n  if (password.length < 8) {\n    return Response.json(\n      statusCode: 400,\n      body: {'error': 'Password must be at least 8 characters'},\n    );\n  }\n\n  final userRepo = context.read<userrepository>();\n  final authService = context.read<authservice>();\n\n  final existing = await userRepo.findByEmail(email);\n  if (existing != null) {\n    return Response.json(\n      statusCode: 409,\n      body: {'error': 'An account with this email already exists'},\n    );\n  }\n\n  final user = await userRepo.create(\n    email: email,\n    passwordHash: authService.hashPassword(password),\n    firstName: firstName,\n    lastName: lastName,\n  );\n\n  return Response.json(\n    statusCode: 201,\n    body: {\n      'user': user.toJson(),\n      'token': authService.generateToken(user),\n    },\n  );\n}\n<\/authservice><\/userrepository><\/string><\/response><\/code><\/pre>\n<p>path\/auth\/login.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'package:dart_frog\/dart_frog.dart';\nimport '..\/..\/lib\/repositories\/user_repository.dart';\nimport '..\/..\/lib\/services\/auth_service.dart';\n\nFuture<response> onRequest(RequestContext context) async {\n  if (context.request.method != HttpMethod.post) {\n    return Response.json(statusCode: 405, body: {'error': 'Method not allowed'});\n  }\n\n  final body = await context.request.json() as Map<string dynamic=\"\">;\n  final email = body['email'] as String?;\n  final password = body['password'] as String?;\n\n  if (email == null || password == null) {\n    return Response.json(\n      statusCode: 400,\n      body: {'error': 'email and password are required'},\n    );\n  }\n\n  final userRepo = context.read<userrepository>();\n  final authService = context.read<authservice>();\n  final user = await userRepo.findByEmail(email);\n\n  if (user == null || !authService.verifyPassword(password, user.passwordHash)) {\n    return Response.json(\n      statusCode: 401,\n      body: {'error': 'Invalid email or password'},\n    );\n  }\n\n  return Response.json(\n    body: {\n      'user': user.toJson(),\n      'token': authService.generateToken(user),\n    },\n  );\n}\n<\/authservice><\/userrepository><\/string><\/response><\/code><\/pre>\n<h3 id=\"heading-user-routes\">\u0635\u0627\u0631\u0641 \u06a9\u0627 \u0631\u0627\u0633\u062a\u06c1<\/h3>\n<p>path\/users\/index.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'package:dart_frog\/dart_frog.dart';\nimport '..\/..\/lib\/repositories\/user_repository.dart';\n\nFuture<response> onRequest(RequestContext context) async {\n  if (context.request.method != HttpMethod.get) {\n    return Response.json(statusCode: 405, body: {'error': 'Method not allowed'});\n  }\n\n  final userRepo = context.read<userrepository>();\n  final users = await userRepo.findAll();\n\n  return Response.json(\n    body: users.map((u) => u.toJson()).toList(),\n  );\n}\n<\/userrepository><\/response><\/code><\/pre>\n<p>\u0631\u0627\u0633\u062a\u06c1\/\u0635\u0627\u0631\u0641\/\u062a\u062e\u0644\u06cc\u0642[id].dart:<\/p>\n<pre><code class=\"language-dart\">import 'package:dart_frog\/dart_frog.dart';\nimport '..\/..\/lib\/repositories\/user_repository.dart';\n\nFuture<response> onRequest(RequestContext context, String id) async {\n  final userRepo = context.read<userrepository>();\n\n  switch (context.request.method) {\n    case HttpMethod.get:\n      return _getUser(userRepo, id);\n    case HttpMethod.put:\n      return _updateUser(context, userRepo, id);\n    case HttpMethod.delete:\n      return _deleteUser(userRepo, id);\n    default:\n      return Response.json(\n        statusCode: 405,\n        body: {'error': 'Method not allowed'},\n      );\n  }\n}\n\nFuture<response> _getUser(UserRepository repo, String id) async {\n  final user = await repo.findById(id);\n  if (user == null) {\n    return Response.json(statusCode: 404, body: {'error': 'User not found'});\n  }\n  return Response.json(body: user.toJson());\n}\n\nFuture<response> _updateUser(\n  RequestContext context,\n  UserRepository repo,\n  String id,\n) async {\n  final body = await context.request.json() as Map<string dynamic=\"\">;\n  final user = await repo.update(\n    id: id,\n    firstName: body['firstName'] as String?,\n    lastName: body['lastName'] as String?,\n  );\n  if (user == null) {\n    return Response.json(statusCode: 404, body: {'error': 'User not found'});\n  }\n  return Response.json(body: user.toJson());\n}\n\nFuture<response> _deleteUser(UserRepository repo, String id) async {\n  final deleted = await repo.delete(id);\n  if (!deleted) {\n    return Response.json(statusCode: 404, body: {'error': 'User not found'});\n  }\n  return Response.json(statusCode: 204, body: null);\n}\n<\/response><\/string><\/response><\/response><\/userrepository><\/response><\/code><\/pre>\n<p>\u062f\u06cc\u06a9\u06be\u06cc\u06ba \u06a9\u06c1 onRequest \u0627\u067e\u0646\u06d2 \u062f\u0648\u0633\u0631\u06d2 \u067e\u06cc\u0631\u0627\u0645\u06cc\u0679\u0631 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633\u0679\u0631\u0646\u06af \u0622\u0626\u06cc \u0688\u06cc \u06a9\u0648 \u06a9\u06cc\u0633\u06d2 \u0644\u06cc\u062a\u0627 \u06c1\u06d2\u06d4 \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u06c1\u06cc\u0646\u0688\u0644\u0631 \u06a9\u0648 \u0645\u062a\u062d\u0631\u06a9 \u0631\u0627\u0633\u062a\u06d2 \u06a9\u06d2 \u062d\u0635\u0648\u06ba \u06a9\u0648 \u0645\u0646\u062a\u0642\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 context.request.method \u0645\u06cc\u06ba \u0633\u0648\u0626\u0686\u0632 \u062a\u0645\u0627\u0645 HTTP \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u0648 \u0627\u06cc\u06a9 \u0641\u0627\u0626\u0644 \u0645\u06cc\u06ba \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c CRUD \u0627\u06cc\u0646\u0688 \u067e\u0648\u0627\u0626\u0646\u0679\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u0645\u062d\u0627\u0648\u0631\u0627\u062a\u06cc \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u067e\u06cc\u0679\u0631\u0646\u06d4<\/p>\n<h3 id=\"heading-profile-routes\">\u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u06a9\u0627 \u0631\u0627\u0633\u062a\u06c1<\/h3>\n<p>\u0631\u0627\u0633\u062a\u06c1\/\u0635\u0627\u0631\u0641\/\u062a\u062e\u0644\u06cc\u0642[id]\/profile.dart:<\/p>\n<pre><code class=\"language-dart\">import 'package:dart_frog\/dart_frog.dart';\nimport '..\/..\/..\/lib\/repositories\/user_repository.dart';\nimport '..\/..\/..\/lib\/repositories\/profile_repository.dart';\n\nFuture<response> onRequest(RequestContext context, String id) async {\n  final userRepo = context.read<userrepository>();\n  final profileRepo = context.read<profilerepository>();\n\n  final user = await userRepo.findById(id);\n  if (user == null) {\n    return Response.json(statusCode: 404, body: {'error': 'User not found'});\n  }\n\n  switch (context.request.method) {\n    case HttpMethod.get:\n      return _getProfile(profileRepo, id);\n    case HttpMethod.post:\n      return _createProfile(context, profileRepo, id);\n    case HttpMethod.put:\n      return _updateProfile(context, profileRepo, id);\n    default:\n      return Response.json(\n        statusCode: 405,\n        body: {'error': 'Method not allowed'},\n      );\n  }\n}\n\nFuture<response> _getProfile(ProfileRepository repo, String userId) async {\n  final profile = await repo.findByUserId(userId);\n  if (profile == null) {\n    return Response.json(statusCode: 404, body: {'error': 'Profile not found'});\n  }\n  return Response.json(body: profile.toJson());\n}\n\nFuture<response> _createProfile(\n  RequestContext context,\n  ProfileRepository repo,\n  String userId,\n) async {\n  final existing = await repo.findByUserId(userId);\n  if (existing != null) {\n    return Response.json(\n      statusCode: 409,\n      body: {'error': 'Profile already exists for this user'},\n    );\n  }\n\n  final body = await context.request.json() as Map<string dynamic=\"\">;\n  final profile = await repo.create(\n    userId: userId,\n    bio: body['bio'] as String?,\n    avatarUrl: body['avatarUrl'] as String?,\n    phone: body['phone'] as String?,\n    location: body['location'] as String?,\n    website: body['website'] as String?,\n  );\n  return Response.json(statusCode: 201, body: profile.toJson());\n}\n\nFuture<response> _updateProfile(\n  RequestContext context,\n  ProfileRepository repo,\n  String userId,\n) async {\n  final body = await context.request.json() as Map<string dynamic=\"\">;\n  final profile = await repo.update(\n    userId: userId,\n    bio: body['bio'] as String?,\n    avatarUrl: body['avatarUrl'] as String?,\n    phone: body['phone'] as String?,\n    location: body['location'] as String?,\n    website: body['website'] as String?,\n  );\n  if (profile == null) {\n    return Response.json(statusCode: 404, body: {'error': 'Profile not found'});\n  }\n  return Response.json(body: profile.toJson());\n}\n<\/string><\/response><\/string><\/response><\/response><\/profilerepository><\/userrepository><\/response><\/code><\/pre>\n<h2 id=\"heading-wiring-the-middleware-pipeline\">\u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u067e\u0627\u0626\u067e \u0644\u0627\u0626\u0646 \u06a9\u0646\u06a9\u0634\u0646<\/h2>\n<p>\u0631\u0648\u0679 \u0627\u0648\u0631 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u062f\u0648\u0646\u0648\u06ba \u0628\u0646\u0627\u0626\u06d2 \u06af\u0626\u06d2 \u06c1\u06cc\u06ba\u060c \u0644\u06cc\u06a9\u0646 \u0627\u0628\u06be\u06cc \u062a\u06a9 \u062c\u0691\u06d2 \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4 \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u0645\u06cc\u06ba\u060c \u06a9\u0646\u06a9\u0634\u0646 \u0627\u0633 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0628\u0646\u0627\u0626\u06d2 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba: <code>_middleware.dart<\/code> \u06cc\u06c1 \u0648\u06c1 \u0641\u0627\u0626\u0644\u06cc\u06ba \u06c1\u06cc\u06ba \u062c\u0648 \u062d\u06a9\u0645\u062a \u0639\u0645\u0644\u06cc \u06a9\u06d2 \u0633\u0627\u062a\u06be \u067e\u0627\u062a\u06be\/\u0641\u0648\u0644\u0688\u0631\u0632 \u0645\u06cc\u06ba \u0631\u06a9\u06be\u06cc \u06af\u0626\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u062c\u0627\u0626\u0632\u06c1 \u0644\u06cc\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2: <code>_middleware.dart<\/code> \u0631\u0648\u0679 \u0644\u06cc\u0648\u0644 \u067e\u0631 \u0641\u0627\u0626\u0644\u06cc\u06ba \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u0631\u0627\u0633\u062a\u0648\u06ba \u067e\u0631 \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u06a9\u0648\u0626\u06cc \u0631\u0627\u0633\u062a\u06c1 \u0646\u06c1\u06cc\u06ba <code>_middleware.dart<\/code> \u0630\u06cc\u0644\u06cc \u0641\u0648\u0644\u0688\u0631\u0632 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0635\u0631\u0641 \u0627\u0633 \u0641\u0648\u0644\u0688\u0631 \u06a9\u06d2 \u0646\u06cc\u0686\u06d2 \u0648\u0627\u0644\u06d2 \u0631\u0627\u0633\u062a\u0648\u06ba \u067e\u0631 \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0622\u067e \u06a9\u0648 \u0641\u0648\u0644\u0688\u0631 \u06a9\u06d2 \u062f\u0627\u0626\u0631\u06c1 \u06a9\u0627\u0631 \u067e\u0631 \u0679\u06be\u06cc\u06a9 \u0679\u06be\u06cc\u06a9 \u06a9\u0646\u0679\u0631\u0648\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u060c \u062c\u06c1\u0627\u06ba \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u062f\u0633\u062a\u06cc \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u06cc\u0627 \u0628\u0691\u06be\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0628\u063a\u06cc\u0631 \u0686\u0644\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0628\u0646\u0627\u0646\u0627 <code>routes\/_middleware.dart<\/code> \u0639\u0627\u0644\u0645\u06cc \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u062c\u0648 \u062a\u0645\u0627\u0645 \u0631\u0627\u0633\u062a\u0648\u06ba \u067e\u0631 \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-dart\">import 'package:dart_frog\/dart_frog.dart';\nimport '..\/lib\/middleware\/database_middleware.dart';\nimport '..\/lib\/middleware\/error_middleware.dart';\n\nHandler middleware(Handler handler) {\n  return handler\n      .use(databaseMiddleware())\n      .use(errorMiddleware());\n}\n<\/code><\/pre>\n<p>\u0628\u0646\u0627\u0646\u0627 <code>routes\/users\/_middleware.dart<\/code> \u062a\u0635\u062f\u06cc\u0642 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u0631\u0627\u0633\u062a\u0648\u06ba \u06a9\u0648 \u0645\u062d\u0641\u0648\u0638 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2:<\/p>\n<pre><code class=\"language-dart\">import 'package:dart_frog\/dart_frog.dart';\nimport '..\/..\/lib\/middleware\/auth_middleware.dart';\n\nHandler middleware(Handler handler) {\n  return handler.use(authMiddleware());\n}\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u0645\u0627\u0688\u0644 \u06a9\u06d2 \u0633\u0628 \u0633\u06d2 \u062e\u0648\u0628\u0635\u0648\u0631\u062a \u062d\u0635\u0648\u06ba \u0645\u06cc\u06ba \u0633\u06d2 \u0627\u06cc\u06a9 \u06c1\u06d2\u06d4 path\/users\/_middleware.dart \u0641\u0627\u0626\u0644 \u062e\u0648\u062f \u0628\u062e\u0648\u062f path\/users\/ \u06a9\u06d2 \u062a\u062d\u062a \u062a\u0645\u0627\u0645 \u0631\u0627\u0633\u062a\u0648\u06ba \u067e\u0631 \u062a\u0635\u062f\u06cc\u0642 \u06a9\u0627 \u0627\u0637\u0644\u0627\u0642 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u060c \u0628\u0634\u0645\u0648\u0644 path\/users\/index.dart \u0627\u0648\u0631 path\/users\/\u06d4[id]\u0688\u0627\u0631\u0679 \u0627\u0648\u0631 \u067e\u0627\u062a\u06be\/\u0635\u0627\u0631\u0641\u06cc\u0646\/[id]\/profile.dart. \u0631\u0648\u0679\u0633\/auth\/ \u06a9\u06d2 \u062a\u062d\u062a \u062a\u0648\u062b\u06cc\u0642 \u06a9\u06d2 \u0631\u0627\u0633\u062a\u06d2 \u0635\u0627\u0631\u0641\u06cc\u0646\/ \u0641\u0648\u0644\u0688\u0631 \u0633\u06d2 \u0628\u0627\u06c1\u0631 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633 \u0644\u06cc\u06d2 \u063a\u06cc\u0631 \u0645\u062a\u0627\u062b\u0631 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u06a9\u0648\u0626\u06cc \u062f\u0633\u062a\u06cc \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u0645\u0627\u0624\u0646\u0679\u0646\u06af\u060c \u0645\u062d\u0641\u0648\u0638 \u0631\u0627\u0633\u062a\u06d2 \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0645\u060c \u0627\u0648\u0631 \u067e\u0627\u062a\u06be \u06af\u0631\u0648\u067e \u06a9\u0646\u0641\u06cc\u06af\u0631\u06cc\u0634\u0646 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0641\u0648\u0644\u0688\u0631 \u06a9\u0627 \u0688\u06be\u0627\u0646\u0686\u06c1 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-testing-the-api\">API \u0679\u06cc\u0633\u0679\u0646\u06af<\/h2>\n<p>\u0633\u0631\u0648\u0631 \u06a9\u06d2 \u0686\u0644\u0646\u06d2 \u0627\u0648\u0631 \u062a\u0645\u0627\u0645 \u0631\u0627\u0633\u062a\u06d2 \u0645\u0646\u0633\u0644\u06a9 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u0633\u0627\u062a\u06be\u060c \u0622\u067e \u0634\u0631\u0648\u0639 \u0633\u06d2 \u0622\u062e\u0631 \u062a\u06a9 \u067e\u0648\u0631\u06d2 \u0628\u06c1\u0627\u0624 \u06a9\u0648 \u062f\u06cc\u06a9\u06be \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0688\u0648\u06cc\u0644\u067e\u0645\u0646\u0679 \u0633\u0631\u0648\u0631 \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u06c1\u0631 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u06a9\u0648 \u062a\u0631\u062a\u06cc\u0628 \u0633\u06d2 \u0686\u0644\u0627\u0626\u06cc\u06ba\u06d4 \u0622\u067e \u0679\u0648\u06a9\u0646 \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u067e\u06c1\u0644\u06d2 \u0635\u0627\u0631\u0641 \u06a9\u0648 \u0631\u062c\u0633\u0679\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u067e\u06be\u0631 \u0627\u0633 \u0679\u0648\u06a9\u0646 \u06a9\u0648 \u0645\u062d\u0641\u0648\u0638 \u0631\u0627\u0633\u062a\u06d2 \u067e\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0646\u06cc\u0686\u06d2 \u062f\u06cc \u06af\u0626\u06cc \u06a9\u0645\u0627\u0646\u0688 \u0645\u06cc\u06ba {userId} \u06a9\u0648 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u06a9\u06d2 \u062c\u0648\u0627\u0628 \u0645\u06cc\u06ba \u0648\u0627\u067e\u0633 \u06a9\u06cc \u06af\u0626\u06cc \u0627\u0635\u0644 ID \u0633\u06d2 \u0628\u062f\u0644 \u062f\u06cc\u06ba\u06d4<\/p>\n<p>\u0688\u0648\u06cc\u0644\u067e\u0645\u0646\u0679 \u0633\u0631\u0648\u0631 \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-bash\">dart_frog dev\n# Server is now running at: http:\/\/localhost:8080\n<\/code><\/pre>\n<p>\u0635\u0627\u0631\u0641 \u06a9\u06cc \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646:<\/p>\n<pre><code class=\"language-bash\">curl http:\/\/localhost:8080\/auth\/register \\\n  -X POST \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\n    \"email\": \"seyi@example.com\",\n    \"password\": \"securepassword\",\n    \"firstName\": \"Seyi\",\n    \"lastName\": \"Dev\"\n  }'\n<\/code><\/pre>\n<p>\u062c\u0648\u0627\u0628:<\/p>\n<pre><code class=\"language-json\">{\n  \"user\": {\n    \"id\": \"uuid-here\",\n    \"email\": \"seyi@example.com\",\n    \"firstName\": \"Seyi\",\n    \"lastName\": \"Dev\",\n    \"isActive\": true,\n    \"createdAt\": \"2025-01-01T00:00:00.000Z\",\n    \"updatedAt\": \"2025-01-01T00:00:00.000Z\"\n  },\n  \"token\": \"eyJhbGci...\"\n}\n<\/code><\/pre>\n<p>\u0644\u0627\u06af \u0627\u0646:<\/p>\n<pre><code class=\"language-bash\">curl http:\/\/localhost:8080\/auth\/login \\\n  -X POST \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"email\": \"seyi@example.com\", \"password\": \"securepassword\"}'\n<\/code><\/pre>\n<p>\u062a\u0645\u0627\u0645 \u0635\u0627\u0631\u0641\u06cc\u0646 \u062d\u0627\u0635\u0644 \u06a9\u0631\u06cc\u06ba:<\/p>\n<pre><code class=\"language-bash\">curl http:\/\/localhost:8080\/users \\\n  -H \"Authorization: Bearer eyJhbGci...\"\n<\/code><\/pre>\n<p>\u0645\u062e\u0635\u0648\u0635 \u0635\u0627\u0631\u0641\u06cc\u0646 \u062d\u0627\u0635\u0644 \u06a9\u0631\u06cc\u06ba:<\/p>\n<pre><code class=\"language-bash\">curl http:\/\/localhost:8080\/users\/{userId} \\\n  -H \"Authorization: Bearer eyJhbGci...\"\n<\/code><\/pre>\n<p>\u0627\u067e\u0646\u0627 \u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-bash\">curl http:\/\/localhost:8080\/users\/{userId}\/profile \\\n  -X POST \\\n  -H \"Authorization: Bearer eyJhbGci...\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\n    \"bio\": \"Flutter engineer turned backend developer\",\n    \"location\": \"Lagos, Nigeria\",\n    \"website\": \"https:\/\/example.com\"\n  }'\n<\/code><\/pre>\n<p>\u0635\u0627\u0631\u0641 \u06a9\u06cc \u062a\u0627\u0632\u06c1 \u06a9\u0627\u0631\u06cc\u06cc\u06ba:<\/p>\n<pre><code class=\"language-bash\">curl http:\/\/localhost:8080\/users\/{userId} \\\n  -X PUT \\\n  -H \"Authorization: Bearer eyJhbGci...\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"firstName\": \"Oluwaseyi\"}'\n<\/code><\/pre>\n<p>\u0635\u0627\u0631\u0641 \u06a9\u0648 \u062d\u0630\u0641 \u06a9\u0631\u06cc\u06ba:<\/p>\n<pre><code class=\"language-bash\">curl http:\/\/localhost:8080\/users\/{userId} \\\n  -X DELETE \\\n  -H \"Authorization: Bearer eyJhbGci...\"\n<\/code><\/pre>\n<h2 id=\"heading-deployment\">\u062a\u0639\u06cc\u0646\u0627\u062a\u06cc<\/h2>\n<p>\u0645\u0642\u0627\u0645\u06cc \u0637\u0648\u0631 \u067e\u0631 \u06c1\u0631 \u0686\u06cc\u0632 \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f\u060c \u0622\u062e\u0631\u06cc \u0645\u0631\u062d\u0644\u06c1 API \u0644\u0627\u0626\u06cc\u0648 \u06a9\u0648 \u0646\u0627\u0641\u0630 \u06a9\u0631\u0646\u0627 \u06c1\u06d2\u06d4 \u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u06cc\u06c1 \u06a9\u0627\u0645 \u0622\u0633\u0627\u0646\u06cc \u0633\u06d2 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u0648\u0627\u062d\u062f CLI \u06a9\u0645\u0627\u0646\u0688 \u0627\u06cc\u06a9 \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u06cc\u0627\u0631 \u0688\u0627\u06a9\u0631 \u0641\u0627\u0626\u0644 \u0628\u0646\u0627\u062a\u06cc \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0648\u06c1\u0627\u06ba \u0633\u06d2 Fly.io \u067e\u0631 \u062a\u0639\u06cc\u0646\u0627\u062a \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u060c \u062c\u06c1\u0627\u06ba \u0622\u067e \u06a9\u06cc \u0627\u06cc\u067e \u0627\u06cc\u06a9 \u0646\u0638\u0645 \u0634\u062f\u06c1 PostgreSQL \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u0646\u0679\u06cc\u0646\u0631\u0627\u0626\u0632\u0688 \u0633\u0631\u0648\u0633 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0686\u0644\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-production-build\">\u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u06a9\u06cc \u062a\u0639\u0645\u06cc\u0631<\/h3>\n<p>\u0688\u0627\u0631\u0679 \u0641\u0631\u0627\u06af \u0627\u06cc\u06a9 \u06c1\u06cc \u06a9\u0645\u0627\u0646\u0688 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u06cc\u0627\u0631 \u0688\u0648\u06a9\u0631 \u0633\u06cc\u0679 \u0627\u067e \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-bash\">dart_frog build\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0627\u06cc\u06a9 \u0628\u0644\u0688\/ \u0688\u0627\u0626\u0631\u06cc\u06a9\u0679\u0631\u06cc \u0628\u0646\u0627\u0626\u06d2 \u06af\u0627 \u062c\u0633 \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-plaintext\">build\/\n  bin\/\n    server.dart         \u2190 compiled entry point\n  Dockerfile            \u2190 production Dockerfile\n  pubspec.yaml\n  pubspec.lock\n<\/code><\/pre>\n<p>\u062a\u06cc\u0627\u0631 \u06a9\u0631\u062f\u06c1 \u0688\u0627\u06a9\u0631 \u0641\u0627\u0626\u0644 \u0627\u06cc\u06a9 \u0645\u0644\u0679\u06cc \u0627\u0633\u0679\u06cc\u062c \u0628\u0644\u0688 \u06c1\u06d2\u060c \u062c\u06c1\u0627\u06ba \u067e\u06c1\u0644\u0627 \u0645\u0631\u062d\u0644\u06c1 \u0645\u0642\u0627\u0645\u06cc \u0628\u0627\u0626\u0646\u0631\u06cc\u0632 \u0645\u06cc\u06ba \u0645\u0631\u062a\u0628 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u062f\u0648\u0633\u0631\u0627 \u0645\u0631\u062d\u0644\u06c1 \u06a9\u0645 \u0633\u06d2 \u06a9\u0645 \u0688\u06cc\u0628\u06cc\u0646 \u0627\u0645\u06cc\u062c \u067e\u0631 \u0686\u0644\u062a\u0627 \u06c1\u06d2\u06d4 \u0622\u067e \u06a9\u0648 \u06cc\u06c1 \u062e\u0648\u062f \u0644\u06a9\u06be\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-deploying-to-flyio\">Fly.io \u067e\u0631 \u062a\u0639\u06cc\u0646\u0627\u062a \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p><strong>\u0645\u0631\u062d\u0644\u06c1 1 &#8211; \u062a\u0635\u062f\u06cc\u0642:<\/strong><\/p>\n<pre><code class=\"language-bash\">fly auth login\n<\/code><\/pre>\n<p><strong>\u0645\u0631\u062d\u0644\u06c1 2 &#8211; \u0628\u0644\u0688 \u0688\u0627\u0626\u0631\u06a9\u0679\u0631\u06cc \u0633\u06d2 \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba\u06d4<\/strong><\/p>\n<pre><code class=\"language-bash\">cd build\nfly launch\n<\/code><\/pre>\n<p>\u0641\u0644\u0627\u0626\u06cc \u0622\u067e \u06a9\u06cc \u0688\u0627\u06a9\u0631 \u0641\u0627\u0626\u0644 \u06a9\u0627 \u067e\u062a\u06c1 \u0644\u06af\u0627\u0626\u06d2 \u06af\u06cc \u0627\u0648\u0631 \u0622\u067e \u06a9\u0648 \u0627\u0633\u06d2 \u06a9\u0646\u0641\u06cc\u06af\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0627\u0634\u0627\u0631\u06c1 \u06a9\u0631\u06d2 \u06af\u06cc\u06d4 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u067e\u0631 \u0627\u06cc\u06a9 PostgreSQL \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><strong>\u0645\u0631\u062d\u0644\u06c1 3 &#8211; \u0631\u0627\u0632 \u0642\u0627\u0626\u0645 \u06a9\u0631\u06cc\u06ba:<\/strong><\/p>\n<pre><code class=\"language-bash\">fly secrets set JWT_SECRET=\"your_production_jwt_secret\"\nfly secrets set JWT_EXPIRY_HOURS=\"24\"\n<\/code><\/pre>\n<p><strong>\u0645\u0631\u062d\u0644\u06c1 4 &#8211; \u062a\u0639\u06cc\u0646\u0627\u062a \u06a9\u0631\u06cc\u06ba:<\/strong><\/p>\n<pre><code class=\"language-bash\">fly deploy\n<\/code><\/pre>\n<p><strong>\u0645\u0631\u062d\u0644\u06c1 5 &#8211; \u062a\u0635\u062f\u06cc\u0642 \u06a9\u0631\u06cc\u06ba:<\/strong><\/p>\n<pre><code class=\"language-bash\">curl https:\/\/your-app-name.fly.dev\/auth\/register \\\n  -X POST \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"email\":\"test@example.com\",\"password\":\"password123\",\"firstName\":\"Seyi\",\"lastName\":\"Dev\"}'\n<\/code><\/pre>\n<h2 id=\"heading-conclusion\">\u0646\u062a\u06cc\u062c\u06c1<\/h2>\n<p>Dart Frog \u0634\u06cc\u0644\u0641 \u06a9\u06d2 \u062e\u0627\u0645 \u06a9\u0646\u0679\u0631\u0648\u0644 \u0627\u0648\u0631 Serverpod \u06a9\u06d2 \u0645\u06a9\u0645\u0644 \u0627\u0646 \u067e\u0679 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0686\u0648\u06a9\u0648\u0631 \u0628\u06cc\u0679\u06be\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 JavaScript \u0627\u06cc\u06a9\u0648 \u0633\u0633\u0679\u0645 \u0645\u06cc\u06ba \u062b\u0627\u0628\u062a \u0634\u062f\u06c1 \u0641\u0627\u0626\u0644 \u067e\u0631 \u0645\u0628\u0646\u06cc \u0631\u0648\u0679\u0646\u06af \u0645\u0627\u0688\u0644 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0632\u0628\u0627\u0646 \u06a9\u06cc \u0637\u0627\u0642\u062a \u0633\u06d2 \u0633\u0645\u062c\u06be\u0648\u062a\u06c1 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 \u0627\u0633\u06d2 \u0635\u0627\u0641 \u0633\u062a\u06be\u0631\u0627 \u0627\u0646\u062f\u0627\u0632 \u0645\u06cc\u06ba \u0688\u0627\u0631\u0679 \u0645\u06cc\u06ba \u0644\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0631\u0648\u0679\u0646\u06af \u0645\u0627\u0688\u0644 \u0627\u0633 \u06a9\u06cc \u0633\u0628 \u0633\u06d2 \u0637\u0627\u0642\u062a\u0648\u0631 \u062e\u0635\u0648\u0635\u06cc\u062a \u06c1\u06d2\u06d4 \u067e\u0627\u062a\u06be\/\u0641\u0648\u0644\u0688\u0631 \u06a9\u0648 \u062f\u06cc\u06a9\u06be\u0646\u06d2 \u0633\u06d2 \u0622\u067e \u06a9\u0648 API \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0633\u0628 \u06a9\u0686\u06be \u067e\u062a\u06c1 \u0686\u0644 \u062c\u0627\u0626\u06d2 \u06af\u0627\u060c \u0628\u0634\u0645\u0648\u0644 \u06a9\u0648\u0646 \u0633\u06d2 \u0627\u06cc\u0646\u0688 \u067e\u0648\u0627\u0626\u0646\u0679\u0633 \u0645\u0648\u062c\u0648\u062f \u06c1\u06cc\u06ba\u060c \u0648\u06c1 \u06a9\u06cc\u0633\u06d2 \u06af\u0631\u0648\u067e \u06a9\u06cc\u06d2 \u06af\u0626\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u06a9\u0648\u0646 \u0633\u0627 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u06a9\u0633 \u0633\u06cc\u06a9\u0634\u0646 \u067e\u0631 \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0634\u0641\u0627\u0641\u06cc\u062a \u06a9\u0648\u0688\u0628\u06cc\u0633 \u06a9\u0648 \u0646\u06cc\u0648\u06cc\u06af\u06cc\u0679 \u06a9\u0631\u0646\u06d2 \u0645\u06cc\u06ba \u0622\u0633\u0627\u0646\u060c \u0622\u0646 \u0628\u0648\u0631\u0688\u0646\u06af \u0645\u06cc\u06ba \u0622\u0633\u0627\u0646\u060c \u0627\u0648\u0631 \u06a9\u0648\u0688\u0628\u06cc\u0633 \u06a9\u06d2 \u0628\u0691\u06be\u0646\u06d2 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0633\u0648\u0686\u0646\u06d2 \u0645\u06cc\u06ba \u0622\u0633\u0627\u0646 \u0628\u0646\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0646\u062d\u0635\u0627\u0631 \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 RequestContext \u0627\u0648\u0631 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0646\u0646\u062f\u06c1 \u06a9\u06d2 \u0646\u0645\u0648\u0646\u06d2 \u0627\u0686\u06be\u06cc \u0637\u0631\u062d \u0633\u06d2 \u0633\u0648\u0686\u06d2 \u06af\u0626\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u06a9\u0648 \u0627\u0646\u062c\u06a9\u0634\u0646 \u0644\u06af\u0627\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0631\u0627\u0633\u062a\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u062f\u0648\u0646\u0648\u06ba \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u06a9\u0686\u06be \u0646\u06c1\u06cc\u06ba \u0628\u06c1\u062a\u0627 \u06c1\u06d2. \u0641\u0648\u0644\u0688\u0631 \u0627\u0633\u06a9\u0648\u067e\u0688 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u062e\u0627\u0635 \u0637\u0648\u0631 \u067e\u0631 \u0635\u0627\u0641 \u0633\u062a\u06be\u0631\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0622\u067e \u06a9\u06d2 API \u06a9\u06d2 \u067e\u0648\u0631\u06d2 \u062d\u0635\u06d2 \u06a9\u0648 \u0645\u062d\u0641\u0648\u0638 \u0628\u0646\u0627\u0646\u0627 \u0627\u062a\u0646\u0627 \u06c1\u06cc \u0622\u0633\u0627\u0646 \u06c1\u06d2 \u062c\u062a\u0646\u0627 \u06a9\u06c1 \u0635\u062d\u06cc\u062d \u0641\u0648\u0644\u0688\u0631 \u0645\u06cc\u06ba _middleware.dart \u0641\u0627\u0626\u0644 \u0631\u06a9\u06be\u0646\u0627\u06d4<\/p>\n<p>\u0641\u0644\u0679\u0631 \u0627\u0646\u062c\u06cc\u0646\u0626\u0631\u0632 \u0628\u0646\u0627\u0646\u06d2 \u0648\u0627\u0644\u06d2 APIs \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0646 \u06a9\u0648 \u06a9\u0644\u0627\u0626\u0646\u0679 \u06a9\u06cc \u0645\u062a\u0639\u062f\u062f \u0627\u0642\u0633\u0627\u0645 \u06a9\u06cc \u062e\u062f\u0645\u062a \u06a9\u0631\u0646\u06d2\u060c \u0645\u0639\u06cc\u0627\u0631\u06cc REST \u06a9\u0646\u0648\u0646\u0634\u0646\u0632 \u067e\u0631 \u0639\u0645\u0644 \u067e\u06cc\u0631\u0627 \u06c1\u0648\u0646\u06d2\u060c \u06cc\u0627 \u0645\u0648\u062c\u0648\u062f\u06c1 \u0641\u0631\u0646\u0679 \u0627\u06cc\u0646\u0688 \u0627\u0646\u0641\u0631\u0627\u0633\u0679\u0631\u06a9\u0686\u0631 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0635\u0627\u0641 \u0637\u0648\u0631 \u067e\u0631 \u0645\u0631\u0628\u0648\u0637 \u06c1\u0648\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u060c Dart Frog \u0627\u06cc\u06a9 \u0627\u06cc\u0633\u06cc \u0639\u0645\u0644\u06cc \u0645\u06cc\u0679\u06be\u06cc \u062c\u06af\u06c1 \u067e\u0631 \u067e\u06c1\u0646\u0686\u062a\u0627 \u06c1\u06d2 \u062c\u06c1\u0627\u06ba \u0646\u06c1 \u062a\u0648 \u0634\u06cc\u0644\u0641 \u0627\u0648\u0631 \u0646\u06c1 \u06c1\u06cc Serverpod \u0642\u062f\u0631\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u067e\u06c1\u0646\u0686 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0688\u0627\u0631\u0679 \u0627\u0628 \u0644\u0641\u0638 \u06a9\u06d2 \u062d\u0642\u06cc\u0642\u06cc \u0645\u0639\u0646\u0648\u06ba \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0645\u06a9\u0645\u0644 \u0627\u0633\u0679\u06cc\u06a9 \u0632\u0628\u0627\u0646 \u06c1\u06d2\u06d4 Flutter \u0627\u06cc\u067e \u0633\u06d2 \u0644\u06d2 \u06a9\u0631 \u0627\u0633\u06d2 \u0686\u0644\u0627\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0633\u0631\u0648\u0631 \u062a\u06a9\u060c \u0648\u06c1\u06cc \u0679\u06cc\u0645\u060c \u0648\u06c1\u06cc \u0632\u0628\u0627\u0646\u060c \u0627\u0648\u0631 \u0648\u06c1\u06cc \u0627\u0635\u0648\u0644 \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0645\u0628\u0627\u0631\u06a9 \u06a9\u0648\u0688\u0646\u06af!<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u0688\u0627\u0631\u0679 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0633\u067e\u06cc\u06a9\u0679\u0631\u0645 \u067e\u0631 \u0645\u0648\u062c\u0648\u062f \u06c1\u06cc\u06ba\u06d4 \u06a9\u0645 \u0633\u06d2 \u06a9\u0645 \u0627\u062e\u062a\u062a\u0627\u0645 \u067e\u0631 \u0634\u06cc\u0644\u0641 \u06c1\u06d2\u060c \u062e\u0627\u0645 \u0642\u062f\u06cc\u0645 \u0627\u0648\u0631 \u0645\u06a9\u0645\u0644 \u06a9\u0646\u0679\u0631\u0648\u0644 \u06a9\u06d2 \u0633\u0627\u062a\u06be\u06d4 \u06c1\u0631 \u0686\u06cc\u0632 \u06a9\u0648 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u062c\u0648\u0691\u06cc\u06ba\u06d4 \u0628\u0627\u0644\u06a9\u0644 \u0622\u062e\u0631 \u0645\u06cc\u06ba \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u06a9\u0648\u0688 \u062c\u0646\u0631\u06cc\u0634\u0646 \u0627\u0648\u0631 \u0645\u0644\u06a9\u06cc\u062a\u06cc \u0642\u0648\u0627\u0646\u06cc\u0646 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u06cc\u06a9 \u0645\u06a9\u0645\u0644 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u06c1\u06d2\u06d4 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 \u0633\u0627\u062e\u062a\u06cc \u0641\u06cc\u0635\u0644\u06d2 \u06a9\u0631\u062a\u0627 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-25247","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/25247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/comments?post=25247"}],"version-history":[{"count":0,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/25247\/revisions"}],"wp:attachment":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/media?parent=25247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/categories?post=25247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/tags?post=25247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}