食品供應商審核應用後端範本
GFSI 認證日誌及設施審核追蹤
一個生產就緒的食品供應商審核後端在 Back4app,適用於經理、協調員和現場工作人員。通過 AI 代理提示、ER 圖、數據字典和 API 遊樂場追蹤 GFSI 認證日誌、設施照片及不合規問題。
關鍵要點
此模板為食品供應商審核團隊提供 GFSI 認證日誌、設施照片和不合規跟進的後端,無需從零設計數據模型。
- GFSI 認證日誌 — 在 GFSILog 類中存儲檢查日期、證書參考和審查結果。
- 設施照片證據 — 將帶有時間戳的 FacilityPhoto 記錄附加到審核中,以便現場團隊能夠記錄他們所發現的內容。
- 不合規追蹤 — 開啟、指派和關閉具有明確狀態和截止日期的 NonCompliance 項目。
- 供應商及審核歷史 — 使用供應商、審核及審核指派指針將每個現場檢查與正確的設施聯繫起來。
- 單一後端適用於移動和網頁 — 通過一個REST和GraphQL API為管理者和檢查員提供服務,跨越您的前端。
概覽:食品供應商審核應用
審核足夠昂貴,沒有食品供應商審核團隊手動重建歷史;帶有時間戳的工作流能迅速回本。詳細資訊不是可選的。此模板在Back4app上結構化了審核員、供應商、審核、設施照片和GFSILog,內建審核記錄,使食品供應商審核評審可以顯示可辯護的時間線。架構涵蓋審核員(姓名、電子郵件、角色)、供應商(供應商名稱、現場位置、聯繫人姓名)、審核(供應商、審核日期、結果、備註)、設施照片(審核、圖片、標題、拍攝時間)、GFSILog(審核、證書ID、標準、發放時間、到期時間)及不合規(審核、嚴重性、狀態、整改措施、到期日),並內建授權、審核記錄和照片支援的評審流程。
最佳用途:
這個食品供應商審核後端的組織方式
食品供應商審核不僅關乎速度;當有人問「請告訴我你怎麼知道這是真的。」時,還要關乎可防禦性。
無論您是從Flutter、React、Next.js還是其他支持的路徑開始,都可以期待相同的審核員、供應商和審核。
核心食品供應商審計功能
本中心中的每個技術卡片都使用相同的供應商審計後端結構,包括審計員、供應商、審計、設施照片、GFSILog 和不合規。
審核員帳戶和分配
審核員為管理者和現場員工儲存姓名、電子郵件和角色。
供應商站點檔案
供應商追蹤供應商名稱、場地位置和聯絡人姓名。
GFSI 認證記錄
GFSILog 儲存 certificateId、標準、屆滿時間和過期時間。
設施照片證據
FacilityPhoto 將圖像、標題和拍攝時間與審核連接。
不合規追踪
NonCompliance 儲存嚴重性、狀態、糾正措施和到期日期。
為什麼要使用Back4app構建您的食品供應商審計應用後端?
Back4app 為審計團隊提供了一種乾淨的方式來存儲供應商訪問、GFSI 證據和不合規後續,並將 API 和身份驗證模型保持在一個地方。
- •具有真實結構的審計記錄: 審計類別將每次訪問與供應商相連接,GFSILog 將 certificateId、標準、發出時間和到期時間一起保留以供審核。
- •設施照片保持附加: FacilityPhoto 記錄指向它們所屬的審計,因此檢查員可以按地點和訪問排序圖像,而不是搜索文件轉儲。
- •不合規行為保持可行動: 使用 NonCompliance 欄位,如嚴重性、狀態、糾正行動和到期日期來跟蹤檢查結束後需要關注的事項。
啟動一個供應商審計後端,將檢查、照片證據和糾正措施保留在一個 API 合約中。
核心優勢
一個供應商審計後端,可幫助您記錄檢查、管理證據並以更少的返工關閉問題。
更快的審計設置
從供應商、審計和 GFSILog 類別開始,而不是在第一次現場訪問已安排後定義每個字段。
照片支持的發現
將設施照片連結到審計,以便每個不合規項目都可以對照確切的設施圖片進行審查。
清晰的校正措施追蹤
使用 NonCompliance.status 和 NonCompliance.dueDate 來顯示哪些項目是開放的、逾期的或已驗證的。
一致的供應商歷史
查詢供應商記錄及相關審核以查看一個站點在檢查中的表現。
所有審核客戶的單一 API
REST 和 GraphQL 支援網頁儀表板、移動檢查應用程式及後台審閱畫面。
提示驅動的啟動
通過 AI Agent 為供應商審核生成後端框架、身份驗證規則和種子數據。
準備好啟動您的食品供應商審核應用程式了嗎?
讓 Back4app AI Agent 為您的供應商審核後端搭建框架,並從一個提示中生成 GFSI 日誌、設施照片和不合規流程。
免費開始 — 每月 50 個 AI 代理提示,不需要信用卡
技術棧
這個食品供應商審核後端模板包含所有功能。
ER 圖
食品供應商審核後端架構的實體關係模型。
涵蓋審核員、供應商、審核、設施照片、GFSI 日誌和不合規項目的架構。
查看圖表來源
erDiagram
Auditor ||--o{ FacilityAudit : "audits"
Supplier ||--o{ FacilityAudit : "site"
FacilityAudit ||--o{ FacilityPhoto : "evidence"
FacilityAudit ||--o{ GfsiCertificationLog : "references"
FacilityAudit ||--o{ NonComplianceFinding : "finds"
FacilityAudit ||--o{ AuditComment : "commented on"
Supplier ||--o{ FacilityPhoto : "site"
Supplier ||--o{ GfsiCertificationLog : "certification log"
Supplier ||--o{ NonComplianceFinding : "supplier"
Auditor ||--o{ AuditComment : "author"
Auditor {
String objectId PK
String username
String email
String password
String role
Date createdAt
Date updatedAt
}
Supplier {
String objectId PK
String supplierCode
String name
String siteType
String status
String primaryContact
Date createdAt
Date updatedAt
}
FacilityAudit {
String objectId PK
String auditNumber
String supplierId FK
String auditorId FK
Date auditDate
String auditType
Number overallScore
String gfsiStatus
String notes
Date createdAt
Date updatedAt
}
FacilityPhoto {
String objectId PK
String auditId FK
String supplierId FK
String photoUrl
String caption
String photoType
Date takenAt
Date createdAt
Date updatedAt
}
GfsiCertificationLog {
String objectId PK
String supplierId FK
String auditId FK
String certificateName
String certificateNumber
Date issuedAt
Date expiresAt
String verificationStatus
String documentUrl
Date createdAt
Date updatedAt
}
NonComplianceFinding {
String objectId PK
String auditId FK
String supplierId FK
String findingCode
String severity
String description
String correctiveAction
Date dueDate
Date closedAt
Date createdAt
Date updatedAt
}
AuditComment {
String objectId PK
String auditId FK
String authorId FK
String commentText
Date createdAt
Date updatedAt
}
整合流程
登錄、供應商審查、GFSI 日誌捕獲、設施照片上傳和不合規跟進的典型執行流程。
查看圖表來源
sequenceDiagram
participant User
participant App as Food Supplier Audit App
participant Back4app as Back4app Cloud
User->>App: Sign in to the audit dashboard
App->>Back4app: POST /login
Back4app-->>App: Session token
User->>App: Open supplier audit list
App->>Back4app: GET /classes/FacilityAudit?include=supplier,auditor&order=-auditDate
Back4app-->>App: FacilityAudit rows
User->>App: Add GFSI certification log
App->>Back4app: POST /classes/GfsiCertificationLog
Back4app-->>App: GfsiCertificationLog objectId
User->>App: Upload facility photo and non-compliance finding
App->>Back4app: POST /classes/FacilityPhoto
App->>Back4app: POST /classes/NonComplianceFinding
Back4app-->>App: Photo and finding saved
App->>Back4app: Subscribe to audit updates
Back4app-->>App: LiveQuery pushes updated audits資料字典
食品供應商審計架構中每個類別的字段級別參考。
| 字段 | 類型 | 描述 | 必需 |
|---|---|---|---|
| objectId | String | Auto-generated unique identifier | 自動 |
| username | String | Auditor login name | |
| String | Auditor email address | ||
| password | String | Hashed password (write-only) | |
| role | String | Role of the user (e.g., manager, coordinator, field_staff) | |
| createdAt | Date | Auto-generated creation timestamp | 自動 |
| updatedAt | Date | Auto-generated last-update timestamp | 自動 |
7 欄位在 Auditor 中
安全性與權限
如何使用 ACL 和 CLP 規則保護審計員、供應商記錄、審計備註、設施照片和非合規項目。
審核員檔案控制
只有已登入的審核員可以更改自己的審核員記錄;其他用戶不應編輯角色或電子郵件欄位。
供應商和審核擁有權
使用雲端代碼,只有被允許的協調員可以為他們的計劃創建或編輯供應商、審核和 GFSILog 記錄。
照片和發現存取
限制設施照片和不合規的讀取權限給審核團隊和經批准的審核者,尤其是當現場證據應該保持有限時。
架構 JSON
準備好複製到 Back4app 或用作實施參考的原始 JSON 架構定義。
{
"classes": [
{
"className": "Auditor",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"username": {
"type": "String",
"required": true
},
"email": {
"type": "String",
"required": true
},
"password": {
"type": "String",
"required": true
},
"role": {
"type": "String",
"required": true
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "Supplier",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"supplierCode": {
"type": "String",
"required": true
},
"name": {
"type": "String",
"required": true
},
"siteType": {
"type": "String",
"required": true
},
"status": {
"type": "String",
"required": true
},
"primaryContact": {
"type": "String",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "FacilityAudit",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"auditNumber": {
"type": "String",
"required": true
},
"supplier": {
"type": "Pointer",
"required": true,
"targetClass": "Supplier"
},
"auditor": {
"type": "Pointer",
"required": true,
"targetClass": "Auditor"
},
"auditDate": {
"type": "Date",
"required": true
},
"auditType": {
"type": "String",
"required": true
},
"overallScore": {
"type": "Number",
"required": false
},
"gfsiStatus": {
"type": "String",
"required": true
},
"notes": {
"type": "String",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "FacilityPhoto",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"audit": {
"type": "Pointer",
"required": true,
"targetClass": "FacilityAudit"
},
"supplier": {
"type": "Pointer",
"required": true,
"targetClass": "Supplier"
},
"photoUrl": {
"type": "String",
"required": true
},
"caption": {
"type": "String",
"required": false
},
"photoType": {
"type": "String",
"required": true
},
"takenAt": {
"type": "Date",
"required": true
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "GfsiCertificationLog",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"supplier": {
"type": "Pointer",
"required": true,
"targetClass": "Supplier"
},
"audit": {
"type": "Pointer",
"required": false,
"targetClass": "FacilityAudit"
},
"certificateName": {
"type": "String",
"required": true
},
"certificateNumber": {
"type": "String",
"required": true
},
"issuedAt": {
"type": "Date",
"required": true
},
"expiresAt": {
"type": "Date",
"required": true
},
"verificationStatus": {
"type": "String",
"required": true
},
"documentUrl": {
"type": "String",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "NonComplianceFinding",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"audit": {
"type": "Pointer",
"required": true,
"targetClass": "FacilityAudit"
},
"supplier": {
"type": "Pointer",
"required": true,
"targetClass": "Supplier"
},
"findingCode": {
"type": "String",
"required": true
},
"severity": {
"type": "String",
"required": true
},
"description": {
"type": "String",
"required": true
},
"correctiveAction": {
"type": "String",
"required": false
},
"dueDate": {
"type": "Date",
"required": false
},
"closedAt": {
"type": "Date",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "AuditComment",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"audit": {
"type": "Pointer",
"required": true,
"targetClass": "FacilityAudit"
},
"author": {
"type": "Pointer",
"required": true,
"targetClass": "Auditor"
},
"commentText": {
"type": "String",
"required": true
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
}
]
}與 AI 代理合作構建
使用 Back4app AI 代理從這個模板生成一個真正的食品供應商稽核應用程序,包括前端、後端、身份驗證以及 GFSI 日誌、照片和不合規流程。
在 Back4app 上使用這個確切的架構和行為創建食品供應商稽核應用程序的後端。 架構: 1. 稽核員:名稱 (字符串,必填),電子郵件 (字符串,必填),角色 (字符串,必填);objectId,createdAt,updatedAt (系統)。 2. 供應商:供應商名稱 (字符串,必填),位置 (字符串,必填),聯繫人名稱 (字符串),聯繫人電子郵件 (字符串);objectId,createdAt,updatedAt (系統)。 3. 稽核:供應商 (指向供應商的指針,必填),稽核員 (指向稽核員的指針,必填),稽核日期 (日期,必填),結果 (字符串,必填),備註 (字符串);objectId,createdAt,updatedAt (系統)。 4. 設施照片:稽核 (指向稽核的指針,必填),圖片 (文件,必填),說明 (字符串),拍攝時間 (日期,必填);objectId,createdAt,updatedAt (系統)。 5. GFSI 日誌:稽核 (指向稽核的指針,必填),證書 ID (字符串,必填),標準 (字符串,必填),發行日期 (日期,必填),到期日期 (日期,必填);objectId,createdAt,updatedAt (系統)。 6. 不合規:稽核 (指向稽核的指針,必填),嚴重性 (字符串,必填),狀態 (字符串,必填),糾正行動 (字符串),到期日期 (日期);objectId,createdAt,updatedAt (系統)。 安全性: - 稽核員只能管理自己的個人資料。使用雲代碼,以便只有被允許的協調員可以創建或編輯供應商、稽核和 GFSI 日誌記錄。將設施照片和不合規查閱限制為稽核團隊。 身份驗證: - 註冊、登錄、登出。 行為: - 列出供應商、記錄稽核、上傳設施照片、註冊 GFSI 認證詳細信息,以及打開或關閉不合規項目。 交付: - Back4app 應用程序,包括架構、ACL、CLP;為供應商列表、稽核錄入、照片上傳、證書記錄和不合規跟進提供前端。
按下下面的按鈕以打開填寫了此模板提示的代理。
這是沒有技術後綴的基本提示。您可以在之後調整生成的前端堆棧。
API 操作區
嘗試對供應商審計架構使用 REST 和 GraphQL 端點。回應使用模擬數據,並且不需要 Back4app 帳戶。
使用與此範本相同的架構。
選擇您的技術
展開每個卡片以查看如何與您選擇的技術組合整合審計員、供應商和審計。
Flutter 食品供應商審核後端
React 食品供應商審核後端
React 原生 食品供應商審核後端
Next.js 食品供應商審核後端
JavaScript 食品供應商審核後端
Android 食品供應商審核後端
iOS 食品供應商審核後端
Vue 食品供應商審核後端
Angular 食品供應商審核後端
GraphQL 食品供應商審核後端
REST API 食品供應商審核後端
PHP 食品供應商審核後端
.NET 食品供應商審核後端
您每一項技術所獲得的內容
每個技術組合都使用相同的食品供應商審計後端架構和API合約。
統一的供應商審計數據結構
與審計員、供應商、審計、設施照片、GFSI 日誌以及不合規項目通過一個模型進行合作。
現場檢查的照片證據
將設施圖像存儲在捕獲它們的審計旁邊,而不是在單獨的文件系統中。
GFSI 及後續跟踪
保持證書詳細信息和糾正行動可供經理和協調員查詢。
角色感知的審計工作流程
使用相同的後端規則定義現場工作人員、協調員和審核員的訪問權限。
REST/GraphQL API 用於供應商審計
通過靈活的 API 訪問集成移動端、網頁和後端界面。
食品供應商審計框架比較
比較所有支持的技術中的設置速度、SDK類型和AI支持。
| 框架 | 設置時間 | 食品供應商審計好處 | SDK類型 | AI支持 |
|---|---|---|---|---|
| 關於5分鐘 | 供應商審核的單一代碼庫,適用於移動和網頁。 | 類型化SDK | 完整 | |
| 少於5分鐘 | 針對審核管理者的快速網頁儀表板。 | 類型化SDK | 完整 | |
| 約3–7分鐘 | 跨平台的現場審核移動應用程序。 | 類型化SDK | 完整 | |
| 快速(5分鐘)設置 | 伺服器渲染的供應商審核網頁應用程序。 | 輸入式 SDK | 完整 | |
| 約 3-5 分鐘 | 輕量級網頁集成用於審核工作流程。 | 輸入式 SDK | 完整 | |
| 大約 5 分鐘 | 原生 Android 應用程式用於現場檢查。 | 輸入式 SDK | 完整 | |
| 少於 5 分鐘 | 原生 iPhone 應用程式,用於基於照片的審核。 | 輸入式 SDK | 完整 | |
| 約 3–7 分鐘 | React 品牌網頁 UI,專為品質團隊設計。 | 類型化 SDK | 完整 | |
| 快速(5 分鐘)設置 | 供應商合規性的企業網頁應用程式。 | 類型化 SDK | 完整 | |
| 少於 2 分鐘 | 靈活的 GraphQL API,用於審核儀表板。 | GraphQL API | 完整 | |
| 快速(2 分鐘)設置 | REST API 整合審計工具。 | REST API | 完整 | |
| 約 3 分鐘 | 伺服器端 PHP 後端用於審計門戶。 | REST API | 完整 | |
| 約 3–7 分鐘 | .NET 後端供應商審計系統。 | 類型化 SDK | 完整 |
設置時間反映了從項目啟動到使用該模板架構進行第一次供應商或審計查詢的預期持續時間。
常見問題
有關使用此模板構建食品供應商審核後端的常見問題。