[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"landing-site-settings:localized-content-set-v4":3,"landing-page-seo:\u002Fdocs:localized-content-set-v3":32,"landing-docs-nodes-menu-navigation:en:v1":51,"landing-navigation-items:localized-content-set-v4":1545,"landing-footer-link-groups:localized-content-set-v3":1620,"landing-docs-node-detail-page:server-context-reference:localized-content-set-v5":1787},[4],{"siteUrl":5,"githubUrl":6,"enfyraVersion":7,"contentSet":8},"https:\u002F\u002Fenfyra.io","https:\u002F\u002Fgithub.com\u002Fenfyra\u002Fenfyra","2.2.20",{"id":9,"contents":10},56,[11],{"languageCode":12,"values":13,"isActive":30,"id":31},"en",{"siteName":14,"logoText":14,"description":15,"copyrightText":16,"navMenuTitle":17,"navMenuDescription":18,"docsSearchButtonLabel":19,"docsSidebarToggleLabel":20,"docsSearchTitle":19,"docsSearchDescription":21,"docsSearchPlaceholder":22,"docsSearchEmptyText":23,"docsSearchNoResultsText":24,"docsSearchFooterHint":25,"copyCommandLabel":26,"copiedCommandLabel":27,"backToTopLabel":28,"themeMenuLabel":29},"Enfyra","Live metadata backend platform for APIs, permissions, hooks, workflows, realtime behavior, and admin tools on Enfyra Cloud or your own infrastructure.","© 2026 Enfyra. Licensed under Elastic License 2.0.","Navigation","Primary Enfyra navigation","Search documentation","Toggle documentation navigation","Search docs by title, summary, slug, and body content.","Search docs...","Type to search every cached documentation page.","No matching docs found.","↑↓ Enter Esc","Copy command","Copied command","Back to top","Theme menu",true,524,[33],{"path":34,"changefreq":35,"priority":36,"ogImage":37,"contentSet":38},"\u002Fdocs","weekly","0.9",null,{"id":39,"contents":40},323,[41],{"languageCode":12,"values":42,"isActive":30,"id":50},{"title":43,"description":44,"keywords":45,"structuredData":37},"Documentation - Enfyra","Complete documentation for Enfyra, including generated REST APIs, metadata modeling, permissions, admin UI, and runtime extension systems.",[14,46,47,48,49],"Documentation","API","Framework","Full-stack",509,[52,68,83,93,108,123,138,153,168,183,198,213,228,241,254,269,282,295,310,323,338,353,366,380,392,405,418,431,444,457,470,483,495,508,521,534,547,561,575,586,599,612,625,638,647,660,673,686,698,711,724,738,752,763,775,788,801,814,827,837,850,863,877,889,902,915,927,940,953,961,975,986,999,1012,1025,1038,1050,1060,1073,1086,1097,1109,1123,1136,1146,1157,1169,1181,1194,1204,1215,1227,1241,1254,1265,1277,1291,1304,1315,1329,1342,1356,1369,1383,1396,1410,1423,1437,1450,1463,1477,1491,1505,1518,1532],{"id":53,"slug":54,"icon":37,"order":55,"metadata":56,"parent":65},113,"getting-started-installation",0,{"navigation":57},{"en":58,"vi":61},{"slug":54,"summary":59,"title":60},"Enfyra Installation Guide Prerequisites Node.js >= 24.0.0 for manual installation Package manager (npm, yarn, or pnpm) Database server (MySQL, PostgreSQL, or MongoDB — MariaDB works via the mysql:\u002F\u002F protocol) Redis server OR use Docker for a complete all-in-one setup (recommended","Enfyra Installation Guide",{"slug":62,"summary":63,"title":64},"cai-dat","Hướng dẫn cài đặt Enfyra Điều kiện cần có Node.js >= 24.0.0 nếu cài thủ công Trình quản lý package ( npm , yarn hoặc pnpm ) Máy chủ cơ sở dữ liệu (MySQL, PostgreSQL hoặc MongoDB — MariaDB dùng giao thức mysql:\u002F\u002F ) Máy chủ Redis Hoặc dùng Docker để có bộ all-in-one hoàn chỉnh, đượ","Hướng dẫn cài đặt Enfyra",{"id":66,"slug":67},128,"getting-started",{"id":69,"slug":70,"icon":37,"order":55,"metadata":71,"parent":80},115,"server-api-lifecycle",{"navigation":72},{"en":73,"vi":76},{"slug":70,"summary":74,"title":75},"API Lifecycle Understanding how API requests flow through Enfyra helps you build effective hooks and handlers. This guide explains the complete request lifecycle and how the context object flows through each phase. Quick Navigation Request Flow Overview - High-level lifecycle Pha","API Lifecycle",{"slug":77,"summary":78,"title":79},"vong-doi-api","Vòng đời API Hiểu cách request API đi qua Enfyra sẽ giúp bạn xây dựng hook và handler hiệu quả. Hướng dẫn này trình bày trọn vẹn vòng đời request và cách đối tượng context đi qua từng giai đoạn. Điều hướng nhanh Tổng quan luồng request - Toàn cảnh vòng đời Các giai đoạn - Giải th","Vòng đời API",{"id":81,"slug":82},129,"server",{"id":66,"slug":67,"icon":37,"order":55,"metadata":84,"parent":37},{"navigation":85},{"en":86,"vi":89},{"slug":67,"summary":87,"title":88},"Getting Started This section helps you set up Enfyra, sign in for the first time, create data, and verify that the generated API works. If you are new to Enfyra, follow the pages in order. If you already have an instance running, use the quick navigation below to jump directly to","Getting Started",{"slug":90,"summary":91,"title":92},"bat-dau","Bắt đầu Phần này hướng dẫn bạn cài đặt Enfyra, đăng nhập lần đầu, tạo dữ liệu và kiểm tra API sinh tự động. Nếu mới dùng Enfyra, hãy đi theo thứ tự các trang dưới đây. Nếu instance của bạn đã chạy, dùng mục điều hướng nhanh để đến thẳng việc cần làm. Điều hướng nhanh Chuẩn bị Enf","Bắt đầu",{"id":94,"slug":95,"icon":37,"order":55,"metadata":96,"parent":105},153,"server-hooks-handlers-prehooks",{"navigation":97},{"en":98,"vi":101},{"slug":95,"summary":99,"title":100},"Hooks and Handlers - preHooks preHooks execute before the handler. Use them for validation, data transformation, and permission checks. Return early or reject the request A pre-hook may use return to skip only its own remaining code. Its return value is ignored: later pre-hooks a","preHooks",{"slug":102,"summary":103,"title":104},"pre-hook","Hooks và Handler - preHooks preHook chạy trước handler. Dùng chúng để xác thực, biến đổi dữ liệu và kiểm tra quyền. Return sớm hoặc từ chối request Pre-hook có thể dùng return để bỏ qua phần mã còn lại của chính hook đó. Giá trị trả về bị bỏ qua: các pre-hook sau và handler vẫn t","Hooks và Handler - preHooks",{"id":106,"slug":107},137,"server-hooks-handlers",{"id":109,"slug":110,"icon":37,"order":55,"metadata":111,"parent":120},156,"server-repository-methods-find",{"navigation":112},{"en":113,"vi":116},{"slug":110,"summary":114,"title":115},"Find Records Query records from a table with filtering, sorting, pagination, and field selection. Basic Usage \u002F\u002F Find all records (up to default limit of 10) const result = await $ctx.$repos.products.find({}); \u002F\u002F Access the data const products = result.data; \u002F\u002F Array of product r","Find Records",{"slug":117,"summary":118,"title":119},"tim-ban-ghi","Tìm bản ghi Truy vấn bản ghi từ bảng với lọc, sắp xếp, phân trang và chọn trường. Cách dùng cơ bản \u002F\u002F Find all records (up to default limit of 10) const result = await $ctx.$repos.products.find({}); \u002F\u002F Access the data const products = result.data; \u002F\u002F Array of product records Tham","Tìm bản ghi",{"id":121,"slug":122},138,"server-repository-methods",{"id":124,"slug":125,"icon":37,"order":55,"metadata":126,"parent":135},159,"server-context-reference-repositories",{"navigation":127},{"en":128,"vi":131},{"slug":125,"summary":129,"title":130},"Context Reference - Repositories Access database tables through repositories. See Repository Methods for complete details. Accessing Repositories \u002F\u002F Access repository by table name const productsRepo = $ctx.$repos.products; const usersRepo = $ctx.$repos.enfyra_user; \u002F\u002F Access mai","Repositories",{"slug":132,"summary":133,"title":134},"context-repository","Tham chiếu Context - Repository Truy cập các bảng cơ sở dữ liệu qua repository. Xem Phương thức Repository để biết đầy đủ. Truy cập repository \u002F\u002F Access repository by table name const productsRepo = $ctx.$repos.products; const usersRepo = $ctx.$repos.enfyra_user; \u002F\u002F Access main t","Tham chiếu Context - Repository",{"id":136,"slug":137},119,"server-context-reference",{"id":139,"slug":140,"icon":37,"order":55,"metadata":141,"parent":150},176,"app-api-integration",{"navigation":142},{"en":143,"vi":146},{"slug":140,"summary":144,"title":145},"API Integration Enfyra uses a local useApi composable that provides API interactions with enhanced error handling and additional features. The composable is built using $fetch and handles all HTTP requests to the Enfyra Server. From the app's perspective, all API calls go to the ","API Integration",{"slug":147,"summary":148,"title":149},"ung-dung\u002Ftich-hop-api","Tích hợp API Enfyra sử dụng thành phần kết hợp useApi cục bộ cung cấp các tương tác API với khả năng xử lý lỗi nâng cao và các tính năng bổ sung. Thành phần kết hợp được xây dựng bằng cách sử dụng $fetch và xử lý tất cả các yêu cầu HTTP đến Máy chủ Enfyra. Từ góc độ của ứng dụng,","Tích hợp API",{"id":151,"slug":152},164,"app",{"id":154,"slug":155,"icon":37,"order":55,"metadata":156,"parent":165},180,"app-hooks-handlers-hooks",{"navigation":157},{"en":158,"vi":161},{"slug":155,"summary":159,"title":160},"Hooks System Hooks are a powerful feature that allows you to inject custom code at specific points in the API request lifecycle. Instead of creating full Custom Handlers , you can use hooks to modify requests and responses with minimal code. For complete lifecycle understanding, ","Hooks System",{"slug":162,"summary":163,"title":164},"ung-dung\u002Fhook-va-handler\u002Fhook","Hệ thống móc Móc là một tính năng mạnh mẽ cho phép bạn chèn mã tùy chỉnh vào các điểm cụ thể trong vòng đời yêu cầu API. Thay vì tạo Trình xử lý tùy chỉnh đầy đủ, bạn có thể sử dụng móc để sửa đổi yêu cầu và phản hồi với mã tối thiểu. Để hiểu đầy đủ về vòng đời, hãy xem Vòng đời ","Hệ thống móc",{"id":166,"slug":167},177,"app-hooks-handlers",{"id":169,"slug":170,"icon":37,"order":55,"metadata":171,"parent":180},196,"api-reference-overview",{"navigation":172},{"en":173,"vi":176},{"slug":170,"summary":174,"title":175},"API Overview Essential details for calling the Enfyra API from your app. Base URL Format All Enfyra REST API endpoints use: {appUrl}\u002Fapi\u002F{path} Environment appUrl Example Local development http:\u002F\u002Flocalhost:3000 http:\u002F\u002Flocalhost:3000\u002Fapi\u002Fme Production Your deployed app URL https:\u002F","API Overview",{"slug":177,"summary":178,"title":179},"tong-quan-api","Tổng quan API Những điểm cốt lõi để gọi API Enfyra từ ứng dụng của bạn. Định dạng URL gốc Mọi endpoint REST của Enfyra dùng dạng: {appUrl}\u002Fapi\u002F{path} Môi trường appUrl Ví dụ Phát triển cục bộ http:\u002F\u002Flocalhost:3000 http:\u002F\u002Flocalhost:3000\u002Fapi\u002Fme Production URL ứng dụng đã triển khai","Tổng quan API",{"id":181,"slug":182},192,"api-reference",{"id":184,"slug":185,"icon":37,"order":55,"metadata":186,"parent":195},258,"integrations-ssr-frameworks",{"navigation":187},{"en":188,"vi":191},{"slug":185,"summary":189,"title":190},"SSR Frameworks Connect an SSR or CSR app to Enfyra with same-origin REST, OAuth cookies, refresh-token support, and Socket.IO. Frameworks with SDK support — use the SDK instead of manual proxy setup If your app uses one of the frameworks below, start with the corresponding SDK pa","SSR Frameworks",{"slug":192,"summary":193,"title":194},"framework-ssr","Framework SSR Kết nối app SSR hoặc CSR với Enfyra bằng REST cùng origin, OAuth cookie, refresh-token support và Socket.IO. Framework đã có SDK — dùng SDK thay vì tự cấu hình proxy Nếu app của bạn dùng một trong các framework dưới đây, hãy bắt đầu bằng SDK package tương ứng. Nuxt ","Framework SSR",{"id":196,"slug":197},257,"integrations",{"id":199,"slug":200,"icon":37,"order":55,"metadata":201,"parent":210},261,"examples-api-examples",{"navigation":202},{"en":203,"vi":206},{"slug":200,"summary":204,"title":205},"API Examples Small REST examples for generated Enfyra table routes. Replace {appUrl} with your app URL, for example http:\u002F\u002Flocalhost:3000 . Authentication Login curl -X POST \"{appUrl}\u002Fapi\u002Flogin\" \\ -H \"Content-Type: application\u002Fjson\" \\ -d '{\"email\":\"admin@example.com\",\"password\":\"","API Examples",{"slug":207,"summary":208,"title":209},"vi-du\u002Fapi","Ví dụ API Các ví dụ REST ngắn cho table route được Enfyra sinh tự động. Thay {appUrl} bằng URL app của bạn, ví dụ http:\u002F\u002Flocalhost:3000 . Xác thực Đăng nhập curl -X POST \"{appUrl}\u002Fapi\u002Flogin\" \\ -H \"Content-Type: application\u002Fjson\" \\ -d '{\"email\":\"admin@example.com\",\"password\":\"pass","Ví dụ API",{"id":211,"slug":212},256,"examples",{"id":214,"slug":215,"icon":37,"order":55,"metadata":216,"parent":225},270,"examples-crud-apps-todo-app",{"navigation":217},{"en":218,"vi":221},{"slug":215,"summary":219,"title":220},"Todo App This example builds a small task app where each user only sees their own tasks. Tables Create todo_task . Field or relation Type Notes title string Required description text Optional status select open , done , archived dueAt datetime Optional owner many-to-one relation ","Todo App",{"slug":222,"summary":223,"title":224},"vi-du\u002Fung-dung-crud\u002Fung-dung-cong-viec","Ứng dụng công việc Ví dụ này xây dựng một ứng dụng công việc nhỏ, trong đó mỗi người dùng chỉ nhìn thấy công việc của chính họ. Table Tạo todo_task . Field hoặc relation Kiểu Ghi chú title string Bắt buộc description text Không bắt buộc status select open , done , archived dueAt ","Ứng dụng công việc",{"id":226,"slug":227},265,"examples-crud-apps",{"id":229,"slug":230,"icon":37,"order":55,"metadata":231,"parent":240},272,"examples-crud-apps-catalog-orders",{"navigation":232},{"en":233,"vi":236},{"slug":230,"summary":234,"title":235},"Catalog And Orders This example covers a simple store flow: public products, authenticated checkout records, and server-side inventory checks. Tables Create shop_product . Field or relation Type Notes name string Required slug string Unique priceCents integer Required stock integ","Catalog And Orders",{"slug":237,"summary":238,"title":239},"vi-du\u002Fung-dung-crud\u002Fcatalog-va-don-hang","Catalog và đơn hàng Ví dụ này bao quát một luồng cửa hàng đơn giản: sản phẩm công khai, bản ghi checkout của người dùng đã xác thực và kiểm tra tồn kho ở server. Table Tạo shop_product . Field hoặc relation Kiểu Ghi chú name string Bắt buộc slug string Duy nhất priceCents integer","Catalog và đơn hàng",{"id":226,"slug":227},{"id":242,"slug":243,"icon":37,"order":55,"metadata":244,"parent":253},273,"examples-crud-apps-blog-comments",{"navigation":245},{"en":246,"vi":249},{"slug":243,"summary":247,"title":248},"Blog With Comments This example builds public post reads with authenticated comments and an admin moderation path. Tables Create blog_post . Field or relation Type Notes title string Required slug string Unique body rich text or text Required status select draft , published , arc","Blog With Comments",{"slug":250,"summary":251,"title":252},"vi-du\u002Fung-dung-crud\u002Fblog-va-binh-luan","Blog có bình luận Ví dụ này xây dựng luồng đọc bài viết công khai, bình luận của người dùng đã xác thực và đường dẫn kiểm duyệt dành cho quản trị viên. Table Tạo blog_post . Field hoặc relation Kiểu Ghi chú title string Bắt buộc slug string Duy nhất body rich text hoặc text Bắt b","Blog có bình luận",{"id":226,"slug":227},{"id":255,"slug":256,"icon":37,"order":55,"metadata":257,"parent":266},274,"examples-files-realtime-activity-feed",{"navigation":258},{"en":259,"vi":262},{"slug":256,"summary":260,"title":261},"Activity Feed This example records project activity and broadcasts updates to viewers of the same project. Table Create project_activity . Field or relation Type Notes project many-to-one relation to project Required actor many-to-one relation to enfyra_user Required kind string ","Activity Feed",{"slug":263,"summary":264,"title":265},"vi-du\u002Ffile-va-realtime\u002Fdong-hoat-dong","Dòng hoạt động Ví dụ này ghi lại hoạt động của project và broadcast cập nhật đến những người đang xem cùng project. Table Tạo project_activity . Field hoặc relation Kiểu Ghi chú project relation many-to-one tới project Bắt buộc actor relation many-to-one tới enfyra_user Bắt buộc ","Dòng hoạt động",{"id":267,"slug":268},266,"examples-files-realtime",{"id":270,"slug":271,"icon":37,"order":55,"metadata":272,"parent":281},275,"examples-files-realtime-file-attachments",{"navigation":273},{"en":274,"vi":277},{"slug":271,"summary":275,"title":276},"File Attachments This example attaches uploaded files to tasks, tickets, or comments. Tables Create task_attachment . Field or relation Type Notes task many-to-one relation to todo_task Required file many-to-one relation to enfyra_file Required uploadedBy many-to-one relation to ","File Attachments",{"slug":278,"summary":279,"title":280},"vi-du\u002Ffile-va-realtime\u002Ffile-dinh-kem","File đính kèm Ví dụ này gắn file đã tải lên với công việc, ticket hoặc bình luận. Table Tạo task_attachment . Field hoặc relation Kiểu Ghi chú task relation many-to-one tới todo_task Bắt buộc file relation many-to-one tới enfyra_file Bắt buộc uploadedBy relation many-to-one tới e","File đính kèm",{"id":267,"slug":268},{"id":283,"slug":284,"icon":37,"order":55,"metadata":285,"parent":294},277,"examples-files-realtime-avatar-upload",{"navigation":286},{"en":287,"vi":290},{"slug":284,"summary":288,"title":289},"Avatar Upload This example uploads a profile avatar and links it to user_profile . Upload Route Create a custom POST \u002Fprofile\u002Favatar route that accepts multipart uploads. The handler stores the file and updates the current user's profile. if (!@USER?.id) { @THROW401('Authenticati","Avatar Upload",{"slug":291,"summary":292,"title":293},"vi-du\u002Ffile-va-realtime\u002Ftai-avatar","Tải avatar Ví dụ này tải avatar profile lên và liên kết với user_profile . Route tải lên Tạo custom route POST \u002Fprofile\u002Favatar nhận upload multipart. Handler lưu file rồi cập nhật profile của người dùng hiện tại. if (!@USER?.id) { @THROW401('Authentication required'); } if (!@UPL","Tải avatar",{"id":267,"slug":268},{"id":296,"slug":297,"icon":37,"order":55,"metadata":298,"parent":307},278,"examples-auth-permissions-profile-owner-scope",{"navigation":299},{"en":300,"vi":303},{"slug":297,"summary":301,"title":302},"Profile Owner Scope This example lets a logged-in user manage their own profile record. Tables Create user_profile . Field or relation Type Notes user one-to-one relation to enfyra_user Required displayName string Public display name bio text Optional avatar many-to-one relation ","Profile Owner Scope",{"slug":304,"summary":305,"title":306},"vi-du\u002Fxac-thuc-va-phan-quyen\u002Fpham-vi-chu-so-huu-ho-so","Phạm vi chủ sở hữu hồ sơ Ví dụ này cho phép người dùng đã đăng nhập quản lý bản ghi hồ sơ của chính họ. Table Tạo user_profile . Field hoặc relation Kiểu Ghi chú user relation one-to-one với enfyra_user Bắt buộc displayName string Tên hiển thị công khai bio text Không bắt buộc av","Phạm vi chủ sở hữu hồ sơ",{"id":308,"slug":309},267,"examples-auth-permissions",{"id":311,"slug":312,"icon":37,"order":55,"metadata":313,"parent":322},279,"examples-auth-permissions-team-workspace-rls",{"navigation":314},{"en":315,"vi":318},{"slug":312,"summary":316,"title":317},"Team Workspace RLS This example models shared workspaces where a user can see records only when they are a member of the workspace. Tables Create workspace . Field or relation Type Notes name string Required owner many-to-one relation to enfyra_user Required Create workspace_memb","Team Workspace RLS",{"slug":319,"summary":320,"title":321},"vi-du\u002Fxac-thuc-va-phan-quyen\u002Frls-workspace-nhom","RLS cho workspace nhóm Ví dụ này mô hình hóa workspace dùng chung, trong đó người dùng chỉ thấy bản ghi khi là thành viên của workspace đó. Table Tạo workspace . Field hoặc relation Kiểu Ghi chú name string Bắt buộc owner relation many-to-one với enfyra_user Bắt buộc Tạo workspac","RLS cho workspace nhóm",{"id":308,"slug":309},{"id":324,"slug":325,"icon":37,"order":55,"metadata":326,"parent":335},281,"examples-automation-integrations-outbound-sync",{"navigation":327},{"en":328,"vi":331},{"slug":325,"summary":329,"title":330},"Outbound Sync This example sends approved records to another API after they are saved. Settings Table Create sync_settings as a single-record table. Field Type Notes endpointUrl string Destination URL apiKey string isEncrypted=true , isPublished=false Post-Hook Attach this post-h","Outbound Sync",{"slug":332,"summary":333,"title":334},"vi-du\u002Ftu-dong-hoa-va-tich-hop\u002Fdong-bo-ra-ngoai","Đồng bộ ra ngoài Ví dụ này gửi các bản ghi đã được duyệt tới một API khác sau khi chúng được lưu. Table cài đặt Tạo sync_settings dưới dạng table một bản ghi. Field Kiểu Ghi chú endpointUrl string URL đích apiKey string isEncrypted=true , isPublished=false Post-hook Gắn post-hook","Đồng bộ ra ngoài",{"id":336,"slug":337},268,"examples-automation-integrations",{"id":339,"slug":340,"icon":37,"order":55,"metadata":341,"parent":350},285,"examples-admin-operations-operator-queue",{"navigation":342},{"en":343,"vi":346},{"slug":340,"summary":344,"title":345},"Operator Queue This example builds a queue page for records that need human action. Table Create review_case . Field or relation Type Notes title string Required status select open , in_review , resolved priority select low , normal , high assignee many-to-one relation to enfyra_","Operator Queue",{"slug":347,"summary":348,"title":349},"hang-doi-van-hanh","Hàng đợi vận hành Ví dụ này xây dựng trang hàng đợi cho các bản ghi cần người xử lý. Bảng Tạo review_case . Trường hoặc quan hệ Kiểu Ghi chú title string Bắt buộc status select open , in_review , resolved priority select low , normal , high assignee quan hệ many-to-one tới enfyra","Hàng đợi vận hành",{"id":351,"slug":352},269,"examples-admin-operations",{"id":354,"slug":355,"icon":37,"order":55,"metadata":356,"parent":365},287,"examples-admin-operations-moderation-console",{"navigation":357},{"en":358,"vi":361},{"slug":355,"summary":359,"title":360},"Moderation Console This example creates an admin page for pending comments. Menu Create a menu item: Field Value label Moderation path \u002Fmoderation permission {\"or\":[{\"route\":\"\u002Fblog_comment\",\"methods\":[\"GET\"]}]} Page Extension Create a page extension attached to that menu. \u003Ctempla","Moderation Console",{"slug":362,"summary":363,"title":364},"bang-dieu-phoi-kiem-duyet","Bảng điều phối kiểm duyệt Ví dụ này tạo một trang quản trị dành cho các bình luận đang chờ duyệt. Menu Tạo một mục menu: Trường Giá trị label Moderation path \u002Fmoderation permission {\"or\":[{\"route\":\"\u002Fblog_comment\",\"methods\":[\"GET\"]}]} Page Extension Tạo một page extension gắn với ","Bảng điều phối kiểm duyệt",{"id":351,"slug":352},{"id":367,"slug":368,"icon":37,"order":55,"metadata":369,"parent":377},293,"sdk-core-client",{"navigation":370},{"en":371,"vi":375},{"slug":372,"summary":373,"title":374},"sdk\u002Fcore-client","Core Client Use @enfyra\u002Fsdk-core directly in Node.js, edge runtimes, framework-free browser applications, workers, scripts, and integrations that need full control over client creation. Install yarn add @enfyra\u002Fsdk-core Create a Client Each Enfyra instance exposes one URL. Use th","Core Client",{"slug":372,"summary":376,"title":374},"Core Client Dùng @enfyra\u002Fsdk-core trực tiếp trong Node.js, edge runtime, browser app không framework, worker, script và integration cần toàn quyền kiểm soát cách tạo client. Cài đặt yarn add @enfyra\u002Fsdk-core Tạo client Mỗi Enfyra instance expose một URL duy nhất. Dùng chính URL đ",{"id":378,"slug":379},291,"sdk",{"id":381,"slug":382,"icon":37,"order":383,"metadata":384,"parent":391},112,"getting-started-getting-started",1,{"navigation":385},{"en":386,"vi":388},{"slug":382,"summary":387,"title":88},"Getting Started After completing the installation of both Enfyra backend and app, follow these steps to get started. New to Enfyra? Start with the Installation Guide to set up your app + server workspace. First Login Navigate to your Enfyra app (default: http:\u002F\u002Flocalhost:3000 ) Y",{"slug":389,"summary":390,"title":92},"bat-dau\u002Fdang-nhap-lan-dau","Bắt đầu Sau khi cài xong Enfyra backend và app, hãy làm theo các bước sau. Mới dùng Enfyra? Bắt đầu từ Hướng dẫn cài đặt để thiết lập workspace app + server. Đăng nhập lần đầu Mở Enfyra app (mặc định: http:\u002F\u002Flocalhost:3000 ). Bạn được chuyển đến trang login. Dùng tài khoản admin ",{"id":66,"slug":67},{"id":393,"slug":394,"icon":37,"order":383,"metadata":395,"parent":404},136,"server-query-filtering",{"navigation":396},{"en":397,"vi":400},{"slug":394,"summary":398,"title":399},"Query Filtering Enfyra provides MongoDB-like filtering operators for querying data. HTTP \u002F REST: pass the predicate as the filter query parameter (JSON in the query string). Handlers, hooks, flows ( $ctx.$repos.*.find , #table.find , etc.): pass the same predicate as filter in re","Query Filtering",{"slug":401,"summary":402,"title":403},"loc-truy-van","Lọc truy vấn Enfyra hỗ trợ các toán tử lọc theo phong cách MongoDB để truy vấn dữ liệu. HTTP \u002F REST: truyền điều kiện qua tham số truy vấn filter (JSON trong query string). Handler, hook, flow ( $ctx.$repos.*.find , #table.find , v.v.): truyền cùng điều kiện vào filter khi gọi re","Lọc truy vấn",{"id":81,"slug":82},{"id":406,"slug":407,"icon":37,"order":383,"metadata":408,"parent":417},155,"server-hooks-handlers-custom-handlers",{"navigation":409},{"en":410,"vi":413},{"slug":407,"summary":411,"title":412},"Hooks and Handlers - Custom Handlers & Hook Types Custom handlers replace the default CRUD operation with your own business logic. Custom Handlers When to Use Custom Handlers Complex business logic that doesn't fit CRUD Multi-step operations External API integrations Custom valid","Custom Handlers & Hook Types",{"slug":414,"summary":415,"title":416},"handler-tuy-chinh","Hooks và Handler - Handler tùy chỉnh và loại Hook Handler tùy chỉnh thay thế thao tác CRUD mặc định bằng logic nghiệp vụ của bạn. Handler tùy chỉnh Khi nào dùng handler tùy chỉnh Logic nghiệp vụ phức tạp không phù hợp với CRUD Hoạt động nhiều bước Tích hợp API bên ngoài Xác thực ","Hooks và Handler - Handler tùy chỉnh và loại Hook",{"id":106,"slug":107},{"id":419,"slug":420,"icon":37,"order":383,"metadata":421,"parent":430},158,"server-repository-methods-create-update-delete",{"navigation":422},{"en":423,"vi":426},{"slug":420,"summary":424,"title":425},"Create, Update, and Delete Records Create Create a new record in the table. Automatically returns the full created record including ID and timestamps. Basic Usage const result = await $ctx.$repos.products.create({ data: { name: 'New Product', price: 99.99, category: 'electronics'","Create, Update, and Delete Records",{"slug":427,"summary":428,"title":429},"tao-cap-nhat-xoa-ban-ghi","Tạo, cập nhật và xóa bản ghi Tạo Tạo bản ghi mới trong bảng. Phương thức tự trả về bản ghi đã tạo đầy đủ, gồm ID và timestamp. Cách dùng cơ bản const result = await $ctx.$repos.products.create({ data: { name: 'New Product', price: 99.99, category: 'electronics' } }); const newPro","Tạo, cập nhật và xóa bản ghi",{"id":121,"slug":122},{"id":432,"slug":433,"icon":37,"order":383,"metadata":434,"parent":443},160,"server-context-reference-request-data",{"navigation":435},{"en":436,"vi":439},{"slug":433,"summary":437,"title":438},"Context Reference - Request Data Access HTTP request information and parameters. $ctx.$body Request body data ( POST and PATCH requests). \u002F\u002F Access request body const email = $ctx.$body.email; const name = $ctx.$body.name; \u002F\u002F Modify request body (in preHook) $ctx.$body.email = $c","Request Data",{"slug":440,"summary":441,"title":442},"du-lieu-request-context","Tham chiếu Context - Dữ liệu request Truy cập thông tin và tham số của request HTTP. $ctx.$body Dữ liệu body của request ( POST và PATCH ). \u002F\u002F Access request body const email = $ctx.$body.email; const name = $ctx.$body.name; \u002F\u002F Modify request body (in preHook) $ctx.$body.email = ","Tham chiếu Context - Dữ liệu request",{"id":136,"slug":137},{"id":445,"slug":446,"icon":37,"order":383,"metadata":447,"parent":456},175,"app-form-system",{"navigation":448},{"en":449,"vi":452},{"slug":446,"summary":450,"title":451},"Form System Enfyra's form system automatically generates forms from your database schema. Forms are dynamic, validated, and fully integrated with permissions and relations. How Forms Work When you create a table in Enfyra, the system automatically generates forms for creating and","Form System",{"slug":453,"summary":454,"title":455},"ung-dung\u002Fhe-thong-bieu-mau","Hệ thống biểu mẫu Hệ thống biểu mẫu của Enfyra tự động tạo biểu mẫu từ lược đồ cơ sở dữ liệu của bạn. Các biểu mẫu rất năng động, được xác thực và được tích hợp đầy đủ với các quyền và quan hệ. Biểu mẫu hoạt động như thế nào Khi bạn tạo bảng trong Enfyra, hệ thống sẽ tự động tạo ","Hệ thống biểu mẫu",{"id":151,"slug":152},{"id":458,"slug":459,"icon":37,"order":383,"metadata":460,"parent":469},179,"app-hooks-handlers-custom-handlers",{"navigation":461},{"en":462,"vi":465},{"slug":459,"summary":463,"title":464},"Custom Handlers Custom Handlers let you replace default CRUD operations with your own JavaScript code. Instead of basic create\u002Fread\u002Fupdate\u002Fdelete behavior, you can write custom functions that handle complex business logic, external integrations, or specialized data processing. Fo","Custom Handlers",{"slug":466,"summary":467,"title":468},"ung-dung\u002Fhook-va-handler\u002Fcustom-handler","Trình xử lý tùy chỉnh Trình xử lý tùy chỉnh cho phép bạn thay thế các thao tác CRUD mặc định bằng mã JavaScript của riêng bạn. Thay vì hành vi tạo\u002Fđọc\u002Fcập nhật\u002Fxóa cơ bản, bạn có thể viết các hàm tùy chỉnh xử lý logic nghiệp vụ phức tạp, tích hợp bên ngoài hoặc xử lý dữ liệu chuy","Trình xử lý tùy chỉnh",{"id":166,"slug":167},{"id":471,"slug":472,"icon":37,"order":383,"metadata":473,"parent":482},193,"api-reference-authentication",{"navigation":474},{"en":475,"vi":478},{"slug":472,"summary":476,"title":477},"Authentication Endpoints All URLs use the base: {appUrl}\u002Fapi POST \u002Flogin Authenticate with email and password through the Enfyra app proxy. In SSR\u002Fcookie mode, the app stores Enfyra tokens in httpOnly cookies for you. URL: {appUrl}\u002Fapi\u002Flogin Request Body: { \"email\": \"admin@exampl","Authentication Endpoints",{"slug":479,"summary":480,"title":481},"endpoint-xac-thuc","Endpoint xác thực Mọi URL dùng base {appUrl}\u002Fapi . POST \u002Flogin Xác thực bằng email và mật khẩu qua Enfyra app proxy. Ở chế độ SSR\u002Fcookie, app lưu Enfyra token trong httpOnly cookie cho bạn. URL: {appUrl}\u002Fapi\u002Flogin { \"email\": \"admin@example.com\", \"password\": \"your_password\", \"reme","Endpoint xác thực",{"id":181,"slug":182},{"id":484,"slug":485,"icon":37,"order":383,"metadata":486,"parent":37},255,"architecture-overview",{"navigation":487},{"en":488,"vi":491},{"slug":485,"summary":489,"title":490},"Architecture Overview Enfyra is a programmable backend platform. You define data, routes, permissions, hooks, handlers, flows, and realtime events as metadata, and Enfyra turns that metadata into a running API without restarting the server. This page explains the main moving part","Architecture Overview",{"slug":492,"summary":493,"title":494},"tong-quan-kien-truc","Kiến trúc Enfyra là nền tảng backend có thể lập trình. Bạn định nghĩa dữ liệu, route, quyền truy cập, hook, handler, flow và sự kiện realtime bằng metadata; Enfyra biến metadata đó thành API đang chạy mà không cần khởi động lại máy chủ. Trang này mô tả các thành phần chính và luồ","Kiến trúc",{"id":496,"slug":497,"icon":37,"order":383,"metadata":498,"parent":507},262,"examples-script-examples",{"navigation":499},{"en":500,"vi":503},{"slug":497,"summary":501,"title":502},"Script Examples Small examples for handlers, hooks, flows, and websocket event scripts. Repository Reads Find Rows const posts = await #post.find({ fields: \"id,title\", limit: 10 }) Find One Row const result = await #post.find({ filter: { id: { _eq: @PARAMS.id } }, fields: \"id,tit","Script Examples",{"slug":504,"summary":505,"title":506},"vi-du-script","Ví dụ script Các ví dụ nhỏ cho handler, hook, flow và script sự kiện websocket. Đọc repository Tìm các dòng const posts = await #post.find({ fields: \"id,title\", limit: 10 }) Tìm một dòng const result = await #post.find({ filter: { id: { _eq: @PARAMS.id } }, fields: \"id,title\", li","Ví dụ script",{"id":211,"slug":212},{"id":509,"slug":510,"icon":37,"order":383,"metadata":511,"parent":520},280,"examples-auth-permissions-public-contact-form",{"navigation":512},{"en":513,"vi":516},{"slug":510,"summary":514,"title":515},"Public Contact Form This example accepts anonymous website submissions without exposing the inbox publicly. Table Create contact_request . Field Type Notes email string Add an email format rule name string Optional message text Required status select new , reviewing , closed sour","Public Contact Form",{"slug":517,"summary":518,"title":519},"vi-du\u002Fxac-thuc-va-phan-quyen\u002Fform-lien-he-cong-khai","Form liên hệ công khai Ví dụ này nhận nội dung gửi từ website mà không công khai hộp thư tiếp nhận. Table Tạo contact_request . Field Kiểu Ghi chú email string Thêm format rule cho email name string Không bắt buộc message text Bắt buộc status select new , reviewing , closed sourc","Form liên hệ công khai",{"id":308,"slug":309},{"id":522,"slug":523,"icon":37,"order":383,"metadata":524,"parent":533},283,"examples-automation-integrations-rate-limited-public-api",{"navigation":525},{"en":526,"vi":529},{"slug":523,"summary":527,"title":528},"Rate-Limited Public API This example protects a public quote endpoint without requiring login. Route Create a custom GET \u002Fpublic\u002Fquote route and make GET public. Pre-Hook const result = await @HELPERS.$rateLimit.byIp({ maxRequests: 60, perSeconds: 60 }); if (!result.allowed) { @T","Rate-Limited Public API",{"slug":530,"summary":531,"title":532},"vi-du\u002Ftu-dong-hoa-va-tich-hop\u002Fapi-cong-khai-co-rate-limit","API công khai có rate limit Ví dụ này bảo vệ endpoint báo giá công khai mà không yêu cầu đăng nhập. Route Tạo custom route GET \u002Fpublic\u002Fquote và cho phép công khai GET . Pre-hook const result = await @HELPERS.$rateLimit.byIp({ maxRequests: 60, perSeconds: 60 }); if (!result.allowe","API công khai có rate limit",{"id":336,"slug":337},{"id":535,"slug":536,"icon":37,"order":383,"metadata":537,"parent":546},289,"integrations-mcp-server",{"navigation":538},{"en":539,"vi":542},{"slug":536,"summary":540,"title":541},"Use Enfyra with an AI coding assistant Enfyra MCP connects your Enfyra project to MCP-compatible coding assistants such as Codex, Claude Code, Cursor, VS Code with GitHub Copilot, and Google Antigravity. Once connected, you can ask the assistant to inspect and change your project","Use Enfyra with an AI coding assistant",{"slug":543,"summary":544,"title":545},"may-chu-mcp","Sử dụng Enfyra với trợ lý lập trình AI Enfyra MCP kết nối dự án Enfyra với các trợ lý lập trình hỗ trợ MCP như Codex, Claude Code, Cursor, VS Code với GitHub Copilot và Google Antigravity. Sau khi kết nối, bạn có thể yêu cầu trợ lý tìm hiểu hoặc thay đổi dự án bằng ngôn ngữ tự nh","Sử dụng Enfyra với trợ lý lập trình AI",{"id":196,"slug":197},{"id":548,"slug":549,"icon":37,"order":383,"metadata":550,"parent":560},292,"sdk-authentication",{"navigation":551},{"en":552,"vi":556},{"slug":553,"summary":554,"title":555},"sdk\u002Fauthentication","Authentication Configure the Enfyra App URL once, then use the authentication API exposed by your SDK package. You do not need to select or manage a session transport. Core Client Create the client and call auth.login() : import { EnfyraClient } from '@enfyra\u002Fsdk-core' const enfy","Authentication",{"slug":557,"summary":558,"title":559},"sdk\u002Fxac-thuc","Xác thực Chỉ cấu hình URL của Enfyra App một lần, sau đó dùng authentication API do package SDK cung cấp. Ứng dụng không cần chọn hoặc tự quản lý session transport. Core Client Tạo client và gọi auth.login() : import { EnfyraClient } from '@enfyra\u002Fsdk-core' const enfyra = new Enf","Xác thực",{"id":378,"slug":379},{"id":562,"slug":563,"icon":37,"order":564,"metadata":565,"parent":574},114,"getting-started-table-creation",2,{"navigation":566},{"en":567,"vi":570},{"slug":563,"summary":568,"title":569},"Table Creation Guide This guide walks you through creating your first table in Enfyra, from basic setup to understanding what happens after creation. Prerequisites : Make sure you've completed Installation and are familiar with the Getting Started Guide . Accessing Table Creation","Table Creation Guide",{"slug":571,"summary":572,"title":573},"tao-bang","Hướng dẫn tạo bảng Hướng dẫn này đi từ việc tạo bảng đầu tiên đến những gì diễn ra sau khi lưu. Điều kiện: đã hoàn thành Cài đặt và quen với Bắt đầu . Mở màn hình tạo bảng Chọn Collections trên thanh bên. Chọn + Create New Table trong khu vực bên trái. Quan trọng: thứ tự tạo Để r","Hướng dẫn tạo bảng",{"id":66,"slug":67},{"id":121,"slug":122,"icon":37,"order":564,"metadata":576,"parent":585},{"navigation":577},{"en":578,"vi":581},{"slug":122,"summary":579,"title":580},"Repository Methods Repositories are the main way to interact with your database tables in Enfyra. Every table you create automatically gets a repository that you can access through $ctx.$repos.tableName . Quick Reference Record methods return data in this format: { data: [...], \u002F","Repository Methods",{"slug":582,"summary":583,"title":584},"phuong-thuc-repository","Phương thức Repository Repository là cách chính để làm việc với bảng cơ sở dữ liệu trong Enfyra. Mỗi bảng bạn tạo tự có một repository, truy cập qua $ctx.$repos.tableName . Tham chiếu nhanh Các phương thức làm việc với bản ghi trả dữ liệu theo dạng: { data: [...], \u002F\u002F Array of rec","Phương thức Repository",{"id":81,"slug":82},{"id":587,"slug":588,"icon":37,"order":564,"metadata":589,"parent":598},157,"server-repository-methods-patterns",{"navigation":590},{"en":591,"vi":594},{"slug":588,"summary":592,"title":593},"Repository Methods - Common Patterns Common patterns and best practices for working with repository methods. Common Patterns Pattern 1: Create and Return Full Record const result = await $ctx.$repos.products.create({ data: { name: 'New Product', price: 99.99 } }); \u002F\u002F result.data[","Common Patterns",{"slug":595,"summary":596,"title":597},"mau-repository-pho-bien","Phương thức Repository - Các mẫu phổ biến Các mẫu phổ biến và thực hành tốt khi làm việc với phương thức repository. Mẫu phổ biến Mẫu 1: Tạo và trả về bản ghi đầy đủ const result = await $ctx.$repos.products.create({ data: { name: 'New Product', price: 99.99 } }); \u002F\u002F result.data[","Phương thức Repository - Các mẫu phổ biến",{"id":121,"slug":122},{"id":600,"slug":601,"icon":37,"order":564,"metadata":602,"parent":611},163,"server-context-reference-helpers-cache",{"navigation":603},{"en":604,"vi":607},{"slug":601,"summary":605,"title":606},"Context Reference - Helpers & Cache Utility functions for common tasks and distributed caching operations. Helpers Utility functions for common tasks. All helper functions require await . Named shared operations Call a saved enabled helper with await @HELPERS.run('normalize_query","Helpers & Cache",{"slug":608,"summary":609,"title":610},"helpers-va-cache-context","Tham chiếu Context - Helpers và bộ nhớ đệm Các hàm tiện ích cho tác vụ phổ biến và thao tác cache phân tán. Hàm hỗ trợ Các hàm tiện ích cho tác vụ phổ biến. Mọi hàm hỗ trợ đều cần await . Thao tác dùng chung theo tên Gọi helper đã lưu và bật bằng await @HELPERS.run('normalize_que","Tham chiếu Context - Helpers và bộ nhớ đệm",{"id":136,"slug":137},{"id":613,"slug":614,"icon":37,"order":564,"metadata":615,"parent":624},169,"app-filter-system",{"navigation":616},{"en":617,"vi":620},{"slug":614,"summary":618,"title":619},"Filter System The Filter System helps you search and filter data in your tables. Instead of scrolling through many records, create search conditions to find exactly what you need. Look for the Filter button - it shows \"Filter\" normally, and \"Filters (N)\" when active. How to Filte","Filter System",{"slug":621,"summary":622,"title":623},"ung-dung\u002Fhe-thong-bo-loc","Hệ thống bộ lọc Hệ thống lọc giúp bạn tìm kiếm và lọc dữ liệu trong bảng của mình. Thay vì cuộn qua nhiều bản ghi, hãy tạo điều kiện tìm kiếm để tìm chính xác thứ bạn cần. Tìm nút Bộ lọc - nó hiển thị \"Bộ lọc\" bình thường và \"Bộ lọc (N)\" khi hoạt động. Cách lọc dữ liệu Bắt đầu lọ","Hệ thống bộ lọc",{"id":151,"slug":152},{"id":626,"slug":627,"icon":37,"order":564,"metadata":628,"parent":637},178,"app-hooks-handlers-package-management",{"navigation":629},{"en":630,"vi":633},{"slug":627,"summary":631,"title":632},"Package Management Package Management lets you install NPM packages directly from the Enfyra interface and use them in your custom handlers and hooks. Instead of managing dependencies manually, you can search, install, and configure packages through the UI - they're automatically","Package Management",{"slug":634,"summary":635,"title":636},"ung-dung\u002Fhook-va-handler\u002Fquan-ly-package","Quản lý gói Quản lý gói cho phép bạn cài đặt các gói NPM trực tiếp từ giao diện Enfyra và sử dụng chúng trong các trình xử lý và hook tùy chỉnh của bạn. Thay vì quản lý các phần phụ thuộc theo cách thủ công, bạn có thể tìm kiếm, cài đặt và định cấu hình các gói thông qua giao diệ","Quản lý gói",{"id":166,"slug":167},{"id":181,"slug":182,"icon":37,"order":564,"metadata":639,"parent":37},{"navigation":640},{"en":641,"vi":644},{"slug":182,"summary":642,"title":643},"API Reference Guide for building your app with the Enfyra API. Use these endpoints to authenticate users, fetch and modify data, and work with files from your custom frontend, mobile app, or external service. All API requests use the app URL with the \u002Fapi prefix. Base URL {appUrl","API Reference",{"slug":645,"summary":646,"title":47},"tham-chieu-api","API Hướng dẫn xây dựng ứng dụng với Enfyra API. Dùng các endpoint này để xác thực người dùng, đọc và thay đổi dữ liệu, cũng như làm việc với file từ frontend riêng, ứng dụng di động hoặc dịch vụ bên ngoài. Mọi yêu cầu API đều dùng URL của ứng dụng với prefix \u002Fapi . Base URL {appU",{"id":648,"slug":649,"icon":37,"order":564,"metadata":650,"parent":659},195,"api-reference-crud-operations",{"navigation":651},{"en":652,"vi":655},{"slug":649,"summary":653,"title":654},"CRUD Operations When you create a table in Enfyra (e.g. products, orders, customers), it automatically gets REST endpoints. Use them from your app to list, create, update, and delete records. Base: {appUrl}\u002Fapi\u002F{routePath} The route path matches your table name or custom route (e","CRUD Operations",{"slug":656,"summary":657,"title":658},"thao-tac-crud","Thao tác CRUD Khi tạo một bảng trong Enfyra (ví dụ products , orders , customers ), bảng đó tự có các endpoint REST. Dùng chúng để liệt kê, tạo, cập nhật và xóa bản ghi từ ứng dụng của bạn. URL gốc: {appUrl}\u002Fapi\u002F{routePath} routePath khớp tên bảng hoặc custom route của bạn (ví dụ","Thao tác CRUD",{"id":181,"slug":182},{"id":661,"slug":662,"icon":37,"order":564,"metadata":663,"parent":672},245,"server-hooks-handlers-posthooks",{"navigation":664},{"en":665,"vi":668},{"slug":662,"summary":666,"title":667},"Hooks and Handlers - postHooks postHooks execute after the handler (or after a preHook\u002Fhandler error). Use them for response transformation, audit logging, and side effects. Execution Behavior postHooks still run when a preHook or handler throws an ordinary error, even though lat","postHooks",{"slug":669,"summary":670,"title":671},"post-hook","Hooks và Handler - postHooks postHook chạy sau handler (hoặc sau lỗi của preHook\u002Fhandler). Dùng chúng để biến đổi response, ghi audit log và thực hiện tác vụ phụ. Cách thực thi postHook vẫn chạy khi preHook hoặc handler throw lỗi thông thường, dù các preHook sau và handler bị bỏ ","Hooks và Handler - postHooks",{"id":106,"slug":107},{"id":674,"slug":675,"icon":37,"order":564,"metadata":676,"parent":685},263,"examples-app-examples",{"navigation":677},{"en":678,"vi":681},{"slug":675,"summary":679,"title":680},"App Examples Small examples for Enfyra App extensions and external SSR apps. Extension Data Load Rows With useApi \u003Cscript setup> const { data, execute } = useApi(\"\u002Fpost\", { query: { fields: \"id,title\", limit: 10 } }) onMounted(() => execute()) \u003C\u002Fscript> Create Row \u003Cscript setup> ","App Examples",{"slug":682,"summary":683,"title":684},"vi-du-ung-dung","Ví dụ ứng dụng Các ví dụ nhỏ cho Enfyra App extension và ứng dụng SSR bên ngoài. Dữ liệu extension Tải các dòng bằng useApi \u003Cscript setup> const { data, execute } = useApi(\"\u002Fpost\", { query: { fields: \"id,title\", limit: 10 } }) onMounted(() => execute()) \u003C\u002Fscript> Tạo dòng \u003Cscript","Ví dụ ứng dụng",{"id":211,"slug":212},{"id":687,"slug":688,"icon":37,"order":564,"metadata":689,"parent":697},271,"examples-crud-apps-graphql-read-api",{"navigation":690},{"en":691,"vi":694},{"slug":688,"summary":692,"title":693},"GraphQL Read API Use GraphQL when a client wants one strongly shaped read query and the table is explicitly enabled for GraphQL. Enable GraphQL In the admin console: Open the table. Enable GraphQL. Save the table. The GraphQL endpoint uses the same API base as REST: POST {ENFYRA_","GraphQL Read API",{"slug":695,"summary":696,"title":693},"vi-du\u002Fung-dung-crud\u002Fapi-doc-graphql","GraphQL Read API Dùng GraphQL khi client cần một query đọc có shape rõ ràng và table đã được bật GraphQL một cách chủ động. Bật GraphQL Trong admin console: Mở table. Bật GraphQL. Lưu table. GraphQL endpoint dùng cùng API base với REST: POST {ENFYRA_API_URL}\u002Fgraphql GET {ENFYRA_A",{"id":226,"slug":227},{"id":699,"slug":700,"icon":37,"order":564,"metadata":701,"parent":710},284,"examples-automation-integrations-scheduled-cleanup",{"navigation":702},{"en":703,"vi":706},{"slug":700,"summary":704,"title":705},"Scheduled Cleanup This example runs a daily flow that archives stale records. Flow Create a flow named archive-stale-tasks . Field Value triggerType schedule triggerConfig {\"cron\":\"0 2 * * *\",\"timezone\":\"UTC\"} isEnabled true Step 1: Find Stale Tasks Type: script const cutoff = ne","Scheduled Cleanup",{"slug":707,"summary":708,"title":709},"vi-du\u002Ftu-dong-hoa-va-tich-hop\u002Fdon-dep-theo-lich","Dọn dẹp theo lịch Ví dụ này chạy flow hằng ngày để lưu trữ các bản ghi đã cũ. Flow Tạo flow có tên archive-stale-tasks . Field Giá trị triggerType schedule triggerConfig {\"cron\":\"0 2 * * *\",\"timezone\":\"UTC\"} isEnabled true Bước 1: Tìm task cũ Kiểu: script const cutoff = new Date(","Dọn dẹp theo lịch",{"id":336,"slug":337},{"id":712,"slug":713,"icon":37,"order":564,"metadata":714,"parent":723},286,"examples-admin-operations-settings-page",{"navigation":715},{"en":716,"vi":719},{"slug":713,"summary":717,"title":718},"Settings Page This example manages a single-record settings table from the admin console. Table Create app_settings with isSingleRecord=true . Field Type Notes siteName string Public name supportEmail string Add email format rule webhookSecret string isEncrypted=true , isPublishe","Settings Page",{"slug":720,"summary":721,"title":722},"trang-cau-hinh","Trang cấu hình Ví dụ này quản lý bảng cấu hình một bản ghi từ admin console. Bảng Tạo app_settings với isSingleRecord=true . Trường Kiểu Ghi chú siteName string Tên công khai supportEmail string Thêm quy tắc định dạng email webhookSecret string isEncrypted=true , isPublished=fals","Trang cấu hình",{"id":351,"slug":352},{"id":725,"slug":726,"icon":37,"order":564,"metadata":727,"parent":737},295,"sdk-data-queries",{"navigation":728},{"en":729,"vi":733},{"slug":730,"summary":731,"title":732},"sdk\u002Fdata-queries","Data & CRUD Use the fluent Query Builder for route-backed Enfyra tables. It handles field selection, filters, sorting, pagination, relation queries, metadata, and ID-scoped mutations. Define a Record Type interface Article { id: number title: string status: 'draft' | 'published' ","Data & CRUD",{"slug":734,"summary":735,"title":736},"sdk\u002Fquery-du-lieu-crud","Dữ liệu và CRUD Dùng Query Builder cho table được Enfyra expose qua route. Nó hỗ trợ fields, filter, sort, pagination, relation query, metadata và mutation theo ID. Khai báo record type interface Article { id: number title: string status: 'draft' | 'published' author?: { id: numb","Dữ liệu và CRUD",{"id":378,"slug":379},{"id":739,"slug":740,"icon":37,"order":741,"metadata":742,"parent":751},111,"getting-started-data-management",3,{"navigation":743},{"en":744,"vi":747},{"slug":740,"summary":745,"title":746},"Data Management Data Management is where you create, view, edit, and delete records in your tables. After creating tables, you can access your data through Data in the sidebar, then select your table. Prerequisites : - Complete Installation and Getting Started Guide - Create at l","Data Management",{"slug":748,"summary":749,"title":750},"quan-ly-du-lieu","Quản lý dữ liệu Data Management là nơi tạo, xem, sửa và xóa bản ghi trong bảng. Sau khi tạo bảng, vào Data ở sidebar rồi chọn bảng. Điều kiện: hoàn thành Cài đặt và Bắt đầu , đồng thời đã tạo ít nhất một bảng theo Hướng dẫn tạo bảng . Cách thao tác dữ liệu hoạt động Mọi thao tác ","Quản lý dữ liệu",{"id":66,"slug":67},{"id":136,"slug":137,"icon":37,"order":741,"metadata":753,"parent":762},{"navigation":754},{"en":755,"vi":758},{"slug":137,"summary":756,"title":757},"Context Reference The $ctx (context) object is available in all hooks and handlers. It provides access to request data, database repositories, helper functions, cache operations, and more. Quick Navigation Request Data - $ctx.$body , $ctx.$params , $ctx.$query , $ctx.$user Reposi","Context Reference",{"slug":759,"summary":760,"title":761},"tham-chieu-context","Tham chiếu Context Đối tượng $ctx (context) có mặt trong mọi hook và handler. Nó cho phép truy cập dữ liệu request, repository cơ sở dữ liệu, hàm hỗ trợ, thao tác cache và nhiều thành phần khác. Điều hướng nhanh Dữ liệu request — $ctx.$body , $ctx.$params , $ctx.$query , $ctx.$us","Tham chiếu Context",{"id":81,"slug":82},{"id":764,"slug":765,"icon":37,"order":741,"metadata":766,"parent":774},154,"server-hooks-handlers-patterns",{"navigation":767},{"en":768,"vi":770},{"slug":765,"summary":769,"title":593},"Hooks and Handlers - Common Patterns Common patterns and best practices for working with hooks and handlers. Common Patterns Pattern 1: Validation and Transformation \u002F\u002F preHook if (!$ctx.$body.email) { @THROW400('Email is required'); return; } $ctx.$body.email = $ctx.$body.email.",{"slug":771,"summary":772,"title":773},"mau-hook-va-handler","Hooks và Handler - Các mẫu phổ biến Các mẫu phổ biến và thực hành tốt khi làm việc với hook và handler. Mẫu phổ biến Mẫu 1: Xác thực và biến đổi \u002F\u002F preHook if (!$ctx.$body.email) { @THROW400('Email is required'); return; } $ctx.$body.email = $ctx.$body.email.toLowerCase().trim();","Hooks và Handler - Các mẫu phổ biến",{"id":106,"slug":107},{"id":776,"slug":777,"icon":37,"order":741,"metadata":778,"parent":787},161,"server-context-reference-logging-errors",{"navigation":779},{"en":780,"vi":783},{"slug":777,"summary":781,"title":782},"Context Reference - Logging & Error Handling Add logs to API responses and throw HTTP errors with proper status codes. Logging Call @LOGS(...) or $ctx.$logs(...) to record script checkpoints. Output is retained in enfyra_user_log and can be inspected under Settings Server Logs Us","Logging & Error Handling",{"slug":784,"summary":785,"title":786},"ghi-log-va-xu-ly-loi-context","Tham chiếu Context - Ghi log và xử lý lỗi Ghi log vào response API và ném lỗi HTTP với mã trạng thái phù hợp. Ghi log Gọi @LOGS(...) hoặc $ctx.$logs(...) để ghi các mốc xử lý của script. Output được lưu vào enfyra_user_log và có thể xem tại Settings Server Logs User logs . Dùng c","Tham chiếu Context - Ghi log và xử lý lỗi",{"id":136,"slug":137},{"id":789,"slug":790,"icon":37,"order":741,"metadata":791,"parent":800},168,"app-relation-picker",{"navigation":792},{"en":793,"vi":796},{"slug":790,"summary":794,"title":795},"Relation Picker System The Relation Picker lets you select related records when working with forms. When you see a pencil icon next to a form field, that's a relation field that connects to records in another table. Instead of typing IDs, the Relation Picker provides a user-frien","Relation Picker System",{"slug":797,"summary":798,"title":799},"ung-dung\u002Fchon-ban-ghi-lien-quan","Bộ chọn bản ghi liên quan Bộ chọn bản ghi liên quan giúp bạn chọn bản ghi có quan hệ khi làm việc với biểu mẫu. Khi thấy biểu tượng bút chì cạnh một trường, đó là trường quan hệ kết nối đến bản ghi ở bảng khác. Thay vì nhập id, bạn có thể duyệt và chọn dữ liệu liên quan trực quan","Bộ chọn bản ghi liên quan",{"id":151,"slug":152},{"id":802,"slug":803,"icon":37,"order":741,"metadata":804,"parent":813},181,"examples-user-registration-example",{"navigation":805},{"en":806,"vi":809},{"slug":803,"summary":807,"title":808},"User Registration Example Build a public POST \u002Fregister endpoint that creates a user safely. This example uses one custom route, one pre-hook, and one custom handler. It is intentionally small so you can copy the pattern into your own app. What You Build POST \u002Fapi\u002Fregister -> pre","User Registration Example",{"slug":810,"summary":811,"title":812},"vi-du\u002Fdang-ky-nguoi-dung","Ví dụ đăng ký người dùng Xây dựng endpoint công khai POST \u002Fregister để tạo người dùng một cách an toàn. Ví dụ này dùng một custom route, một pre-hook và một custom handler. Nội dung được giữ gọn để bạn có thể áp dụng mẫu này cho ứng dụng của mình. Nội dung sẽ xây dựng POST \u002Fapi\u002Fr","Ví dụ đăng ký người dùng",{"id":211,"slug":212},{"id":815,"slug":816,"icon":37,"order":741,"metadata":817,"parent":826},197,"api-reference-query-parameters",{"navigation":818},{"en":819,"vi":822},{"slug":816,"summary":820,"title":821},"Query Parameters These parameters apply to GET requests for list endpoints (e.g. GET {appUrl}\u002Fapi\u002Fenfyra_user ). fields Select which fields to return. Comma-separated list. Example: GET {appUrl}\u002Fapi\u002Fenfyra_user?fields=id,email,name,role.name Use dot notation for related fields: r","Query Parameters",{"slug":823,"summary":824,"title":825},"tham-so-truy-van","Tham số truy vấn Những tham số này áp dụng cho request GET tới list endpoint (ví dụ GET {appUrl}\u002Fapi\u002Fenfyra_user ). fields Chọn field trả về, cách nhau bằng dấu phẩy. GET {appUrl}\u002Fapi\u002Fenfyra_user?fields=id,email,name,role.name Dùng dot notation cho field liên quan: role.name Dùng","Tham số truy vấn",{"id":181,"slug":182},{"id":196,"slug":197,"icon":37,"order":741,"metadata":828,"parent":37},{"navigation":829},{"en":830,"vi":833},{"slug":197,"summary":831,"title":832},"Integrations Use these guides when you want to connect an external app to Enfyra. Start with the SDK if your framework is supported Enfyra SDK supports Nuxt, Next.js, Vue (CSR), React (CSR), and Node.js\u002Fedge. If your app falls into one of these categories, start with the SDK docu","Integrations",{"slug":834,"summary":835,"title":836},"tich-hop","Tích hợp Dùng các hướng dẫn này khi bạn muốn kết nối một ứng dụng bên ngoài với Enfyra. Bắt đầu từ SDK nếu framework đã được hỗ trợ Enfyra SDK đã hỗ trợ Nuxt, Next.js, Vue (CSR), React (CSR) và Node.js\u002Fedge. Nếu app của bạn thuộc nhóm này, hãy bắt đầu từ tài liệu SDK . Adapter Nu","Tích hợp",{"id":838,"slug":839,"icon":37,"order":741,"metadata":840,"parent":849},276,"examples-files-realtime-realtime-notifications",{"navigation":841},{"en":842,"vi":845},{"slug":839,"summary":843,"title":844},"Realtime Notifications This example persists user notifications and emits a live event to the recipient. Table Create user_notification . Field or relation Type Notes recipient many-to-one relation to enfyra_user Required title string Required body text Optional targetPath string","Realtime Notifications",{"slug":846,"summary":847,"title":848},"vi-du\u002Ffile-va-realtime\u002Fthong-bao-realtime","Thông báo realtime Ví dụ này lưu thông báo của người dùng và phát một event trực tiếp đến người nhận. Table Tạo user_notification . Field hoặc relation Kiểu Ghi chú recipient relation many-to-one tới enfyra_user Bắt buộc title string Bắt buộc body text Không bắt buộc targetPath s","Thông báo realtime",{"id":267,"slug":268},{"id":851,"slug":852,"icon":37,"order":741,"metadata":853,"parent":862},282,"examples-automation-integrations-webhook-ingest",{"navigation":854},{"en":855,"vi":858},{"slug":852,"summary":856,"title":857},"Webhook Ingest This example receives signed provider events and stores each event once. Tables Create integration_settings as a single-record table. Field Type Notes providerWebhookSecret string isEncrypted=true , isPublished=false Create provider_event . Field Type Notes provide","Webhook Ingest",{"slug":859,"summary":860,"title":861},"vi-du\u002Ftu-dong-hoa-va-tich-hop\u002Fnhan-webhook","Nhận webhook Ví dụ này nhận event đã được nhà cung cấp ký và chỉ lưu mỗi event một lần. Table Tạo integration_settings dưới dạng table một bản ghi. Field Kiểu Ghi chú providerWebhookSecret string isEncrypted=true , isPublished=false Tạo provider_event . Field Kiểu Ghi chú provide","Nhận webhook",{"id":336,"slug":337},{"id":864,"slug":865,"icon":37,"order":741,"metadata":866,"parent":876},294,"sdk-custom-http",{"navigation":867},{"en":868,"vi":872},{"slug":869,"summary":870,"title":871},"sdk\u002Fcustom-http","Custom API & Transforms Use the client's HTTP methods when your third-party application calls a custom Enfyra route, needs a non-table response, downloads another response type, or wants request-specific transformation. Typed HTTP Methods interface PublishResult { articleId: numb","Custom API & Transforms",{"slug":873,"summary":874,"title":875},"sdk\u002Fcustom-route-http-transform","Custom API và Transform Dùng HTTP method của client khi third-party app gọi custom route, cần response không theo table, tải response type khác hoặc muốn transform riêng cho request. HTTP method có type interface PublishResult { articleId: number publishedAt: string } const { dat","Custom API và Transform",{"id":378,"slug":379},{"id":106,"slug":107,"icon":37,"order":878,"metadata":879,"parent":888},4,{"navigation":880},{"en":881,"vi":884},{"slug":107,"summary":882,"title":883},"Hooks and Handlers Hooks and handlers allow you to customize API behavior at different points in the request lifecycle. Hooks run before and after handlers, while handlers contain the main business logic. Quick Navigation Overview - What are hooks and handlers preHooks - Execute ","Hooks and Handlers",{"slug":885,"summary":886,"title":887},"hook-va-handler","Hooks và Handler Hook và handler cho phép bạn tùy chỉnh hành vi API tại từng điểm trong vòng đời request. Hook chạy trước hoặc sau handler, còn handler chứa logic nghiệp vụ chính. Điều hướng nhanh Tổng quan — Hook và handler là gì preHooks — Chạy trước handler postHooks — Chạy sa","Hooks và Handler",{"id":81,"slug":82},{"id":890,"slug":891,"icon":37,"order":878,"metadata":892,"parent":901},162,"server-context-reference-advanced",{"navigation":893},{"en":894,"vi":897},{"slug":891,"summary":895,"title":896},"Context Reference - Advanced Features Advanced context features including file uploads, API information, shared context, and package access. Transactions Use await @TRANSACTION.run(async () => { ... }) when repository mutations must either all commit or all roll back. It is equiv","Advanced Features",{"slug":898,"summary":899,"title":900},"context-nang-cao","Tham chiếu Context - Tính năng nâng cao Các tính năng context nâng cao gồm tải tệp lên, thông tin API, context dùng chung và truy cập package. Transaction Dùng await @TRANSACTION.run(async () => { ... }) khi các mutation qua repository phải cùng commit hoặc cùng rollback. Nó tươn","Tham chiếu Context - Tính năng nâng cao",{"id":136,"slug":137},{"id":903,"slug":904,"icon":37,"order":878,"metadata":905,"parent":914},167,"app-permission-builder",{"navigation":906},{"en":907,"vi":910},{"slug":904,"summary":908,"title":909},"Permission Builder The Permission Builder is a visual interface for creating complex access control rules. Instead of writing permission code, you can build permission conditions using a drag-and-drop style interface with logical operators. Accessing Permission Builder Permission","Permission Builder",{"slug":911,"summary":912,"title":913},"ung-dung\u002Ftrinh-tao-quyen","Trình tạo quyền Trình tạo quyền là giao diện trực quan để thiết lập các quy tắc kiểm soát truy cập phức tạp. Thay vì viết mã phân quyền, bạn có thể ghép điều kiện bằng các nhóm và toán tử logic. Mở Trình tạo quyền Trường quyền xuất hiện trong nhiều biểu mẫu của Enfyra: Quản lý me","Trình tạo quyền",{"id":151,"slug":152},{"id":916,"slug":917,"icon":37,"order":878,"metadata":918,"parent":926},184,"docker",{"navigation":919},{"en":920,"vi":923},{"slug":917,"summary":921,"title":922},"Enfyra Docker - Usage Guide New to Enfyra? See the Installation Guide for complete setup instructions, including Docker and manual installation options. Overview The enfyra\u002Fenfyra image can run in 3 different modes : all (default) - Run both server + app + embedded services serve","Enfyra Docker - Usage Guide",{"slug":917,"summary":924,"title":925},"Enfyra Docker – Hướng dẫn sử dụng Mới dùng Enfyra? Xem Hướng dẫn cài đặt để biết hướng dẫn thiết lập đầy đủ, bao gồm các tùy chọn cài đặt bằng Docker và cài đặt thủ công. Tổng quan Image enfyra\u002Fenfyra có thể chạy ở 3 mode khác nhau : all (mặc định) - Chạy server + app + các servi","Enfyra Docker – Hướng dẫn sử dụng",{"id":66,"slug":67},{"id":928,"slug":929,"icon":37,"order":878,"metadata":930,"parent":939},194,"api-reference-file-storage",{"navigation":931},{"en":932,"vi":935},{"slug":929,"summary":933,"title":934},"File & Storage Use these endpoints to upload files, organize them in folders, and serve assets from your app. Base: {appUrl}\u002Fapi Files List files GET {appUrl}\u002Fapi\u002Fenfyra_file?fields=id,filename,mimetype,size,folder&filter={\"folder\":{\"_eq\":123}} Upload file Use multipart\u002Fform-data","File & Storage",{"slug":936,"summary":937,"title":938},"tham-chieu-api\u002Ftep-va-luu-tru","Tệp và lưu trữ Dùng các endpoint này để tải file lên, sắp xếp theo folder và phân phối asset từ ứng dụng. Base URL: {appUrl}\u002Fapi File Liệt kê file GET {appUrl}\u002Fapi\u002Fenfyra_file?fields=id,filename,mimetype,size,folder&filter={\"folder\":{\"_eq\":123}} Tải file lên Dùng multipart\u002Fform-d","Tệp và lưu trữ",{"id":181,"slug":182},{"id":941,"slug":942,"icon":37,"order":878,"metadata":943,"parent":952},247,"examples-multi-tenant-rls-example",{"navigation":944},{"en":945,"vi":948},{"slug":942,"summary":946,"title":947},"Row-Level Security Example Build a shared table where each user only sees rows from their own tenant. This example uses one relation, one pre-hook, and normal generated CRUD routes. What You Build enfyra_user -> has tenant project_task -> has tenant -> generated \u002Fproject_task rou","Row-Level Security Example",{"slug":949,"summary":950,"title":951},"vi-du-rls-da-tenant","Ví dụ row-level security Xây dựng một bảng dùng chung, trong đó mỗi người dùng chỉ thấy các dòng thuộc tenant của mình. Ví dụ này dùng một quan hệ, một pre-hook và các CRUD route được sinh bình thường. Nội dung sẽ xây dựng enfyra_user -> có tenant project_task -> có tenant -> rou","Ví dụ row-level security",{"id":211,"slug":212},{"id":378,"slug":379,"icon":37,"order":878,"metadata":954,"parent":37},{"navigation":955},{"en":956,"vi":959},{"slug":379,"summary":957,"title":958},"SDK Enfyra SDKs connect a third-party application to Enfyra through the single URL exposed by your Enfyra instance. Choose the package for your framework, configure that URL once, and use the SDK directly. These guides are for applications that you build and deploy separately. To","SDK",{"slug":379,"summary":960,"title":958},"SDK Enfyra SDK kết nối third-party application với Enfyra qua URL duy nhất do Enfyra instance expose. Chọn package đúng framework, cấu hình URL đó một lần và dùng SDK trực tiếp. Các hướng dẫn này dành cho application do bạn tự build và deploy. Để viết extension chạy bên trong Enf",{"id":962,"slug":963,"icon":37,"order":878,"metadata":964,"parent":974},299,"sdk-storage",{"navigation":965},{"en":966,"vi":970},{"slug":967,"summary":968,"title":969},"sdk\u002Fstorage","Files & Storage Use the SDK storage API to upload files, download protected assets, build download URLs, browse the folder tree, and list enabled storage configurations. Upload a File const fileRecord = await enfyra.storage.upload({ file: selectedFile, folder: folderId, title: 'C","Files & Storage",{"slug":971,"summary":972,"title":973},"sdk\u002Ffile-storage","File và Storage Dùng SDK storage API để upload file, download protected asset, tạo download URL, duyệt folder tree và lấy storage configuration đang bật. Upload file const fileRecord = await enfyra.storage.upload({ file: selectedFile, folder: folderId, title: 'Customer contract',","File và Storage",{"id":378,"slug":379},{"id":151,"slug":152,"icon":37,"order":976,"metadata":977,"parent":37},5,{"navigation":978},{"en":979,"vi":982},{"slug":152,"summary":980,"title":981},"Enfyra App and Extension Documentation This section covers UI and extension work that runs inside Enfyra Admin : pages, widgets, forms, permissions, menus, header actions, and operator workflows. If you are building a separately deployed web app, mobile backend, CLI, or service, ","App",{"slug":983,"summary":984,"title":985},"ung-dung","Enfyra App và Extension Phần này hướng dẫn UI và extension chạy bên trong Enfyra Admin : page, widget, form, permission, menu, header action và operator workflow. Nếu bạn đang xây web app, backend cho mobile app, CLI hoặc service được deploy riêng, hãy dùng tài liệu SDK . SDK app","Enfyra App và Extension",{"id":987,"slug":988,"icon":37,"order":976,"metadata":989,"parent":998},165,"app-permission-components",{"navigation":990},{"en":991,"vi":994},{"slug":988,"summary":992,"title":993},"Permission Components Enfyra provides two main tools for controlling UI visibility based on user permissions: the PermissionGate component for declarative rendering and the usePermissions composable for programmatic checks. PermissionGate Component The PermissionGate component wr","Permission Components",{"slug":995,"summary":996,"title":997},"ung-dung\u002Fthanh-phan-quyen","Các thành phần phân quyền Enfyra cung cấp hai công cụ chính để kiểm soát việc hiển thị giao diện theo quyền của người dùng: component PermissionGate để render theo kiểu khai báo và composable usePermissions để kiểm tra quyền bằng code. Component PermissionGate Component Permissio","Các thành phần phân quyền",{"id":151,"slug":152},{"id":1000,"slug":1001,"icon":37,"order":976,"metadata":1002,"parent":1011},182,"server-template-syntax",{"navigation":1003},{"en":1004,"vi":1007},{"slug":1001,"summary":1005,"title":1006},"Template Syntax Guide Enfyra provides three equivalent ways to access context properties. You can use the full $ctx.$property syntax, template syntax, or direct table syntax - all work exactly the same way. Overview All three syntaxes are fully supported and equivalent: \u002F\u002F Full s","Template Syntax Guide",{"slug":1008,"summary":1009,"title":1010},"cu-phap-mau","Hướng dẫn cú pháp mẫu Enfyra có ba cách tương đương để truy cập thuộc tính context. Bạn có thể dùng cú pháp đầy đủ $ctx.$property , cú pháp template hoặc cú pháp bảng trực tiếp; cả ba hoạt động như nhau. Tổng quan Cả ba cú pháp đều được hỗ trợ đầy đủ và tương đương: \u002F\u002F Cú pháp đầ","Hướng dẫn cú pháp mẫu",{"id":81,"slug":82},{"id":1013,"slug":1014,"icon":37,"order":976,"metadata":1015,"parent":1024},259,"examples-third-party-chat-app",{"navigation":1016},{"en":1017,"vi":1020},{"slug":1014,"summary":1018,"title":1019},"Third-Party Chat App Example Build a small chat app on top of Enfyra from an external SSR app. Read SSR Frameworks first. This example assumes your app already proxies: \u002Fenfyra\u002F** -> Enfyra app \u002Fapi\u002F** \u002Fsocket.io\u002F** -> Enfyra app \u002Fws\u002Fsocket.io\u002F** What You Build Conversation list ","Third-Party Chat App Example",{"slug":1021,"summary":1022,"title":1023},"vi-du\u002Fung-dung-chat-ben-thu-ba","Ví dụ ứng dụng chat bên thứ ba Xây dựng một ứng dụng chat nhỏ trên Enfyra từ ứng dụng SSR bên ngoài. Hãy đọc SSR Frameworks trước. Ví dụ này giả định ứng dụng của bạn đã proxy: \u002Fenfyra\u002F** -> Enfyra app \u002Fapi\u002F** \u002Fsocket.io\u002F** -> Enfyra app \u002Fws\u002Fsocket.io\u002F** Nội dung sẽ xây dựng Conv","Ví dụ ứng dụng chat bên thứ ba",{"id":211,"slug":212},{"id":1026,"slug":1027,"icon":37,"order":976,"metadata":1028,"parent":1037},290,"getting-started-first-app",{"navigation":1029},{"en":1030,"vi":1033},{"slug":1027,"summary":1031,"title":1032},"Build Your First App This guide gives you one complete result before you learn every Enfyra feature: a task collection, a record in the admin app, and a generated REST API you can call. Time: about 15 minutes. You need: a running Enfyra app and an admin account. If you do not hav","Build Your First App",{"slug":1034,"summary":1035,"title":1036},"ung-dung-dau-tien","Xây dựng ứng dụng đầu tiên Hướng dẫn này cho bạn một kết quả hoàn chỉnh trước khi tìm hiểu mọi tính năng Enfyra: collection task , một bản ghi trong admin app và REST API được tạo tự động để bạn gọi. Thời gian: khoảng 15 phút. Cần có: một Enfyra app đang chạy và tài khoản admin. ","Xây dựng ứng dụng đầu tiên",{"id":66,"slug":67},{"id":1039,"slug":1040,"icon":37,"order":976,"metadata":1041,"parent":1049},298,"sdk-realtime",{"navigation":1042},{"en":1043,"vi":1047},{"slug":1044,"summary":1045,"title":1046},"sdk\u002Frealtime","Realtime Use WebSocketClient or a framework useWebSocket() helper to connect a third-party application to an Enfyra Socket.IO gateway. Prerequisites Before connecting: Create and enable the gateway and its events in Enfyra. Grant the intended user access. Expose the Socket.IO tra","Realtime",{"slug":1044,"summary":1048,"title":1046},"Realtime Dùng WebSocketClient hoặc framework helper useWebSocket() để kết nối third-party app với Socket.IO gateway của Enfyra. Điều kiện cần Trước khi kết nối: Tạo và bật gateway cùng event trong Enfyra. Cấp quyền cho user mục tiêu. Expose Socket.IO transport qua deployment nếu ",{"id":378,"slug":379},{"id":81,"slug":82,"icon":37,"order":1051,"metadata":1052,"parent":37},6,{"navigation":1053},{"en":1054,"vi":1057},{"slug":82,"summary":1055,"title":1056},"Enfyra Server Documentation This documentation covers the Enfyra server architecture, APIs, and development guides. It's organized to help you find information quickly, whether you're learning the basics or looking up specific details. New to Enfyra? Start with the Installation G","Server",{"slug":1058,"summary":1059,"title":1056},"may-chu-enfyra","Server Tài liệu này bao quát kiến trúc, API và hướng dẫn phát triển của Enfyra server. Nội dung được tổ chức để giúp bạn tìm thông tin nhanh, dù bạn đang học những điều cơ bản hay tra cứu chi tiết cụ thể. Mới dùng Enfyra? Hãy bắt đầu với Hướng dẫn cài đặt để thiết lập workspace a",{"id":1061,"slug":1062,"icon":37,"order":1051,"metadata":1063,"parent":1072},251,"server-guards",{"navigation":1064},{"en":1065,"vi":1068},{"slug":1062,"summary":1066,"title":1067},"Guards Guards protect your routes with declarative rules — no code required. Configure them through the admin UI or API to block IPs, rate-limit requests, and control access. How Guards Work Guards run automatically at two points in the request lifecycle: 1. Route Detection 2. Pr","Guards",{"slug":1069,"summary":1070,"title":1071},"bao-ve-tuyen","Guard Guard bảo vệ các route bằng những quy tắc khai báo sẵn, không cần viết code. Bạn có thể cấu hình trong giao diện quản trị hoặc qua API để chặn IP, giới hạn tần suất request và kiểm soát quyền truy cập. Guard hoạt động như thế nào Guard tự động chạy tại hai thời điểm trong v","Guard",{"id":81,"slug":82},{"id":1074,"slug":1075,"icon":37,"order":1051,"metadata":1076,"parent":1085},253,"app-column-rules",{"navigation":1077},{"en":1078,"vi":1081},{"slug":1075,"summary":1079,"title":1080},"Column Rules Column Rules let you attach extra validation constraints (min\u002Fmax, length, pattern, format, etc.) to a column without writing any code. Rules are enforced server-side every time the API receives a REST POST or PATCH or a generated GraphQL create_\u003Ctable> \u002F update_\u003Ctab","Column Rules",{"slug":1082,"summary":1083,"title":1084},"ung-dung\u002Fquy-tac-cot","Quy tắc cột Quy tắc cột cho phép bạn đính kèm các ràng buộc xác thực bổ sung (tối thiểu\u002Ftối đa, độ dài, mẫu, định dạng, v.v.) vào một cột mà không cần viết bất kỳ mã nào. Các quy tắc được thực thi phía máy chủ mỗi khi API nhận được POST hoặc PATCH qua REST hoặc mutation GraphQL đ","Quy tắc cột",{"id":151,"slug":152},{"id":351,"slug":352,"icon":37,"order":1051,"metadata":1087,"parent":1096},{"navigation":1088},{"en":1089,"vi":1092},{"slug":352,"summary":1090,"title":1091},"Admin Operations Use these examples when operators need a purpose-built screen instead of raw data tables. Dynamic admin extensions are Vue single-file components stored in enfyra_extension . Page extensions should register the app-level page header, use permissions for sensitive","Admin Operations",{"slug":1093,"summary":1094,"title":1095},"vi-du\u002Fvan-hanh-admin","Vận hành Admin Dùng các ví dụ này khi người vận hành cần một màn hình chuyên biệt thay vì làm việc trực tiếp với bảng dữ liệu thô. Dynamic admin extension là Vue single-file component được lưu trong enfyra_extension . Page extension nên đăng ký page header cấp ứng dụng, dùng quyề","Vận hành Admin",{"id":211,"slug":212},{"id":1098,"slug":1099,"icon":37,"order":1051,"metadata":1100,"parent":1108},296,"sdk-nuxt",{"navigation":1101},{"en":1102,"vi":1106},{"slug":1103,"summary":1104,"title":1105},"sdk\u002Fnuxt","Nuxt Use @enfyra\u002Fsdk-nuxt for a third-party Nuxt 3 or Nuxt 4 application. It configures the same-origin Enfyra bridge, creates one SDK client per SSR request, forwards auth cookies safely, and auto-imports SDK composables. This package is for your own Nuxt application. It is not ","Nuxt",{"slug":1103,"summary":1107,"title":1105},"Nuxt Dùng @enfyra\u002Fsdk-nuxt cho third-party app viết bằng Nuxt 3 hoặc Nuxt 4. Package cấu hình same-origin bridge, tạo SDK client riêng cho từng SSR request, forward auth cookie an toàn và auto-import composable. Package này dành cho Nuxt app riêng của bạn, không phải API dùng tro",{"id":378,"slug":379},{"id":1110,"slug":1111,"icon":37,"order":1112,"metadata":1113,"parent":1122},172,"app-routing-management",7,{"navigation":1114},{"en":1115,"vi":1118},{"slug":1111,"summary":1116,"title":1117},"Routing Management Routing Management lets you create custom API endpoints that are served by your backend server . By default, Enfyra automatically generates REST API endpoints for every table you create (like \u002Fenfyra_table ). The Routing Manager allows you to create custom endp","Routing Management",{"slug":1119,"summary":1120,"title":1121},"ung-dung\u002Fquan-ly-dieu-huong","Quản lý định tuyến Quản lý định tuyến cho phép bạn tạo các điểm cuối API tùy chỉnh được máy chủ phụ trợ của bạn phục vụ. Theo mặc định, Enfyra tự động tạo điểm cuối API REST cho mọi bảng bạn tạo (như \u002Fenfyra_table ). Trình quản lý định tuyến cho phép bạn tạo điểm cuối tùy chỉnh n","Quản lý định tuyến",{"id":151,"slug":152},{"id":1124,"slug":1125,"icon":37,"order":1112,"metadata":1126,"parent":1135},250,"server-field-permissions",{"navigation":1127},{"en":1128,"vi":1131},{"slug":1125,"summary":1129,"title":1130},"Field Permissions Control access to individual columns and relations per role, user, or condition. Visibility Baseline: isPublished Every column and relation has an isPublished flag (default: true ). isPublished: true — accessible by all authenticated users by default isPublished","Field Permissions",{"slug":1132,"summary":1133,"title":1134},"phan-quyen-truong","Quyền theo trường Kiểm soát quyền truy cập từng column và relation theo role, người dùng hoặc điều kiện. Mặc định hiển thị: isPublished Mọi column và relation đều có cờ isPublished (mặc định: true ). isPublished: true — mặc định mọi người dùng đã xác thực đều có thể truy cập isPu","Quyền theo trường",{"id":81,"slug":82},{"id":211,"slug":212,"icon":37,"order":1112,"metadata":1137,"parent":37},{"navigation":1138},{"en":1139,"vi":1142},{"slug":212,"summary":1140,"title":1141},"Examples Use these examples when you want short copy-ready snippets, common app recipes, or complete feature walkthroughs. Start with the small examples when you need syntax quickly. Use category recipes when you are building a normal product feature. Use walkthroughs when you wa","Examples",{"slug":1143,"summary":1144,"title":1145},"vi-du","Ví dụ Dùng các ví dụ này khi bạn cần snippet ngắn có thể dùng ngay, công thức ứng dụng phổ biến hoặc hướng dẫn hoàn chỉnh cho một tính năng. Bắt đầu với ví dụ nhỏ khi cần kiểm tra cú pháp nhanh. Dùng công thức theo nhóm khi bạn đang xây một tính năng sản phẩm thông thường. Dùng h","Ví dụ",{"id":308,"slug":309,"icon":37,"order":1112,"metadata":1147,"parent":1156},{"navigation":1148},{"en":1149,"vi":1152},{"slug":309,"summary":1150,"title":1151},"Auth & Permissions Use these examples when the main question is who can read or change a record. Enfyra uses enfyra_user as the built-in user table. Relate application records directly to enfyra_user through real relations, then enforce ownership with route permissions, field per","Auth & Permissions",{"slug":1153,"summary":1154,"title":1155},"vi-du\u002Fxac-thuc-va-phan-quyen","Xác thực và phân quyền Dùng các ví dụ này khi câu hỏi chính là ai có thể đọc hoặc thay đổi một bản ghi. Enfyra dùng enfyra_user làm table người dùng tích hợp sẵn. Hãy relation trực tiếp bản ghi ứng dụng với enfyra_user , sau đó áp dụng quyền sở hữu bằng route permission, field pe","Xác thực và phân quyền",{"id":211,"slug":212},{"id":1158,"slug":1159,"icon":37,"order":1112,"metadata":1160,"parent":1168},301,"sdk-next",{"navigation":1161},{"en":1162,"vi":1166},{"slug":1163,"summary":1164,"title":1165},"sdk\u002Fnext","Next Use @enfyra\u002Fsdk-next for a third-party Next.js application built with the App Router. It adds the same-origin Enfyra rewrite, provides providerless browser hooks, and creates request-scoped server clients that forward auth cookies safely. This package is for your own Next.js","Next",{"slug":1163,"summary":1167,"title":1165},"Next Dùng @enfyra\u002Fsdk-next cho third-party app viết bằng Next.js App Router. Package thêm same-origin rewrite tới Enfyra, cung cấp browser hook không cần Provider và tạo server client riêng cho từng request để forward auth cookie an toàn. Package này dành cho Next.js app riêng củ",{"id":378,"slug":379},{"id":166,"slug":167,"icon":37,"order":1170,"metadata":1171,"parent":1180},8,{"navigation":1172},{"en":1173,"vi":1176},{"slug":167,"summary":1174,"title":1175},"Hooks & Handlers (App UI) This section covers everything you configure from the admin app that affects server-side hooks and handlers : Hooks – Hooks System UI (preHooks and postHooks) Custom Handlers – Custom Handlers UI for replacing default CRUD Package Management – Installing","Hooks & Handlers (App UI)",{"slug":1177,"summary":1178,"title":1179},"ung-dung\u002Fhook-va-handler","Hook và Handler (giao diện App) Phần này bao quát mọi cấu hình trong Admin có ảnh hưởng đến hook và handler phía server : Hook — giao diện Hooks System ( preHooks và postHooks ) Custom Handler — giao diện Custom Handlers để thay CRUD mặc định Quản lý package — cài NPM package để ","Hook và Handler (giao diện App)",{"id":151,"slug":152},{"id":1182,"slug":1183,"icon":37,"order":1170,"metadata":1184,"parent":1193},249,"server-flows",{"navigation":1185},{"en":1186,"vi":1189},{"slug":1183,"summary":1187,"title":1188},"Flows (Automated Workflows) Flows are automated workflows that execute a sequence of steps based on triggers. They support scheduled execution (cron) and manual triggers. For event-driven flows, use handlers\u002Fhooks with @TRIGGER() . Tables Table Purpose enfyra_flow Flow configurat","Flows (Automated Workflows)",{"slug":1190,"summary":1191,"title":1192},"luong-tu-dong","Luồng tự động Flow là workflow tự động thực thi một chuỗi step theo trigger. Flow hỗ trợ chạy theo lịch (cron) và trigger thủ công. Với luồng dựa trên sự kiện, hãy dùng handler\u002Fhook cùng @TRIGGER() . Bảng dữ liệu Bảng Mục đích enfyra_flow Cấu hình flow (name, trigger, timeout, ma","Luồng tự động",{"id":81,"slug":82},{"id":1195,"slug":1196,"icon":37,"order":1170,"metadata":1197,"parent":37},264,"cloud",{"navigation":1198},{"en":1199,"vi":1202},{"slug":1196,"summary":1200,"title":1201},"Enfyra Cloud Enfyra Cloud is a management plane for Enfyra projects that run in infrastructure accounts you own. Enfyra connects to supported providers through OAuth, creates and manages the resources selected for each project, and gives you one console for provisioning, deployme","Enfyra Cloud",{"slug":1196,"summary":1203,"title":1201},"Enfyra Cloud Enfyra Cloud là control plane quản lý các Enfyra project chạy trong tài khoản hạ tầng do chính bạn sở hữu. Enfyra kết nối với provider được hỗ trợ qua OAuth, tạo và quản lý tài nguyên đã chọn cho từng project, đồng thời cung cấp một console chung cho provisioning, de",{"id":336,"slug":337,"icon":37,"order":1170,"metadata":1205,"parent":1214},{"navigation":1206},{"en":1207,"vi":1210},{"slug":337,"summary":1208,"title":1209},"Automation & Integrations Use these examples when Enfyra talks to another system, runs scheduled work, or protects a custom API. Recipes Webhook Ingest - Verify and store signed external events idempotently. Scheduled Cleanup - Run a daily flow that archives stale records. Rate-L","Automation & Integrations",{"slug":1211,"summary":1212,"title":1213},"vi-du\u002Ftu-dong-hoa-va-tich-hop","Tự động hóa và tích hợp Dùng các ví dụ này khi Enfyra cần trao đổi với hệ thống khác, chạy công việc theo lịch hoặc bảo vệ một API tùy biến. Công thức triển khai Webhook Ingest — Xác thực và lưu event bên ngoài đã ký theo cách idempotent. Dọn dẹp theo lịch — Chạy flow hằng ngày đ","Tự động hóa và tích hợp",{"id":211,"slug":212},{"id":1216,"slug":1217,"icon":37,"order":1170,"metadata":1218,"parent":1226},300,"sdk-vue",{"navigation":1219},{"en":1220,"vi":1224},{"slug":1221,"summary":1222,"title":1223},"sdk\u002Fvue","Vue Use @enfyra\u002Fsdk-vue for a client-rendered Vue 3 application that uses Enfyra as its backend. This package is CSR-only and must not run in an SSR process. This guide is for a separately deployed Vue application, not a Vue extension running inside Enfyra Admin. Install yarn add","Vue",{"slug":1221,"summary":1225,"title":1223},"Vue Dùng @enfyra\u002Fsdk-vue cho client-rendered Vue 3 app sử dụng Enfyra làm backend. Package này chỉ chạy trong browser và không được dùng trong SSR process. Hướng dẫn này dành cho Vue app deploy riêng, không phải Vue extension chạy bên trong Enfyra Admin. Cài đặt yarn add @enfyra\u002F",{"id":378,"slug":379},{"id":1228,"slug":1229,"icon":37,"order":1230,"metadata":1231,"parent":1240},191,"server-websocket",9,{"navigation":1232},{"en":1233,"vi":1236},{"slug":1229,"summary":1234,"title":1235},"WebSocket Integration Prerequisite: The WebSocket gateway must be enabled in Enfyra Admin before connecting. Contact your administrator to enable the gateway for your application. Connection Connect to Enfyra WebSocket using Socket.IO client: import { io } from 'socket.io-client'","WebSocket Integration",{"slug":1237,"summary":1238,"title":1239},"websocket","Tích hợp WebSocket Điều kiện trước: WebSocket gateway phải được bật trong Enfyra Admin trước khi kết nối. Hãy liên hệ quản trị viên để bật gateway cho ứng dụng của bạn. Kết nối Kết nối tới Enfyra WebSocket bằng Socket.IO client: import { io } from 'socket.io-client'; const socket","Tích hợp WebSocket",{"id":81,"slug":82},{"id":1242,"slug":1243,"icon":37,"order":1230,"metadata":1244,"parent":1253},248,"app-flows",{"navigation":1245},{"en":1246,"vi":1249},{"slug":1243,"summary":1247,"title":1248},"Flows - UI Guide Flows are managed from Settings > Flows in the sidebar. Flow List The list page shows all flows as cards with: - Flow name and description - Trigger type badge (Schedule, Manual) - Status toggle (Active\u002FInactive) - Step count and timeout - Click a card to open th","Flows - UI Guide",{"slug":1250,"summary":1251,"title":1252},"ung-dung\u002Fluong-tu-dong","Luồng - Hướng dẫn giao diện người dùng Các luồng được quản lý từ Cài đặt > Luồng trong thanh bên. Danh sách luồng Trang danh sách hiển thị tất cả các luồng dưới dạng thẻ có: - Tên luồng và mô tả - Huy hiệu loại kích hoạt (Lịch trình, Thủ công) - Chuyển đổi trạng thái (Hoạt động\u002FK","Luồng - Hướng dẫn giao diện người dùng",{"id":151,"slug":152},{"id":226,"slug":227,"icon":37,"order":1230,"metadata":1255,"parent":1264},{"navigation":1256},{"en":1257,"vi":1260},{"slug":227,"summary":1258,"title":1259},"CRUD Apps Use these examples for normal data-driven applications: task lists, publishing flows, catalogs, and order management. Each recipe starts from tables, then shows the REST or GraphQL calls a frontend usually needs. Use relation property names in request bodies and filters","CRUD Apps",{"slug":1261,"summary":1262,"title":1263},"vi-du\u002Fung-dung-crud","Ứng dụng CRUD Dùng các ví dụ này cho ứng dụng vận hành dựa trên dữ liệu: danh sách công việc, luồng xuất bản, catalog và quản lý đơn hàng. Mỗi công thức bắt đầu từ table, sau đó mô tả các lệnh REST hoặc GraphQL mà frontend thường cần. Dùng tên property của relation trong request ","Ứng dụng CRUD",{"id":211,"slug":212},{"id":1266,"slug":1267,"icon":37,"order":1230,"metadata":1268,"parent":1276},297,"sdk-react",{"navigation":1269},{"en":1270,"vi":1274},{"slug":1271,"summary":1272,"title":1273},"sdk\u002Freact","React Use @enfyra\u002Fsdk-react for a client-rendered React application that uses Enfyra as its backend. The package provides a client provider, auth state, queries, mutations, storage, and realtime hooks. This package is CSR-only. It is for a separately deployed React application, n","React",{"slug":1271,"summary":1275,"title":1273},"React Dùng @enfyra\u002Fsdk-react cho client-rendered React app sử dụng Enfyra làm backend. Package cung cấp client provider, auth state, query, mutation, storage và realtime hook. Package này chỉ chạy trong browser và dành cho React app deploy riêng, không phải extension chạy bên tro",{"id":378,"slug":379},{"id":1278,"slug":1279,"icon":37,"order":1280,"metadata":1281,"parent":1290},120,"server-file-handling",10,{"navigation":1282},{"en":1283,"vi":1286},{"slug":1279,"summary":1284,"title":1285},"File Handling Enfyra supports request file uploads, storage-backed file records, metadata updates, and file deletion through dynamic script helpers. Uploaded File Context For a dynamic POST, PATCH, or PUT route, configure Request body multipart for that method in the route editor","File Handling",{"slug":1287,"summary":1288,"title":1289},"xu-ly-tep","Xử lý tệp Enfyra hỗ trợ tải tệp lên từ request, bản ghi tệp trên storage, cập nhật metadata và xóa tệp qua các helper trong script động. Tệp tải lên trong context Với route động POST, PATCH hoặc PUT, mở cấu hình của từng method và chọn Request body multipart . Nếu không khai báo ","Xử lý tệp",{"id":81,"slug":82},{"id":1292,"slug":1293,"icon":37,"order":1280,"metadata":1294,"parent":1303},166,"app-storage-management",{"navigation":1295},{"en":1296,"vi":1299},{"slug":1293,"summary":1297,"title":1298},"Storage Management Storage Management allows you to organize and manage files and folders in your application. You can upload files, create folders, and configure storage locations. Accessing Storage Management Navigate to Storage Management in the sidebar You'll see the file man","Storage Management",{"slug":1300,"summary":1301,"title":1302},"ung-dung\u002Fquan-ly-luu-tru","Quản lý lưu trữ Quản lý lưu trữ cho phép bạn sắp xếp và quản lý các tệp và thư mục trong ứng dụng của mình. Bạn có thể tải tệp lên, tạo thư mục và định cấu hình vị trí lưu trữ. Truy cập Quản lý lưu trữ Điều hướng đến Quản lý lưu trữ trong thanh bên Bạn sẽ thấy giao diện quản lý f","Quản lý lưu trữ",{"id":151,"slug":152},{"id":267,"slug":268,"icon":37,"order":1280,"metadata":1305,"parent":1314},{"navigation":1306},{"en":1307,"vi":1310},{"slug":268,"summary":1308,"title":1309},"Files & Realtime Use these examples for uploads, attachments, notifications, and live updates. Files are managed through enfyra_file and storage helpers. Realtime uses Socket.IO gateways and event scripts. Browser apps should connect through the app-origin Socket.IO bridge rather","Files & Realtime",{"slug":1311,"summary":1312,"title":1313},"vi-du\u002Ffile-va-realtime","File và Realtime Dùng các ví dụ này cho upload, file đính kèm, thông báo và cập nhật trực tiếp. File được quản lý qua enfyra_file và storage helper. Realtime dùng Socket.IO gateway và event script. Ứng dụng trên trình duyệt nên kết nối qua Socket.IO bridge cùng origin của app tha","File và Realtime",{"id":211,"slug":212},{"id":1316,"slug":1317,"icon":37,"order":1318,"metadata":1319,"parent":1328},134,"server-cache-operations",11,{"navigation":1320},{"en":1321,"vi":1324},{"slug":1317,"summary":1322,"title":1323},"Cache Operations Enfyra provides managed user-cache operations and distributed locking through Redis. Use cache operations for performance optimization, rate limiting, and coordinating between instances. Quick Navigation Getting Started - Basic cache operations Cache Storage - Ge","Cache Operations",{"slug":1325,"summary":1326,"title":1327},"bo-nho-dem-va-khoa","Thao tác bộ nhớ đệm Enfyra cung cấp thao tác user cache được quản lý và cơ chế khóa phân tán qua Redis. Hãy dùng cache để tối ưu hiệu năng, giới hạn tần suất và điều phối giữa các instance. Điều hướng nhanh Bắt đầu - Thao tác cache cơ bản Lưu trữ cache - Đọc và ghi giá trị cache ","Thao tác bộ nhớ đệm",{"id":81,"slug":82},{"id":1330,"slug":1331,"icon":37,"order":1318,"metadata":1332,"parent":1341},170,"app-menu-management",{"navigation":1333},{"en":1334,"vi":1337},{"slug":1331,"summary":1335,"title":1336},"Menu Management Menu Management provides a visual interface for creating and organizing navigation menus in your application. You can create hierarchical menu structures with drag-and-drop reordering, configure permissions, and manage menu items all through an intuitive visual ed","Menu Management",{"slug":1338,"summary":1339,"title":1340},"ung-dung\u002Fquan-ly-menu","Quản lý menu Quản lý menu cung cấp giao diện trực quan để tạo và sắp xếp menu điều hướng trong ứng dụng. Bạn có thể xây dựng cấu trúc menu phân cấp, kéo thả để thay đổi thứ tự, cấu hình quyền và quản lý các mục menu ngay trong trình chỉnh sửa trực quan. Truy cập trang Quản lý men","Quản lý menu",{"id":151,"slug":152},{"id":1343,"slug":1344,"icon":37,"order":1345,"metadata":1346,"parent":1355},118,"server-cluster-architecture",12,{"navigation":1347},{"en":1348,"vi":1351},{"slug":1344,"summary":1349,"title":1350},"Cluster Architecture Multiple Enfyra server processes can run against the same database and Redis. Coordination uses Redis Pub\u002FSub (cache reload signals), Redis-backed BullMQ (background jobs), Redis for Socket.IO ( @socket.io\u002Fredis-adapter ), and namespace-scoped Redis leases fo","Cluster Architecture",{"slug":1352,"summary":1353,"title":1354},"kien-truc-cum","Kiến trúc cụm Nhiều process Enfyra server có thể cùng chạy trên một database và Redis. Chúng phối hợp qua Redis Pub\u002FSub (tín hiệu nạp lại cache), BullMQ dùng Redis (tác vụ nền), Redis cho Socket.IO ( @socket.io\u002Fredis-adapter ) và Redis lease theo namespace cho provisioning hệ thố","Kiến trúc cụm",{"id":81,"slug":82},{"id":1357,"slug":1358,"icon":37,"order":1345,"metadata":1359,"parent":1368},288,"app-theme-color-contract",{"navigation":1360},{"en":1361,"vi":1364},{"slug":1358,"summary":1362,"title":1363},"App Theme Guide Use this guide when you build Enfyra App pages, widgets, or extensions and want them to match the admin console in both light and dark mode. The short rule is: choose colors by meaning, not by palette name. Do not pick green , violet , cyan , hex colors, or raw CS","App Theme Guide",{"slug":1365,"summary":1366,"title":1367},"ung-dung\u002Fhop-dong-mau-sac-theme","Hướng dẫn về theme cho ứng dụng Hãy dùng hướng dẫn này khi xây dựng trang, widget hoặc extension cho Enfyra App để giao diện đồng bộ với trang quản trị ở cả chế độ sáng và tối. Nguyên tắc ngắn gọn là: chọn màu theo ý nghĩa, không chọn theo tên bảng màu. Đừng dùng green , violet ,","Hướng dẫn về theme cho ứng dụng",{"id":151,"slug":152},{"id":1370,"slug":1371,"icon":37,"order":1372,"metadata":1373,"parent":1382},174,"app-extension-system",13,{"navigation":1374},{"en":1375,"vi":1378},{"slug":1371,"summary":1376,"title":1377},"Extension System The Extension System allows you to create custom pages, widgets, and global shell integrations using Vue.js components. Page extensions pair with menu items to provide route content, widget extensions are embedded inside pages, and global extensions mount once at","Extension System",{"slug":1379,"summary":1380,"title":1381},"ung-dung\u002Fhe-thong-mo-rong","Hệ thống mở rộng Hệ thống tiện ích mở rộng cho phép bạn tạo các trang, tiện ích tùy chỉnh và tích hợp shell toàn cầu bằng cách sử dụng các thành phần Vue.js. Tiện ích mở rộng trang kết hợp với các mục menu để cung cấp nội dung định tuyến, tiện ích mở rộng tiện ích được nhúng bên ","Hệ thống mở rộng",{"id":151,"slug":152},{"id":1384,"slug":1385,"icon":37,"order":1372,"metadata":1386,"parent":1395},252,"server-schema-migration-preview",{"navigation":1387},{"en":1388,"vi":1391},{"slug":1385,"summary":1389,"title":1390},"Schema Preview When you change a table’s schema via PATCH \u002Fapi\u002Fenfyra_table\u002F:id (admin UI or API), Enfyra may require a confirmed preview before applying destructive changes. This keeps multi-DB behavior aligned and prevents silent data loss. When preview is required Removing col","Schema Preview",{"slug":1392,"summary":1393,"title":1394},"xem-truoc-chuyen-doi-luoc-do","Xem trước thay đổi schema Khi thay đổi schema của một bảng bằng PATCH \u002Fapi\u002Fenfyra_table\u002F:id (trên giao diện quản trị hoặc qua API), Enfyra có thể yêu cầu bạn xác nhận bản xem trước trước khi áp dụng thay đổi có nguy cơ mất dữ liệu. Cơ chế này giữ hành vi nhất quán giữa các databa","Xem trước thay đổi schema",{"id":81,"slug":82},{"id":1397,"slug":1398,"icon":37,"order":1399,"metadata":1400,"parent":1409},135,"server-error-handling",14,{"navigation":1401},{"en":1402,"vi":1405},{"slug":1398,"summary":1403,"title":1404},"Error Handling Enfyra provides built-in error handling mechanisms for throwing HTTP errors and handling exceptions in hooks and handlers. Quick Navigation Throwing Errors - How to throw HTTP errors HTTP Status Codes - Available status codes Error Handling in postHook - Handling e","Error Handling",{"slug":1406,"summary":1407,"title":1408},"xu-ly-loi","Xử lý lỗi Enfyra có sẵn cơ chế xử lý lỗi để ném lỗi HTTP và xử lý ngoại lệ trong hook, handler. Điều hướng nhanh Ném lỗi - Cách ném lỗi HTTP Mã trạng thái HTTP - Các mã trạng thái hỗ trợ Xử lý lỗi trong postHook - Xử lý lỗi đã xảy ra Mẫu thường dùng - Ví dụ xử lý lỗi thực tế Ném ","Xử lý lỗi",{"id":81,"slug":82},{"id":1411,"slug":1412,"icon":37,"order":1399,"metadata":1413,"parent":1422},171,"app-header-actions",{"navigation":1414},{"en":1415,"vi":1418},{"slug":1412,"summary":1416,"title":1417},"Header Actions System Extensions can dynamically inject custom actions into the app's header and sub-header areas, providing seamless integration with the core interface. This demonstrates the incredible power of Enfyra's extension system - extensions can intervene and customize ","Header Actions System",{"slug":1419,"summary":1420,"title":1421},"ung-dung\u002Fhanh-dong-dau-trang","Hệ thống hành động tiêu đề Tiện ích mở rộng có thể tự động đưa các hành động tùy chỉnh vào khu vực tiêu đề và tiêu đề phụ của ứng dụng, cung cấp khả năng tích hợp liền mạch với giao diện cốt lõi. Điều này thể hiện sức mạnh đáng kinh ngạc của hệ thống tiện ích mở rộng của Enfyra -","Hệ thống hành động tiêu đề",{"id":151,"slug":152},{"id":1424,"slug":1425,"icon":37,"order":1426,"metadata":1427,"parent":1436},173,"app-page-header",15,{"navigation":1428},{"en":1429,"vi":1432},{"slug":1425,"summary":1430,"title":1431},"Page Header System The Page Header System allows you to register custom page headers that appear at the top of each page, providing context and navigation information to users. Table of Contents Overview Basic Usage Header Variants Gradient Options Leading icon Stats Display Adva","Page Header System",{"slug":1433,"summary":1434,"title":1435},"ung-dung\u002Fdau-trang","Hệ thống đầu trang Hệ thống đầu trang cho phép bạn đăng ký nội dung đầu trang tùy chỉnh để hiển thị ở phía trên mỗi trang, giúp người dùng nắm được ngữ cảnh và thông tin điều hướng. Mục lục Tổng quan Cách dùng cơ bản Các biến thể đầu trang Tùy chọn gradient Biểu tượng đầu dòng Hi","Hệ thống đầu trang",{"id":151,"slug":152},{"id":1438,"slug":1439,"icon":37,"order":1426,"metadata":1440,"parent":1449},304,"server-shared-helpers",{"navigation":1441},{"en":1442,"vi":1445},{"slug":1439,"summary":1443,"title":1444},"Reuse server operations with Shared Helpers Shared Helpers let handlers, hooks, flow scripts and other dynamic server scripts call one saved operation by name without dispatching another route or starting a queue job. Use them for a reusable operation with explicit inputs and a c","Reuse server operations with Shared Helpers",{"slug":1446,"summary":1447,"title":1448},"may-chu\u002Fhelper-dung-chung","Tái sử dụng thao tác server bằng Shared Helpers Shared Helpers cho phép handler, hook, flow script và các dynamic script khác gọi một thao tác đã lưu theo tên, không cần dispatch route khác hay tạo queue job. Dùng helper cho thao tác tái sử dụng có đầu vào rõ ràng và kết quả xác ","Tái sử dụng thao tác server bằng Shared Helpers",{"id":81,"slug":82},{"id":1451,"slug":1452,"icon":37,"order":1426,"metadata":1453,"parent":1462},305,"server-code-history",{"navigation":1454},{"en":1455,"vi":1458},{"slug":1452,"summary":1456,"title":1457},"Code Audit and Versioning Code audit identifies a changed record by its exact table and ID, records the caller, and keeps the earlier source so it can be reviewed or restored. The current source stays on the record itself. Versioned records These nine tables require an advancing ","Code Audit and Versioning",{"slug":1459,"summary":1460,"title":1461},"lich-su-code","Audit code và phiên bản Lịch sử code xác định record bằng đúng tên bảng và ID, ghi nhận người thao tác và giữ source trước thay đổi để xem lại hoặc phục hồi. Source hiện tại nằm trên chính record. Record có version Chín bảng sau bắt buộc gửi version mới mỗi lần update, kể cả khi ","Audit code và phiên bản",{"id":81,"slug":82},{"id":1464,"slug":1465,"icon":37,"order":1466,"metadata":1467,"parent":1476},254,"app-runtime-monitor",16,{"navigation":1468},{"en":1469,"vi":1472},{"slug":1465,"summary":1470,"title":1471},"Runtime Monitor Runtime Monitor is available at Settings > Admin > Runtime Monitor . It helps admins inspect the running Enfyra server without leaving the admin app. Tabs Overview : process, request, database, queue, websocket, and health metrics. Requests : recent HTTP request l","Runtime Monitor",{"slug":1473,"summary":1474,"title":1475},"ung-dung\u002Fgiam-sat-runtime","Giám sát runtime Giám sát runtime có tại Cài đặt > Quản trị > Giám sát runtime . Công cụ này giúp quản trị viên kiểm tra Enfyra Server đang chạy mà không cần rời ứng dụng quản trị. Các tab Tổng quan : chỉ số về tiến trình, request, cơ sở dữ liệu, hàng đợi, websocket và tình trạng","Giám sát runtime",{"id":151,"slug":152},{"id":1478,"slug":1479,"icon":37,"order":1480,"metadata":1481,"parent":1490},246,"app-log-viewing",17,{"navigation":1482},{"en":1483,"vi":1486},{"slug":1479,"summary":1484,"title":1485},"Trace Errors and Script Logs Open Settings Server Logs ( \u002Fsettings\u002Flogs ) to investigate a failed operation or inspect output from @LOGS(...) . The page reads database records across server instances. Access Root administrators can read both tabs and their details. Other administ","Trace Errors and Script Logs",{"slug":1487,"summary":1488,"title":1489},"ung-dung\u002Fxem-nhat-ky","Trace lỗi và log của script Mở Settings Server Logs ( \u002Fsettings\u002Flogs ) để tìm nguyên nhân thao tác thất bại hoặc xem nội dung từ @LOGS(...) . Trang này đọc các record trong database, bao gồm log từ nhiều instance của server. Quyền truy cập Root administrator có thể đọc cả hai tab","Trace lỗi và log của script",{"id":151,"slug":152},{"id":1492,"slug":1493,"icon":37,"order":1494,"metadata":1495,"parent":1504},260,"app-method-management",18,{"navigation":1496},{"en":1497,"vi":1500},{"slug":1493,"summary":1498,"title":1499},"Method Management Method Management controls the HTTP method records used by route forms, handler\u002Fhook selectors, API testing, and method badges in the Enfyra App. Open Method Manager Go to Settings > Methods . Review the existing method records and their badge colors. Click New ","Method Management",{"slug":1501,"summary":1502,"title":1503},"ung-dung\u002Fquan-ly-phuong-thuc","Quản lý phương thức Quản lý phương thức kiểm soát các bản ghi HTTP method dùng trong biểu mẫu tuyến, bộ chọn handler\u002Fhook, kiểm thử API và nhãn method của Enfyra App. Mở trình quản lý phương thức Vào Cài đặt > Phương thức . Xem các method hiện có và màu nhãn của chúng. Nhấn Phươn","Quản lý phương thức",{"id":151,"slug":152},{"id":1506,"slug":1507,"icon":37,"order":1494,"metadata":1508,"parent":1517},306,"app-code-history",{"navigation":1509},{"en":1510,"vi":1513},{"slug":1507,"summary":1511,"title":1512},"Audit Code Changes Use Audit to inspect earlier dynamic-code revisions and restore one without resetting the record's version. Save a code record When updating a handler, hook, shared helper, WebSocket gateway or event, OAuth configuration, flow step, or extension: Edit and valid","Audit Code Changes",{"slug":1514,"summary":1515,"title":1516},"ung-dung\u002Flich-su-code","Audit thay đổi code Dùng Audit để kiểm tra source của phiên bản trước và phục hồi mà không đặt lùi version của record. Lưu record code Khi cập nhật handler, hook, shared helper, WebSocket gateway hoặc event, cấu hình OAuth, flow step hay extension: Sửa và kiểm tra record, rồi chọ","Audit thay đổi code",{"id":151,"slug":152},{"id":1519,"slug":1520,"icon":37,"order":1521,"metadata":1522,"parent":1531},302,"app-data-table",19,{"navigation":1523},{"en":1524,"vi":1527},{"slug":1520,"summary":1525,"title":1526},"Display records with DataTable Use DataTable for structured records in an Enfyra Admin page or widget. It wraps Nuxt UI's UTable : columns, sorting, visibility, selection, loading, and named cell\u002Fheader slots follow the native table model. Use a card grid for distinct visual item","Display records with DataTable",{"slug":1528,"summary":1529,"title":1530},"ung-dung\u002Fbang-du-lieu","Hiển thị bản ghi bằng DataTable Dùng DataTable cho các bản ghi có cấu trúc trong page hoặc widget của Enfyra Admin. Đây là wrapper của UTable thuộc Nuxt UI: cột, sắp xếp, ẩn\u002Fhiện cột, chọn dòng, loading và slot của ô\u002Ftiêu đề theo mô hình bảng gốc. Dùng card grid cho nội dung thiê","Hiển thị bản ghi bằng DataTable",{"id":151,"slug":152},{"id":1533,"slug":1534,"icon":37,"order":1521,"metadata":1535,"parent":1544},303,"app-settings-search",{"navigation":1536},{"en":1537,"vi":1540},{"slug":1534,"summary":1538,"title":1539},"Find Settings records quickly Use the table's Search field to find records without opening the advanced filter builder. Each Settings quick search targets exactly one field. Settings page Search field Users email Roles name Routes path Guards name Flows name Extensions name WebSo","Find Settings records quickly",{"slug":1541,"summary":1542,"title":1543},"ung-dung\u002Ftim-nhanh-settings","Tìm nhanh bản ghi trong Settings Dùng ô Search của bảng để tìm bản ghi mà không cần mở bộ lọc nâng cao. Mỗi tìm kiếm nhanh trong Settings chỉ nhắm đến một field. Trang Settings Field tìm kiếm Users email Roles name Routes path Guards name Flows name Extensions name WebSockets pat","Tìm nhanh bản ghi trong Settings",{"id":151,"slug":152},[1546,1559,1569,1580,1590,1599,1609],{"id":383,"kind":1547,"type":1548,"to":1549,"href":37,"icon":37,"order":383,"metadata":1550,"contentSet":1552},"primary","internal","\u002F",{"active":1551},"exact",{"id":1553,"contents":1554},46,[1555],{"languageCode":12,"values":1556,"isActive":30,"id":1558},{"label":1557,"ariaLabel":37},"Home",525,{"id":564,"kind":1547,"type":1548,"to":1560,"href":37,"icon":37,"order":564,"metadata":1561,"contentSet":1562},"\u002Ffeatures",{"active":1551},{"id":1563,"contents":1564},47,[1565],{"languageCode":12,"values":1566,"isActive":30,"id":1568},{"label":1567,"ariaLabel":37},"Features",526,{"id":1112,"kind":1547,"type":1548,"to":1570,"href":37,"icon":1571,"order":741,"metadata":1572,"contentSet":1573},"\u002Fpricing","lucide:badge-dollar-sign",{"active":1551},{"id":1574,"contents":1575},51,[1576],{"languageCode":12,"values":1577,"isActive":30,"id":1579},{"label":1578,"ariaLabel":1578},"Pricing",531,{"id":741,"kind":1547,"type":1548,"to":34,"href":37,"icon":37,"order":878,"metadata":1581,"contentSet":1583},{"active":1582},"prefix",{"id":1584,"contents":1585},48,[1586],{"languageCode":12,"values":1587,"isActive":30,"id":1589},{"label":1588,"ariaLabel":37},"Docs",527,{"id":878,"kind":1547,"type":1548,"to":1591,"href":37,"icon":37,"order":976,"metadata":1592,"contentSet":1593},"\u002Fgetting-started",{"active":1551},{"id":1594,"contents":1595},49,[1596],{"languageCode":12,"values":1597,"isActive":30,"id":1598},{"label":88,"ariaLabel":37},528,{"id":976,"kind":1547,"type":1548,"to":1600,"href":37,"icon":37,"order":1051,"metadata":1601,"contentSet":1602},"\u002Fcommunity",{"active":1551},{"id":1603,"contents":1604},50,[1605],{"languageCode":12,"values":1606,"isActive":30,"id":1608},{"label":1607,"ariaLabel":37},"Community",529,{"id":1051,"kind":1610,"type":1611,"to":37,"href":6,"icon":1612,"order":383,"metadata":37,"contentSet":1613},"social","external","lucide:github",{"id":1614,"contents":1615},338,[1616],{"languageCode":12,"values":1617,"isActive":30,"id":1619},{"label":1618,"ariaLabel":1618},"GitHub",530,[1621,1661,1700,1741],{"id":1399,"type":1622,"order":383,"contentSet":1623,"children":1630},"group",{"id":1624,"contents":1625},52,[1626],{"languageCode":12,"values":1627,"isActive":30,"id":1629},{"label":1628},"Product",545,[1631,1638,1645,1652],{"id":383,"type":1548,"to":1560,"href":37,"order":383,"isActive":30,"contentSet":1632},{"id":1633,"contents":1634},57,[1635],{"languageCode":12,"values":1636,"isActive":30,"id":1637},{"label":1567},532,{"id":564,"type":1548,"to":1591,"href":37,"order":564,"isActive":30,"contentSet":1639},{"id":1640,"contents":1641},58,[1642],{"languageCode":12,"values":1643,"isActive":30,"id":1644},{"label":88},533,{"id":741,"type":1548,"to":34,"href":37,"order":741,"isActive":30,"contentSet":1646},{"id":1647,"contents":1648},59,[1649],{"languageCode":12,"values":1650,"isActive":30,"id":1651},{"label":46},534,{"id":878,"type":1611,"to":37,"href":1653,"order":878,"isActive":30,"contentSet":1654},"https:\u002F\u002Fdemo.enfyra.io\u002F",{"id":1655,"contents":1656},60,[1657],{"languageCode":12,"values":1658,"isActive":30,"id":1660},{"label":1659},"Demo",535,{"id":1426,"type":1622,"order":564,"contentSet":1662,"children":1669},{"id":1663,"contents":1664},53,[1665],{"languageCode":12,"values":1666,"isActive":30,"id":1668},{"label":1667},"Resources",546,[1670,1677,1684,1692],{"id":1230,"type":1548,"to":34,"href":37,"order":383,"isActive":30,"contentSet":1671},{"id":1672,"contents":1673},65,[1674],{"languageCode":12,"values":1675,"isActive":30,"id":1676},{"label":643},540,{"id":1280,"type":1548,"to":34,"href":37,"order":564,"isActive":30,"contentSet":1678},{"id":1679,"contents":1680},66,[1681],{"languageCode":12,"values":1682,"isActive":30,"id":1683},{"label":1141},541,{"id":1318,"type":1548,"to":34,"href":37,"order":741,"isActive":30,"contentSet":1685},{"id":1686,"contents":1687},91,[1688],{"languageCode":12,"values":1689,"isActive":30,"id":1691},{"label":1690},"Architecture",542,{"id":1345,"type":1611,"to":37,"href":6,"order":878,"isActive":30,"contentSet":1693},{"id":1694,"contents":1695},92,[1696],{"languageCode":12,"values":1697,"isActive":30,"id":1699},{"label":1698},"Contributing",543,{"id":1466,"type":1622,"order":741,"contentSet":1701,"children":1707},{"id":1702,"contents":1703},54,[1704],{"languageCode":12,"values":1705,"isActive":30,"id":1706},{"label":1607},547,[1708,1715,1724,1732],{"id":976,"type":1611,"to":37,"href":6,"order":383,"isActive":30,"contentSet":1709},{"id":1710,"contents":1711},61,[1712],{"languageCode":12,"values":1713,"isActive":30,"id":1714},{"label":1618},536,{"id":1051,"type":1611,"to":37,"href":1716,"order":564,"isActive":30,"contentSet":1717},"https:\u002F\u002Fdiscord.gg\u002FDH5sXtFVWM",{"id":1718,"contents":1719},62,[1720],{"languageCode":12,"values":1721,"isActive":30,"id":1723},{"label":1722},"Discord",537,{"id":1112,"type":1548,"to":1600,"href":37,"order":741,"isActive":30,"contentSet":1725},{"id":1726,"contents":1727},63,[1728],{"languageCode":12,"values":1729,"isActive":30,"id":1731},{"label":1730},"Discussions",538,{"id":1170,"type":1611,"to":37,"href":1733,"order":878,"isActive":30,"contentSet":1734},"https:\u002F\u002Fgithub.com\u002Fenfyra\u002Fenfyra\u002Fissues",{"id":1735,"contents":1736},64,[1737],{"languageCode":12,"values":1738,"isActive":30,"id":1740},{"label":1739},"Issues",539,{"id":1480,"type":1622,"order":878,"contentSet":1742,"children":1749},{"id":1743,"contents":1744},55,[1745],{"languageCode":12,"values":1746,"isActive":30,"id":1748},{"label":1747},"Legal",548,[1750,1759,1768,1777],{"id":1372,"type":1548,"to":1751,"href":37,"order":383,"isActive":30,"contentSet":1752},"\u002Fcloud-terms",{"id":1753,"contents":1754},93,[1755],{"languageCode":12,"values":1756,"isActive":30,"id":1758},{"label":1757},"Cloud Terms",544,{"id":1494,"type":1548,"to":1760,"href":37,"order":564,"isActive":30,"contentSet":1761},"\u002Fprivacy-policy",{"id":1762,"contents":1763},94,[1764],{"languageCode":12,"values":1765,"isActive":30,"id":1767},{"label":1766},"Privacy Policy",549,{"id":1521,"type":1548,"to":1769,"href":37,"order":741,"isActive":30,"contentSet":1770},"\u002Frefund-policy",{"id":1771,"contents":1772},95,[1773],{"languageCode":12,"values":1774,"isActive":30,"id":1776},{"label":1775},"Refund Policy",550,{"id":1778,"type":1548,"to":1779,"href":37,"order":878,"isActive":30,"contentSet":1780},20,"\u002Fcloud-headroom",{"id":1781,"contents":1782},96,[1783],{"languageCode":12,"values":1784,"isActive":30,"id":1786},{"label":1785},"Cloud Provider Model",551,[1788],{"id":136,"slug":137,"icon":37,"order":741,"metadata":1789,"contentSet":1793,"parent":1798},{"navigation":1790},{"en":1791,"vi":1792},{"slug":137,"summary":756,"title":757},{"slug":759,"summary":760,"title":761},{"id":802,"contents":1794},[1795],{"languageCode":12,"values":1796,"isActive":30,"id":1098},{"title":757,"summary":756,"contentHtml":1797,"slug":137},"\u003Ch1>Context Reference\u003C\u002Fh1>\n\u003Cp>The \u003Ccode>$ctx\u003C\u002Fcode> (context) object is available in all hooks and handlers. It provides access to request data, database repositories, helper functions, cache operations, and more.\u003C\u002Fp>\n\u003Ch2>Quick Navigation\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fserver-context-reference-request-data\">Request Data\u003C\u002Fa> - \u003Ccode>$ctx.$body\u003C\u002Fcode>, \u003Ccode>$ctx.$params\u003C\u002Fcode>, \u003Ccode>$ctx.$query\u003C\u002Fcode>, \u003Ccode>$ctx.$user\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fserver-context-reference-repositories\">Repositories\u003C\u002Fa> - \u003Ccode>$ctx.$repos\u003C\u002Fcode> for database operations\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fserver-context-reference-helpers-cache\">Helpers &amp; Cache\u003C\u002Fa> - \u003Ccode>$ctx.$helpers\u003C\u002Fcode> (JWT, bcrypt, crypto, file helpers, rate limiting) and \u003Ccode>$ctx.$cache\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fserver-shared-helpers\">Shared Helpers\u003C\u002Fa> - Explicit named calls with fresh data and inherited execution capabilities\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fserver-context-reference-logging-errors\">Logging &amp; Error Handling\u003C\u002Fa> - \u003Ccode>$ctx.$logs()\u003C\u002Fcode> and \u003Ccode>$ctx.$throw\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fserver-context-reference-advanced\">Advanced Features\u003C\u002Fa> - File uploads, \u003Ccode>$ctx.$env\u003C\u002Fcode>, API info, shared context, packages, and patterns\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Documentation\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>\u003Ca href=\"\u002Fdocs\u002Fserver-context-reference-request-data\">Request Data\u003C\u002Fa>\u003C\u002Fstrong> - Access HTTP request information and parameters\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ca href=\"\u002Fdocs\u002Fserver-context-reference-repositories\">Repositories\u003C\u002Fa>\u003C\u002Fstrong> - Database operations through repositories\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ca href=\"\u002Fdocs\u002Fserver-context-reference-helpers-cache\">Helpers &amp; Cache\u003C\u002Fa>\u003C\u002Fstrong> - Utility functions (JWT, bcrypt, crypto, rate limiting) and Redis cache operations\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ca href=\"\u002Fdocs\u002Fserver-context-reference-logging-errors\">Logging &amp; Error Handling\u003C\u002Fa>\u003C\u002Fstrong> - Adding logs and throwing errors\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ca href=\"\u002Fdocs\u002Fserver-context-reference-advanced\">Advanced Features\u003C\u002Fa>\u003C\u002Fstrong> - File uploads, sanitized env access, API information, shared context, and more\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Next Steps\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>See \u003Ca href=\"..\u002Frepository-methods\u002F\">Repository Methods\u003C\u002Fa> for database operations\u003C\u002Fli>\n\u003Cli>Check \u003Ca href=\"\u002Fdocs\u002Fserver-api-lifecycle\">API Lifecycle\u003C\u002Fa> to understand when context is available\u003C\u002Fli>\n\u003Cli>Learn about \u003Ca href=\"..\u002Fhooks-handlers\u002F\">Hooks and Handlers\u003C\u002Fa> for using context in custom code\u003C\u002Fli>\n\u003C\u002Ful>",{"id":81,"slug":82}]