{"id":24833,"date":"2026-06-03T03:47:21","date_gmt":"2026-06-03T03:47:21","guid":{"rendered":"https:\/\/umang.pk\/2026\/06\/03\/%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-%d8%b3%d8%b1%d9%88%d8%b1-%d9%be%d9%88%da%88-%da%a9%d8%a7\/"},"modified":"2026-06-03T03:47:21","modified_gmt":"2026-06-03T03:47:21","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-%d8%b3%d8%b1%d9%88%d8%b1-%d9%be%d9%88%da%88-%da%a9%d8%a7","status":"publish","type":"post","link":"https:\/\/umang.pk\/ur\/2026\/06\/03\/%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-%d8%b3%d8%b1%d9%88%d8%b1-%d9%be%d9%88%da%88-%da%a9%d8%a7\/","title":{"rendered":"\u0641\u0644\u0679\u0631 \u0633\u06d2 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u062a\u06a9: \u0688\u0627\u0631\u0679 \u0627\u0648\u0631 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \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>Serverpod \u0688\u0627\u0631\u0679 \u067e\u0631 \u0628\u0646\u0627\u0626\u06d2 \u06af\u0626\u06d2 \u0633\u0628 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u067e\u0631\u0641\u0627\u0631\u0645\u0646\u0633 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0645\u06cc\u06ba \u0633\u06d2 \u0627\u06cc\u06a9 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0645\u0644\u06a9\u06cc\u062a\u06cc \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u06c1\u06d2 \u062c\u0648 \u0627\u067e\u0646\u06d2 ORM\u060c \u0627\u067e\u0646\u06d2 \u06a9\u0648\u0688 \u062c\u0646\u0631\u06cc\u0634\u0646 \u0633\u0633\u0679\u0645\u060c \u0645\u0627\u0626\u06cc\u06af\u0631\u06cc\u0634\u0646 \u0679\u0648\u0644\u0632\u060c \u062a\u0635\u062f\u06cc\u0642\u06cc \u0645\u0627\u0688\u06cc\u0648\u0644\u0632 \u0627\u0648\u0631 \u062a\u0639\u06cc\u0646\u0627\u062a\u06cc \u067e\u0644\u06cc\u0679 \u0641\u0627\u0631\u0645 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0622\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u06af\u0631 \u0622\u067e \u0627\u067e\u0646\u0627 API \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0634\u06cc\u0644\u0641 \u062c\u06cc\u0633\u06d2 \u0679\u0648\u0644 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0622\u067e \u0633\u0628 \u06a9\u0686\u06be \u062e\u0648\u062f \u0627\u06a9\u0679\u06be\u0627 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06cc\u06a9 \u067e\u06cc\u06a9\u06cc\u062c \u06a9\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0631\u06cc\u06ba\u060c \u0627\u067e\u0646\u0627 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u0644\u06a9\u06be\u06cc\u06ba\u060c \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u0646\u06a9\u0634\u0646 \u06a9\u0627 \u0646\u0638\u0645 \u06a9\u0631\u06cc\u06ba\u060c \u0627\u0648\u0631 \u062a\u0645\u0627\u0645 \u0679\u06a9\u0691\u0648\u06ba \u06a9\u0648 \u062f\u0633\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u062c\u0648\u0691\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0634\u06cc\u0644\u0641 \u0637\u0631\u06cc\u0642\u06c1 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u06cc\u06c1 \u0622\u067e \u06a9\u0648 \u0628\u0627\u0644\u06a9\u0644 \u0628\u062a\u0627\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0633\u0631\u0648\u0631 \u0633\u0627\u0626\u06cc\u0688 \u0688\u0627\u0631\u0679 \u0627\u0646\u062f\u0631\u0648\u0646\u06cc \u0637\u0648\u0631 \u067e\u0631 \u06a9\u06cc\u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0627\u06cc\u06a9 \u0628\u0627\u0644\u06a9\u0644 \u0645\u062e\u062a\u0644\u0641 \u0641\u0644\u0633\u0641\u06c1 \u06c1\u06d2\u06d4<\/p>\n<p>\u062c\u0628\u06a9\u06c1 \u0634\u06cc\u0644\u0641 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0639\u0646\u0627\u0635\u0631 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0627\u06cc\u06a9 \u0645\u06a9\u0645\u0644 \u0646\u0638\u0627\u0645 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 YAML \u0645\u06cc\u06ba \u0627\u067e\u0646\u06d2 \u0645\u0627\u0688\u0644 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u06cc\u06ba\u060c \u062c\u0646\u0631\u06cc\u0679\u0631 \u0686\u0644\u0627\u0626\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0679\u0627\u0626\u067e \u0634\u062f\u06c1 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u0644\u0627\u0633\u0632\u060c \u0633\u06cc\u0631\u06cc\u0644\u0627\u0626\u0632\u06cc\u0634\u0646\u060c \u0627\u0648\u0631 \u06a9\u0644\u0627\u0626\u0646\u0679 \u0633\u0627\u0626\u0688 \u06a9\u0648\u0688 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u062a\u06cc\u0627\u0631 \u06c1\u0648 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0641\u0644\u0679\u0631 \u0627\u0646\u062c\u06cc\u0646\u0626\u0631\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u06cc\u06c1 \u0641\u0648\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0645\u0627\u0646\u0648\u0633 \u0645\u062d\u0633\u0648\u0633 \u06c1\u0648\u06af\u0627\u06d4 \u06cc\u06c1 \u0627\u0633\u06cc \u0642\u0633\u0645 \u06a9\u06cc \u067e\u06cc\u062f\u0627\u0648\u0627\u0631\u06cc \u0635\u0644\u0627\u062d\u06cc\u062a \u06c1\u06d2 \u062c\u0648 \u0622\u067e \u0641\u0644\u0679\u0631 \u0679\u0648\u0644 \u0686\u06cc\u0646 \u0633\u06d2 \u062d\u0627\u0635\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062c\u0648 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u067e\u0631 \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0633 \u0645\u0636\u0645\u0648\u0646 \u0645\u06cc\u06ba\u060c \u06c1\u0645 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0634\u0631\u0648\u0639 \u0633\u06d2 \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\u0626\u06cc\u06ba \u06af\u06d2\u06d4 \u0622\u067e \u0633\u06cc\u06a9\u06be\u06cc\u06ba \u06af\u06d2 \u06a9\u06c1 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0627 \u06a9\u0648\u0688 \u062c\u0646\u0631\u06cc\u0634\u0646\u060c \u0628\u0644\u0679 \u0627\u0646 ORM\u060c \u0627\u0648\u0631 \u0627\u06cc\u0646\u0688 \u067e\u0648\u0627\u0626\u0646\u0679 \u0633\u0633\u0679\u0645 \u06a9\u06cc\u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0622\u062e\u0631 \u062a\u06a9 \u0622\u067e \u06a9\u06d2 \u067e\u0627\u0633 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u062a\u0639\u06cc\u0646\u0627\u062a \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u06c1\u0648\u06af\u0627\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 \u062a\u0631\u0642\u06cc \u06a9\u0627 \u0639\u0644\u0645<\/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>\u0641\u0644\u0679\u0631 SDK \u0627\u0646\u0633\u0679\u0627\u0644 \u06c1\u06d2 (\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0648 \u0635\u0631\u0641 \u0633\u0631\u0648\u0631 \u06a9\u06d2 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u06be\u06cc \u0627\u0633 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2)<\/p>\n<\/li>\n<li>\n<p>\u062a\u0639\u06cc\u0646\u0627\u062a\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2 Fly.io \u0627\u06a9\u0627\u0624\u0646\u0679 \u06cc\u0627 Serverpod Cloud \u0627\u06a9\u0627\u0624\u0646\u0679<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"heading-how-serverpod-differs-from-shelf\">\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0627\u0648\u0631 \u0634\u06cc\u0644\u0641 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0641\u0631\u0642<\/h2>\n<p>\u06a9\u0648\u0688 \u06a9\u06cc \u0627\u06cc\u06a9 \u0644\u0627\u0626\u0646 \u0644\u06a9\u06be\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u0634\u06cc\u0644\u0641 \u0627\u0648\u0631 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0641\u0644\u0633\u0641\u06cc\u0627\u0646\u06c1 \u0641\u0631\u0642 \u06a9\u0648 \u0633\u0645\u062c\u06be\u0646\u0627 \u0627\u0686\u06be\u0627 \u062e\u06cc\u0627\u0644 \u06c1\u06d2\u06d4 \u0627\u0633 \u0633\u06d2 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0645\u06cc\u06ba \u06c1\u0631 \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u0627 \u0641\u06cc\u0635\u0644\u06c1 \u0645\u0646 \u0645\u0627\u0646\u06cc \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u062c\u0627\u0646 \u0628\u0648\u062c\u06be \u06a9\u0631 \u0645\u062d\u0633\u0648\u0633 \u06c1\u0648\u06af\u0627\u06d4<\/p>\n<p>\u0634\u06cc\u0644\u0641 \u0622\u067e \u06a9\u0648 \u06a9\u0686\u06be \u0628\u06be\u06cc \u0644\u06a9\u06be\u0646\u06d2 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4 \u062a\u062c\u0632\u06cc\u06c1\u060c \u0631\u0633\u067e\u0627\u0646\u0633 \u0641\u0627\u0631\u0645\u06cc\u0679\u0646\u06af\u060c \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0627\u0633\u062a\u0641\u0633\u0627\u0631\u060c \u0645\u0646\u062a\u0642\u0644\u06cc\u060c \u062a\u0635\u062f\u06cc\u0642\u060c \u0627\u0648\u0631 \u0644\u0627\u06af\u0646\u06af \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u0631\u06cc\u06ba\u06d4 \u06c1\u0631 \u062d\u0635\u06c1 \u0648\u0627\u0636\u062d \u06a9\u0648\u0688 \u06c1\u06d2 \u062c\u0633\u06d2 \u0622\u067e \u0633\u0645\u062c\u06be \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0622\u067e \u0646\u06d2 \u0627\u0633\u06d2 \u0644\u06a9\u06be\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u06d2 \u0633\u0627\u062a\u06be\u060c \u0622\u067e \u0686\u06cc\u0632\u0648\u06ba \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u06a9\u0648\u0688 \u0644\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4 YAML \u0645\u06cc\u06ba \u0627\u067e\u0646\u06d2 \u0645\u0627\u0688\u0644 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u06cc\u06ba\u060c \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u062c\u0646\u0631\u06cc\u0679 \u0686\u0644\u0627\u0626\u06cc\u06ba\u060c \u0627\u0648\u0631 \u062e\u0648\u062f\u06a9\u0627\u0631 \u0637\u0648\u0631 \u067e\u0631 \u0645\u06a9\u0645\u0644 \u0688\u0627\u0631\u0679 \u06a9\u0644\u0627\u0633 \u062f\u0631\u0622\u0645\u062f \u06a9\u0631\u06cc\u06ba\u060c \u0628\u0634\u0645\u0648\u0644 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0628\u0627\u0626\u0646\u0688\u0646\u06af\u060c \u0633\u06cc\u0631\u06cc\u0644\u0627\u0626\u0632\u06cc\u0634\u0646\u060c \u0627\u0648\u0631 \u06a9\u0644\u0627\u0626\u0646\u0679 \u0633\u0627\u0626\u0688 \u0631\u0633\u0627\u0626\u06cc\u06d4 \u0622\u067e \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u06a9\u06d2 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0627\u0631 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0631\u0648\u0679\u0646\u06af\u060c \u067e\u06cc\u0631\u0627\u0645\u06cc\u0679\u0631 \u0646\u06a9\u0627\u0644\u0646\u06d2\u060c \u0627\u0648\u0631 \u0631\u0633\u067e\u0627\u0646\u0633 \u0641\u0627\u0631\u0645\u06cc\u0679\u0646\u06af \u06a9\u0627 \u062e\u06cc\u0627\u0644 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u0648\u06c1\u06cc \u0633\u0645\u062c\u06be\u0648\u062a\u06c1 \u06c1\u06d2 \u062c\u0648 \u0641\u0644\u0679\u0631 \u0645\u0642\u0627\u0645\u06cc \u067e\u0644\u06cc\u0679 \u0641\u0627\u0631\u0645 APIs \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06a9\u06d2 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0641\u0644\u0679\u0631 \u0627\u06cc\u06a9 \u0644\u06d2 \u0622\u0624\u0679 \u0627\u0646\u062c\u0646\u060c \u0631\u06cc\u0646\u0688\u0631\u0646\u06af \u067e\u0627\u0626\u067e \u0644\u0627\u0626\u0646\u060c \u0627\u0648\u0631 \u0627\u0634\u0627\u0631\u06c1 \u06a9\u0627 \u0646\u0638\u0627\u0645 \u0644\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u0635\u0646\u0648\u0639\u0627\u062a \u06a9\u06cc \u0645\u0646\u0637\u0642 \u067e\u0631 \u062a\u0648\u062c\u06c1 \u062f\u06cc\u06ba\u06d4 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u067e\u0631 \u0627\u06cc\u06a9 \u06c1\u06cc \u0634\u0631\u0637 \u0644\u06af\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0633 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631\u06cc \u0635\u0644\u0627\u062d\u06cc\u062a \u06a9\u06cc \u0642\u06cc\u0645\u062a \u0644\u0686\u06a9 \u06c1\u06d2\u06d4 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u06cc \u0627\u0633 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0645\u0636\u0628\u0648\u0637 \u0631\u0627\u0626\u06d2 \u06c1\u06d2 \u06a9\u06c1 \u0686\u06cc\u0632\u0648\u06ba \u06a9\u0648 \u06a9\u0633 \u0637\u0631\u062d \u062a\u0634\u06a9\u06cc\u0644 \u062f\u06cc\u0627 \u062c\u0627\u0646\u0627 \u0686\u0627\u06c1\u0626\u06d2\u06d4 \u0627\u06af\u0631 \u0622\u067e \u06a9\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0627 \u0645\u0639\u0627\u0645\u0644\u06c1 \u0627\u0646 \u062a\u0628\u0635\u0631\u0648\u06ba \u06a9\u0648 \u067e\u0648\u0631\u0627 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u062a\u0631\u0642\u06cc \u0628\u06c1\u062a \u062a\u06cc\u0632 \u06c1\u0648\u06af\u06cc\u06d4 \u062f\u0648\u0633\u0631\u06cc \u0635\u0648\u0631\u062a \u0645\u06cc\u06ba\u060c \u0622\u067e \u0627\u06cc\u06a9 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u06a9\u06d2 \u062e\u0644\u0627\u0641 \u06a9\u0627\u0645 \u06a9\u0631 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba.<\/p>\n<p>\u0635\u0627\u0631\u0641 \u0627\u0648\u0631 \u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u0645\u06cc\u0646\u062c\u0645\u0646\u0679 API \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0648 \u06c1\u0645 \u06cc\u06c1\u0627\u06ba \u0628\u0646\u0627 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u060c Serverpod \u0627\u06cc\u06a9 \u0628\u06c1\u062a\u0631\u06cc\u0646 \u0641\u0679 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-installing-serverpod\">\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u06cc \u062a\u0646\u0635\u06cc\u0628<\/h2>\n<p>\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0648 \u0635\u0631\u0641 \u0633\u0631\u0648\u0631 \u06a9\u06d2 \u06a9\u0627\u0645\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u06be\u06cc \u0641\u0644\u0679\u0631 \u0627\u0646\u0633\u0679\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u06cc \u0648\u062c\u06c1 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0679\u0648\u0644 \u0686\u06cc\u0646 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u06cc \u062a\u062e\u0644\u06cc\u0642 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u0633\u0631\u0648\u0631 \u067e\u06cc\u06a9\u062c\u0648\u06ba \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u0644\u0627\u0626\u0646\u0679 \u067e\u06cc\u06a9\u062c\u0632 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 CLI \u06a9\u0648 \u0639\u0627\u0644\u0645\u06cc \u0633\u0637\u062d \u067e\u0631 \u0627\u0646\u0633\u0679\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-bash\">dart pub global activate serverpod_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\">serverpod\n# Should print the Serverpod CLI help\n<\/code><\/pre>\n<p>\u062c\u0627\u0631\u06cc \u0631\u06a9\u06be\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u0626\u06cc\u06ba \u06a9\u06c1 \u0688\u0648\u06a9\u0631 \u0688\u06cc\u0633\u06a9 \u0679\u0627\u067e \u0686\u0644 \u0631\u06c1\u0627 \u06c1\u06d2\u06d4 Serverpod \u0645\u0642\u0627\u0645\u06cc \u062a\u0631\u0642\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2 PostgreSQL \u0627\u0648\u0631 Redis \u06a9\u0648 \u0645\u0646\u0638\u0645 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 Docker \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\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\">serverpod create user_profile_api\ncd user_profile_api\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0648\u0627\u062d\u062f \u06a9\u0645\u0627\u0646\u0688 \u062a\u06cc\u0646 \u0688\u0627\u0631\u0679 \u067e\u06cc\u06a9\u062c\u0632 \u0628\u0646\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-plaintext\">user_profile_api\/\n  user_profile_api_server\/    \u2190 your server code\n  user_profile_api_client\/    \u2190 auto-generated client (do not edit)\n  user_profile_api_flutter\/   \u2190 Flutter app pre-configured to connect\n<\/code><\/pre>\n<p>\u0627\u0633 \u0645\u0636\u0645\u0648\u0646 \u0645\u06cc\u06ba \u06c1\u0645 \u062c\u0648 \u06a9\u0686\u06be \u0628\u06be\u06cc \u0644\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba \u0648\u06c1 user_profile_api_server \u0645\u06cc\u06ba \u06c1\u06d2\u06d4 \u06a9\u0644\u0627\u0626\u0646\u0679 \u0627\u0648\u0631 \u0641\u0644\u0679\u0631 \u067e\u06cc\u06a9\u062c\u0632 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0628\u0646 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0628 \u0641\u0644\u0679\u0631 \u0641\u0631\u0646\u0679 \u0627\u06cc\u0646\u0688 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0628\u0627\u062a \u0686\u06cc\u062a \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u062a\u0627 \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<p>user_profile_api_server \u06a9\u06d2 \u0627\u0646\u062f\u0631:<\/p>\n<pre><code class=\"language-plaintext\">user_profile_api_server\/\n  bin\/\n    main.dart                  \u2190 entry point\n  lib\/\n    src\/\n      endpoints\/               \u2190 your endpoint classes live here\n      generated\/               \u2190 auto-generated code (never edit manually)\n    user_profile_api_server.dart\n  config\/\n    development.yaml           \u2190 database and server config\n    staging.yaml\n    production.yaml\n    passwords.yaml             \u2190 database passwords\n  migrations\/                  \u2190 auto-generated migration files\n  web\/                         \u2190 optional web server files\n  Dockerfile\n  docker-compose.yaml\n  pubspec.yaml\n<\/code><\/pre>\n<p>\u0627\u0633 \u0688\u06be\u0627\u0646\u0686\u06d2 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0633\u0645\u062c\u06be\u0646\u06d2 \u06a9\u06d2 \u0644\u0626\u06d2 \u0633\u0628 \u0633\u06d2 \u0627\u06c1\u0645 \u0686\u06cc\u0632 generate\/folder \u06c1\u06d2\u06d4 \u0648\u06c1\u0627\u06ba \u0645\u0648\u062c\u0648\u062f \u06c1\u0631 \u0686\u06cc\u0632 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u062c\u0646\u0631\u06cc\u0679 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06c1 \u062a\u06cc\u0627\u0631 \u06a9\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0633\u06d2 \u062f\u0633\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0627\u06cc\u0688\u0679 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0627 \u062c\u0627\u0646\u0627 \u0686\u0627\u06c1\u0626\u06d2\u06d4 \u062c\u0628 \u0622\u067e \u062c\u0646\u0631\u06cc\u0679\u0631 \u0686\u0644\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0628 \u0622\u067e \u0645\u0627\u0688\u0644 \u06cc\u0627 \u0627\u06cc\u0646\u0688 \u067e\u0648\u0627\u0626\u0646\u0679 \u06a9\u0648 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u062c\u0646\u0631\u06cc\u0679\u0631 \u0627\u0633 \u0641\u0648\u0644\u0688\u0631 \u06a9\u0648 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06a9\u0646\u0641\u06cc\u06af\u0631\u06cc\u0634\u0646\/\u0641\u0648\u0644\u0688\u0631 \u0645\u06cc\u06ba \u0645\u0627\u062d\u0648\u0644 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u062e\u0635\u0648\u0635 \u062a\u0631\u062a\u06cc\u0628 \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4 develop.yaml \u0641\u0627\u0626\u0644 \u06a9\u0648 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u06d2 \u0644\u06cc\u06d2 \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2 \u062a\u0627\u06a9\u06c1 \u0645\u0642\u0627\u0645\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633\u067e\u0646 \u0688\u0648\u06a9\u0631 \u06a9\u0646\u0679\u06cc\u0646\u0631 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u0627\u0645 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u06d2\u06d4<\/p>\n<h2 id=\"heading-serverpod-core-concepts\">\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u06d2 \u0628\u0646\u06cc\u0627\u062f\u06cc \u062a\u0635\u0648\u0631\u0627\u062a<\/h2>\n<h3 id=\"heading-endpoints-and-the-session-object\">\u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u0627\u0648\u0631 \u0633\u06cc\u0634\u0646 \u0622\u0628\u062c\u06cc\u06a9\u0679<\/h3>\n<p>\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0645\u06cc\u06ba\u060c \u0627\u06cc\u06a9 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u0627\u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u06c1\u06d2 \u062c\u0648 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u06a9\u0648 \u0628\u0691\u06be\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u0644\u0627\u0633 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u0639\u0648\u0627\u0645\u06cc \u0637\u0631\u06cc\u0642\u06d2 API \u06a9\u0627\u0644\u0632 \u0628\u0646 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u06a9\u0644\u0627\u0626\u0646\u0679 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06a9\u0648\u0626\u06cc \u0631\u0648\u0679\u0646\u06af \u06a9\u0646\u0641\u06cc\u06af\u0631\u06cc\u0634\u0646\u060c \u06c1\u06cc\u0646\u0688\u0644\u0631 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646\u060c \u06cc\u0627 \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u0645\u0627\u0624\u0646\u0679\u0646\u06af \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u06a9\u0648\u0688 \u062c\u0646\u0631\u06cc\u0634\u0646 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0627\u06cc\u0646\u0688 \u067e\u0648\u0627\u0626\u0646\u0679\u0633 \u06a9\u0648 \u062f\u0631\u06cc\u0627\u0641\u062a \u0627\u0648\u0631 \u0631\u062c\u0633\u0679\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">import 'package:serverpod\/serverpod.dart';\n\nclass UserEndpoint extends Endpoint {\n  Future<string> greet(Session session, String name) async {\n    return 'Hello, $name!';\n  }\n}\n<\/string><\/code><\/pre>\n<p>Serverpod \u0645\u06cc\u06ba \u0633\u06cc\u0634\u0646 \u0622\u0628\u062c\u06cc\u06a9\u0679 \u0633\u0628 \u0633\u06d2 \u0627\u06c1\u0645 \u067e\u06cc\u0631\u0627\u0645\u06cc\u0679\u0631 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u062a\u0645\u0627\u0645 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u0648 \u0645\u0646\u062a\u0642\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0633 \u062a\u06a9 \u0631\u0633\u0627\u0626\u06cc \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2:<\/p>\n<ul>\n<li>\n<p>\u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0622\u067e\u0631\u06cc\u0634\u0646\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 session.db<\/p>\n<\/li>\n<li>\n<p>\u062a\u0635\u062f\u06cc\u0642 \u06a9\u06cc \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u06a9\u06d2 \u0644\u06cc\u06d2 session.auth<\/p>\n<\/li>\n<li>\n<p>\u0633\u0679\u0631\u06a9\u0686\u0631\u0688 \u0644\u0627\u06af\u0646\u06af \u06a9\u06d2 \u0644\u06cc\u06d2 session.log<\/p>\n<\/li>\n<li>\n<p>\u06a9\u06cc\u0634\u0646\u06af \u06a9\u06d2 \u0644\u06cc\u06d2 session.caches<\/p>\n<\/li>\n<li>\n<p>\u0631\u06cc\u0626\u0644 \u0679\u0627\u0626\u0645 \u0645\u06cc\u0633\u062c\u0646\u06af \u06a9\u06d2 \u0644\u06cc\u06d2 session.messages<\/p>\n<\/li>\n<\/ul>\n<p>Flutter&#8217;s BuildContext \u06a9\u06d2 Serverpod \u06a9\u06d2 \u0645\u0633\u0627\u0648\u06cc \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0633\u06cc\u0634\u0646 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0633\u0648\u0686\u06cc\u06ba\u06d4 \u06cc\u06c1 \u06c1\u0631 \u0686\u06cc\u0632 \u06a9\u0627 \u06af\u06cc\u0679 \u0648\u06d2 \u06c1\u06d2 \u062c\u0648 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u06c1\u0645\u06cc\u0634\u06c1 \u067e\u06c1\u0644\u0627 \u067e\u06cc\u0631\u0627\u0645\u06cc\u0679\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-model-files-and-code-generation\">\u0645\u0627\u0688\u0644 \u0641\u0627\u0626\u0644 \u0627\u0648\u0631 \u06a9\u0648\u0688 \u062c\u0646\u0631\u06cc\u0634\u0646<\/h3>\n<p>\u06cc\u06c1 \u0648\u06c1 \u062c\u06af\u06c1 \u06c1\u06d2 \u062c\u06c1\u0627\u06ba \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0627 \u0646\u0642\u0637\u06c1 \u0646\u0638\u0631 \u0634\u06cc\u0644\u0641 \u0633\u06d2 \u0633\u0628 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0645\u062e\u062a\u0644\u0641 \u06c1\u06d2\u06d4 \u0688\u0627\u0631\u0679 \u0645\u0627\u0688\u0644 \u06a9\u0644\u0627\u0633\u0632 \u06a9\u0648 \u062f\u0633\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0644\u06a9\u06be\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c .spy.yaml \u0641\u0627\u0626\u0644 \u0645\u06cc\u06ba \u0688\u06cc\u0679\u0627 \u0688\u06be\u0627\u0646\u0686\u06d2 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 Serverpod \u06a9\u0648 Dart \u06a9\u0644\u0627\u0633\u0632 \u0628\u0646\u0627\u0646\u06d2 \u062f\u06cc\u06ba\u06d4<\/p>\n<p>\u06a9\u0645\u067e\u0646\u06cc \u06a9\u06cc \u0645\u0627\u0688\u0644 \u0641\u0627\u0626\u0644\u06cc\u06ba \u062f\u0631\u062c \u0630\u06cc\u0644 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-yaml\">class: Company\ntable: company\nfields:\n  name: String\n  foundedDate: DateTime?\n<\/code><\/pre>\n<p>\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u062c\u0646\u0631\u06cc\u0679 \u06a9\u0648 \u0686\u0644\u0627\u0646\u06d2 \u0633\u06d2 \u0627\u06cc\u06a9 \u0645\u06a9\u0645\u0644 \u0688\u0627\u0631\u0679 \u06a9\u0644\u0627\u0633 \u062a\u06cc\u0627\u0631 \u06c1\u0648\u06af\u06cc \u062c\u0633 \u0645\u06cc\u06ba:<\/p>\n<ul>\n<li>\n<p>\u0635\u062d\u06cc\u062d \u0642\u0633\u0645 \u06a9\u06d2 \u0646\u0627\u0642\u0627\u0628\u0644 \u062a\u063a\u06cc\u0631 \u0641\u06cc\u0644\u0688\u0632<\/p>\n<\/li>\n<li>\n<p>toJson \u0627\u0648\u0631 fromJson \u0633\u06cc\u0631\u06cc\u0644\u0627\u0626\u0632\u06cc\u0634\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2<\/p>\n<\/li>\n<li>\n<p>\u0688\u06cc \u0628\u06cc \u0633\u0679\u06cc\u0679\u06a9 \u0627\u06cc\u06a9\u0633\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0628\u0627\u0626\u0646\u0688\u0646\u06af<\/p>\n<\/li>\n<li>\n<p>\u06a9\u0646\u0633\u0679\u0631\u06a9\u0679\u0631 \u0627\u0648\u0631 \u06a9\u0627\u067e\u06cc \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0637\u0631\u06cc\u0642\u06c1<\/p>\n<\/li>\n<li>\n<p>\u0627\u0633\u06cc \u06a9\u0644\u0627\u0633 \u06a9\u0648 \u06a9\u0644\u0627\u0626\u0646\u0679 \u067e\u06cc\u06a9\u062c \u0645\u06cc\u06ba \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2 \u062a\u0627\u06a9\u06c1 \u0622\u067e \u0627\u0633\u06d2 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0627\u067e\u0646\u06cc Flutter \u0627\u06cc\u067e \u0645\u06cc\u06ba \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<\/ul>\n<p>\u06cc\u06c1 \u0627\u06cc\u06a9 \u0627\u06c1\u0645 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631\u06cc \u0641\u0631\u0648\u063a \u06c1\u06d2\u06d4 YAML \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u0627\u067e\u0646\u06cc \u0634\u06a9\u0644 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0622\u067e \u06a9\u0648 \u0627\u06cc\u06a9 \u0645\u0633\u062a\u0642\u0644\u060c \u0679\u0627\u0626\u067e \u0634\u062f\u06c1 \u0645\u0627\u0688\u0644 \u0645\u0644\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0633\u0631\u0648\u0631\u0632\u060c \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633\u0632 \u0627\u0648\u0631 \u06a9\u0644\u0627\u0626\u0646\u0679\u0633 \u0645\u06cc\u06ba \u0628\u063a\u06cc\u0631 \u0646\u0642\u0644 \u06a9\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-the-built-in-orm\">\u0628\u0644\u0679 \u0627\u0646 ORM<\/h3>\n<p>Serverpod \u06a9\u0627 ORM \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u062a\u06cc\u0627\u0631 \u06a9\u0631\u062f\u06c1 \u0645\u0627\u0688\u0644 \u06a9\u0644\u0627\u0633\u0632 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u062a\u0645\u0627\u0645 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0622\u067e\u0631\u06cc\u0634\u0646\u0632 \u0645\u0627\u0688\u0644 \u06a9\u06d2 \u0633\u0679\u06cc\u0679\u06a9 \u0688\u06cc \u0628\u06cc \u0627\u06cc\u06a9\u0633\u0633\u0631\u0632 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0627\u0646\u062c\u0627\u0645 \u067e\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ Insert a row\nvar company = Company(name: 'Serverpod Corp', foundedDate: DateTime.now());\ncompany = await Company.db.insertRow(session, company);\n\n\/\/ Find by ID\nvar found = await Company.db.findById(session, company.id!);\n\n\/\/ Find with condition\nvar result = await Company.db.findFirstRow(\n  session,\n  where: \n);\n\n\/\/ Find all with ordering\nvar all = await Company.db.find(\n  session,\n  orderBy: \n);\n\n\/\/ Update\ncompany = company.copyWith(name: 'New Name');\nawait Company.db.updateRow(session, company);\n\n\/\/ Delete\nawait Company.db.deleteRow(session, company);\n<\/code><\/pre>\n<p>\u062c\u06c1\u0627\u06ba \u067e\u06cc\u0631\u0627\u0645\u06cc\u0679\u0631 \u0679\u0627\u0626\u067e \u0633\u06cc\u0641 \u0627\u06cc\u06a9\u0633\u067e\u0631\u06cc\u0634\u0646 \u0628\u0644\u0688\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 t \u067e\u06cc\u0631\u0627\u0645\u06cc\u0679\u0631 \u0679\u06cc\u0628\u0644 \u06a9\u0627\u0644\u0645\u0648\u06ba \u062a\u06a9 \u0679\u0627\u0626\u067e \u0634\u062f\u06c1 \u0631\u0633\u0627\u0626\u06cc \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u062c\u0633 \u0633\u06d2 \u0622\u067e \u06a9\u0648 \u062e\u0648\u062f\u06a9\u0627\u0631 \u062a\u06a9\u0645\u06cc\u0644 \u0627\u0648\u0631 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u062d\u0627\u0644\u0627\u062a \u06a9\u06cc \u0645\u0631\u062a\u0628 \u0648\u0642\u062a \u06a9\u06cc \u062c\u0627\u0646\u0686 \u067e\u0691\u062a\u0627\u0644 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u0645\u0644\u062a\u06cc \u06c1\u06d2\u06d4 \u06a9\u0648\u0626\u06cc \u062e\u0627\u0645 SQL\u060c \u06a9\u0648\u0626\u06cc \u0633\u0679\u0631\u0646\u06af \u067e\u0631 \u0645\u0628\u0646\u06cc \u06a9\u0627\u0644\u0645 \u06a9\u06d2 \u0646\u0627\u0645 \u0646\u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0631\u0646 \u0679\u0627\u0626\u0645 \u067e\u0631 \u06a9\u0648\u0626\u06cc \u062d\u06cc\u0631\u062a \u0646\u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-migrations\">\u0646\u0642\u0644 \u0645\u06a9\u0627\u0646\u06cc<\/h3>\n<p>\u062c\u0628 \u0622\u067e \u0645\u0627\u0688\u0644 \u06a9\u0648 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 Serverpod \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u06c1\u062c\u0631\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-bash\">serverpod create-migration\n<\/code><\/pre>\n<p>\u06cc\u06c1 migrations\/ \u0688\u0627\u0626\u0631\u06cc\u06a9\u0679\u0631\u06cc \u0645\u06cc\u06ba \u0627\u06cc\u0633 \u06a9\u06cc\u0648 \u0627\u06cc\u0644 \u0645\u0627\u0626\u06cc\u06af\u0631\u06cc\u0634\u0646 \u0641\u0627\u0626\u0644 \u0628\u0646\u0627\u0626\u06d2 \u06af\u0627\u06d4 \u062c\u0628 \u0622\u067e \u0633\u0631\u0648\u0631 \u0634\u0631\u0648\u0639 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u0627\u0633\u06d2 \u0644\u0627\u06af\u0648 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-bash\">dart bin\/main.dart --apply-migrations\n<\/code><\/pre>\n<p>Serverpod \u0644\u0627\u06af\u0648 \u0634\u062f\u06c1 \u0645\u0646\u062a\u0642\u0644\u06cc \u067e\u0631 \u0646\u0638\u0631 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0635\u0631\u0641 \u0646\u0626\u06cc \u0645\u0646\u062a\u0642\u0644\u06cc \u0686\u0644\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0646\u0642\u0644 \u0645\u06a9\u0627\u0646\u06cc \u06a9\u0627 \u0646\u0638\u0627\u0645 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0645\u0627\u0688\u0644 \u0633\u0633\u0679\u0645 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0645\u0631\u0628\u0648\u0637 \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u0622\u067e \u06a9\u06cc \u0688\u0627\u0631\u0679 \u06a9\u0644\u0627\u0633\u0632 \u0627\u0648\u0631 \u0622\u067e \u06a9\u06d2 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0627\u0633\u06a9\u06cc\u0645\u0627 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u06a9\u0648\u0626\u06cc \u0641\u0631\u0642 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-starting-the-development-server\">\u0688\u0648\u06cc\u0644\u067e\u0645\u0646\u0679 \u0633\u0631\u0648\u0631 \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba\u06d4<\/h2>\n<p>\u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u06a9\u0648\u0688 \u0644\u06a9\u06be\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0627\u067e\u0646\u06d2 \u062a\u0631\u0642\u06cc\u0627\u062a\u06cc \u0645\u0627\u062d\u0648\u0644 \u06a9\u0648 \u0686\u0644\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<p>\u0688\u0627\u06a9\u0631 \u06a9\u0646\u0679\u06cc\u0646\u0631\u0632 \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba (PostgreSQL \u0627\u0648\u0631 Redis)\u06d4<\/p>\n<pre><code class=\"language-bash\">cd user_profile_api_server\ndocker compose up --build --detach\n<\/code><\/pre>\n<p>\u0648\u06c1 \u0633\u0631\u0648\u0631 \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba \u062c\u0633 \u067e\u0631 \u0645\u0646\u062a\u0642\u0644\u06cc \u06a9\u0627 \u0627\u0637\u0644\u0627\u0642 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-bash\">dart bin\/main.dart --apply-migrations\n<\/code><\/pre>\n<p>\u0622\u067e \u06a9\u0648 \u062f\u0631\u062c \u0630\u06cc\u0644 \u06a9\u0648 \u0686\u06cc\u06a9 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u0626\u06d2:<\/p>\n<pre><code class=\"language-plaintext\">SERVERPOD version: 2.x.x, mode: development\nInsights listening on port 8081\nServer default listening on port 8080\nWebserver listening on port 8082\n<\/code><\/pre>\n<p>3 \u067e\u0648\u0631\u0679\u0633: \u067e\u0648\u0631\u0679 8080 \u0688\u06cc\u0641\u0627\u0644\u0679 API \u0633\u0631\u0648\u0631 \u06c1\u06d2\u06d4 \u067e\u0648\u0631\u0679 8081 \u0646\u06af\u0631\u0627\u0646\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2 Serverpod Insights \u0679\u0648\u0644 \u06c1\u06d2\u06d4 \u067e\u0648\u0631\u0679 8082 \u0627\u06cc\u06a9 \u0627\u062e\u062a\u06cc\u0627\u0631\u06cc \u0648\u06cc\u0628 \u0633\u0631\u0648\u0631 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0645\u0636\u0645\u0648\u0646 \u0635\u0631\u0641 \u067e\u0648\u0631\u0679 8080 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u0627\u0645 \u06a9\u0631\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<h3 id=\"heading-the-user-model\">\u0635\u0627\u0631\u0641 \u0645\u0627\u0688\u0644<\/h3>\n<p>\u0627\u067e\u0646\u06d2 \u0633\u0631\u0648\u0631 \u067e\u06cc\u06a9\u062c \u0645\u06cc\u06ba lib\/src\/models\/user.spy.yaml \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-yaml\">class: AppUser\ntable: app_users\nfields:\n  email: String\n  passwordHash: String\n  firstName: String\n  lastName: String\n  isActive: bool, default=true\nindexes:\n  app_users_email_idx:\n    fields: email\n    unique: true\n<\/code><\/pre>\n<p>\u06cc\u06c1\u0627\u06ba \u0646\u0648\u0679 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0686\u0646\u062f \u0686\u06cc\u0632\u06cc\u06ba \u06c1\u06cc\u06ba: \u062a\u0648\u062b\u06cc\u0642 \u06a9\u06d2 \u0645\u0627\u0688\u06cc\u0648\u0644 \u0645\u06cc\u06ba \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0648\u0646\u06cc \u0635\u0627\u0631\u0641 \u0637\u0628\u0642\u06d2 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062a\u0646\u0627\u0632\u0639\u06c1 \u0633\u06d2 \u0628\u0686\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u06a9\u0644\u0627\u0633 \u06a9\u0627 \u0646\u0627\u0645 User \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 AppUser \u0631\u06a9\u06be\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4 \u0679\u06cc\u0628\u0644 \u06a9\u06cc \u06a9\u0644\u06cc\u062f PostgreSQL \u0679\u06cc\u0628\u0644 \u06a9\u06d2 \u0646\u0627\u0645 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4 \u0627\u0646\u0688\u06cc\u06a9\u0633 \u0628\u0644\u0627\u06a9 \u0627\u06cc \u0645\u06cc\u0644 \u06a9\u0627\u0644\u0645 \u067e\u0631 \u0627\u06cc\u06a9 \u0645\u0646\u0641\u0631\u062f \u0627\u0646\u0688\u06cc\u06a9\u0633 \u0628\u0646\u0627 \u06a9\u0631 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u06cc \u0633\u0637\u062d \u067e\u0631 \u0627\u0646\u0641\u0631\u0627\u062f\u06cc\u062a \u06a9\u0648 \u0646\u0627\u0641\u0630 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>Serverpod int \u06c1\u06d2\u061f \u062e\u0648\u062f\u06a9\u0627\u0631 \u0637\u0648\u0631 \u067e\u0631 \u0642\u0633\u0645 \u06a9\u0627 \u0627\u06cc\u06a9 id \u0641\u06cc\u0644\u0688 \u0634\u0627\u0645\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0679\u06cc\u0628\u0644 \u06a9\u06cc\u0632 \u0648\u0627\u0644\u06d2 \u062a\u0645\u0627\u0645 \u0645\u0627\u0688\u0644\u0632 \u067e\u0631 \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u0622\u067e \u062e\u0648\u062f \u0627\u0633 \u06a9\u0627 \u0627\u0639\u0644\u0627\u0646 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u06d2\u06d4<\/p>\n<h3 id=\"heading-the-profile-model\">\u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u0645\u0627\u0688\u0644<\/h3>\n<p>lib\/src\/models\/profile.spy.yaml \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-yaml\">class: Profile\ntable: profiles\nfields:\n  userId: int\n  bio: String?\n  avatarUrl: String?\n  phone: String?\n  location: String?\n  website: String?\nindexes:\n  profiles_user_id_idx:\n    fields: userId\n    unique: true\n<\/code><\/pre>\n<p>userId \u0627\u06cc\u06a9 int \u06c1\u06d2 \u062c\u0648 AppUser \u06a9\u06cc ID \u06a9\u0627 \u062d\u0648\u0627\u0644\u06c1 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4 Serverpod \u06a9\u06d2 \u0645\u0627\u0688\u0644 \u0633\u0633\u0679\u0645 \u0645\u06cc\u06ba \u0627\u0628\u06be\u06cc \u062a\u06a9 YAML \u0645\u06cc\u06ba \u063a\u06cc\u0631 \u0645\u0644\u06a9\u06cc \u06a9\u0644\u06cc\u062f\u06cc \u0627\u0639\u0644\u0627\u0646\u06cc\u06c1 \u0646\u062d\u0648 \u0645\u0648\u062c\u0648\u062f \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u062d\u0648\u0627\u0644\u06c1 \u062c\u0627\u062a\u06cc \u0633\u0627\u0644\u0645\u06cc\u062a \u06a9\u0648 \u0627\u06cc\u0646\u0688 \u067e\u0648\u0627\u0626\u0646\u0679 \u0645\u0646\u0637\u0642 \u0645\u06cc\u06ba \u0627\u06cc\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 \u0644\u06cc\u0626\u0631 \u067e\u0631 \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-running-code-generation\">\u06a9\u0648\u0688 \u062c\u0646\u0631\u06cc\u0634\u0646 \u0686\u0644\u0627\u0626\u06cc\u06ba\u06d4<\/h3>\n<p>\u0627\u06cc\u06a9 \u0628\u0627\u0631 \u062c\u0628 \u062f\u0648\u0646\u0648\u06ba \u0645\u0627\u0688\u0644 \u0641\u0627\u0626\u0644\u06cc\u06ba \u062a\u06cc\u0627\u0631 \u06c1\u0648\u062c\u0627\u0626\u06cc\u06ba\u060c \u062c\u0646\u0631\u06cc\u0679\u0631 \u0686\u0644\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-bash\">serverpod generate\n<\/code><\/pre>\n<p>\u06cc\u06c1 lib\/src\/generated\/ \u0645\u06cc\u06ba \u0688\u0627\u0631\u0679 \u06a9\u0644\u0627\u0633\u0632 \u062a\u06cc\u0627\u0631 \u06a9\u0631\u06d2 \u06af\u0627\u06d4 AppUser \u06a9\u06d2 \u0644\u06cc\u06d2 \u0622\u067e \u06a9\u0648 \u0645\u0644\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-dart\">\/\/ This is auto-generated, never edit directly\nclass AppUser extends SerializableEntity {\n  AppUser({\n    this.id,\n    required this.email,\n    required this.passwordHash,\n    required this.firstName,\n    required this.lastName,\n    this.isActive = true,\n  });\n\n  int? id;\n  String email;\n  String passwordHash;\n  String firstName;\n  String lastName;\n  bool isActive;\n\n  \/\/ db accessor for ORM operations\n  static final db = AppUserRepository._();\n\n  \/\/ Serialization methods\n  factory AppUser.fromJson(Map<string dynamic=\"\"> jsonSerialization, ...) { ... }\n  Map<string dynamic=\"\"> toJson() { ... }\n}\n<\/string><\/string><\/code><\/pre>\n<p>\u062a\u06cc\u0627\u0631 \u06a9\u0631\u062f\u06c1 \u06a9\u0648\u0688 \u0648\u06c1\u06cc \u06c1\u06d2 \u062c\u0633 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u062a\u0639\u0627\u0645\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06a9\u0628\u06be\u06cc \u06c1\u0627\u062a\u06be \u0633\u06d2 \u0646\u06c1 \u0644\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-creating-and-applying-migrations\">\u06c1\u062c\u0631\u062a\u06cc\u06ba \u0628\u0646\u0627\u0626\u06cc\u06ba \u0627\u0648\u0631 \u0644\u0627\u06af\u0648 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u0645\u0627\u0688\u0644 \u0628\u0646\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f\u060c \u0627\u06cc\u06a9 \u0645\u0646\u062a\u0642\u0644\u06cc \u0628\u0646\u0627\u0626\u06cc\u06ba.<\/p>\n<pre><code class=\"language-bash\">serverpod create-migration\n<\/code><\/pre>\n<p>\u06cc\u06c1 migrations\/ \u0645\u06cc\u06ba \u0679\u0627\u0626\u0645 \u0627\u0633\u0679\u06cc\u0645\u067e\u0688 SQL \u0641\u0627\u0626\u0644 \u0628\u0646\u0627\u0626\u06d2 \u06af\u0627\u06d4 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u062f\u06cc\u06ba:<\/p>\n<pre><code class=\"language-bash\">dart bin\/main.dart --apply-migrations\n<\/code><\/pre>\n<p>app_users \u0627\u0648\u0631 \u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u0679\u06cc\u0628\u0644 \u0627\u0628 PostgreSQL \u0645\u06cc\u06ba \u062f\u0631\u0633\u062a \u06a9\u0627\u0644\u0645\u0648\u06ba \u0627\u0648\u0631 \u0627\u0634\u0627\u0631\u06cc\u06c1 \u062c\u0627\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0645\u0648\u062c\u0648\u062f \u06c1\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-building-the-api\">\u0627\u06cc\u06a9 API \u0628\u0646\u0627\u0646\u0627<\/h2>\n<h3 id=\"heading-the-auth-endpoint\">\u062a\u0648\u062b\u06cc\u0642 \u06a9\u0627 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1<\/h3>\n<p>lib\/src\/endpoints\/auth_endpoint.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'package:serverpod\/serverpod.dart';\nimport 'package:bcrypt\/bcrypt.dart';\nimport 'package:dart_jsonwebtoken\/dart_jsonwebtoken.dart';\nimport '..\/generated\/protocol.dart';\n\nclass AuthEndpoint extends Endpoint {\n  Future<map dynamic=\"\">> register(\n    Session session,\n    String email,\n    String password,\n    String firstName,\n    String lastName,\n  ) async {\n    if (email.isEmpty || password.isEmpty || firstName.isEmpty || lastName.isEmpty) {\n      throw Exception('All fields are required');\n    }\n\n    if (password.length < 8) {\n      throw Exception('Password must be at least 8 characters');\n    }\n\n    \/\/ Check for existing user\n    final existing = await AppUser.db.findFirstRow(\n      session,\n      where: \n    );\n\n    if (existing != null) {\n      throw Exception('An account with this email already exists');\n    }\n\n    final passwordHash = BCrypt.hashpw(password, BCrypt.gensalt());\n\n    var user = AppUser(\n      email: email,\n      passwordHash: passwordHash,\n      firstName: firstName,\n      lastName: lastName,\n    );\n\n    user = await AppUser.db.insertRow(session, user);\n\n    final token = _generateToken(user);\n\n    return {\n      'user': _sanitizeUser(user),\n      'token': token,\n    };\n  }\n\n  Future<map dynamic=\"\">> login(\n    Session session,\n    String email,\n    String password,\n  ) async {\n    if (email.isEmpty || password.isEmpty) {\n      throw Exception('Email and password are required');\n    }\n\n    final user = await AppUser.db.findFirstRow(\n      session,\n      where: \n    );\n\n    if (user == null || !BCrypt.checkpw(password, user.passwordHash)) {\n      throw Exception('Invalid email or password');\n    }\n\n    if (!user.isActive) {\n      throw Exception('This account has been deactivated');\n    }\n\n    final token = _generateToken(user);\n\n    return {\n      'user': _sanitizeUser(user),\n      'token': token,\n    };\n  }\n\n  String _generateToken(AppUser user) {\n    final jwt = JWT({'sub': user.id, 'email': user.email});\n    return jwt.sign(SecretKey(_jwtSecret), expiresIn: const Duration(hours: 24));\n  }\n\n  \/\/ Never return the password hash to the client\n  Map<string dynamic=\"\"> _sanitizeUser(AppUser user) => {\n        'id': user.id,\n        'email': user.email,\n        'firstName': user.firstName,\n        'lastName': user.lastName,\n        'isActive': user.isActive,\n      };\n\n  \/\/ Read from Serverpod's config system\n  String get _jwtSecret =>\n      Session.serverpod.getPassword('jwtSecret') ?? 'fallback_dev_secret';\n}\n<\/string><\/map><\/map><\/code><\/pre>\n<p>Serverpod \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u062f\u0631\u062c \u06a9\u0631\u062f\u06c1 \u0642\u062f\u0631 \u0648\u0627\u067e\u0633 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0646\u0642\u0634\u06c1 \u0648\u0627\u067e\u0633 \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a<string dynamic=\"\">\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0627\u0633\u06d2 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0633\u06cc\u0631\u06cc\u0644\u0627\u0626\u0632 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u062c\u0628 \u06a9\u0648\u0626\u06cc \u0627\u0633\u062a\u062b\u0646\u0627\u0621 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u060c \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0627\u0633\u06d2 \u067e\u06a9\u0691\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u06a9\u0644\u0627\u0626\u0646\u0679 \u06a9\u0648 \u0627\u06cc\u06a9 \u0633\u0627\u062e\u062a\u06cc \u063a\u0644\u0637\u06cc \u06a9\u0627 \u062c\u0648\u0627\u0628 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4 \u0639\u0627\u0645 \u06a9\u06cc\u0633\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0648\u0626\u06cc \u062f\u0633\u062a\u06cc \u062c\u0648\u0627\u0628\u06cc \u0641\u0627\u0631\u0645\u06cc\u0679 \u0627\u0648\u0631 \u0627\u0633\u0679\u06cc\u0679\u0633 \u06a9\u0648\u0688 \u06a9\u0627 \u06a9\u0648\u0626\u06cc \u0627\u0646\u062a\u0638\u0627\u0645 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/string><\/p>\n<h3 id=\"heading-the-user-endpoint\">\u0635\u0627\u0631\u0641 \u06a9\u0627 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1<\/h3>\n<p>lib\/src\/endpoints\/user_endpoint.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'package:serverpod\/serverpod.dart';\nimport '..\/generated\/protocol.dart';\n\nclass UserEndpoint extends Endpoint {\n  @override\n  bool get requireLogin => true;\n\n  Future<list dynamic=\"\">>> getAll(Session session) async {\n    final users = await AppUser.db.find(\n      session,\n      where: \n      orderBy: \n    );\n\n    return users.map(_sanitizeUser).toList();\n  }\n\n  Future<map dynamic=\"\">> getById(Session session, int userId) async {\n    final user = await AppUser.db.findById(session, userId);\n\n    if (user == null || !user.isActive) {\n      throw Exception('User not found');\n    }\n\n    return _sanitizeUser(user);\n  }\n\n  Future<map dynamic=\"\">> update(\n    Session session,\n    int userId,\n    String? firstName,\n    String? lastName,\n  ) async {\n    final user = await AppUser.db.findById(session, userId);\n\n    if (user == null || !user.isActive) {\n      throw Exception('User not found');\n    }\n\n    final updated = user.copyWith(\n      firstName: firstName ?? user.firstName,\n      lastName: lastName ?? user.lastName,\n    );\n\n    await AppUser.db.updateRow(session, updated);\n    return _sanitizeUser(updated);\n  }\n\n  Future<void> delete(Session session, int userId) async {\n    final user = await AppUser.db.findById(session, userId);\n\n    if (user == null || !user.isActive) {\n      throw Exception('User not found');\n    }\n\n    \/\/ Soft delete\n    final deactivated = user.copyWith(isActive: false);\n    await AppUser.db.updateRow(session, deactivated);\n  }\n\n  Map<string dynamic=\"\"> _sanitizeUser(AppUser user) => {\n        'id': user.id,\n        'email': user.email,\n        'firstName': user.firstName,\n        'lastName': user.lastName,\n        'isActive': user.isActive,\n      };\n}\n<\/string><\/void><\/map><\/map><\/list><\/code><\/pre>\n<p>@override bool \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u0644\u0627\u06af \u0627\u0646 => \u0633\u0686 \u06c1\u06d2\u06d4 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u0648\u06ba \u06a9\u06cc \u062d\u0641\u0627\u0638\u062a \u06a9\u06d2 \u0644\u06cc\u06d2 \u06cc\u06c1 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0627 \u0628\u0644\u0679 \u0627\u0646 \u0645\u06cc\u06a9\u0627\u0646\u0632\u0645 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u06cc\u06c1 \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u0627 \u062f\u0631\u0633\u062a \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 Serverpod \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0648 \u0628\u0644\u0627\u0626\u06d2 \u062c\u0627\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0627\u0633 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u067e\u0631 \u06c1\u0631 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u067e\u0631 \u062a\u0635\u062f\u06cc\u0642\u06cc \u0679\u0648\u06a9\u0646 \u06a9\u06cc \u062a\u0648\u062b\u06cc\u0642 \u06a9\u0631\u06d2 \u06af\u0627\u06d4 \u063a\u06cc\u0631 \u062a\u0635\u062f\u06cc\u0642 \u0634\u062f\u06c1 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u06cc\u06ba \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06c1 \u0645\u0633\u062a\u0631\u062f \u06a9\u0631\u062f\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-the-profile-endpoint\">\u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1<\/h3>\n<p>lib\/src\/endpoints\/profile_endpoint.dart \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">import 'package:serverpod\/serverpod.dart';\nimport '..\/generated\/protocol.dart';\n\nclass ProfileEndpoint extends Endpoint {\n  @override\n  bool get requireLogin => true;\n\n  Future<map dynamic=\"\">> getByUserId(\n    Session session,\n    int userId,\n  ) async {\n    final user = await AppUser.db.findById(session, userId);\n    if (user == null || !user.isActive) {\n      throw Exception('User not found');\n    }\n\n    final profile = await Profile.db.findFirstRow(\n      session,\n      where: \n    );\n\n    if (profile == null) {\n      throw Exception('Profile not found');\n    }\n\n    return _profileToMap(profile);\n  }\n\n  Future<map dynamic=\"\">> create(\n    Session session,\n    int userId,\n    String? bio,\n    String? avatarUrl,\n    String? phone,\n    String? location,\n    String? website,\n  ) async {\n    final user = await AppUser.db.findById(session, userId);\n    if (user == null || !user.isActive) {\n      throw Exception('User not found');\n    }\n\n    final existing = await Profile.db.findFirstRow(\n      session,\n      where: \n    );\n\n    if (existing != null) {\n      throw Exception('Profile already exists for this user');\n    }\n\n    var profile = Profile(\n      userId: userId,\n      bio: bio,\n      avatarUrl: avatarUrl,\n      phone: phone,\n      location: location,\n      website: website,\n    );\n\n    profile = await Profile.db.insertRow(session, profile);\n    return _profileToMap(profile);\n  }\n\n  Future<map dynamic=\"\">> update(\n    Session session,\n    int userId,\n    String? bio,\n    String? avatarUrl,\n    String? phone,\n    String? location,\n    String? website,\n  ) async {\n    final profile = await Profile.db.findFirstRow(\n      session,\n      where: \n    );\n\n    if (profile == null) {\n      throw Exception('Profile not found');\n    }\n\n    final updated = profile.copyWith(\n      bio: bio ?? profile.bio,\n      avatarUrl: avatarUrl ?? profile.avatarUrl,\n      phone: phone ?? profile.phone,\n      location: location ?? profile.location,\n      website: website ?? profile.website,\n    );\n\n    await Profile.db.updateRow(session, updated);\n    return _profileToMap(updated);\n  }\n\n  Map<string dynamic=\"\"> _profileToMap(Profile profile) => {\n        'id': profile.id,\n        'userId': profile.userId,\n        'bio': profile.bio,\n        'avatarUrl': profile.avatarUrl,\n        'phone': profile.phone,\n        'location': profile.location,\n        'website': profile.website,\n      };\n}\n<\/string><\/map><\/map><\/map><\/code><\/pre>\n<p>\u0627\u0646 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u067e\u0648\u0627\u0626\u0646\u0679\u0633 \u06a9\u0648 \u0634\u0627\u0645\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f\u060c \u062c\u0646\u0631\u06cc\u0679\u0631 \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0686\u0644\u0627\u0626\u06cc\u06ba \u062a\u0627\u06a9\u06c1 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0648 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u067e\u0648\u0627\u0626\u0646\u0679\u0633 \u06a9\u0648 \u0631\u062c\u0633\u0679\u0631 \u06a9\u0631\u0627\u06cc\u0627 \u062c\u0627\u0626\u06d2\u06d4<\/p>\n<pre><code class=\"language-bash\">serverpod generate\n<\/code><\/pre>\n<h2 id=\"heading-authentication\">\u062b\u0628\u0648\u062a<\/h2>\n<h3 id=\"heading-password-hashing-and-jwt\">\u067e\u0627\u0633 \u0648\u0631\u0688 \u06c1\u06cc\u0634\u0646\u06af \u0627\u0648\u0631 JWT<\/h3>\n<p>\u0627\u067e\u0646\u06d2 \u0633\u0631\u0648\u0631 \u067e\u06cc\u06a9\u062c \u0645\u06cc\u06ba pubspec.yaml \u0645\u06cc\u06ba \u0645\u0637\u0644\u0648\u0628\u06c1 \u067e\u06cc\u06a9\u062c\u0632 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-yaml\">dependencies:\n  serverpod: ^2.5.0\n  bcrypt: ^1.1.3\n  dart_jsonwebtoken: ^2.12.0\n<\/code><\/pre>\n<p>\u067e\u06be\u0631 \u0686\u0644\u0627\u0626\u06cc\u06ba \u0688\u0627\u0631\u0679 \u067e\u0628 \u062d\u0627\u0635\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p>\u062a\u0635\u062f\u06cc\u0642 \u06a9\u06d2 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u067e\u0631 _generateToken \u0627\u0648\u0631 _sanitizeUser \u0645\u062f\u062f\u06af\u0627\u0631 \u067e\u0627\u0633 \u0648\u0631\u0688 \u06c1\u06cc\u0634\u0646\u06af \u0627\u0648\u0631 JWT \u062c\u0646\u0631\u06cc\u0634\u0646 \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 JWT \u0631\u0627\u0632 \u06a9\u0648 Serverpod \u06a9\u06d2 \u0628\u0644\u0679 \u0627\u0646 \u067e\u0627\u0633 \u0648\u0631\u0688 \u0645\u06cc\u0646\u062c\u0645\u0646\u0679 \u0633\u0633\u0679\u0645 \u0633\u06d2 Session.serverpod.getPassword(&#8216;jwtSecret&#8217;) \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u067e\u0691\u06be\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>config\/passwords.yaml \u0645\u06cc\u06ba \u0631\u0627\u0632 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-yaml\">development:\n  database: 'dart_password'\n  jwtSecret: 'your_development_jwt_secret_here'\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0641\u0627\u0626\u0644 \u0622\u067e \u06a9\u06d2 Serverpod \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0645\u06cc\u06ba \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u06c1\u06cc .gitignore \u0645\u06cc\u06ba \u0645\u0648\u062c\u0648\u062f \u06c1\u06d2\u06d4 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0644\u0627\u0624\u0688 \u0645\u06cc\u06ba \u0645\u0627\u062d\u0648\u0644\u06cc\u0627\u062a\u06cc \u0645\u062a\u063a\u06cc\u0631\u0627\u062a \u06cc\u0627 \u0631\u0627\u0632\u0648\u06ba \u06a9\u06d2 \u0627\u0646\u062a\u0638\u0627\u0645 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u06a9\u06d2 \u0631\u0627\u0632 \u0644\u06af\u0627\u0626\u06d2 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-protecting-endpoints\">\u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u062a\u062d\u0641\u0638<\/h3>\n<p>\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0645\u06cc\u06ba \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u062a\u062d\u0641\u0638 \u06a9\u06cc \u062f\u0648 \u0633\u0637\u062d\u06cc\u06ba \u06c1\u06cc\u06ba:<\/p>\n<p>needLogin &#8211; \u062e\u0648\u062f\u06a9\u0627\u0631 \u0637\u0648\u0631 \u067e\u0631 \u063a\u06cc\u0631 \u062a\u0635\u062f\u06cc\u0642 \u0634\u062f\u06c1 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u06a9\u0648 \u0645\u0633\u062a\u0631\u062f \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">@override\nbool get requireLogin => true;\n<\/code><\/pre>\n<p>\u0645\u0637\u0644\u0648\u0628\u06c1 \u062f\u0627\u0626\u0631\u06c1 \u06a9\u0627\u0631 &#8211; \u0627\u06cc\u06a9 \u0645\u062e\u0635\u0648\u0635 \u0627\u0633\u062a\u062d\u0642\u0627\u0642 \u06a9\u0627 \u062f\u0627\u0626\u0631\u06c1 \u062f\u0631\u06a9\u0627\u0631 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">@override\nSet<scope> get requiredScopes => {Scope.admin};\n<\/scope><\/code><\/pre>\n<p>\u0627\u0633 \u0645\u0636\u0645\u0648\u0646 \u0645\u06cc\u06ba \u0635\u0627\u0631\u0641 \u0627\u0648\u0631 \u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u06a9\u06d2 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u06a9\u0627\u062a \u06a9\u06d2 \u0644\u06cc\u06d2 \u0644\u0627\u06af \u0627\u0646 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06a9\u0627\u0641\u06cc \u06c1\u06d2\u06d4 \u0644\u0627\u06af \u0627\u0646 \u06a9\u06d2 \u062c\u0648\u0627\u0628 \u0633\u06d2 \u0679\u0648\u06a9\u0646 \u0628\u0639\u062f \u0645\u06cc\u06ba \u0622\u0646\u06d2 \u0648\u0627\u0644\u06cc \u062a\u0645\u0627\u0645 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u06a9\u06d2 \u0622\u062a\u06be\u0631\u0627\u0626\u0632\u06cc\u0634\u0646 \u06c1\u06cc\u0688\u0631 \u0645\u06cc\u06ba \u067e\u0627\u0633 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0627\u06cc\u0646\u0688 \u067e\u0648\u0627\u0626\u0646\u0679 \u06a9\u06d2 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0648 \u0628\u0644\u0627\u0626\u06d2 \u062c\u0627\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0627\u0633 \u06a9\u06cc \u062a\u0635\u062f\u06cc\u0642 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u0648\u062c\u0648\u062f\u06c1 \u0635\u0627\u0631\u0641 \u06a9\u06cc ID \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u0646\u0688 \u067e\u0648\u0627\u0626\u0646\u0679 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0645\u0648\u062c\u0648\u062f \u0679\u0648\u06a9\u0646 \u06a9\u0648 \u0686\u06cc\u06a9 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">Future<void> someProtectedMethod(Session session) async {\n  final authInfo = await session.authenticated;\n\n  if (authInfo == null) {\n    throw Exception('Not authenticated');\n  }\n\n  final userId = authInfo.userId;\n  \/\/ proceed with userId\n}\n<\/void><\/code><\/pre>\n<h2 id=\"heading-error-handling-in-serverpod\">\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0645\u06cc\u06ba \u06c1\u06cc\u0646\u0688\u0644\u0646\u06af \u0645\u06cc\u06ba \u062e\u0631\u0627\u0628\u06cc\u06d4<\/h2>\n<p>Serverpod \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06c1 \u0627\u0679\u06be\u0627\u0626\u06d2 \u06af\u0626\u06d2 \u0627\u0633\u062a\u062b\u0646\u0627\u0621 \u06a9\u0648 \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0627\u0646\u06c1\u06cc\u06ba \u0633\u0627\u062e\u062a\u06cc \u063a\u0644\u0637\u06cc \u06a9\u06d2 \u062c\u0648\u0627\u0628\u0627\u062a \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u067e\u06be\u06cc\u0646\u06a9\u062a\u06d2 \u0648\u0642\u062a:<\/p>\n<pre><code class=\"language-dart\">throw Exception('User not found');\n<\/code><\/pre>\n<p>\u06a9\u0644\u0627\u0626\u0646\u0679 \u06a9\u0648 \u0627\u06cc\u06a9 \u0645\u0646\u0638\u0645 \u063a\u0644\u0637\u06cc \u06a9\u0627 \u062c\u0648\u0627\u0628 \u0645\u0644\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u0632\u06cc\u062f \u062f\u0627\u0646\u06d2 \u062f\u0627\u0631 \u06a9\u0646\u0679\u0631\u0648\u0644 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c Serverpod \u0679\u0627\u0626\u067e \u0634\u062f\u06c1 \u0645\u0633\u062a\u062b\u0646\u06cc\u0627\u062a \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">throw ServerpodClientException('User not found', statusCode: 404);\n<\/code><\/pre>\n<p>\u06a9\u0644\u0627\u0626\u0646\u0679 \u06a9\u0648 \u062a\u0641\u0635\u06cc\u0644\u0627\u062a \u0628\u062a\u0627\u0626\u06d2 \u0628\u063a\u06cc\u0631 \u0633\u0631\u0648\u0631 \u0633\u0627\u0626\u06cc\u0688 \u0644\u0627\u06af\u0646\u06af \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2:<\/p>\n<pre><code class=\"language-dart\">session.log('Unexpected error during user creation', level: LogLevel.error);\nthrow Exception('An internal error occurred');\n<\/code><\/pre>\n<p>\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0627 \u0644\u0627\u06af\u0646\u06af \u0633\u0633\u0679\u0645 \u0644\u0627\u06af\u0632 \u06a9\u0648 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0645\u06cc\u06ba \u0627\u0633\u0679\u0648\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u067e\u0648\u0631\u0679 8081 \u067e\u0631 \u0627\u0646\u0633\u0627\u0626\u0679\u0633 \u0688\u06cc\u0634 \u0628\u0648\u0631\u0688 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0627\u0646\u06c1\u06cc\u06ba \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u062a\u0645\u0627\u0645 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u06cc\u06ba \u0648\u0642\u062a \u06a9\u06cc \u0645\u0639\u0644\u0648\u0645\u0627\u062a\u060c \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u06a9\u06d2 \u0646\u0627\u0645 \u0627\u0648\u0631 \u0646\u062a\u0627\u0626\u062c \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0644\u0627\u06af \u0627\u0646 \u06c1\u0648\u062c\u0627\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u06a9\u0633\u06cc \u0627\u0636\u0627\u0641\u06cc \u0645\u0688\u0644 \u0648\u06cc\u0626\u0631 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-testing-the-api\">API \u0679\u06cc\u0633\u0679\u0646\u06af<\/h2>\n<p>Serverpod HTTP \u067e\u0631 \u0627\u06cc\u06a9 \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u06a9\u0648 \u0628\u06d2 \u0646\u0642\u0627\u0628 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u06cc \u0634\u06a9\u0644 \u0631\u0648\u0627\u06cc\u062a\u06cc REST \u0688\u06be\u0627\u0646\u0686\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 Serverpod \u06a9\u06d2 RPC \u06a9\u0646\u0648\u0646\u0634\u0646\u0648\u06ba \u06a9\u06cc \u067e\u06cc\u0631\u0648\u06cc \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u0622\u067e curl \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06a9\u06d2 \u062e\u0648\u062f \u0627\u0633 \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u06cc\u0627\u0631 \u06a9\u0631\u062f\u06c1 URL \u067e\u06cc\u0679\u0631\u0646 \u06cc\u06c1 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-plaintext\">POST \/[endpoint]\/[method]\n<\/code><\/pre>\n<p>\u0637\u0631\u06cc\u0642\u06c1 \u067e\u06cc\u0631\u0627\u0645\u06cc\u0679\u0631\u0632 \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 JSON \u0628\u0627\u0688\u06cc \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\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>\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 (\u062a\u0635\u062f\u06cc\u0642 \u0634\u062f\u06c1):<\/p>\n<pre><code class=\"language-bash\">curl http:\/\/localhost:8080\/user\/getAll \\\n  -X POST \\\n  -H \"Authorization: Bearer eyJhbGci...\"\n<\/code><\/pre>\n<p>ID \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u0648 \u062f\u0631\u0622\u0645\u062f \u06a9\u0631\u06cc\u06ba:<\/p>\n<pre><code class=\"language-bash\">curl http:\/\/localhost:8080\/user\/getById \\\n  -X POST \\\n  -H \"Authorization: Bearer eyJhbGci...\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"userId\": 1}'\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\/profile\/create \\\n  -X POST \\\n  -H \"Authorization: Bearer eyJhbGci...\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\n    \"userId\": 1,\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\/user\/update \\\n  -X POST \\\n  -H \"Authorization: Bearer eyJhbGci...\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"userId\": 1, \"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\/user\/delete \\\n  -X POST \\\n  -H \"Authorization: Bearer eyJhbGci...\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"userId\": 1}'\n<\/code><\/pre>\n<h2 id=\"heading-deployment\">\u062a\u0639\u06cc\u0646\u0627\u062a\u06cc<\/h2>\n<h3 id=\"heading-deploying-with-docker-and-flyio\">Docker \u0627\u0648\u0631 Fly.io \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u062a\u0639\u06cc\u0646\u0627\u062a \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>Serverpod \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u06cc \u062a\u062e\u0644\u06cc\u0642 \u06a9\u06d2 \u062d\u0635\u06d2 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0627\u06cc\u06a9 Dockerfile \u062a\u06cc\u0627\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 user_profile_api_server\/Dockerfile \u0645\u06cc\u06ba \u0648\u0627\u0642\u0639 \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u06cc\u0627\u0631 \u06c1\u06d2\u06d4<\/p>\n<p>\u0633\u0631\u0648\u0631 \u067e\u06cc\u06a9\u062c \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 docker-compose.yaml \u0645\u0642\u0627\u0645\u06cc \u062a\u0631\u0642\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2 PostgreSQL \u0627\u0648\u0631 Redis \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 Fly.io \u06a9\u06cc \u067e\u06cc\u062f\u0627\u0648\u0627\u0631\u06cc \u062a\u0639\u06cc\u0646\u0627\u062a\u06cc\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u0639\u0645\u0644 \u0627\u0633\u06cc \u0688\u0627\u06a9\u0631 \u067e\u0631 \u0645\u0628\u0646\u06cc \u067e\u06cc\u0679\u0631\u0646 \u06a9\u06cc \u067e\u06cc\u0631\u0648\u06cc \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0630\u06cc\u0644 \u0645\u06cc\u06ba \u062a\u0639\u06cc\u0646\u0627\u062a\u06cc \u0633\u06cc\u06a9\u0634\u0646 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06c1\u06d2\u06d4<\/p>\n<p><strong>\u0645\u0631\u062d\u0644\u06c1 1 &#8211; \u0641\u0644\u0627\u0626\u06cc \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062a\u0635\u062f\u06cc\u0642 \u06a9\u0631\u06cc\u06ba:<\/strong><\/p>\n<pre><code class=\"language-bash\">fly auth login\n<\/code><\/pre>\n<p><strong>\u0645\u0631\u062d\u0644\u06c1 2 &#8211; \u0633\u0631\u0648\u0631 \u0688\u0627\u0626\u0631\u06a9\u0679\u0631\u06cc \u0633\u06d2 \u0627\u06cc\u067e \u0686\u0644\u0627\u0626\u06cc\u06ba\u06d4<\/strong><\/p>\n<pre><code class=\"language-bash\">cd user_profile_api_server\nfly launch\n<\/code><\/pre>\n<p><strong>\u0645\u0631\u062d\u0644\u06c1 3 &#8211; \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u06a9\u0627 \u0631\u0627\u0632 \u0645\u0642\u0631\u0631 \u06a9\u0631\u06cc\u06ba:<\/strong><\/p>\n<pre><code class=\"language-bash\">fly secrets set JWT_SECRET=\"your_production_jwt_secret\"\n<\/code><\/pre>\n<p><strong>\u0645\u0631\u062d\u0644\u06c1 4 &#8211; \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628 \u06a9\u0648 \u0627\u067e \u0688\u06cc\u0679 \u06a9\u0631\u06cc\u06ba:<\/strong><\/p>\n<p>Fly \u06a9\u06cc \u0637\u0631\u0641 \u0633\u06d2 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062f\u06c1 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u0646\u06a9\u0634\u0646 \u06a9\u06cc \u062a\u0641\u0635\u06cc\u0644\u0627\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be config\/production.yaml \u0645\u06cc\u06ba \u062a\u0631\u0645\u06cc\u0645 \u06a9\u0631\u06cc\u06ba\u06d4 Fly \u0627\u06cc\u06a9 DATABASE_URL \u0645\u0627\u062d\u0648\u0644\u06cc\u0627\u062a\u06cc \u0645\u062a\u063a\u06cc\u0631 \u06a9\u0648 \u0627\u0646\u062c\u06cc\u06a9\u0679 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0646\u0641\u06cc\u06af\u0631\u06cc\u0634\u0646 \u06a9\u06cc \u0642\u0633\u0645 \u0633\u06d2 \u0646\u0642\u0634\u06c1 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><strong>\u0645\u0631\u062d\u0644\u06c1 5 &#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 6 &#8211; \u067e\u06c1\u0644\u06cc \u062a\u0639\u06cc\u0646\u0627\u062a\u06cc \u067e\u0631 \u0645\u0646\u062a\u0642\u0644\u06cc \u06a9\u0627 \u0627\u0637\u0644\u0627\u0642 \u06a9\u0631\u06cc\u06ba\u06d4<\/strong><\/p>\n<pre><code class=\"language-bash\">fly ssh console\ndart bin\/main.dart --apply-migrations --mode production\n<\/code><\/pre>\n<h3 id=\"heading-deploying-with-serverpod-cloud\">\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0644\u0627\u0624\u0688 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062a\u0639\u06cc\u0646\u0627\u062a \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>Serverpod Cloud \u0627\u06cc\u06a9 \u0645\u0642\u0627\u0645\u06cc \u062a\u0639\u06cc\u0646\u0627\u062a\u06cc \u067e\u0644\u06cc\u0679 \u0641\u0627\u0631\u0645 \u06c1\u06d2 \u062c\u0648 \u062e\u0627\u0635 \u0637\u0648\u0631 \u067e\u0631 Serverpod \u0627\u06cc\u067e\u0644\u06cc \u06a9\u06cc\u0634\u0646\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u06cc \u0641\u0631\u0627\u06c1\u0645\u06cc\u060c \u0627\u0633\u06a9\u06cc\u0644\u0646\u06af\u060c \u0646\u06af\u0631\u0627\u0646\u06cc\u060c \u0627\u0648\u0631 \u062a\u0639\u06cc\u0646\u0627\u062a\u06cc \u06a9\u0648 \u06a9\u0645 \u0633\u06d2 \u06a9\u0645 \u062a\u0631\u062a\u06cc\u0628 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0644\u0627\u0624\u0688 CLI \u0627\u0646\u0633\u0679\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-bash\">dart pub global activate serverpod_cloud_cli\n<\/code><\/pre>\n<p>\u0633\u0631\u0679\u06cc\u0641\u06cc\u06a9\u06cc\u0634\u0646:<\/p>\n<pre><code class=\"language-bash\">scloud login\n<\/code><\/pre>\n<p>Cloud.serverpod.dev \u067e\u0631 Serverpod \u06a9\u0644\u0627\u0624\u0688 \u0688\u06cc\u0634 \u0628\u0648\u0631\u0688 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0628\u0646\u0627\u0626\u06cc\u06ba \u0627\u0648\u0631 \u067e\u06be\u0631 \u0627\u067e\u0646\u06d2 \u0645\u0642\u0627\u0645\u06cc \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u0648 \u062c\u0648\u0691\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-bash\">scloud link --project-id your-project-id\n<\/code><\/pre>\n<p>\u062a\u0642\u0633\u06cc\u0645:<\/p>\n<pre><code class=\"language-bash\">scloud deploy\n<\/code><\/pre>\n<p>\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u06a9\u0644\u0627\u0624\u0688 \u067e\u0631\u0648\u0648\u06cc\u0698\u0646\u0632 \u067e\u0648\u0633\u0679\u06af\u0631\u06cc \u0627\u06cc\u0633 \u06a9\u06cc\u0648 \u0627\u06cc\u0644 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633\u0632 \u06a9\u0627 \u0646\u0638\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u06c1\u062c\u0631\u062a \u06a9\u0627 \u0627\u0637\u0644\u0627\u0642 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0633\u0631\u0648\u0631\u0632 \u06a9\u0648 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u062a\u0639\u06cc\u0646\u0627\u062a \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06c1\u0645 \u0645\u0627\u0646\u06cc\u0679\u0631\u0646\u06af \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba\u060c \u0644\u0627\u06af\u0632 \u0627\u0648\u0631 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u0645\u06cc\u06ba \u06a9\u0627\u0631\u06a9\u0631\u062f\u06af\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0646\u0633\u0627\u0626\u0679\u0633 \u0688\u06cc\u0634 \u0628\u0648\u0631\u0688\u0632 \u0628\u06be\u06cc \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0679\u06cc\u0645\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0648 \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u06c1\u06cc Serverpod \u0627\u06cc\u06a9\u0648 \u0633\u0633\u0679\u0645 \u0633\u06d2 \u0648\u0627\u0628\u0633\u062a\u06c1 \u06c1\u06cc\u06ba\u060c Serverpod Cloud \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u06a9\u06cc \u062a\u0639\u06cc\u0646\u0627\u062a\u06cc \u06a9\u0627 \u062a\u06cc\u0632 \u062a\u0631\u06cc\u0646 \u0631\u0627\u0633\u062a\u06c1 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-conclusion\">\u0646\u062a\u06cc\u062c\u06c1<\/h2>\n<p>\u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0634\u06cc\u0644\u0641 \u0633\u06d2 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0645\u062e\u062a\u0644\u0641 \u0646\u0642\u0637\u06c1 \u0646\u0638\u0631 \u0627\u062e\u062a\u06cc\u0627\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u062c\u0628\u06a9\u06c1 \u0634\u06cc\u0644\u0641 \u06a9\u0646\u0679\u0631\u0648\u0644 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0633\u0631\u0648\u0631 \u067e\u0648\u0688 \u0631\u0641\u062a\u0627\u0631 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 YAML \u0645\u06cc\u06ba \u0645\u0627\u0688\u0644\u0632 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u06cc\u06ba\u060c \u062c\u0646\u0631\u06cc\u0679\u0631 \u0686\u0644\u0627\u0626\u06cc\u06ba\u060c \u0627\u0648\u0631 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u0644\u0627\u0633\u0632\u060c \u0633\u06cc\u0631\u06cc\u0644\u0627\u0626\u0632\u06cc\u0634\u0646\u060c \u0627\u0648\u0631 \u06a9\u0644\u0627\u0626\u0646\u0679 \u06a9\u0648\u0688 \u062a\u06cc\u0627\u0631 \u06a9\u0631\u06cc\u06ba\u06d4 \u0622\u067e \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u06a9\u0627 \u0637\u0631\u06cc\u0642\u06c1 \u0644\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0631\u0648\u0679\u0646\u06af\u060c \u067e\u06cc\u0631\u0627\u0645\u06cc\u0679\u0631 \u0646\u06a9\u0627\u0644\u0646\u06d2\u060c \u062a\u0648\u062b\u06cc\u0642\u060c \u0627\u0648\u0631 \u063a\u0644\u0637\u06cc \u06a9\u06cc \u0641\u0627\u0631\u0645\u06cc\u0679\u0646\u06af \u06a9\u0627 \u062e\u06cc\u0627\u0644 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>ORM \u062a\u062c\u0631\u0628\u06d2 \u06a9\u0627 \u0633\u0628 \u0633\u06d2 \u0637\u0627\u0642\u062a\u0648\u0631 \u062d\u0635\u06c1 \u06c1\u06d2\u06d4 \u0679\u0627\u0626\u067e \u0633\u06cc\u0641 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0627\u0638\u06c1\u0627\u0631\u0627\u062a\u060c \u062e\u0648\u062f\u06a9\u0627\u0631 \u0645\u0646\u062a\u0642\u0644\u06cc \u06a9\u06cc \u062a\u062e\u0644\u06cc\u0642\u060c \u0627\u0648\u0631 \u06a9\u0648\u0688 \u0627\u0648\u0631 \u0627\u0633\u06a9\u06cc\u0645\u0627 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u06a9\u0648\u0626\u06cc \u0627\u06cc\u0633 \u06a9\u06cc\u0648 \u0627\u06cc\u0644 \u0628\u0691\u06be\u06d2 \u06c1\u0648\u0626\u06d2 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u06cc \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc\u0648\u06ba \u06a9\u0648 \u062e\u0627\u0645 SQL \u06a9\u06d2 \u0645\u0642\u0627\u0628\u0644\u06d2 \u0645\u06cc\u06ba \u0646\u0645\u0627\u06cc\u0627\u06ba \u0637\u0648\u0631 \u067e\u0631 \u062a\u06cc\u0632 \u0627\u0648\u0631 \u0645\u062d\u0641\u0648\u0638 \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0644\u0627\u06af\u062a \u0633\u062e\u062a\u06cc \u06c1\u06d2\u06d4 Serverpod \u06a9\u0627 URL \u0688\u06be\u0627\u0646\u0686\u06c1\u060c \u0633\u06cc\u0631\u06cc\u0644\u0627\u0626\u0632\u06cc\u0634\u0646 \u0641\u0627\u0631\u0645\u06cc\u0679\u060c \u0627\u0648\u0631 \u062a\u0639\u0645\u06cc\u0631\u0627\u062a\u06cc \u0627\u0635\u0648\u0644 \u0627\u062e\u062a\u06cc\u0627\u0631\u06cc \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4 \u0627\u06af\u0631 \u0622\u067e \u06a9\u06d2 API \u06a9\u0648 \u06a9\u0633\u06cc \u0645\u062e\u0635\u0648\u0635 REST \u0688\u06be\u0627\u0646\u0686\u06d2 \u067e\u0631 \u0639\u0645\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2 \u062c\u0648 Serverpod \u06a9\u06d2 RPC \u0627\u0646\u062f\u0627\u0632 \u0633\u06d2 \u0645\u062e\u062a\u0644\u0641 \u06c1\u06d2\u060c \u062a\u0648 \u0622\u067e \u0627\u06cc\u06a9 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u06a9\u06d2 \u062e\u0644\u0627\u0641 \u06a9\u0627\u0645 \u06a9\u0631 \u0631\u06c1\u06d2 \u06c1\u0648\u06ba \u06af\u06d2\u06d4<\/p>\n<p>API \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0688\u0627\u0631\u0679 \u06a9\u0644\u0627\u0626\u0646\u0679 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06af\u0631\u06cc\u0646 \u0641\u06cc\u0644\u0688 \u0641\u0644\u0679\u0631 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c Serverpod \u06a9\u0648 \u0634\u06a9\u0633\u062a \u0646\u06c1\u06cc\u06ba \u062f\u06cc \u062c\u0627 \u0633\u06a9\u062a\u06cc\u06d4 \u0633\u0631\u0648\u0631 \u0627\u0648\u0631 \u06a9\u0644\u0627\u0626\u0646\u0679 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u06a9\u0648\u0688 \u06a9\u0627 \u0627\u0634\u062a\u0631\u0627\u06a9\u060c \u062e\u0648\u062f\u06a9\u0627\u0631 \u06a9\u0644\u0627\u0626\u0646\u0679 \u06a9\u06cc \u062a\u062e\u0644\u06cc\u0642\u060c \u0627\u0648\u0631 \u0633\u062e\u062a \u0679\u0648\u0644 \u0686\u06cc\u0646 \u0627\u0646\u0679\u06cc\u06af\u0631\u06cc\u0634\u0646 \u0622\u067e \u06a9\u0648 \u0627\u0646\u062a\u06c1\u0627\u0626\u06cc \u067e\u06cc\u062f\u0627\u0648\u0627\u0631\u06cc \u0688\u0627\u0631\u0679 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u0622\u067e\u0634\u0646 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0642\u0627\u0628\u0644 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>APIs \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0646 \u06a9\u0648 \u0645\u062a\u0639\u062f\u062f \u06a9\u0644\u0627\u0626\u0646\u0679\u0633 \u06a9\u06cc \u062e\u062f\u0645\u062a \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u060c \u0628\u06cc\u0631\u0648\u0646\u06cc REST \u06a9\u0646\u0648\u0646\u0634\u0646\u0632 \u06a9\u06cc \u067e\u06cc\u0631\u0648\u06cc \u06a9\u0631\u06cc\u06ba\u060c \u06cc\u0627 \u0645\u0648\u062c\u0648\u062f\u06c1 \u0627\u0646\u0641\u0631\u0627\u0633\u0679\u0631\u06a9\u0686\u0631 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u0646\u0636\u0645\u0627\u0645 \u06a9\u0631\u06cc\u06ba \u062c\u0648 Serverpod \u0633\u06d2 \u0641\u0627\u0631\u0645\u06cc\u0679 \u06a9\u06cc \u062a\u0648\u0642\u0639 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0634\u06cc\u0644\u0641 \u062c\u06cc\u0633\u06d2 \u0646\u0686\u0644\u06d2 \u062f\u0631\u062c\u06d2 \u06a9\u06d2 \u0679\u0648\u0644 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0622\u067e \u06a9\u0648 \u0632\u06cc\u0627\u062f\u06c1 \u06a9\u0646\u0679\u0631\u0648\u0644 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0622\u067e \u06cc\u06c1 \u062f\u06cc\u06a9\u06be\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0634\u06cc\u0644\u0641 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u06cc\u06a9 \u06c1\u06cc \u0635\u0627\u0631\u0641 \u0627\u0648\u0631 \u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u0645\u06cc\u0646\u062c\u0645\u0646\u0679 API \u06a9\u06cc\u0633\u06d2 \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u062f\u0648\u0646\u0648\u06ba \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u0627 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0645\u0648\u0627\u0632\u0646\u06c1 \u06a9\u0631\u06cc\u06ba \u062a\u0648 \u0622\u067e \u0648\u06c1 \u0645\u0636\u0645\u0648\u0646 \u06cc\u06c1\u0627\u06ba \u062a\u0644\u0627\u0634 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u06cc\u06c1 \u062c\u0627\u0646\u0646\u0627 \u06a9\u06c1 \u06a9\u0648\u0646 \u0633\u0627 \u0679\u0648\u0644 \u06a9\u0633 \u06a9\u0627\u0645 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0635\u062d\u06cc\u062d \u06c1\u06d2 \u0648\u06c1\u06cc \u0627\u06cc\u06a9 \u0688\u0648\u06cc\u0644\u067e\u0631 \u06a9\u0648 \u0627\u0644\u06af \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u06a9\u0648 \u0627\u06cc\u0633\u06d2 \u0688\u0648\u06cc\u0644\u067e\u0631 \u0633\u06d2 \u062c\u0627\u0646\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u0688\u06cc\u0648\u0644\u067e\u0645\u0646\u0679 \u06a9\u0648 \u0633\u0645\u062c\u06be\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u0628\u0627\u0631\u06a9 \u06a9\u0648\u0688\u0646\u06af!<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Serverpod \u0688\u0627\u0631\u0679 \u067e\u0631 \u0628\u0646\u0627\u0626\u06d2 \u06af\u0626\u06d2 \u0633\u0628 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u067e\u0631\u0641\u0627\u0631\u0645\u0646\u0633 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0645\u06cc\u06ba \u0633\u06d2 \u0627\u06cc\u06a9 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0645\u0644\u06a9\u06cc\u062a\u06cc \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u06c1\u06d2 \u062c\u0648 \u0627\u067e\u0646\u06d2 ORM\u060c \u0627\u067e\u0646\u06d2 \u06a9\u0648\u0688 \u062c\u0646\u0631\u06cc\u0634\u0646 \u0633\u0633\u0679\u0645\u060c \u0645\u0627\u0626\u06cc\u06af\u0631\u06cc\u0634\u0646 \u0679\u0648\u0644\u0632\u060c \u062a\u0635\u062f\u06cc\u0642\u06cc \u0645\u0627\u0688\u06cc\u0648\u0644\u0632 \u0627\u0648\u0631 \u062a\u0639\u06cc\u0646\u0627\u062a\u06cc \u067e\u0644\u06cc\u0679 \u0641\u0627\u0631\u0645 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0622\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0622\u067e \u0627\u067e\u0646\u0627 API \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0634\u06cc\u0644\u0641 \u062c\u06cc\u0633\u06d2 [&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-24833","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/posts\/24833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/comments?post=24833"}],"version-history":[{"count":0,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/posts\/24833\/revisions"}],"wp:attachment":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/media?parent=24833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/categories?post=24833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/tags?post=24833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}