Distillery Cask Inventory Backend Template
Proof Logs, Angel’s Share Tracking, and Barrel History
A production-ready distillery cask inventory backend on Back4app with proof logs, angel’s share tracking, and barrel history. Includes ER diagram, data dictionary, JSON schema, API playground, and an AI Agent prompt for rapid bootstrap.
Key Takeaways
This template gives you a distillery cask inventory backend with proof logs, angel’s share tracking, and barrel history so managers and field staff can keep cask records aligned.
- Proof logs you can audit — Store every CaskProofLog with reading time, proof value, and note text tied to a specific Cask.
- Angel’s share tracking by barrel — Capture AngelShareReading entries for each Barrel so shrinkage stays visible over time.
- Barrel history in one view — Connect BarrelHistory events to cask moves, transfers, and inspections for a clean timeline.
- Role-aware access — Use ACL and CLP rules to protect cask records while allowing coordinators and field staff to update the right classes.
What Is the Distillery Cask Inventory Template?
If distillery replenishment is reactive, you are always ordering late; structured usage logs make demand visible before shelves go empty. Small delays compound fast. This template models Distillery, Cask, CaskProofLog, BarrelHistory, and AngelShareReading with built-in auth and real-time queries on Back4app for distillery teams that need traceability by default. The schema covers User (username, email, password), Distillery (name, location, timezone), Cask (distillery, caskNumber, spiritType, fillDate, fillProof, status), CaskProofLog (cask, loggedBy, proofValue, readingAt, note), BarrelHistory (cask, eventType, eventAt, fromLocation, toLocation, notes), and AngelShareReading (cask, readingAt, evaporationGallons, estimatedLossPercent, weatherNote) with auth and audit-friendly tracking built in. Connect your preferred frontend and ship faster.
Best for:
Distillery backend overview
A credible distillery operation can explain what happened last Tuesday. If that takes a scavenger hunt, the system is the bottleneck.
Review Distillery, Cask, and CaskProofLog first, then open a stack card to see SDK-specific notes and integration patterns.
Core Distillery Cask Features
Every technology card in this hub uses the same distillery cask inventory schema with Distillery, Cask, CaskProofLog, BarrelHistory, and AngelShareReading.
Distillery profile management
Distillery stores name, location, and timezone for each site.
Cask registry and status
Cask links distillery, caskNumber, spiritType, fillDate, fillProof, and status.
Proof log capture
CaskProofLog records cask, loggedBy, proofValue, readingAt, and note.
Angel’s share monitoring
AngelShareReading tracks evaporationGallons, estimatedLossPercent, and weatherNote.
Barrel history timeline
BarrelHistory links cask, eventType, eventAt, fromLocation, and toLocation.
Why Build Your Distillery Cask Inventory Backend with Back4app?
Back4app gives you cask, proof, and history primitives so your team can focus on inventory accuracy instead of maintaining custom API plumbing.
- •Cask and proof structure: The Cask class anchors fill proof, status, and distillery links while CaskProofLog stores each reading.
- •Angel’s share visibility: AngelShareReading keeps evaporation, loss estimates, and weather notes attached to each barrel record.
- •Realtime + API flexibility: Use Live Queries for barrel history changes while keeping REST and GraphQL available for every client.
Build and iterate on cask inventory workflows quickly with one backend contract across all platforms.
Core Benefits
A distillery backend that keeps proof, loss, and history data easy to query and review.
Faster cask setup
Start from a complete Distillery and Cask schema instead of designing every field from zero.
Readable proof trail
Use CaskProofLog records to show who logged the proof, when they did it, and what value they entered.
Loss tracking that stays visible
Store AngelShareReading values so evaporation and estimated loss are tied to each cask.
Clear barrel movement history
Use BarrelHistory to preserve move, transfer, and inspection events for each cask.
Queryable inventory data
Filter by caskNumber, status, and readingAt without flattening your distillery workflow into spreadsheets.
AI bootstrap workflow
Generate backend scaffolding and integration guidance fast with one structured prompt.
Ready to launch your cask inventory app?
Let the Back4app AI Agent scaffold your distillery cask inventory backend and generate proof log, angel’s share, and barrel history flows from one prompt.
Free to start — 50 AI Agent prompts/month, no credit card required
Technical Stack
Everything included in this distillery cask inventory backend template.
ER Diagram
Entity relationship model for the distillery cask inventory schema.
Schema covering distilleries, casks, proof logs, barrel history, and angel’s share readings.
View diagram source
erDiagram
User ||--o{ Cask : "assignedTo"
User ||--o{ ProofLog : "loggedBy"
User ||--o{ BarrelHistory : "recordedBy"
User ||--o{ AngelShareEntry : "loggedBy"
Cask ||--o{ ProofLog : "cask"
Cask ||--o{ BarrelHistory : "cask"
Cask ||--o{ AngelShareEntry : "cask"
User {
String objectId PK
String username
String email
String password
String role
Date createdAt
Date updatedAt
}
Cask {
String objectId PK
String caskCode
String distillateType
Date fillDate
Number fillProof
String location
String status
String assignedToId FK
Date createdAt
Date updatedAt
}
ProofLog {
String objectId PK
String caskId FK
String loggedById FK
Date sampleDate
Number sampleProof
Number volumeGallons
String notes
Date createdAt
Date updatedAt
}
BarrelHistory {
String objectId PK
String caskId FK
String eventType
Date eventDate
String recordedById FK
String fromLocation
String toLocation
String details
Date createdAt
Date updatedAt
}
AngelShareEntry {
String objectId PK
String caskId FK
String loggedById FK
Date measuredOn
Number expectedGallons
Number actualGallons
Number lossGallons
String environment
Date createdAt
Date updatedAt
}
Integration Flow
Typical runtime flow for auth, cask lookup, proof logging, barrel history updates, and angel’s share readings.
View diagram source
sequenceDiagram
participant User
participant App as Distillery Cask Inventory App
participant Back4app as Back4app Cloud
User->>App: Sign in to the inventory console
App->>Back4app: POST /login
Back4app-->>App: Session token
User->>App: Review cask list
App->>Back4app: GET /classes/Cask?include=assignedTo&order=-updatedAt
Back4app-->>App: Cask records
User->>App: Add a proof reading
App->>Back4app: POST /classes/ProofLog
Back4app-->>App: ProofLog objectId
User->>App: Record angel's share and barrel movement
App->>Back4app: POST /classes/AngelShareEntry
App->>Back4app: POST /classes/BarrelHistory
Back4app-->>App: Updated cask history
App->>Back4app: Live query for cask status changes
Back4app-->>App: Change eventData Dictionary
Full field-level reference for every class in the distillery cask schema.
| Field | Type | Description | Required |
|---|---|---|---|
| objectId | String | Auto-generated unique identifier | Auto |
| username | String | User login name | |
| String | User 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 | Auto |
| updatedAt | Date | Auto-generated last-update timestamp | Auto |
7 fields in User
Security and Permissions
How ACL and CLP strategy secures casks, proof logs, barrel history, and angel’s share readings.
User ownership rules
Only the assigned staff user can update their profile; identity records stay separate from cask operations.
Cask record integrity
Use Cloud Code so only approved roles can create or close Cask records and append audit-safe history entries.
Scoped log access
Restrict reads and writes so managers can review distillery-wide data while field staff only touch the casks assigned to them.
Schema (JSON)
Raw JSON schema definition ready to copy into Back4app or use as implementation reference.
{
"classes": [
{
"className": "User",
"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": "Cask",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"caskCode": {
"type": "String",
"required": true
},
"distillateType": {
"type": "String",
"required": true
},
"fillDate": {
"type": "Date",
"required": true
},
"fillProof": {
"type": "Number",
"required": true
},
"location": {
"type": "String",
"required": true
},
"status": {
"type": "String",
"required": true
},
"assignedTo": {
"type": "Pointer",
"required": true,
"targetClass": "User"
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "ProofLog",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"cask": {
"type": "Pointer",
"required": true,
"targetClass": "Cask"
},
"loggedBy": {
"type": "Pointer",
"required": true,
"targetClass": "User"
},
"sampleDate": {
"type": "Date",
"required": true
},
"sampleProof": {
"type": "Number",
"required": true
},
"volumeGallons": {
"type": "Number",
"required": true
},
"notes": {
"type": "String",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "BarrelHistory",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"cask": {
"type": "Pointer",
"required": true,
"targetClass": "Cask"
},
"eventType": {
"type": "String",
"required": true
},
"eventDate": {
"type": "Date",
"required": true
},
"recordedBy": {
"type": "Pointer",
"required": true,
"targetClass": "User"
},
"fromLocation": {
"type": "String",
"required": false
},
"toLocation": {
"type": "String",
"required": false
},
"details": {
"type": "String",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "AngelShareEntry",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"cask": {
"type": "Pointer",
"required": true,
"targetClass": "Cask"
},
"loggedBy": {
"type": "Pointer",
"required": true,
"targetClass": "User"
},
"measuredOn": {
"type": "Date",
"required": true
},
"expectedGallons": {
"type": "Number",
"required": true
},
"actualGallons": {
"type": "Number",
"required": true
},
"lossGallons": {
"type": "Number",
"required": true
},
"environment": {
"type": "String",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
}
]
}Build with AI Agent
Use the Back4app AI Agent to generate a real distillery cask inventory app from this template, including frontend, backend, auth, and proof log, barrel history, and angel’s share flows.
Create a distillery cask inventory app backend on Back4app with this exact schema and behavior. Schema: 1. User (use Back4app built-in): username, email, password; objectId, createdAt, updatedAt (system). 2. Distillery: name (String, required), location (String, required), timezone (String, required); objectId, createdAt, updatedAt (system). 3. Cask: distillery (Pointer to Distillery, required), caskNumber (String, required, unique), spiritType (String, required), fillDate (Date, required), fillProof (Number, required), status (String, required); objectId, createdAt, updatedAt (system). 4. CaskProofLog: cask (Pointer to Cask, required), loggedBy (Pointer to User, required), proofValue (Number, required), readingAt (Date, required), note (String); objectId, createdAt, updatedAt (system). 5. BarrelHistory: cask (Pointer to Cask, required), eventType (String, required), eventAt (Date, required), fromLocation (String), toLocation (String), notes (String); objectId, createdAt, updatedAt (system). 6. AngelShareReading: cask (Pointer to Cask, required), readingAt (Date, required), evaporationGallons (Number, required), estimatedLossPercent (Number, required), weatherNote (String); objectId, createdAt, updatedAt (system). Security: - Only the assigned staff user can update their profile. Use Cloud Code and ACL/CLP to protect cask records and audit fields. Auth: - Sign-up, login, logout. Behavior: - List casks, add proof logs, record angel’s share readings, and append barrel history events. Deliver: - Back4app app with schema, ACLs, CLPs; frontend for distillery profiles, cask inventory, proof logs, barrel history, and angel’s share readings.
Press the button below to open the Agent with this template prompt pre-filled.
This is the base prompt without a technology suffix. You can adapt the generated frontend stack afterward.
API Playground
Try REST and GraphQL endpoints against the distillery cask inventory schema. Responses use mock data and do not require a Back4app account.
Uses the same schema as this template.
Choose Your Technology
Expand each card to see how to integrate Distillery, Cask, and CaskProofLog with your chosen stack.
Flutter Distillery Cask Backend
React Distillery Cask Backend
React Native Distillery Cask Backend
Next.js Distillery Cask Backend
JavaScript Distillery Cask Backend
Android Distillery Cask Backend
iOS Distillery Cask Backend
Vue Distillery Cask Backend
Angular Distillery Cask Backend
GraphQL Distillery Cask Backend
REST API Distillery Cask Backend
PHP Distillery Cask Backend
.NET Distillery Cask Backend
What You Get with Every Technology
Every stack uses the same distillery cask inventory schema and API contracts.
Unified distillery data structure
Keep casks, proof logs, barrel history, and angel’s share readings in one schema.
Proof log capture for distilleries
Record proofValue and readingAt for each CaskProofLog without inventing a new backend.
Angel’s share tracking for distilleries
Measure evaporationGallons and estimatedLossPercent against each cask over time.
Barrel history for distilleries
Track eventType, fromLocation, and toLocation for every cask movement.
REST/GraphQL APIs for distilleries
Integrate inventory screens, audits, and operations tools through flexible APIs.
Extensible architecture for distilleries
Add cask notes, tasting logs, or warehouse classes later without discarding the model.
Distillery Cask Framework Comparison
Compare setup speed, SDK style, and AI support across all supported technologies.
| Framework | Setup Time | Distillery Benefit | SDK Type | AI Support |
|---|---|---|---|---|
| About 5 min | Single codebase for distillery cask inventory on mobile and web. | Typed SDK | Full | |
| Under 5 minutes | Fast web dashboard for cask inventory. | Typed SDK | Full | |
| ~3–7 min | Cross-platform mobile app for proof logs and barrel history. | Typed SDK | Full | |
| Rapid (5 min) setup | Server-rendered web app for distillery operations. | Typed SDK | Full | |
| ~3–5 min | Lightweight web integration for cask tracking. | Typed SDK | Full | |
| About 5 min | Native Android app for warehouse proof checks. | Typed SDK | Full | |
| Under 5 minutes | Native iPhone app for cellar staff. | Typed SDK | Full | |
| ~3–7 min | Reactive web UI for cask inventory. | Typed SDK | Full | |
| Rapid (5 min) setup | Enterprise web app for distillery operations. | Typed SDK | Full | |
| Under 2 min | Flexible GraphQL API for cask and proof log queries. | GraphQL API | Full | |
| Quick (2 min) setup | REST API integration for inventory workflows. | REST API | Full | |
| ~3 min | Server-side PHP backend for distillery tools. | REST API | Full | |
| ~3–7 min | .NET backend for cask inventory operations. | Typed SDK | Full |
Setup time reflects expected duration from project bootstrap to first cask or proof log query using this template schema.
Frequently Asked Questions
Common questions about building a distillery cask inventory backend with this template.
Ready to Build Your Distillery Cask Inventory App?
Start your distillery cask inventory project in minutes. No credit card required.