{"id":487347,"date":"2026-07-15T07:50:07","date_gmt":"2026-07-15T07:50:07","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=487347"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=487347","title":{"rendered":"Point0 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043a\u0430\u043a tRPC, \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0444\u0443\u043b\u0441\u0442\u0435\u043a-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0425\u043e\u0447\u0443 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Point0 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 tRPC. \u0414\u0435\u043b\u0430\u044e \u044d\u0442\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u0432\u0435\u0440\u0438 \u0438 \u043c\u0443\u0442\u0430\u0446\u0438\u0438 \u0432 Point0 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0438 \u043f\u043e DX \u043d\u0430 tRPC, \u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b \u0432\u0432\u0438\u0434\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u0441\u0451 \u0436\u0435 Point0 \u044d\u0442\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0438 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u043a\u0432\u0435\u0440\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u0430\u0445, \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0438\u0434\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0435\u0433\u0438\u0434\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0432\u0435\u0440\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 SSR<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043c\u0443\u0442\u0430\u0446\u0438\u044f\u0445 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 FormData \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e<\/p>\n<\/li>\n<li>\n<p>\u0418\u043c\u0435\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0440\u043b\u044b \u0434\u043b\u044f \u043a\u0432\u0435\u0440\u0438 \u0438 \u043c\u0443\u0442\u0430\u0446\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0432 \u043e\u0442\u0432\u0435\u0442\u0430\u0445 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u0446\u0435\u043b\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043e\u0441\u0442\u0440\u043e\u0432\u0430<\/p>\n<\/li>\n<li>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0432\u0438\u0434\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u0438 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, Point0 \u043c\u043e\u0436\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0435\u0449\u0451, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445. \u0421\u0435\u0439\u0447\u0430\u0441 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 tRPC. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0441 tRPC \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043d\u0435\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b, \u043d\u043e \u043d\u0438\u0436\u0435 \u044f \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0443 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 tRPC, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0432\u0438\u0434\u0438\u043c\u044b\u043c\u0438.<\/p>\n<h2>\u0421\u043f\u0440\u0430\u0432\u043a\u0430<\/h2>\n<ul>\n<li>\n<p>\u0412\u0438\u0434\u0435\u043e \u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430 Youtube: <a href=\"https:\/\/www.youtube.com\/watch?v=0CT9vBzywyg\" rel=\"noopener noreferrer nofollow\">https:\/\/www.youtube.com\/watch?v=0CT9vBzywyg<\/a><\/p>\n<\/li>\n<li>\n<p>\u0412\u0438\u0434\u0435\u043e \u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430 \u0412\u041a-\u0432\u0438\u0434\u0435\u043e: <a href=\"https:\/\/vkvideo.ru\/video-227165132_456239212?pl=-227165132_5\" rel=\"noopener noreferrer nofollow\">https:\/\/vkvideo.ru\/video-227165132_456239212?pl=-227165132_5<\/a><\/p>\n<\/li>\n<li>\n<p>\u0413\u0438\u0442\u0445\u0430\u0431 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430: <a href=\"https:\/\/github.com\/1gr14\/point0\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/1gr14\/point0<\/a><\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f: <a href=\"https:\/\/1gr14.dev\/point0\" rel=\"noopener noreferrer nofollow\">https:\/\/1gr14.dev\/point0<\/a><\/p>\n<\/li>\n<li>\n<p>\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0441 \u0440\u0430\u0437\u0431\u043e\u0440\u043e\u043c \u0432\u0441\u0435\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435: <a href=\"https:\/\/habr.com\/ru\/articles\/1054310\/\" rel=\"noopener noreferrer nofollow\">Point0 \u2014 \u0444\u0443\u043b\u0441\u0442\u0435\u043a TypeScript-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043d\u0430 Bun \u0438 React, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u043c\u0435\u0447\u0442\u0430\u043b<\/a><\/p>\n<\/li>\n<li>\n<p>\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438 \u043f\u0440\u043e\u0442\u0438\u0432 Next.js \u0438 TanStack Start (\u0447\u0443\u0442\u044c \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0438, \u043d\u043e \u043f\u0440\u0430\u0432\u0434\u0438\u0432\u044b\u0435): <a href=\"https:\/\/github.com\/1gr14\/point0-benchmarks\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/1gr14\/point0-benchmarks<\/a><\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0443 \u043e\u0434\u043d\u0438\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0434\u043b\u044f \u0418\u0418-\u0430\u0433\u0435\u043d\u0442\u0430: <a href=\"https:\/\/1gr14.dev\/llms.txt\" rel=\"noopener noreferrer nofollow\">https:\/\/1gr14.dev\/llms.txt<\/a> \u2014 \u0441\u043a\u043e\u0440\u043c\u0438\u0442\u0435 \u0430\u0433\u0435\u043d\u0442\u0443, \u0438 \u043e\u043d \u043e\u0442\u0432\u0435\u0442\u0438\u0442 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0443<\/p>\n<\/li>\n<li>\n<p>\u042f \u2014 \u0430\u0432\u0442\u043e\u0440 Point0, \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0445\u0430\u0431\u0440\u0430<\/p>\n<\/li>\n<\/ul>\n<h2>\u041a\u0432\u0435\u0440\u0438 \u0432 tRPC<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0438: \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e id. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 tRPC. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430:<\/p>\n<pre><code class=\"typescript\">\/\/ server\/routers\/idea.tsimport { z } from 'zod'import { publicProcedure, router } from '..\/trpc'import { prisma } from '..\/prisma'export const ideaRouter = router({  view: publicProcedure    .input(z.object({ id: z.string() }))    .query(async ({ input }) =&gt; {      const idea = await prisma.idea.findUniqueOrThrow({        where: { id: input.id },      })      return { idea }    }),  \/\/ \u041a\u0430\u0436\u0434\u044b\u0439 \u043d\u043e\u0432\u044b\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u044e\u0434\u0430})<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u0442\u043e\u043c \u0435\u0451 \u043d\u0430\u0434\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0431\u0449\u0435\u043c \u0440\u043e\u0443\u0442\u0435\u0440\u0435 \u2014 \u0440\u0443\u043a\u0430\u043c\u0438:<\/p>\n<pre><code class=\"typescript\">\/\/ server\/routers\/_app.tsimport { router } from '..\/trpc'import { ideaRouter } from '.\/idea'export const appRouter = router({  idea: ideaRouter,   \/\/ \u043a\u0430\u0436\u0434\u044b\u0439 \u043d\u043e\u0432\u044b\u0439 \u0440\u043e\u0443\u0442\u0435\u0440 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u044e\u0434\u0430})export type AppRouter = typeof appRouter<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u0442\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0445\u0443\u043a\u0438, \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u043e\u043c \u0432\u0441\u0435\u0433\u043e \u0440\u043e\u0443\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"typescript\">\/\/ utils\/trpc.tsimport { createTRPCReact } from '@trpc\/react-query'import type { AppRouter } from '..\/server\/routers\/_app'export const trpc = createTRPCReact&lt;AppRouter&gt;()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"typescript\">\/\/ client\/components\/idea.tsximport { trpc } from '@\/utils\/trpc'export const IdeaView = ({ id }: { id: string }) =&gt; {  const result = trpc.idea.view.useQuery({ id })  if (result.isLoading) return &lt;div&gt;\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430...&lt;\/div&gt;  if (result.error) return &lt;div&gt;{result.error.message}&lt;\/div&gt;  return &lt;h1&gt;{result.data.idea.title}&lt;\/h1&gt;}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h2>\u041a\u0432\u0435\u0440\u0438 \u0432 Point0<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c Point0. \u041a\u0432\u0435\u0440\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u2014 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c:<\/p>\n<pre><code class=\"typescript\">\/\/ modules\/idea.tsximport { root } from '@\/lib\/root'import { prisma } from '@\/lib\/prisma'import * as z from 'zod'export const ideaViewQuery = root.lets  .query()  \/\/ \u0438\u043b\u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441: root.lets('query', 'ideaView')  \/\/ \u0432 Point0 \u0432\u0441\u0435 \u043f\u043e\u0438\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043b\u0438\u0431\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0439, \u043b\u0438\u0431\u043e \u0434\u043b\u0438\u043d\u043d\u043e\u0439 \u043d\u043e\u0442\u0430\u0446\u0438\u0435\u0439  .input(z.object({ id: z.string() })) \/\/ \u0441\u0445\u0435\u043c\u0430 \u043b\u044e\u0431\u043e\u0439 \u043b\u0438\u0431\u043e\u0439: zod, valibot, typebox, ...  .loader(async ({ input }) =&gt; {    const idea = await prisma.idea.findUniqueOrThrow({      where: { id: input.id },    })    return { idea }  })  .query() \/\/ \u0441\u044e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u0438 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e useQuery\/fetchQuery<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u2014 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0430 \u043a\u0432\u0435\u0440\u0438, \u0430 \u043d\u0435 \u0445\u0443\u043a-\u043f\u0440\u043e\u043a\u0441\u0438. \u041f\u0440\u0438\u0447\u0451\u043c \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0430 \u043f\u0440\u044f\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043c \u0436\u0435, \u0433\u0434\u0435 \u0438 \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438, \u0440\u044f\u0434\u043e\u043c \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\u0439\/\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c.<\/p>\n<pre><code class=\"typescript\">\/\/ modules\/idea.tsxexport const IdeaView = ({ id }: { id: string }) =&gt; {  const result = ideaViewQuery.useQuery({ id })  if (result.isLoading) return &lt;div&gt;\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430...&lt;\/div&gt;  if (result.error) return &lt;div&gt;{result.error.message}&lt;\/div&gt;  return &lt;h1&gt;{result.data.idea.title}&lt;\/h1&gt;}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><code>result<\/code> \u2014 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 <code>useQuery<\/code> \u0438\u0437 react-query, \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0431\u0451\u0440\u043d\u0443\u0442\u043e\u0433\u043e. \u0412\u0441\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b react-query \u0436\u0438\u0432\u0443\u0442 \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u043a\u0432\u0435\u0440\u0438:<\/p>\n<pre><code class=\"typescript\">ideaViewQuery.useQuery({ id })ideaViewQuery.fetchQuery({ id })ideaViewQuery.prefetchQuery({ id })ideaViewQuery.invalidateQuery({ id })ideaViewQuery.setQueryData({ id }, ...)ideaViewQuery.getQueryKey({ id })\/\/ \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \u2014 \u0432\u0435\u0441\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0432\u0435\u0437\u0434\u0435 \u0438\u0434\u0451\u0442 \u0438\u043d\u043f\u0443\u0442 \u2014 \u0438\u0437 \u043d\u0435\u0433\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 <code>queryKey<\/code>. \u0415\u0441\u043b\u0438 \u0438\u043d\u043f\u0443\u0442 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u043e\u0432\u0441\u0435.<\/p>\n<p>\u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0443\u0436\u0435 \u0432\u0438\u0434\u043d\u0430: \u043d\u0435\u0442 \u0444\u0430\u0439\u043b\u0430 \u0441 \u0440\u043e\u0443\u0442\u0435\u0440\u043e\u043c, \u043d\u0435\u0442 <code>AppRouter<\/code>, \u043d\u0435\u0442 <code>utils\/trpc.ts<\/code>. \u041e\u0431\u044a\u044f\u0432\u0438\u043b, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b, \u0432\u044b\u0437\u0432\u0430\u043b. \u041a\u0443\u0434\u0430 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0435\u043b\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0435 \u0443\u0442\u0451\u043a \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442, \u0431\u0443\u0434\u0435\u0442 \u0432 \u0434\u0432\u0443\u0445 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 \u043d\u0438\u0436\u0435.<\/p>\n<h2>\u041c\u0443\u0442\u0430\u0446\u0438\u0438 \u0432 tRPC<\/h2>\n<p>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0432 \u0440\u043e\u0443\u0442\u0435\u0440\u0435, \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 <code>useMutation<\/code>:<\/p>\n<pre><code class=\"typescript\">\/\/ server\/routers\/idea.tsexport const ideaRouter = router({  \/\/ ...  update: publicProcedure    .input(      z.object({        id: z.string(),        title: z.string().min(1),        content: z.string().min(1),      }),    )    .mutation(async ({ input }) =&gt; {      const idea = await prisma.idea.update({        where: { id: input.id },        data: { title: input.title, content: input.content },      })      return { idea }    }),  \/\/ ...})<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"typescript\">\/\/ client\/components\/idea.tsximport { trpc } from '@\/utils\/trpc'export const IdeaEditForm = ({ idea }: { idea: Idea }) =&gt; {  const utils = trpc.useUtils()  const mutation = trpc.idea.update.useMutation({    onSuccess: ({ idea }) =&gt; {      utils.idea.view.setData({ id: idea.id }, { idea })    },  })  \/\/ ...}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h2>\u041c\u0443\u0442\u0430\u0446\u0438\u0438 \u0432 Point0<\/h2>\n<p>Point0 \u2014 \u0442\u0430 \u0436\u0435 \u0441\u0445\u0435\u043c\u0430, \u0442\u043e\u0442 \u0436\u0435 \u043b\u043e\u0430\u0434\u0435\u0440, \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0438\u043d\u0442, \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0439 \u0438 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0438 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<pre><code class=\"typescript\">\/\/ modules\/idea.tsximport { root } from '@\/lib\/root'import { prisma } from '@\/lib\/prisma'import { ideaViewQuery } from '@\/modules\/idea'import { navigate } from '@\/lib\/navigation'import * as z from 'zod'export const ideaUpdateMutation = root.lets  .mutation()  .input(    z.object({      id: z.string(),      title: z.string().min(1),      content: z.string().min(1),    }),  )  .loader(async ({ input }) =&gt; {    const idea = await prisma.idea.update({      where: { id: input.id },      data: { title: input.title, content: input.content },    })    return { idea }  })  .mutation({    onSuccess: ({ idea }) =&gt; {      ideaViewQuery.setQueryData({ id: idea.id }, { idea })    },  })export const IdeaEditForm = ({ idea }: { idea: Idea }) =&gt; {  const mutation = ideaUpdateMutation.useMutation()  return (    &lt;form      onSubmit={async (e) =&gt; {        e.preventDefault()        const form = new FormData(e.currentTarget)        await mutation.mutateAsync({          id: idea.id,          title: String(form.get('title')),          content: String(form.get('content')),        })        await navigate('ideaView', { id: idea.id })      }}    &gt;      &lt;input name=\"title\" defaultValue={idea.title} \/&gt;      &lt;textarea name=\"content\" defaultValue={idea.content} \/&gt;      &lt;button disabled={mutation.isPending}&gt;\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c&lt;\/button&gt;    &lt;\/form&gt;  )}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u0432\u0440\u043e\u0434\u0435 <code>ideaViewQuery.setQueryData()<\/code> \u0438 <code>invalidateQuery()<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0433\u0434\u0435 \u0443\u0433\u043e\u0434\u043d\u043e \u2014 \u0432 \u043c\u0443\u0442\u0430\u0446\u0438\u0438, \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435, \u0432\u043d\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u041a\u0432\u0435\u0440\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0432 Point0 \u043e\u0431\u0449\u0438\u0439 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 (\u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u0432\u043e\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0435 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043b\u0438\u0441\u044c).<\/p>\n<h2>\u0418\u043d\u0444\u0438\u043d\u0438\u0442\u0438 \u043a\u0432\u0435\u0440\u0438 \u0432 tRPC<\/h2>\n<p>\u0412 tRPC \u0443 \u0438\u043d\u0444\u0438\u043d\u0438\u0442\u0438 \u043a\u0432\u0435\u0440\u0438 \u0435\u0441\u0442\u044c \u0436\u0451\u0441\u0442\u043a\u043e\u0435 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435: \u043f\u043e\u043b\u0435 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u0432 \u0438\u043d\u043f\u0443\u0442\u0435 \u043e\u0431\u044f\u0437\u0430\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f <code>cursor<\/code>, \u0438\u043d\u0430\u0447\u0435 <code>useInfiniteQuery<\/code> \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f:<\/p>\n<pre><code class=\"typescript\">\/\/ server\/routers\/idea.tsexport const ideaRouter = router({  \/\/ ...  list: publicProcedure    .input(      z.object({        cursor: z.number().default(0),        limit: z.number().default(10),      }),    )    .query(async ({ input: { cursor, limit } }) =&gt; {      const ideasCount = await prisma.idea.count()      const ideas = await prisma.idea.findMany({        take: limit,        skip: cursor * limit,        orderBy: { updatedAt: 'desc' },      })      const nextCursor = ideasCount &gt; (cursor + 1) * limit ? cursor + 1 : undefined      return { ideas, nextCursor }    }),  \/\/ ...})<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"typescript\">\/\/ client\/components\/idea.tsxconst query = trpc.idea.list.useInfiniteQuery(  { limit: 10 },  { getNextPageParam: (lastPage) =&gt; lastPage.nextCursor },)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h2>\u0418\u043d\u0444\u0438\u043d\u0438\u0442\u0438 \u043a\u0432\u0435\u0440\u0438 \u0432 Point0<\/h2>\n<p>\u0412 Point0 \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043a\u043b\u044e\u0447 \u0438\u043d\u043f\u0443\u0442\u0430, \u043d\u0430 \u043d\u0435\u0433\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 <code>pageParamFromInput<\/code>:<\/p>\n<pre><code class=\"typescript\">\/\/ modules\/idea.tsxexport const ideaListQuery = root.lets  .infiniteQuery()  .input(    z.object({      page: z.number().default(0),      limit: z.number().default(10),    }),  )  .loader(async ({ input: { page, limit } }) =&gt; {    const ideasCount = await prisma.idea.count()    const ideas = await prisma.idea.findMany({      take: limit,      skip: page * limit,      orderBy: { updatedAt: 'desc' },    })    const nextCursor = ideasCount &gt; (page + 1) * limit ? page + 1 : undefined    return { ideas, ideasCount, nextCursor }  })  .infiniteQuery({    \/\/ \u0441\u044e\u0434\u0430 \u0438\u0434\u0443\u0442 \u043b\u044e\u0431\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u043e\u0434\u043d\u043e\u0433\u043e useInfiniteQuery,    \/\/ \u043f\u043b\u044e\u0441 \u043d\u0430\u0448 pageParamFromInput \u2014 \u043a\u043b\u044e\u0447 \u0432 \u0438\u043d\u043f\u0443\u0442\u0435     \/\/ (\u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043f\u043e \u0442\u0438\u043f\u0443 some.thing.deep),    \/\/ \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0433\u0440\u0430\u0435\u0442 \u0440\u043e\u043b\u044c pageParam    pageParamFromInput: 'page',    getNextPageParam: (lastPage) =&gt; lastPage.nextCursor,    initialPageParam: 0,  })<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 <code>useInfiniteQuery<\/code> \u0438\u0437 react-query \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0435\u0433\u043e <code>fetchNextPage<\/code>, <code>hasNextPage<\/code>, <code>isFetchingNextPage<\/code>:<\/p>\n<pre><code class=\"typescript\">const query = ideaListQuery.useInfiniteQuery({ limit: 10 })const ideas = query.data?.pages.flatMap((page) =&gt; page.ideas) ?? []<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h2>\u041a\u0443\u0434\u0430 \u0434\u0435\u043b\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441<\/h2>\n<p>\u0412 tRPC \u0438\u043d\u0434\u0435\u043a\u0441 \u2014 \u044d\u0442\u043e <code>appRouter<\/code>. \u041e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0440\u0443\u043a\u0430\u043c\u0438 \u0438 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0432\u0441\u0435\u043c\u0438 \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430\u043c\u0438. \u041e\u0431\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0435, \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0442\u0438\u043f\u044b \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445. \u041f\u0440\u043e\u0435\u043a\u0442 \u0440\u0430\u0441\u0442\u0451\u0442, \u0430\u0432\u0442\u043e\u043a\u043e\u043c\u043f\u043b\u0438\u0442 \u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0432\u0441\u0451 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435.<\/p>\n<p>\u0412 Point0 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 \u0442\u0438\u043f\u0430\u0445 \u043d\u0435\u0442 \u0432\u043e\u043e\u0431\u0449\u0435. \u041a\u0432\u0435\u0440\u0438 \u0438 \u043c\u0443\u0442\u0430\u0446\u0438\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0438 \u0442\u0438\u043f\u044b \u043a\u0430\u0436\u0434\u043e\u0439 \u0436\u0438\u0432\u0443\u0442 \u0441\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435. \u041e\u0431\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u043e\u0434\u043d\u043e\u0439, \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0451. \u0412 <a href=\"https:\/\/github.com\/1gr14\/point0-benchmarks\" rel=\"noopener noreferrer nofollow\">\u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430\u0445<\/a> \u044d\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u0447\u0438\u0441\u043b\u0430\u043c\u0438: \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u043e\u0432 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u0443 Point0 \u043d\u0435 \u0440\u0430\u0441\u0442\u0451\u0442 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u2014 1.50 s \u043d\u0430 4 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445, 1.59 s \u043d\u0430 504. (\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438 \u0447\u0443\u0442\u044c \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0438, \u043f\u043e\u0437\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u0430\u043d\u044b, \u043d\u043e \u043f\u043e \u0441\u0443\u0442\u0438 \u043e\u043d\u0438 \u0432\u0435\u0440\u043d\u044b\u0435).<\/p>\n<p>\u041d\u043e \u0438\u043d\u0434\u0435\u043a\u0441 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u0436\u0435\u043d \u043d\u0435 \u0442\u0438\u043f\u0430\u043c, \u0430 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0443. \u0414\u0432\u0438\u0436\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u043d\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0438\u043d\u0442\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0418 \u0432\u043e\u0442 \u0435\u0433\u043e \u0432 Point0 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438 \u043d\u0435 \u043d\u0430\u0434\u043e, \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0438\u043d\u0442\u044b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c \u043a\u043e\u0434\u0430 \u0438 \u043f\u0438\u0448\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441-\u0444\u0430\u0439\u043b \u0441\u0430\u043c. \u0412 dev-\u0440\u0435\u0436\u0438\u043c\u0435 \u043d\u0430 \u043b\u0435\u0442\u0443 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438, \u0438 \u043f\u0440\u0438 \u0431\u0438\u043b\u0434\u0435. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"typescript\">\/\/ generated\/point0\/points.server.ts \u2014 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e, \u043b\u0435\u0436\u0438\u0442 \u0432 .gitignoreimport type { PointsDefinition } from '@point0\/core'import { root as root_0 } from '..\/..\/lib\/root.js'import { ideaListPage as ideaListPage_1 } from '..\/..\/pages\/idea-list.js'import { ideaViewPage as ideaViewPage_2 } from '..\/..\/pages\/idea-view.js'import {  ideaViewQuery as ideaViewQuery_3,  ideaUpdateMutation as ideaUpdateMutation_4,} from '..\/..\/modules\/idea.js'export default [  root_0,  ideaListPage_1,  ideaViewPage_2,  ideaViewQuery_3,  ideaUpdateMutation_4,] as PointsDefinition&lt;...&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0440\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0432\u0438\u0436\u043e\u043a \u0432 <code>src\/engine.ts<\/code> \u2014 \u0438 \u0432\u0441\u0451, \u0434\u0432\u0438\u0436\u043e\u043a \u0437\u043d\u0430\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442. \u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0442\u043e\u0433\u043e \u0436\u0435 \u0444\u0430\u0439\u043b\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438 \u0432 \u0431\u0430\u043d\u0434\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043b\u0435\u043d\u0438\u0432\u044b\u043c\u0438 \u0447\u0430\u043d\u043a\u0430\u043c\u0438. \u042d\u0442\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0434\u0430 \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u0440\u0438 <code>bun create point0-app<\/code> \u0443\u0436\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u043e, \u0438 \u043f\u043e\u0442\u043e\u043c \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"typescript\">\/\/ src\/engine.tsimport { Engine } from '@point0\/engine'import { clientEnvKeys } from '.\/client-shape'export const engine = Engine.create({  file: import.meta.url,  ssr: true,  pointsGlob: '**\/*.{ts,tsx,mdx}',  server: {    scope: 'root',    entry: { main: '.\/index.server.ts' },    points: async () =&gt; await import('.\/generated\/point0\/points.server'),    generate: { points: '.\/generated\/point0\/points.server.ts' },    outdir: '..\/dist\/server',  },  client: {    scope: 'root',    indexHtml: '.\/index.html',    app: async () =&gt; await import('.\/app.client'),    points: async () =&gt; await import('.\/generated\/point0\/points.client'),    generate: {      points: '.\/generated\/point0\/points.client.ts',      routes: '.\/generated\/point0\/routes.ts',    },    publicdir: { source: '..\/public', outdir: '..\/dist\/client' },    outdir: '..\/dist\/client',  },})<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"typescript\">\/\/ src\/app.server.tsimport { engine } from '.\/engine'\/\/ \u0440\u0430\u0437\u0434\u0430\u0451\u043c \u043d\u0430\u0448\u0438 \u043f\u043e\u0438\u043d\u0442\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432await engine.serve()\/\/ \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418\u0442\u043e\u0433\u043e: \u0432 tRPC \u0438\u043d\u0434\u0435\u043a\u0441 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u0432\u044b, \u0438 \u043e\u043d \u0442\u043e\u0440\u043c\u043e\u0437\u0438\u0442 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440. \u0412 Point0 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440, \u0438 \u043e\u043d \u043d\u0438\u043a\u043e\u0433\u043e \u043d\u0435 \u0442\u043e\u0440\u043c\u043e\u0437\u0438\u0442, \u0434\u0430 \u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0433\u0434\u0435 \u043a\u0440\u043e\u043c\u0435 \u0441\u0435\u0442\u0430\u043f\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<h2>\u0421\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u043a\u043e\u0434 \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435<\/h2>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u043d\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 <code>ideaViewQuery<\/code>. \u0422\u0430\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 prisma \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0431\u0430\u0437\u0435, \u0438 \u044d\u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435. \u041a\u0430\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0432 \u0431\u0430\u043d\u0434\u043b\u0435?<\/p>\n<p>\u0412 tRPC \u044d\u0442\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0435\u043d\u0430 \u0434\u0438\u0441\u0446\u0438\u043f\u043b\u0438\u043d\u043e\u0439. \u0421\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u0436\u0438\u0432\u0451\u0442 \u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445, \u043a\u043b\u0438\u0435\u043d\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e <code>type AppRouter<\/code>, \u0438 \u0432\u044b \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0447\u0435\u0440\u0435\u0437 \u0436\u0438\u0432\u043e\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u0438\u0442\u0435\u043a\u043b\u043e.<\/p>\n<p>\u0412 Point0 \u0437\u0430 \u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440. \u0418\u0437 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u0431\u0430\u043d\u0434\u043b\u0430 \u043e\u043d \u0432\u044b\u0440\u0435\u0437\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434, \u0438\u0437 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u2014 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439, \u0430 \u043e\u0441\u0438\u0440\u043e\u0442\u0435\u0432\u0448\u0438\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u0443\u0434\u0430\u043b\u044f\u0435\u0442. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>point0 compile src\/modules\/idea.tsx --side client<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"typescript\">\/\/ \u0432\u0430\u0448 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434import { root } from '@\/lib\/root'import { prisma } from '@\/lib\/prisma'import * as z from 'zod'export const ideaViewQuery = root.lets  .query()  .input(z.object({ id: z.string() }))  .loader(async ({ input }) =&gt; {    const idea = await prisma.idea.findUniqueOrThrow({      where: { id: input.id },    })    return { idea }  })  .query()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"typescript\">\/\/ \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b point0 compile src\/modules\/idea.tsx --side client\/\/ \u044d\u0442\u043e \u0436\u0435 \u0438 \u0435\u0441\u0442\u044c \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0435\u0434\u0435\u0442 \u0434\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u0431\u0430\u043d\u0434\u043b\u0430import { root } from '@\/lib\/root'\/\/ prisma \u0438 zod \u0432\u044b\u0440\u0435\u0437\u0430\u043b\u0438\u0441\u044c \u0441\u0430\u043c\u0438 \u2014 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0442\u0435\u043b\u043e\u043c \u043b\u043e\u0430\u0434\u0435\u0440\u0430 \u0438 \u0441\u0445\u0435\u043c\u043e\u0439export const ideaViewQuery = root  \/\/ \u043d\u043e\u0442\u0430\u0446\u0438\u044f .lets() \u0441\u0430\u043c\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e, \u0433\u0434\u0435 \u0438\u043c\u044f \u043a\u0432\u0435\u0440\u0438 \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439  .lets('query', 'ideaView')  .input()  .loader()  .query()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u044b\u0440\u0435\u0437\u0430\u043b\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0430\u0434\u0435\u0440, \u043d\u043e \u0438 \u0441\u0445\u0435\u043c\u0430 \u0438\u043d\u043f\u0443\u0442\u0430. \u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0436\u0438\u0432\u0451\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0438 zod-\u0441\u0445\u0435\u043c\u044b \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u0431\u0430\u043d\u0434\u043b \u043d\u0435 \u0435\u0434\u0443\u0442 \u0432\u043e\u043e\u0431\u0449\u0435. \u0422\u0430\u043a \u0436\u0435 \u0432\u044b\u0440\u0435\u0437\u0430\u044e\u0442\u0441\u044f \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b: <code>.ctx()<\/code>, <code>.middleware()<\/code>, \u0441\u0445\u0435\u043c\u044b \u044d\u043a\u0448\u0435\u043d\u043e\u0432. \u041a\u043b\u0438\u0435\u043d\u0442 \u0437\u043d\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u044f \u0438 \u0442\u0438\u043f \u043f\u043e\u0438\u043d\u0442\u0430 \u2014 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. \u0417\u0430\u043e\u0434\u043d\u043e \u0432\u0438\u0434\u043d\u043e, \u0432\u043e \u0447\u0442\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b\u0430\u0441\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0430\u044f \u043d\u043e\u0442\u0430\u0446\u0438\u044f: <code>root.lets.query()<\/code> \u2014 \u044d\u0442\u043e \u0441\u0430\u0445\u0430\u0440, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0431\u0435\u0440\u0451\u0442 \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>ideaViewQuery<\/code>, \u043e\u0442\u0440\u0435\u0437\u0430\u0435\u0442 \u0441\u0443\u0444\u0444\u0438\u043a\u0441 \u0442\u0438\u043f\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438\u043c\u044f \u043f\u043e\u0438\u043d\u0442\u0430 <code>ideaView<\/code>. \u041e\u043d\u043e \u0435\u0449\u0451 \u0441\u044b\u0433\u0440\u0430\u0435\u0442 \u0440\u043e\u043b\u044c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043f\u0440\u043e \u0443\u0440\u043b\u044b.<\/p>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0442\u0440\u0451\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445: bun-\u043f\u043b\u0430\u0433\u0438\u043d, vite-\u043f\u043b\u0430\u0433\u0438\u043d \u0438 babel-\u043f\u043b\u0430\u0433\u0438\u043d, \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043a\u0435\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. \u041f\u0435\u0440\u0432\u044b\u0439 (\u0441\u0430\u043c\u044b\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439) \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0447\u0443\u0442\u044c \u0434\u043e\u043b\u044c\u0448\u0435, \u0434\u0430\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u0441\u0442\u0440\u043e.<\/p>\n<h2>\u0412\u0441\u0451 \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u2014 \u0438 HMR \u0436\u0438\u0432\u043e\u0439<\/h2>\n<p>\u041a\u0432\u0435\u0440\u0438 \u0438 \u043c\u0443\u0442\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0440\u044f\u0434\u043e\u043c \u0441 \u0444\u043e\u0440\u043c\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0445 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442. React Fast Refresh \u0445\u043e\u0447\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0432\u043c\u0435\u0441\u0442\u043e \u0433\u043e\u0440\u044f\u0447\u0435\u0439 \u0437\u0430\u043c\u0435\u043d\u044b.<\/p>\n<p>\u041c\u044b \u0431\u0430\u043d\u0434\u043b\u0435\u0440\u044b \u043f\u0435\u0440\u0435\u0445\u0438\u0442\u0440\u0438\u043b\u0438. \u0412 dev-\u0440\u0435\u0436\u0438\u043c\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043f\u043e\u0438\u043d\u0442\u0443 \u0445\u0432\u043e\u0441\u0442:<\/p>\n<pre><code class=\"typescript\">export const ideaUpdateMutation = root.lets  .mutation()  .input(\/* ... *\/)  .loader(\/* ... *\/)  .mutation()  ._tail(() =&gt; null) \/\/ \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 dev<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u0430\u043c <code>ideaUpdateMutation<\/code> \u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0451\u043d\u043d\u0430\u044f \u0438\u0437 <code>._tail(() =&gt; null)<\/code>, \u0442\u0430\u043a \u0447\u0442\u043e \u0438 bun, \u0438 vite \u0441\u0447\u0438\u0442\u0430\u044e\u0442 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c, \u0438 Fast Refresh \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0410 \u043c\u044b \u043a \u043f\u043e\u0438\u043d\u0442\u0443 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f, \u043c\u044b \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430\u043c, \u0438 \u043e\u043d\u0438 \u0432\u0441\u0435 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e \u0441\u0443\u0442\u0438 \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0438\u043c\u0435\u0442\u044c HMR \u0437\u0430 15 \u043c\u0441 (\u043c\u0435\u0434\u0438\u0430\u043d\u0430 \u0438\u0437 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432).<\/p>\n<p>\u0421\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0432 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442. Point0 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043d\u0430\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0430\u043f\u043e\u043a. \u0425\u043e\u0442\u0438\u0442\u0435 \u2014 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0439\u0442\u0435 \u043f\u043e\u0438\u043d\u0442\u044b \u043c\u0443\u0442\u0430\u0446\u0438\u0439 \u0438 \u043a\u0432\u0435\u0440\u0435\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0438\u043b\u0438 \u0432\u0441\u0435 \u0432 \u043e\u0434\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435, \u0438\u043b\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435 \u043f\u043e \u043f\u0430\u043f\u043a\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u044d\u0442\u043e \u0432\u044b\u0431\u043e\u0440, \u0430 \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430.<\/p>\n<h2>\u041a\u0432\u0435\u0440\u0438 \u043f\u0440\u044f\u043c\u043e \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u2014 \u0438 \u0433\u0438\u0434\u0440\u0430\u0446\u0438\u044f \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a Point0 \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0438 \u043b\u044d\u0439\u0430\u0443\u0442\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c. \u0418 \u0432\u0441\u0451 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u043f\u043e\u0438\u043d\u0442\u044b. \u041a\u0432\u0435\u0440\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u0448\u0438\u0442\u044c \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 Point0 \u0447\u0435\u0440\u0435\u0437 <code>.with()<\/code> \u2014 \u0438 \u044d\u0442\u043e \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u043a\u0432\u0435\u0440\u0438 \u0441 \u0442\u0435\u043c \u0436\u0435 \u043a\u0435\u0448\u0435\u043c:<\/p>\n<pre><code class=\"typescript\">import { ideaViewQuery } from '@\/modules\/idea'export const ideaPage = root.lets  .page('\/ideas\/:id')  \/\/ \u043c\u0430\u043f\u0438\u043c \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u043e\u0443\u0442\u0430 \u043d\u0430 \u0438\u043d\u043f\u0443\u0442 \u043a\u0432\u0435\u0440\u0438  .with(ideaViewQuery, ({ params }) =&gt; ({ id: params.id }))  .head(({ data: { idea } }) =&gt; idea.title)  .page(({ data: { idea } }) =&gt; (    &lt;article&gt;      &lt;h1&gt;{idea.title}&lt;\/h1&gt;      &lt;p&gt;{idea.content}&lt;\/p&gt;    &lt;\/article&gt;  ))<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 <code>.page()<\/code> \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0436\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b: \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0440\u0438\u0441\u0443\u044e\u0442\u0441\u044f \u0441\u0430\u043c\u0438, \u0438\u0445 \u0432\u0438\u0434 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0437\u0430\u0434\u0430\u043d \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u043f\u043e\u0438\u043d\u0442\u0435. \u0418\u043b\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0418 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0430 \u0436\u0435 <code>ideaViewQuery.useQuery({ id })<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043b\u044e\u0431\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 \u2014 \u043a\u0435\u0448 \u043e\u0434\u0438\u043d, \u043b\u0438\u0448\u043d\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0443\u0439\u0434\u0451\u0442.<\/p>\n<p>\u041a\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b SSR-\u0433\u0438\u0434\u0440\u0430\u0446\u0438\u044e react-query \u043f\u043e\u0432\u0435\u0440\u0445 tRPC, \u0437\u043d\u0430\u0435\u0442 \u044d\u0442\u0443 \u043e\u0431\u0432\u044f\u0437\u043a\u0443 \u043d\u0430\u0438\u0437\u0443\u0441\u0442\u044c:<\/p>\n<pre><code class=\"typescript\">\/\/ tRPC + Next: prefetch \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, dehydrate, \u043f\u0440\u043e\u043a\u0438\u043d\u0443\u0442\u044c, hydrateexport async function getServerSideProps(ctx) {  const helpers = createServerSideHelpers({    router: appRouter,    ctx: await createContext(),    transformer: superjson, \/\/ \u0442\u043e\u0442 \u0436\u0435, \u0447\u0442\u043e \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435, \u0438\u043d\u0430\u0447\u0435 \u0432\u0441\u0451 \u0440\u0430\u0437\u0432\u0430\u043b\u0438\u0442\u0441\u044f  })  await helpers.idea.view.prefetch({ id: ctx.params.id })  return {    props: { trpcState: helpers.dehydrate(), id: ctx.params.id },  }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418 \u0442\u0430\u043a \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435, \u0433\u0434\u0435 \u043d\u0443\u0436\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0435.<\/p>\n<p>\u0412 Point0 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043d\u0435\u0442 \u0441\u043e\u0432\u0441\u0435\u043c. \u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0441\u0430\u043c \u0432\u0438\u0434\u0438\u0442, \u043a\u0430\u043a\u0438\u0435 \u043a\u0432\u0435\u0440\u0438 \u0435\u0439 \u043d\u0443\u0436\u043d\u044b, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 <code>.with()<\/code> \u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u0441\u0430\u043c \u0438\u0445 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442, \u043a\u043b\u0430\u0434\u0451\u0442 \u0434\u0435\u0433\u0438\u0434\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u0435\u0448 \u043a\u0432\u0435\u0440\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 HTML, \u0430 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0441\u0430\u043c \u0435\u0433\u043e \u0433\u0438\u0434\u0440\u0438\u0440\u0443\u0435\u0442. \u0410 \u0435\u0441\u043b\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u0435 SSR, \u043a\u043e\u0434 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u043d\u0438 \u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0443: \u0442\u0435 \u0436\u0435 \u043a\u0432\u0435\u0440\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0435\u0434\u0443\u0442 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0418 \u0434\u0430\u0436\u0435 \u0441\u043e \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u043c SSR \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430\u0445 \u043f\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 JS-\u0447\u0430\u043d\u043a\u0438.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u043b\u043e\u0430\u0434\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u2014 \u0442\u043e\u0436\u0435 \u043a\u0432\u0435\u0440\u0438. \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441 <code>.loader()<\/code> \u0441\u0430\u043c\u0430 \u0443\u043c\u0435\u0435\u0442 <code>ideaPage.useQuery({ id })<\/code>, <code>ideaPage.prefetchQuery({ id })<\/code> \u0438 \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435. \u0412\u0441\u0451 \u043f\u043e\u0438\u043d\u0442\u044b, \u0432\u0441\u0451 react-query:<\/p>\n<pre><code class=\"typescript\">import { ideaViewQuery } from '@\/modules\/idea'export const ideaPage = root.lets  .page('\/ideas\/:id')  .loader(async ({ params }) =&gt; {    const idea = await prisma.idea.findUniqueOrThrow({      where: { id: params.id },    })    return { idea }  })  .head(({ data: { idea } }) =&gt; idea.title)  .page(({ data: { idea } }) =&gt; (    &lt;article&gt;      &lt;h1&gt;{idea.title}&lt;\/h1&gt;      &lt;p&gt;{idea.content}&lt;\/p&gt;    &lt;\/article&gt;  ))<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h2>\u0424\u0430\u0439\u043b \u0432 \u043c\u0443\u0442\u0430\u0446\u0438\u0438 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u0435 \u0438\u043d\u043f\u0443\u0442\u0430<\/h2>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u2014 \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 tRPC v11 \u0447\u0435\u0441\u0442\u043d\u043e \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442. FormData \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u043d\u043f\u0443\u0442\u0430 \u043d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"typescript\">\/\/ tRPC v11upload: publicProcedure  .input(z.instanceof(FormData))  .mutation(async ({ input }) =&gt; {    const title = input.get('title') \/\/ FormDataEntryValue | null    const image = input.get('image') \/\/ FormDataEntryValue | null    \/\/ \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u0440\u0443\u043a\u0430\u043c\u0438: \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0441\u043a\u0430\u0441\u0442\u043e\u0432\u0430\u0442\u044c, \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c  }),<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0441\u0445\u0435\u043c\u043e\u0439 \u2014 <code>input.get()<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>FormDataEntryValue | null<\/code>, \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u0432\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u0441\u0430\u043c\u0438 (\u043b\u0438\u0431\u043e \u0442\u0430\u0449\u0438\u0442\u0435 zod-form-data \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0435 \u0441\u0445\u0435\u043c\u0443 \u0432 \u0435\u0451 \u0441\u0442\u0438\u043b\u0435).<\/p>\n<p>\u0412 Point0 \u0444\u0430\u0439\u043b \u2014 \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u043f\u0443\u0442\u0430:<\/p>\n<pre><code class=\"typescript\">export const ideaCreateMutation = root.lets  .mutation()  .input(    z.object({      title: z.string().min(1),      content: z.string().min(1),      image: z.file().optional(), \/\/ \u0432\u043e\u0442 \u043e\u043d, \u0444\u0430\u0439\u043b    }),  )  .loader(async ({ input }) =&gt; {    \/\/ input.image \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u2014 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 File    const imageBase64 = input.image      ? Buffer.from(await input.image.arrayBuffer()).toString('base64')      : undefined    const idea = await prisma.idea.create({      data: { title: input.title, content: input.content, image: imageBase64 },    })    return { idea }  })  .mutation()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 <code>File<\/code> \u043a\u043b\u0430\u0434\u0451\u0442\u0441\u044f \u0432 \u0438\u043d\u043f\u0443\u0442 \u043a\u0430\u043a \u0435\u0441\u0442\u044c:<\/p>\n<pre><code class=\"typescript\">const mutation = ideaCreateMutation.useMutation()await mutation.mutateAsync({  title,  content,  image: fileInput.files?.[0], \/\/ \u043f\u0440\u043e\u0441\u0442\u043e File \u0438\u0437 \u0438\u043d\u043f\u0443\u0442\u0430})<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>FormData \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441\u043e\u0431\u0435\u0440\u0451\u0442 \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u0442 \u0441\u0430\u043c: \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441\u0445\u0435\u043c\u043e\u0439 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u0444\u0430\u0439\u043b \u0434\u043e\u0435\u0434\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u043c. \u0417\u0430\u043f\u0440\u043e\u0441\u044b \u0441\u0430\u043c\u0438 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 FormData, \u0430 \u043a\u043e\u0433\u0434\u0430 \u0432 JSON, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 Blob \u0438\u043b\u0438 File. \u0418 \u0432\u0441\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u044b \u043d\u0430 \u044d\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f. \u041f\u0440\u043e\u0441\u0442\u043e \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043a \u043f\u043b\u043e\u0441\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438, \u043d\u043e \u0432\u044b \u044d\u0442\u043e\u0433\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435, \u0432\u0441\u0451 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.<\/p>\n<h2>\u0421\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0443\u0440\u043b\u044b<\/h2>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441\u044b tRPC \u0443\u0435\u0437\u0436\u0430\u044e\u0442 \u043d\u0430 \u043e\u0434\u0438\u043d \u043c\u0430\u0443\u043d\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0432 \u043f\u0443\u0442\u0438 \u0438 \u0438\u043d\u043f\u0443\u0442\u043e\u043c, \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0432 query string, \u0430 \u0431\u0430\u0442\u0447-\u043b\u0438\u043d\u043a \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 \u0432 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code>GET \/api\/trpc\/idea.view,idea.list?batch=1&amp;input=%7B%220%22%3A%7B%22id%22...<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 Point0 \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0432\u0435\u0440\u0438 \u0438 \u043c\u0443\u0442\u0430\u0446\u0438\u0438 \u0441\u0432\u043e\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0443\u0440\u043b \u2014 \u0438\u0437 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u0438\u043d\u0442\u0430 \u0432 \u043a\u0435\u0431\u0430\u0431-\u043a\u0435\u0439\u0441\u0435. \u0417\u0430\u043f\u0440\u043e\u0441 \u0432 \u043c\u0443\u0442\u0430\u0446\u0438\u044e \u0432\u0441\u0435\u0433\u0434\u0430 POST, \u0430 \u0432 \u043a\u0432\u0435\u0440\u0438 GET \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0434\u043b\u0438\u043d\u0430 \u0443\u0440\u043b\u0430 \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0438\u043d\u0430\u0447\u0435 \u0442\u043e\u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 POST:<\/p>\n<pre><code>GET  \/_point0\/root\/query\/idea-view      \u2190 ideaViewQueryGET  \/_point0\/root\/query\/idea-list      \u2190 ideaListQueryPOST \/_point0\/root\/mutation\/idea-update \u2190 ideaUpdateMutation<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u044b\u0432\u0435\u043b \u0438\u043c\u044f <code>ideaView<\/code> \u0438\u0437 \u0438\u043c\u0435\u043d\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439? \u0412\u043e\u0442 \u0437\u0434\u0435\u0441\u044c \u043e\u043d\u043e \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0410 \u0440\u0430\u0437 \u0443 \u0432\u0441\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0443\u0440\u043b\u044b \u0438 \u0441\u0445\u0435\u043c\u044b, \u0438\u0437 \u043d\u0438\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u0430\u044f OpenAPI-\u0441\u043f\u0435\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u043a\u0435\u0442 <code>@point0\/openapi<\/code>, \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0432 Scalar \u0438\u043b\u0438 Swagger UI. \u041a\u0430\u0436\u0434\u0430\u044f \u043a\u0432\u0435\u0440\u0438, \u043c\u0443\u0442\u0430\u0446\u0438\u044f \u0438 \u044d\u043a\u0448\u0435\u043d \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0442\u0443\u0434\u0430 \u0441\u0430\u043c\u0438, \u0430 \u043c\u043e\u0436\u043d\u043e \u0438 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<h2>\u042d\u043a\u0448\u0435\u043d\u044b: \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u0435\u043d \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442<\/h2>\n<p>\u0423 tRPC \u0432\u0441\u0451 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430\u043c\u0438. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u0435\u043d \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0438 \u043f\u0443\u0442\u0451\u043c \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u0435\u0431\u0445\u0443\u043a Stripe, \u043a\u043e\u043b\u0431\u044d\u043a OAuth, \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u0447\u0443\u0436\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u2014 \u0432\u044b \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u0435 \u0438\u0437 tRPC \u0438 \u043f\u0438\u0448\u0435\u0442\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 route handler \u0440\u044f\u0434\u043e\u043c (\u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0435 trpc-to-openapi).<\/p>\n<p>\u0412 Point0 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0432\u0438\u0434 \u043f\u043e\u0438\u043d\u0442\u043e\u0432 \u00ab\u044d\u043a\u0448\u0435\u043d\u00bb, \u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u043d\u0430\u0434 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0438 \u043f\u0443\u0442\u0451\u043c:<\/p>\n<pre><code class=\"typescript\">export const stripeWebhookAction = root.lets  .action('POST', '\/api\/webhooks\/stripe')  .loader(async ({ request }) =&gt; {    const event = await stripe.webhooks.constructEvent(      await request.original.text(),      request.headers['stripe-signature'],      process.env.STRIPE_WEBHOOK_SECRET,    )    await handleStripeEvent(event)    return { received: true }  })  .action()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u042d\u043a\u0448\u0435\u043d\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0441\u0445\u0435\u043c\u044b \u0432\u0441\u0435\u0433\u043e, \u0438\u0437 \u0447\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441: \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0443\u0442\u0438, \u0441\u0451\u0440\u0447\u0430, \u0445\u0435\u0434\u0435\u0440\u043e\u0432, \u0431\u043e\u0434\u0438:<\/p>\n<pre><code class=\"typescript\">export const myTestAction = root.lets  .action('POST', '\/api\/my-test\/:id')  .params(z.object({ id: z.coerce.number().min(1) }))  .headers(z.object({ x: z.string().min(1) }))  .search(z.object({ y: z.string().min(1) }))  .body(z.object({ b: z.number().min(1) }))  .action(({ params, headers, search, body }) =&gt; {    return { params, headers, search, body }  })<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u0441\u0445\u0435\u043c\u0430 \u0431\u043e\u0434\u0438, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441\u0430\u043c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442 \u0438 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442 \u0435\u0433\u043e \u043a\u0430\u043a json\/formData, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0432 <code>request.rawBody<\/code> \u2014 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c, \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0431\u043e\u0434\u0438 \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u0443\u0433\u043e\u0434\u043d\u043e \u0438 \u043a\u0430\u043a \u0432\u0430\u043c \u0443\u0433\u043e\u0434\u043d\u043e.<\/p>\n<p>\u042d\u043a\u0448\u0435\u043d \u2014 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0438\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u043e\u043c: <code>.query()<\/code>, <code>.mutation()<\/code> \u0438\u043b\u0438 <code>.infiniteQuery()<\/code>. \u0418 \u0442\u043e\u0433\u0434\u0430 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0441 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c \u043f\u0443\u0442\u0451\u043c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 react-query \u043a\u0432\u0435\u0440\u0438 \u0438\u043b\u0438 \u043c\u0443\u0442\u0430\u0446\u0438\u0435\u0439 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435:<\/p>\n<pre><code class=\"typescript\">export const ideaUpdateAction = root.lets  .action('PUT', '\/api\/ideas\/:id')  .body(    z.object({      title: z.string().min(1),      content: z.string().min(1),    }),  )  .loader(async ({ params: { id }, body: { title, content } }) =&gt; {    const idea = await prisma.idea.update({      where: { id },      data: { title, content },    })    return { idea }  })  .mutation() \/\/ \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u043c\u0443\u0442\u0430\u0446\u0438\u044f<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"typescript\">const mutation = ideaUpdateAction.useMutation()await mutation.mutateAsync({  \/\/ \u0438\u043d\u043f\u0443\u0442 \u044d\u043a\u0448\u0435\u043d\u0430 \u043d\u0435 \u043f\u043b\u043e\u0441\u043a\u0438\u0439, \u0430 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d \u043f\u043e \u0447\u0430\u0441\u0442\u044f\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430  params: { id: idea.id },  body: { title, content },})<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0434\u0438\u043d \u043f\u043e\u0438\u043d\u0442 \u2014 \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 <code>PUT \/api\/ideas\/:id<\/code> \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043c\u0438\u0440\u0430, \u0438 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043c\u0443\u0442\u0430\u0446\u0438\u044f \u0441\u043e \u0432\u0441\u0435\u043c \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<h2>\u0421\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043e\u0441\u0442\u0440\u043e\u0432\u0430<\/h2>\n<p>\u0412 tRPC \u0442\u0430\u043a\u043e\u0433\u043e \u0431\u044b\u0442\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430. \u0410 \u0432 Point0 \u043b\u043e\u0430\u0434\u0435\u0440 \u0443\u043c\u0435\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u0438 \u0440\u0435\u0430\u043a\u0442-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b. \u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 Point0 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u0430\u043a\u043e\u0435 \u0436\u0435 \u043f\u043e\u043b\u0435 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435, \u043a\u0430\u043a \u0447\u0438\u0441\u043b\u043e \u0438\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u043b\u043e\u0430\u0434\u0435\u0440: \u0438\u0437 \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043a\u0432\u0435\u0440\u0435\u0439, \u043c\u0443\u0442\u0430\u0446\u0438\u0439.<\/p>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u043e\u0432\u043d\u043e \u0434\u0432\u0430 \u0432\u0438\u0434\u0430, \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u043d\u0438 \u0442\u0435\u043c, \u0447\u0435\u043c \u0432\u044b \u0438\u0445 \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438:<\/p>\n<ul>\n<li>\n<p><strong>\u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/strong> \u2014 \u044d\u0442\u043e <strong>\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/strong>. Point0 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 (\u043c\u043e\u0436\u043d\u043e async), \u0438 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u0435\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430. \u0421\u0430\u043c \u043a\u043e\u0434 \u0438 \u0432\u0441\u0451, \u0447\u0442\u043e \u043e\u043d \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b, \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442.<\/p>\n<\/li>\n<li>\n<p><strong>\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442-\u043f\u043e\u0438\u043d\u0442<\/strong> \u2014 \u044d\u0442\u043e <strong>\u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043e\u0441\u0442\u0440\u043e\u0432<\/strong>. \u041e\u043d \u0435\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u043e\u0439 (\u0441\u0432\u043e\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c) \u0438 \u043f\u0440\u043e\u043f\u0441\u0430\u043c\u0438-\u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0430 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u043e\u0436\u0438\u0432\u0430\u0435\u0442: \u0441\u0442\u0435\u0439\u0442, \u0445\u0443\u043a\u0438, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u043f\u043e\u0438\u043d\u0442\u0435 \u2014 \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043d\u0435 \u043f\u0440\u043e\u0442\u0435\u043a\u0430\u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e:<\/p>\n<pre><code class=\"typescript\">export const root = Point0.lets  .root()  .rsc({ depth: 1 }) \/\/ \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0432 \u043f\u043e\u043b\u044f\u0445 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f  .root()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u0434\u0435 \u0432 \u043e\u0434\u043d\u043e\u043c \u043b\u043e\u0430\u0434\u0435\u0440\u0435 \u0435\u0441\u0442\u044c \u0438 \u0442\u043e, \u0438 \u0434\u0440\u0443\u0433\u043e\u0435. \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0438\u0434\u0435\u0438: \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u2014 \u0442\u044f\u0436\u0451\u043b\u044b\u0439 markdown, \u043b\u0430\u0439\u043a \u2014 \u0436\u0438\u0432\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0441\u0442\u0440\u043e\u0432. \u042d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442-\u043f\u043e\u0438\u043d\u0442, \u0432 \u0441\u0432\u043e\u0451\u043c \u0444\u0430\u0439\u043b\u0435 \u2014 \u0442\u043e\u0433\u0434\u0430 \u043e\u043d \u043f\u043e\u0435\u0434\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043b\u0435\u043d\u0438\u0432\u044b\u043c \u0447\u0430\u043d\u043a\u043e\u043c:<\/p>\n<pre><code class=\"typescript\">\/\/ modules\/idea-like.tsximport { root } from '@\/lib\/root'import { ideaLikeMutation } from '@\/modules\/idea'import { useState } from 'react'export const IdeaLikeButton = root.lets  .component&lt;{ id: string; likes: number }&gt;()  .component(({ props }) =&gt; {    const [likes, setLikes] = useState(props.likes)    const mutation = ideaLikeMutation.useMutation()    return (      &lt;button        disabled={mutation.isPending}        onClick={async () =&gt; {          await mutation.mutateAsync({ id: props.id })          setLikes(likes + 1)        }}      &gt;        \u2764\ufe0f {likes}      &lt;\/button&gt;    )  })<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u2014 \u0442\u043e\u0436\u0435 \u0432 \u0441\u0432\u043e\u0451\u043c \u0444\u0430\u0439\u043b\u0435. \u042d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u043e\u0438\u043d\u0442\u043e\u0432, \u043c\u043e\u0436\u043d\u043e async:<\/p>\n<pre><code class=\"typescript\">\/\/ modules\/idea-content.tsximport { markdownToHtml } from 'heavy-markdown-lib' \/\/ \u0442\u044f\u0436\u0451\u043b\u0430\u044f \u043b\u0438\u0431\u0430export const IdeaContent = async ({ markdown }: { markdown: string }) =&gt; {  const html = await markdownToHtml(markdown)  return &lt;article dangerouslySetInnerHTML={{ __html: html }} \/&gt;}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u0437 \u043d\u0438\u0445 \u043e\u0442\u0432\u0435\u0442:<\/p>\n<pre><code class=\"typescript\">\/\/ pages\/idea-view.tsximport { root } from '@\/lib\/root'import { prisma } from '@\/lib\/prisma'import { IdeaContent } from '@\/modules\/idea-content'import { IdeaLikeButton } from '@\/modules\/idea-like'export const ideaPage = root.lets  .page('\/ideas\/:id')  .loader(async ({ params }) =&gt; {    const idea = await prisma.idea.findUniqueOrThrow({      where: { id: params.id },    })    return {      title: idea.title, \/\/ \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430      content: &lt;IdeaContent markdown={idea.content} \/&gt;, \/\/ \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442      like: &lt;IdeaLikeButton id={idea.id} likes={idea.likes} \/&gt;, \/\/ \u043e\u0441\u0442\u0440\u043e\u0432    }  })  .page(({ data }) =&gt; (    &lt;main&gt;      &lt;h1&gt;{data.title}&lt;\/h1&gt;      {data.content}      {data.like}    &lt;\/main&gt;  ))<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432 <code>.page()<\/code> \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 <code>data<\/code> \u043f\u043e \u043c\u0435\u0441\u0442\u0430\u043c \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0430\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b. \u0410 \u0432\u043e\u0442 \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u0435\u0445\u0430\u043b\u043e \u0434\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435:<\/p>\n<pre><code>{  \"title\": \"\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043d\u0430 Bun\",  \/\/ \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0443\u0436\u0435 \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043b\u0441\u044f \u2014 \u0435\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430  \"content\": {    \"__p0e\": {      \"t\": \"article\",      \"p\": { \"dangerouslySetInnerHTML\": { \"__html\": \"&lt;p&gt;\u2026&lt;\/p&gt;\" } }    }  },  \/\/ \u043e\u0441\u0442\u0440\u043e\u0432 \u0435\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442-\u043f\u043e\u0438\u043d\u0442 \u0438 \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0440\u043e\u043f\u0441\u0430\u043c\u0438  \"like\": {    \"__p0e\": { \"t\": { \"c\": \"IdeaLikeButton\" }, \"p\": { \"id\": \"42\", \"likes\": 7 } }  }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><code>IdeaContent<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043b\u043e\u0430\u0434\u0435\u0440\u0430 \u2014 \u0437\u043d\u0430\u0447\u0438\u0442 \u0435\u0433\u043e \u0438\u043c\u043f\u043e\u0440\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u0437 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u0431\u0430\u043d\u0434\u043b\u0430 \u0432\u044b\u0440\u0435\u0436\u0435\u0442, \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0438\u043c \u0443\u0435\u0434\u0435\u0442 \u0438 <code>heavy-markdown-lib<\/code>. \u0410 <code>IdeaLikeButton<\/code> \u043b\u0435\u0436\u0438\u0442 \u0432 \u0441\u0432\u043e\u0451\u043c \u0444\u0430\u0439\u043b\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0431\u0430\u043d\u0434\u043b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442: \u0435\u0433\u043e \u0447\u0430\u043d\u043a \u0441\u043a\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043f\u0440\u0438\u0434\u0451\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043d\u0435\u0433\u043e.<\/p>\n<p>\u041d\u0438\u043a\u0430\u043a\u0438\u0445 <code>'use client'<\/code>, \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430: \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0435\u0437\u0434\u0435, \u0433\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0432 \u043c\u0443\u0442\u0430\u0446\u0438\u044f\u0445 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u043a\u0443\u0441\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430:<\/p>\n<pre><code class=\"typescript\">export const commentAddMutation = root.lets  .mutation()  .input(z.object({ ideaId: z.string(), text: z.string().min(1) }))  .loader(async ({ input }) =&gt; {    const comment = await prisma.comment.create({ data: input })    return { comment: &lt;Comment comment={comment} \/&gt; }  })  .mutation()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"typescript\">const mutation = commentAddMutation.useMutation()\/\/ mutation.data.comment \u2014 \u0436\u0438\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043c \u043a\u0430\u043a \u0435\u0441\u0442\u044creturn &lt;section id=\"comments\"&gt;{mutation.data?.comment}&lt;\/section&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0415\u0441\u0442\u044c \u0435\u0449\u0451 <code>defer<\/code>, \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0445 \u043a\u0443\u0441\u043a\u043e\u0432 \u0432 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0442\u0432\u0435\u0442, \u043f\u0440\u043e\u043c\u0438\u0441\u044b \u0432 \u043f\u0440\u043e\u043f\u0441\u0430\u0445 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432. \u041d\u043e \u044d\u0442\u043e \u0432\u0441\u0451 \u0442\u0435\u043c\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u043d\u043e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c <a href=\"https:\/\/1gr14.dev\/point0\/latest\/rsc\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 RSC \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<h2>\u0427\u0435\u0433\u043e \u0432 Point0 \u043f\u043e\u043a\u0430 \u043d\u0435\u0442<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0447\u0435\u0441\u0442\u043d\u044b\u043c:<\/p>\n<ul>\n<li>\n<p><strong>\u0421\u0430\u0431\u0441\u043a\u0440\u0438\u043f\u0448\u0435\u043d\u043e\u0432.<\/strong> \u0423 tRPC \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 SSE \u0438 WebSocket. \u0412 Point0 \u0440\u0435\u0430\u043b\u0442\u0430\u0439\u043c-\u043f\u043e\u0438\u043d\u0442\u044b \u0432 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u043d\u043e \u0435\u0449\u0451 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u0411\u0430\u0442\u0447\u0438\u043d\u0433\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/strong> <code>httpBatchLink<\/code> \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0432\u0435\u0440\u0435\u0439 \u0432 \u043e\u0434\u0438\u043d HTTP-\u0437\u0430\u043f\u0440\u043e\u0441. \u0411\u0430\u0442\u0447\u0438\u043d\u0433 \u0432 \u043f\u043b\u0430\u043d\u0430\u0445, \u043f\u0440\u043e\u0441\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0443\u0441\u043f\u0435\u043b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0447\u0443\u0436\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/strong> \u0422\u0438\u043f <code>AppRouter<\/code> \u0438\u0437 tRPC \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442. \u041f\u043e\u0438\u043d\u0442\u044b Point0 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0432\u043e\u0435\u0439 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b, \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e: \u0441\u0430\u0439\u0442, \u0430\u0434\u043c\u0438\u043d\u043a\u0430, Expo-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0432\u043e\u0439 \u0431\u0430\u043d\u0434\u043b. \u0410 \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f OpenAPI-\u0441\u043f\u0435\u043a\u0430. \u041d\u043e \u0438 Point0 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0444\u0443\u043b\u0441\u0442\u0435\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0435\u0441\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u0441\u0430\u043c\u0438 \u0441\u0435\u0431\u0435 \u0438 \u043d\u0430\u043f\u0438\u0448\u0443\u0442, \u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0435\u0433\u043e \u0440\u0430\u0437\u0432\u043e\u0437\u0438\u0442\u044c \u043f\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0432 Point0 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u044d\u0442\u043e \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0418 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u044d\u0442\u043e \u0446\u0435\u043b\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a<\/h2>\n<p>\u0412\u0441\u0451 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0432\u044b\u0448\u0435 \u043d\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u043f\u0440\u0438\u043a\u0440\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043a Next. \u042d\u0442\u043e \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u0437 \u0442\u0435\u0445 \u0436\u0435 \u043f\u043e\u0438\u043d\u0442\u043e\u0432 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0451: \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u043b\u044d\u0439\u0430\u0443\u0442\u044b \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043b\u043e\u0430\u0434\u0435\u0440\u0430\u043c\u0438, \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b, \u0440\u043e\u0443\u0442\u0435\u0440 \u0441 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439, head, SSR, RSC, MDX, \u0430\u0441\u0441\u0435\u0442\u044b, env-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, OpenAPI, MCP-\u0441\u0435\u0440\u0432\u0435\u0440\u044b \u0434\u043b\u044f \u0430\u0433\u0435\u043d\u0442\u043e\u0432, \u0441\u0431\u043e\u0440\u043a\u0430.<\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0432\u0435\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u044e \u043a \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\n<\/th>\n<th>\n<p align=\"left\">tRPC<\/p>\n<\/th>\n<th>\n<p align=\"left\">Point0<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c<\/p>\n<\/td>\n<td>\n<p align=\"left\">react-query<\/p>\n<\/td>\n<td>\n<p align=\"left\">react-query<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0421\u0445\u0435\u043c\u044b<\/p>\n<\/td>\n<td>\n<p align=\"left\">zod \u0438 \u0434\u0440\u0443\u0433\u0438\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">zod \u0438 \u0434\u0440\u0443\u0433\u0438\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0418\u043d\u0434\u0435\u043a\u0441 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>appRouter<\/code> \u0440\u0443\u043a\u0430\u043c\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440, \u0441\u0430\u043c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0422\u0438\u043f\u044b \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0442\u0438\u043f \u0432\u0441\u0435\u0433\u043e \u0440\u043e\u0443\u0442\u0435\u0440\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0442\u0438\u043f \u043e\u0434\u043d\u043e\u0439 \u043a\u0432\u0435\u0440\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0421\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u0440\u044f\u0434\u043e\u043c \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u043c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u043b\u044c\u0437\u044f, \u0440\u0430\u0437\u043d\u043e\u0441\u0438\u0442\u044c \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043c\u043e\u0436\u043d\u043e, \u0440\u0435\u0436\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041a\u0432\u0435\u0440\u0438 \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 + SSR-\u0433\u0438\u0434\u0440\u0430\u0446\u0438\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043e\u0431\u0432\u044f\u0437\u043a\u0430 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0424\u0430\u0439\u043b \u0432 \u043c\u0443\u0442\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">FormData \u0431\u0435\u0437 \u0442\u0438\u043f\u043e\u0432<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 <code>z.file()<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0423\u0440\u043b\u044b<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043e\u0434\u0438\u043d \u043c\u0430\u0443\u043d\u0442, \u0438\u043d\u043f\u0443\u0442 \u0432 query string<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0443\u0440\u043b \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0438\u043d\u0442\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438 \u043f\u0443\u0442\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0432\u044b\u0445\u043e\u0434 \u0438\u0437 tRPC<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u044d\u043a\u0448\u0435\u043d, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043a\u0432\u0435\u0440\u0438\/\u043c\u0443\u0442\u0430\u0446\u0438\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043e\u0442\u0432\u0435\u0442\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u043e\u0441\u0442\u0440\u043e\u0432\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0411\u0430\u0442\u0447\u0438\u043d\u0433<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0432 \u043f\u043b\u0430\u043d\u0430\u0445<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0421\u0430\u0431\u0441\u043a\u0440\u0438\u043f\u0448\u0435\u043d\u044b<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0432 \u043f\u043b\u0430\u043d\u0430\u0445<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0432\u043e\u043a\u0440\u0443\u0433<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0443\u0436\u0435\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u044d\u0442\u043e \u043e\u043d \u0438 \u0435\u0441\u0442\u044c<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f tRPC, \u0442\u043e \u043f\u043e \u0434\u0443\u0445\u0443 \u0437\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u0440\u043e\u0434\u043d\u043e\u0435: \u0442\u0430 \u0436\u0435 react-query, \u0442\u0435 \u0436\u0435 \u0441\u0445\u0435\u043c\u044b, \u0442\u0435 \u0436\u0435 \u0441\u043a\u0432\u043e\u0437\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0431\u0435\u0437 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438. \u041f\u0440\u043e\u0441\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u043d \u043d\u0435 \u0441\u043b\u043e\u0439 API \u043f\u043e\u0432\u0435\u0440\u0445 \u0447\u0443\u0436\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0446\u0435\u043b\u0438\u043a\u043e\u043c.<\/p>\n<h2>P.S.<\/h2>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u0447\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b\u0438. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0442\u0435 \u043c\u0435\u043d\u044f, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0437\u0432\u0435\u0437\u0434\u0443 \u043d\u0430 <a href=\"https:\/\/github.com\/1gr14\/point0\" rel=\"noopener noreferrer nofollow\">\u0433\u0438\u0442\u0445\u0430\u0431\u0435<\/a><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0439\u0442\u0435 \u0441 \u0442\u0440\u0435\u0434\u043e\u043c \u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432 Twitter (X): <a href=\"https:\/\/x.com\/s_1gr14\/status\/2077297754171187628?s=20\" rel=\"noopener noreferrer nofollow\">https:\/\/x.com\/s_1gr14\/status\/2077297754171187628?s=20<\/a><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043b\u0430\u0439\u043a\u0430\u0439\u0442\u0435 \u0432\u0438\u0434\u0435\u043e \u0438 \u043f\u043e\u0434\u043f\u0438\u0448\u0438\u0442\u0435\u0441\u044c \u043d\u0430 \u043a\u0430\u043d\u0430\u043b \u0432 Youtube: <a href=\"https:\/\/www.youtube.com\/watch?v=0CT9vBzywyg\" rel=\"noopener noreferrer nofollow\">https:\/\/www.youtube.com\/watch?v=0CT9vBzywyg<\/a><\/p>\n<\/li>\n<li>\n<p>\u0412\u0441\u0442\u0443\u043f\u0430\u0439\u0442\u0435 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e. \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u2014 <a href=\"https:\/\/t.me\/s_1gr14\" rel=\"noopener noreferrer nofollow\">\u043a\u0430\u043d\u0430\u043b<\/a> \u0438 <a href=\"https:\/\/t.me\/s_1gr14_chat\" rel=\"noopener noreferrer nofollow\">\u0447\u0430\u0442<\/a> (\u0440\u0443\u0441\u0441\u043a\u0438\u0439), \u0434\u0438\u0441\u043a\u043e\u0440\u0434 \u2014 <a href=\"https:\/\/discord.gg\/hWgtn58FVv\" rel=\"noopener noreferrer nofollow\">\u0441\u0435\u0440\u0432\u0435\u0440<\/a> (\u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439). \u041e\u0442\u0432\u0435\u0447\u0430\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f: <a href=\"https:\/\/1gr14.dev\/point0\" rel=\"noopener noreferrer nofollow\">https:\/\/1gr14.dev\/point0<\/a>, \u043f\u043e\u043b\u043d\u044b\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u2014 <a href=\"https:\/\/habr.com\/ru\/articles\/1054310\/\" rel=\"noopener noreferrer nofollow\">\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e!<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1059310\/\">https:\/\/habr.com\/ru\/articles\/1059310\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0425\u043e\u0447\u0443 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Point0 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 tRPC. \u0414\u0435\u043b\u0430\u044e \u044d\u0442\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u0432\u0435\u0440\u0438 \u0438 \u043c\u0443\u0442\u0430\u0446\u0438\u0438 \u0432 Point0 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0438 \u043f\u043e DX \u043d\u0430 tRPC, \u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b \u0432\u0432\u0438\u0434\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u0441\u0451 \u0436\u0435 Point0 \u044d\u0442\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0438 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442:\u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u043a\u0432\u0435\u0440\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u0430\u0445, \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0438\u0434\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0435\u0433\u0438\u0434\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0432\u0435\u0440\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 SSR\u0412 \u043c\u0443\u0442\u0430\u0446\u0438\u044f\u0445 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 FormData \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0418\u043c\u0435\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0440\u043b\u044b \u0434\u043b\u044f \u043a\u0432\u0435\u0440\u0438 \u0438 \u043c\u0443\u0442\u0430\u0446\u0438\u0439\u041d\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0432 \u043e\u0442\u0432\u0435\u0442\u0430\u0445 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u0446\u0435\u043b\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043e\u0441\u0442\u0440\u043e\u0432\u0430\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0432\u0438\u0434\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u0438 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, Point0 \u043c\u043e\u0436\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0435\u0449\u0451, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445. \u0421\u0435\u0439\u0447\u0430\u0441 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 tRPC. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0441 tRPC \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043d\u0435\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b, \u043d\u043e \u043d\u0438\u0436\u0435 \u044f \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0443 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 tRPC, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0432\u0438\u0434\u0438\u043c\u044b\u043c\u0438.\u0421\u043f\u0440\u0430\u0432\u043a\u0430\u0412\u0438\u0434\u0435\u043e \u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430 Youtube: https:\/\/www.youtube.com\/watch?v=0CT9vBzywyg\u0412\u0438\u0434\u0435\u043e \u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430 \u0412\u041a-\u0432\u0438\u0434\u0435\u043e: https:\/\/vkvideo.ru\/video-227165132_456239212?pl=-227165132_5\u0413\u0438\u0442\u0445\u0430\u0431 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430: https:\/\/github.com\/1gr14\/point0\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f: https:\/\/1gr14.dev\/point0\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0441 \u0440\u0430\u0437\u0431\u043e\u0440\u043e\u043c \u0432\u0441\u0435\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435: Point0 \u2014 \u0444\u0443\u043b\u0441\u0442\u0435\u043a TypeScript-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043d\u0430 Bun \u0438 React, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u043c\u0435\u0447\u0442\u0430\u043b\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438 \u043f\u0440\u043e\u0442\u0438\u0432 Next.js \u0438 TanStack Start (\u0447\u0443\u0442\u044c \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0438, \u043d\u043e \u043f\u0440\u0430\u0432\u0434\u0438\u0432\u044b\u0435): https:\/\/github.com\/1gr14\/point0-benchmarks\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0443 \u043e\u0434\u043d\u0438\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0434\u043b\u044f \u0418\u0418-\u0430\u0433\u0435\u043d\u0442\u0430: https:\/\/1gr14.dev\/llms.txt \u2014 \u0441\u043a\u043e\u0440\u043c\u0438\u0442\u0435 \u0430\u0433\u0435\u043d\u0442\u0443, \u0438 \u043e\u043d \u043e\u0442\u0432\u0435\u0442\u0438\u0442 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0443\u042f \u2014 \u0430\u0432\u0442\u043e\u0440 Point0, \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0445\u0430\u0431\u0440\u0430\u041a\u0432\u0435\u0440\u0438 \u0432 tRPC\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0438: \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e id. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 tRPC. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430:\/\/ server\/routers\/idea.tsimport { z } from &#8216;zod&#8217;import { publicProcedure, router } from &#8216;..\/trpc&#8217;import { prisma } from &#8216;..\/prisma&#8217;export const ideaRouter = router({  view: publicProcedure    .input(z.object({ id: z.string() }))    .query(async ({ input }) =&gt; {      const idea = await prisma.idea.findUniqueOrThrow({        where: { id: input.id },      })      return { idea }    }),  \/\/ \u041a\u0430\u0436\u0434\u044b\u0439 \u043d\u043e\u0432\u044b\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u044e\u0434\u0430})\u041f\u043e\u0442\u043e\u043c \u0435\u0451 \u043d\u0430\u0434\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0431\u0449\u0435\u043c \u0440\u043e\u0443\u0442\u0435\u0440\u0435 \u2014 \u0440\u0443\u043a\u0430\u043c\u0438:\/\/ server\/routers\/_app.tsimport { router } from &#8216;..\/trpc&#8217;import { ideaRouter } from &#8216;.\/idea&#8217;export const appRouter = router({  idea: ideaRouter,   \/\/ \u043a\u0430\u0436\u0434\u044b\u0439 \u043d\u043e\u0432\u044b\u0439 \u0440\u043e\u0443\u0442\u0435\u0440 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u044e\u0434\u0430})export type AppRouter = typeof appRouter\u041f\u043e\u0442\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0445\u0443\u043a\u0438, \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u043e\u043c \u0432\u0441\u0435\u0433\u043e \u0440\u043e\u0443\u0442\u0435\u0440\u0430:\/\/ utils\/trpc.tsimport { createTRPCReact } from &#8216;@trpc\/react-query&#8217;import type { AppRouter } from &#8216;..\/server\/routers\/_app&#8217;export const trpc = createTRPCReact&lt;AppRouter&gt;()\u0418 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:\/\/ client\/components\/idea.tsximport { trpc } from &#8216;@\/utils\/trpc&#8217;export const IdeaView = ({ id }: { id: string }) =&gt; {  const result = trpc.idea.view.useQuery({ id })  if (result.isLoading) return &lt;div&gt;\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430&#8230;&lt;\/div&gt;  if (result.error) return &lt;div&gt;{result.error.message}&lt;\/div&gt;  return &lt;h1&gt;{result.data.idea.title}&lt;\/h1&gt;}\u041a\u0432\u0435\u0440\u0438 \u0432 Point0\u0422\u0435\u043f\u0435\u0440\u044c Point0. \u041a\u0432\u0435\u0440\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u2014 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c:\/\/ modules\/idea.tsximport { root } from &#8216;@\/lib\/root&#8217;import { prisma } from &#8216;@\/lib\/prisma&#8217;import * as z from &#8216;zod&#8217;export const ideaViewQuery = root.lets  .query()  \/\/ \u0438\u043b\u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441: root.lets(&#8216;query&#8217;, &#8216;ideaView&#8217;)  \/\/ \u0432 Point0 \u0432\u0441\u0435 \u043f\u043e\u0438\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043b\u0438\u0431\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0439, \u043b\u0438\u0431\u043e \u0434\u043b\u0438\u043d\u043d\u043e\u0439 \u043d\u043e\u0442\u0430\u0446\u0438\u0435\u0439  .input(z.object({ id: z.string() })) \/\/ \u0441\u0445\u0435\u043c\u0430 \u043b\u044e\u0431\u043e\u0439 \u043b\u0438\u0431\u043e\u0439: zod, valibot, typebox, &#8230;  .loader(async ({ input }) =&gt; {    const idea = await prisma.idea.findUniqueOrThrow({      where: { id: input.id },    })    return { idea }  })  .query() \/\/ \u0441\u044e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u0438 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e useQuery\/fetchQuery\u0418 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u2014 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0430 \u043a\u0432\u0435\u0440\u0438, \u0430 \u043d\u0435 \u0445\u0443\u043a-\u043f\u0440\u043e\u043a\u0441\u0438. \u041f\u0440\u0438\u0447\u0451\u043c \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0430 \u043f\u0440\u044f\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043c \u0436\u0435, \u0433\u0434\u0435 \u0438 \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438, \u0440\u044f\u0434\u043e\u043c \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\u0439\/\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c.\/\/ modules\/idea.tsxexport const IdeaView = ({ id }: { id: string }) =&gt; {  const result = ideaViewQuery.useQuery({ id })  if (result.isLoading) return &lt;div&gt;\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430&#8230;&lt;\/div&gt;  if (result.error) return &lt;div&gt;{result.error.message}&lt;\/div&gt;  return &lt;h1&gt;{result.data.idea.title}&lt;\/h1&gt;}result \u2014 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 useQuery \u0438\u0437 react-query, \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0431\u0451\u0440\u043d\u0443\u0442\u043e\u0433\u043e. \u0412\u0441\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b react-query \u0436\u0438\u0432\u0443\u0442 \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u043a\u0432\u0435\u0440\u0438:ideaViewQuery.useQuery({ id })ideaViewQuery.fetchQuery({ id })ideaViewQuery.prefetchQuery({ id })ideaViewQuery.invalidateQuery({ id })ideaViewQuery.setQueryData({ id }, &#8230;)ideaViewQuery.getQueryKey({ id })\/\/ \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \u2014 \u0432\u0435\u0441\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440\u041f\u0435\u0440\u0432\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0432\u0435\u0437\u0434\u0435 \u0438\u0434\u0451\u0442 \u0438\u043d\u043f\u0443\u0442 \u2014 \u0438\u0437 \u043d\u0435\u0433\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 queryKey. \u0415\u0441\u043b\u0438 \u0438\u043d\u043f\u0443\u0442 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u043e\u0432\u0441\u0435.\u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0443\u0436\u0435 \u0432\u0438\u0434\u043d\u0430: \u043d\u0435\u0442 \u0444\u0430\u0439\u043b\u0430 \u0441 \u0440\u043e\u0443\u0442\u0435\u0440\u043e\u043c, \u043d\u0435\u0442 AppRouter, \u043d\u0435\u0442 utils\/trpc.ts. \u041e\u0431\u044a\u044f\u0432\u0438\u043b, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b, \u0432\u044b\u0437\u0432\u0430\u043b. \u041a\u0443\u0434\u0430 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0435\u043b\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0435 \u0443\u0442\u0451\u043a \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442, \u0431\u0443\u0434\u0435\u0442 \u0432 \u0434\u0432\u0443\u0445 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 \u043d\u0438\u0436\u0435.\u041c\u0443\u0442\u0430\u0446\u0438\u0438 \u0432 tRPC\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0432 \u0440\u043e\u0443\u0442\u0435\u0440\u0435, \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 useMutation:\/\/ server\/routers\/idea.tsexport const ideaRouter = router({  \/\/ &#8230;  update: publicProcedure    .input(      z.object({        id: z.string(),        title: z.string().min(1),        content: z.string().min(1),      }),    )    .mutation(async ({ input }) =&gt; {      const idea = await prisma.idea.update({        where: { id: input.id },        data: { title: input.title, content: input.content },      })      return { idea }    }),  \/\/ &#8230;})\/\/ client\/components\/idea.tsximport { trpc } from &#8216;@\/utils\/trpc&#8217;export const IdeaEditForm = ({ idea }: { idea: Idea }) =&gt; {  const utils = trpc.useUtils()  const mutation = trpc.idea.update.useMutation({    onSuccess: ({ idea }) =&gt; {      utils.idea.view.setData({ id: idea.id }, { idea })    },  })  \/\/ &#8230;}\u041c\u0443\u0442\u0430\u0446\u0438\u0438 \u0432 Point0Point0 \u2014 \u0442\u0430 \u0436\u0435 \u0441\u0445\u0435\u043c\u0430, \u0442\u043e\u0442 \u0436\u0435 \u043b\u043e\u0430\u0434\u0435\u0440, \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0438\u043d\u0442, \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0439 \u0438 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0438 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430.\/\/ modules\/idea.tsximport { root } from &#8216;@\/lib\/root&#8217;import { prisma } from &#8216;@\/lib\/prisma&#8217;import { ideaViewQuery } from &#8216;@\/modules\/idea&#8217;import { navigate } from &#8216;@\/lib\/navigation&#8217;import * as z from &#8216;zod&#8217;export const ideaUpdateMutation = root.lets  .mutation()  .input(    z.object({      id: z.string(),      title: z.string().min(1),      content: z.string().min(1),    }),  )  .loader(async ({ input }) =&gt; {    const idea = await prisma.idea.update({      where: { id: input.id },      data: { title: input.title, content: input.content },    })    return { idea }  })  .mutation({    onSuccess: ({ idea }) =&gt; {      ideaViewQuery.setQueryData({ id: idea.id }, { idea })    },  })export const IdeaEditForm = ({ idea }: { idea: Idea }) =&gt; {  const mutation = ideaUpdateMutation.useMutation()  return (    &lt;form      onSubmit={async (e) =&gt; {        e.preventDefault()        const form = new FormData(e.currentTarget)        await mutation.mutateAsync({          id: idea.id,          title: String(form.get(&#8216;title&#8217;)),          content: String(form.get(&#8216;content&#8217;)),        })        await navigate(&#8216;ideaView&#8217;, { id: idea.id })      }}    &gt;      &lt;input name=&#187;title&#187; defaultValue={idea.title} \/&gt;      &lt;textarea name=&#187;content&#187; defaultValue={idea.content} \/&gt;      &lt;button disabled={mutation.isPending}&gt;\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c&lt;\/button&gt;    &lt;\/form&gt;  )}\u041c\u0435\u0442\u043e\u0434\u044b \u0432\u0440\u043e\u0434\u0435 ideaViewQuery.setQueryData() \u0438 invalidateQuery() \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0433\u0434\u0435 \u0443\u0433\u043e\u0434\u043d\u043e \u2014 \u0432 \u043c\u0443\u0442\u0430\u0446\u0438\u0438, \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435, \u0432\u043d\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u041a\u0432\u0435\u0440\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0432 Point0 \u043e\u0431\u0449\u0438\u0439 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 (\u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u0432\u043e\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0435 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043b\u0438\u0441\u044c).\u0418\u043d\u0444\u0438\u043d\u0438\u0442\u0438 \u043a\u0432\u0435\u0440\u0438 \u0432 tRPC\u0412 tRPC \u0443 \u0438\u043d\u0444\u0438\u043d\u0438\u0442\u0438 \u043a\u0432\u0435\u0440\u0438 \u0435\u0441\u0442\u044c \u0436\u0451\u0441\u0442\u043a\u043e\u0435 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435: \u043f\u043e\u043b\u0435 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u0432 \u0438\u043d\u043f\u0443\u0442\u0435 \u043e\u0431\u044f\u0437\u0430\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f cursor, \u0438\u043d\u0430\u0447\u0435 useInfiniteQuery \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f:\/\/ server\/routers\/idea.tsexport const ideaRouter = router({  \/\/ &#8230;  list: publicProcedure    .input(      z.object({        cursor: z.number().default(0),        limit: z.number().default(10),      }),    )    .query(async ({ input: { cursor, limit } }) =&gt; {      const ideasCount = await prisma.idea.count()      const ideas = await prisma.idea.findMany({        take: limit,        skip: cursor * limit,        orderBy: { updatedAt: &#8216;desc&#8217; },      })      const nextCursor = ideasCount &gt; (cursor + 1) * limit ? cursor + 1 : undefined      return { ideas, nextCursor }    }),  \/\/ &#8230;})\/\/ client\/components\/idea.tsxconst query = trpc.idea.list.useInfiniteQuery(  { limit: 10 },  { getNextPageParam: (lastPage) =&gt; lastPage.nextCursor },)\u0418\u043d\u0444\u0438\u043d\u0438\u0442\u0438 \u043a\u0432\u0435\u0440\u0438 \u0432 Point0\u0412 Point0 \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043a\u043b\u044e\u0447 \u0438\u043d\u043f\u0443\u0442\u0430, \u043d\u0430 \u043d\u0435\u0433\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 pageParamFromInput:\/\/ modules\/idea.tsxexport const ideaListQuery = root.lets  .infiniteQuery()  .input(    z.object({      page: z.number().default(0),      limit: z.number().default(10),    }),  )  .loader(async ({ input: { page, limit } }) =&gt; {    const ideasCount = await prisma.idea.count()    const ideas = await prisma.idea.findMany({      take: limit,      skip: page * limit,      orderBy: { updatedAt: &#8216;desc&#8217; },    })    const nextCursor = ideasCount &gt; (page + 1) * limit ? page + 1 : undefined    return { ideas, ideasCount, nextCursor }  })  .infiniteQuery({    \/\/ \u0441\u044e\u0434\u0430 \u0438\u0434\u0443\u0442 \u043b\u044e\u0431\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u043e\u0434\u043d\u043e\u0433\u043e useInfiniteQuery,    \/\/ \u043f\u043b\u044e\u0441 \u043d\u0430\u0448 pageParamFromInput \u2014 \u043a\u043b\u044e\u0447 \u0432 \u0438\u043d\u043f\u0443\u0442\u0435     \/\/ (\u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043f\u043e \u0442\u0438\u043f\u0443 some.thing.deep),    \/\/ \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0433\u0440\u0430\u0435\u0442 \u0440\u043e\u043b\u044c pageParam    pageParamFromInput: &#8216;page&#8217;,    getNextPageParam: (lastPage) =&gt; lastPage.nextCursor,    initialPageParam: 0,  })\u0414\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 useInfiniteQuery \u0438\u0437 react-query \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0435\u0433\u043e fetchNextPage, hasNextPage, isFetchingNextPage:const query = ideaListQuery.useInfiniteQuery({ limit: 10 })const ideas = query.data?.pages.flatMap((page) =&gt; page.ideas) ?? []\u041a\u0443\u0434\u0430 \u0434\u0435\u043b\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0412 tRPC \u0438\u043d\u0434\u0435\u043a\u0441 \u2014 \u044d\u0442\u043e appRouter. \u041e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0440\u0443\u043a\u0430\u043c\u0438 \u0438 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-487347","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/487347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=487347"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/487347\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=487347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=487347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=487347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}