Industry Scenarios
Complete vertical application examples for specific industries. Each scenario provides a full implementation blueprint including data models, configurations, components, and AI integration patterns.
1. Immigration Case Management
A complete system for immigration law firms to manage cases, track document collection, and communicate with clients.
Overview
Problem: Immigration attorneys need to track complex cases with multiple document requirements, deadline management, and client communication.
Solution: A Vertical Template application that provides case tracking, automated document collection workflows, status updates, and client portal access.
Key Features
- Client intake and case creation
- Document requirement tracking
- Status workflow (draft → submitted → in review → approved/denied)
- Attorney assignment and workload management
- Client communication portal
- AI-powered document classification
- Automated deadline reminders
Object Types
import { ObjectTypeConfig } from '@/config/types';
export const immigrationObjectTypes: ObjectTypeConfig[] = [
{
name: 'ImmigrationCase',
apiName: 'immigration_case',
pluralName: 'Cases',
fields: [
{
name: 'caseNumber',
type: 'text',
label: 'Case Number',
required: true,
unique: true,
validation: { pattern: '^CASE-[0-9]{6}$' },
},
{
name: 'clientName',
type: 'text',
label: 'Client Name',
required: true,
},
{
name: 'clientEmail',
type: 'email',
label: 'Client Email',
required: true,
},
{
name: 'caseType',
type: 'select',
label: 'Case Type',
required: true,
options: [
{ value: 'h1b', label: 'H-1B Work Visa' },
{ value: 'greencard', label: 'Green Card' },
{ value: 'citizenship', label: 'Citizenship' },
{ value: 'family', label: 'Family-Based' },
{ value: 'asylum', label: 'Asylum' },
],
},
{
name: 'status',
type: 'select',
label: 'Status',
required: true,
default: 'draft',
options: [
{ value: 'draft', label: 'Draft', color: 'gray' },
{ value: 'submitted', label: 'Submitted', color: 'blue' },
{ value: 'in_review', label: 'In Review', color: 'yellow' },
{ value: 'approved', label: 'Approved', color: 'green' },
{ value: 'denied', label: 'Denied', color: 'red' },
],
},
{
name: 'filingDate',
type: 'date',
label: 'Filing Date',
required: true,
},
{
name: 'assignedAttorney',
type: 'user',
label: 'Assigned Attorney',
roles: ['attorney'],
},
{
name: 'requiredDocuments',
type: 'multi-select',
label: 'Required Documents',
required: true,
options: [
'Passport Copy',
'Birth Certificate',
'Employment Letter',
'Financial Documents',
'Marriage Certificate',
'Police Clearance',
'Medical Exam',
],
},
{
name: 'submittedDocuments',
type: 'reference',
ref: 'document',
multiple: true,
label: 'Submitted Documents',
},
],
},
{
name: 'Document',
apiName: 'document',
fields: [
{ name: 'fileName', type: 'text', required: true },
{ name: 'fileType', type: 'text', required: true },
{ name: 'category', type: 'text', required: true },
{ name: 'uploadedBy', type: 'user', required: true },
{ name: 'uploadedAt', type: 'datetime', required: true },
{ name: 'fileUrl', type: 'text', required: true },
{ name: 'verified', type: 'boolean', default: false },
],
},
];
Tenant Configuration
import { TenantConfig } from '@/config/types';
export const immigrationConfig: TenantConfig = {
id: 'immigration-portal',
name: 'Immigration Case Management',
theme: {
primaryColor: '#1e40af',
logo: '/logos/immigration.svg',
},
objectTypes: immigrationObjectTypes,
sections: [
{
id: 'dashboard',
title: 'Dashboard',
path: '/',
icon: 'home',
components: [
{
type: 'metric-grid',
metrics: [
{ label: 'Active Cases', value: '{{count:immigration_case}}' },
{ label: 'Pending Review', value: '{{count:immigration_case:status=in_review}}' },
{ label: 'This Month', value: '{{count:immigration_case:created=this_month}}' },
],
},
{
type: 'chart',
chartType: 'bar',
title: 'Cases by Type',
data: '{{groupBy:immigration_case:caseType}}',
},
],
},
{
id: 'cases',
title: 'Cases',
path: '/cases',
icon: 'briefcase',
roles: ['attorney', 'admin'],
components: [
{
type: 'search-bar',
placeholder: 'Search cases...',
fields: ['caseNumber', 'clientName'],
},
{
type: 'resource-list',
objectType: 'immigration_case',
columns: ['caseNumber', 'clientName', 'caseType', 'status', 'assignedAttorney'],
filters: [
{ field: 'status', type: 'select' },
{ field: 'caseType', type: 'select' },
{ field: 'assignedAttorney', type: 'user' },
],
actions: ['view', 'edit'],
},
],
},
{
id: 'my-case',
title: 'My Case',
path: '/my-case',
icon: 'user',
roles: ['client'],
components: [
{
type: 'custom',
component: 'ClientCaseView',
},
],
},
{
id: 'documents',
title: 'Documents',
path: '/documents',
icon: 'document',
components: [
{
type: 'custom',
component: 'DocumentManager',
},
],
},
],
};
Component Implementation
import React from 'react';
import { useResources } from '@eai/platform-sdk/react';
import { useAuth } from '@eai/platform-sdk/react';
import { DocumentUpload } from '@/components/DocumentUpload';
import { StatusTimeline } from '@/components/StatusTimeline';
interface ImmigrationCase {
id: string;
caseNumber: string;
clientName: string;
caseType: string;
status: string;
filingDate: string;
requiredDocuments: string[];
submittedDocuments: string[];
assignedAttorney?: {
name: string;
email: string;
};
}
export const ClientCaseView: React.FC = () => {
const { user } = useAuth();
const { resources: cases, isLoading } = useResources<ImmigrationCase>({
objectType: 'immigration_case',
filters: {
clientEmail: user?.email,
},
});
if (isLoading) {
return <div>Loading your case...</div>;
}
const myCase = cases[0];
if (!myCase) {
return <div>No case found.</div>;
}
const completionPercentage = Math.round(
(myCase.submittedDocuments.length / myCase.requiredDocuments.length) * 100
);
return (
<div className="space-y-6">
<div className="bg-white shadow rounded-lg p-6">
<h2 className="text-2xl font-bold mb-4">Case {myCase.caseNumber}</h2>
<div className="grid grid-cols-2 gap-4 mb-6">
<div>
<span className="text-sm text-gray-600">Case Type</span>
<p className="font-semibold">{myCase.caseType}</p>
</div>
<div>
<span className="text-sm text-gray-600">Status</span>
<p className="font-semibold capitalize">{myCase.status}</p>
</div>
<div>
<span className="text-sm text-gray-600">Filing Date</span>
<p className="font-semibold">{new Date(myCase.filingDate).toLocaleDateString()}</p>
</div>
<div>
<span className="text-sm text-gray-600">Attorney</span>
<p className="font-semibold">{myCase.assignedAttorney?.name || 'Not assigned'}</p>
</div>
</div>
<StatusTimeline currentStatus={myCase.status} />
</div>
<div className="bg-white shadow rounded-lg p-6">
<h3 className="text-xl font-bold mb-4">Document Checklist</h3>
<div className="mb-4">
<div className="flex justify-between text-sm mb-2">
<span>Completion</span>
<span>{completionPercentage}%</span>
</div>
<div className="w-full bg-gray-200 rounded-full h-2">
<div
className="bg-blue-600 h-2 rounded-full"
style={{ width: `${completionPercentage}%` }}
/>
</div>
</div>
<div className="space-y-2">
{myCase.requiredDocuments.map((doc) => {
const isSubmitted = myCase.submittedDocuments.includes(doc);
return (
<div
key={doc}
className="flex items-center justify-between p-3 border rounded"
>
<div className="flex items-center">
<span className={isSubmitted ? 'text-green-600' : 'text-gray-400'}>
{isSubmitted ? '✓' : '○'}
</span>
<span className="ml-3">{doc}</span>
</div>
{!isSubmitted && (
<DocumentUpload
caseId={myCase.id}
documentType={doc}
/>
)}
</div>
);
})}
</div>
</div>
</div>
);
};
AI Integration
// AI-powered document classification
import { sdk } from '@eai/platform-sdk';
export async function classifyDocument(fileUrl: string): Promise<string> {
const response = await sdk.ai.classify({
input: { fileUrl },
categories: [
'Passport Copy',
'Birth Certificate',
'Employment Letter',
'Financial Documents',
'Marriage Certificate',
'Police Clearance',
'Medical Exam',
],
prompt: 'Classify this immigration document into one of the provided categories.',
});
return response.category;
}
// AI-assisted case notes
export async function generateCaseNotes(caseData: ImmigrationCase): Promise<string> {
const response = await sdk.ai.chat({
messages: [
{
role: 'system',
content: 'You are an immigration case assistant. Summarize the case status and next steps.',
},
{
role: 'user',
content: JSON.stringify(caseData),
},
],
});
return response.content;
}
2. Property Management Portal
A comprehensive system for property managers to track properties, tenants, maintenance requests, and lease management.
Overview
Problem: Property managers juggle multiple properties, tenant relationships, maintenance coordination, and financial tracking.
Solution: Centralized portal for property listings, tenant management, maintenance tracking, and document storage.
Key Features
- Property and unit inventory
- Tenant profiles and lease tracking
- Maintenance request workflow
- Rent collection tracking
- Document management (leases, inspections)
- Occupancy analytics
- Tenant communication
Object Types
export const propertyObjectTypes: ObjectTypeConfig[] = [
{
name: 'Property',
apiName: 'property',
fields: [
{ name: 'address', type: 'text', required: true },
{ name: 'units', type: 'number', required: true },
{ name: 'propertyType', type: 'select', options: ['apartment', 'house', 'commercial'], required: true },
{ name: 'yearBuilt', type: 'number' },
{ name: 'squareFeet', type: 'number' },
{ name: 'monthlyRent', type: 'currency', required: true },
{ name: 'occupiedUnits', type: 'number', default: 0 },
{ name: 'manager', type: 'user', required: true },
],
},
{
name: 'Tenant',
apiName: 'tenant',
fields: [
{ name: 'name', type: 'text', required: true },
{ name: 'email', type: 'email', required: true },
{ name: 'phone', type: 'text', required: true },
{ name: 'property', type: 'reference', ref: 'property', required: true },
{ name: 'unitNumber', type: 'text', required: true },
{ name: 'leaseStart', type: 'date', required: true },
{ name: 'leaseEnd', type: 'date', required: true },
{ name: 'monthlyRent', type: 'currency', required: true },
{ name: 'depositAmount', type: 'currency', required: true },
{ name: 'status', type: 'select', options: ['active', 'notice_given', 'moved_out'], default: 'active' },
],
},
{
name: 'MaintenanceRequest',
apiName: 'maintenance_request',
fields: [
{ name: 'property', type: 'reference', ref: 'property', required: true },
{ name: 'unit', type: 'text', required: true },
{ name: 'requestedBy', type: 'reference', ref: 'tenant', required: true },
{ name: 'category', type: 'select', options: ['plumbing', 'electrical', 'hvac', 'appliance', 'other'], required: true },
{ name: 'priority', type: 'select', options: ['low', 'medium', 'high', 'emergency'], required: true },
{ name: 'description', type: 'textarea', required: true },
{ name: 'status', type: 'select', options: ['open', 'in_progress', 'completed', 'cancelled'], default: 'open' },
{ name: 'assignedTo', type: 'user' },
{ name: 'estimatedCost', type: 'currency' },
{ name: 'completedAt', type: 'datetime' },
],
},
];
Dashboard Component
import React from 'react';
import { useResources } from '@eai/platform-sdk/react';
export const PropertyDashboard: React.FC = () => {
const { resources: properties } = useResources({ objectType: 'property' });
const { resources: requests } = useResources({ objectType: 'maintenance_request' });
const totalProperties = properties.length;
const totalUnits = properties.reduce((sum, p) => sum + p.units, 0);
const occupiedUnits = properties.reduce((sum, p) => sum + p.occupiedUnits, 0);
const occupancyRate = totalUnits > 0 ? (occupiedUnits / totalUnits) * 100 : 0;
const openRequests = requests.filter((r) => r.status === 'open').length;
const urgentRequests = requests.filter(
(r) => r.status === 'open' && (r.priority === 'high' || r.priority === 'emergency')
).length;
return (
<div className="space-y-6">
<div className="grid grid-cols-4 gap-4">
<MetricCard label="Properties" value={totalProperties} />
<MetricCard label="Total Units" value={totalUnits} />
<MetricCard label="Occupancy Rate" value={`${occupancyRate.toFixed(1)}%`} />
<MetricCard label="Open Requests" value={openRequests} highlight={urgentRequests > 0} />
</div>
<div className="grid grid-cols-2 gap-6">
<PropertyList properties={properties} />
<MaintenanceQueue requests={requests.filter((r) => r.status === 'open')} />
</div>
</div>
);
};
3. Healthcare Patient Portal
Patient-facing portal for accessing medical records, scheduling appointments, and communicating with providers.
Overview
Problem: Patients need secure access to health records, appointment scheduling, and provider communication.
Solution: HIPAA-compliant portal with document management, appointment booking, and secure messaging.
Key Features
- Patient profile and health history
- Appointment scheduling
- Medical document access
- Lab results viewing
- Prescription management
- Secure provider messaging
- AI-powered symptom checker
Object Types
export const healthcareObjectTypes: ObjectTypeConfig[] = [
{
name: 'Patient',
apiName: 'patient',
fields: [
{ name: 'firstName', type: 'text', required: true },
{ name: 'lastName', type: 'text', required: true },
{ name: 'dateOfBirth', type: 'date', required: true },
{ name: 'email', type: 'email', required: true },
{ name: 'phone', type: 'text', required: true },
{ name: 'address', type: 'text', required: true },
{ name: 'insurance', type: 'text' },
{ name: 'primaryProvider', type: 'user', roles: ['provider'] },
{ name: 'allergies', type: 'multi-select', options: [] },
{ name: 'conditions', type: 'multi-select', options: [] },
],
},
{
name: 'Appointment',
apiName: 'appointment',
fields: [
{ name: 'patient', type: 'reference', ref: 'patient', required: true },
{ name: 'provider', type: 'user', roles: ['provider'], required: true },
{ name: 'appointmentType', type: 'select', options: ['checkup', 'followup', 'urgent'], required: true },
{ name: 'scheduledAt', type: 'datetime', required: true },
{ name: 'duration', type: 'number', default: 30 },
{ name: 'status', type: 'select', options: ['scheduled', 'completed', 'cancelled'], default: 'scheduled' },
{ name: 'notes', type: 'textarea' },
],
},
{
name: 'MedicalRecord',
apiName: 'medical_record',
fields: [
{ name: 'patient', type: 'reference', ref: 'patient', required: true },
{ name: 'recordType', type: 'select', options: ['lab_result', 'imaging', 'prescription', 'note'], required: true },
{ name: 'date', type: 'date', required: true },
{ name: 'provider', type: 'user', roles: ['provider'], required: true },
{ name: 'description', type: 'textarea' },
{ name: 'document', type: 'reference', ref: 'document' },
],
},
];
AI Integration
// AI symptom checker
export async function checkSymptoms(symptoms: string[]): Promise<{
possibleConditions: string[];
urgencyLevel: 'low' | 'medium' | 'high';
recommendations: string[];
}> {
const response = await sdk.ai.chat({
messages: [
{
role: 'system',
content: 'You are a medical triage assistant. Analyze symptoms and provide guidance. Not a replacement for professional medical advice.',
},
{
role: 'user',
content: `Patient reports: ${symptoms.join(', ')}. Assess urgency and possible conditions.`,
},
],
});
return JSON.parse(response.content);
}
4. Education Course Platform
Learning management system for course delivery, enrollment, and assessment.
Overview
Problem: Educational institutions need to manage course catalogs, student enrollment, assignments, and grading.
Solution: Complete LMS with course management, student progress tracking, and assessment tools.
Key Features
- Course catalog and descriptions
- Student enrollment management
- Assignment submission and grading
- Progress tracking
- Discussion forums
- AI-powered tutoring
- Analytics and reporting
Object Types
export const educationObjectTypes: ObjectTypeConfig[] = [
{
name: 'Course',
apiName: 'course',
fields: [
{ name: 'title', type: 'text', required: true },
{ name: 'code', type: 'text', required: true, unique: true },
{ name: 'description', type: 'textarea', required: true },
{ name: 'instructor', type: 'user', roles: ['instructor'], required: true },
{ name: 'capacity', type: 'number', required: true },
{ name: 'enrolled', type: 'number', default: 0 },
{ name: 'startDate', type: 'date', required: true },
{ name: 'endDate', type: 'date', required: true },
{ name: 'status', type: 'select', options: ['draft', 'open', 'in_progress', 'completed'], default: 'draft' },
],
},
{
name: 'Enrollment',
apiName: 'enrollment',
fields: [
{ name: 'student', type: 'user', roles: ['student'], required: true },
{ name: 'course', type: 'reference', ref: 'course', required: true },
{ name: 'enrolledAt', type: 'datetime', required: true },
{ name: 'status', type: 'select', options: ['enrolled', 'completed', 'dropped'], default: 'enrolled' },
{ name: 'grade', type: 'number', min: 0, max: 100 },
],
},
{
name: 'Assignment',
apiName: 'assignment',
fields: [
{ name: 'course', type: 'reference', ref: 'course', required: true },
{ name: 'title', type: 'text', required: true },
{ name: 'description', type: 'textarea', required: true },
{ name: 'dueDate', type: 'datetime', required: true },
{ name: 'maxPoints', type: 'number', required: true },
{ name: 'submissionType', type: 'select', options: ['text', 'file', 'url'], required: true },
],
},
];
5. Government Permits System
Public-facing system for permit applications, review workflows, and status tracking.
Overview
Problem: Citizens need to apply for permits (building, business, event), track status, and government staff need efficient review workflows.
Solution: Digital permit application system with public portal and staff review tools.
Key Features
- Public permit application forms
- Document upload and verification
- Review and approval workflows
- Status tracking and notifications
- Fee calculation and payment
- Public status lookup
- Compliance checking
Object Types
export const permitObjectTypes: ObjectTypeConfig[] = [
{
name: 'Permit',
apiName: 'permit',
fields: [
{ name: 'permitNumber', type: 'text', required: true, unique: true },
{ name: 'permitType', type: 'select', options: ['building', 'business', 'event', 'sign'], required: true },
{ name: 'applicantName', type: 'text', required: true },
{ name: 'applicantEmail', type: 'email', required: true },
{ name: 'projectAddress', type: 'text', required: true },
{ name: 'description', type: 'textarea', required: true },
{ name: 'status', type: 'select', options: ['draft', 'submitted', 'under_review', 'approved', 'denied'], default: 'draft' },
{ name: 'submittedAt', type: 'datetime' },
{ name: 'reviewedBy', type: 'user', roles: ['reviewer'] },
{ name: 'reviewNotes', type: 'textarea' },
{ name: 'fee', type: 'currency', computed: true },
{ name: 'estimatedValue', type: 'currency' },
],
},
];
Public Status Lookup
import React, { useState } from 'react';
import { sdk } from '@eai/platform-sdk';
export const PermitLookup: React.FC = () => {
const [permitNumber, setPermitNumber] = useState('');
const [permit, setPermit] = useState<any>(null);
const [error, setError] = useState<string | null>(null);
const handleSearch = async () => {
try {
const result = await sdk.resources.query('permit', {
filters: { permitNumber },
});
if (result.length > 0) {
setPermit(result[0]);
setError(null);
} else {
setError('Permit not found');
setPermit(null);
}
} catch (err) {
setError('Search failed');
}
};
return (
<div className="max-w-2xl mx-auto p-6">
<h2 className="text-2xl font-bold mb-4">Check Permit Status</h2>
<div className="flex gap-2 mb-6">
<input
type="text"
value={permitNumber}
onChange={(e) => setPermitNumber(e.target.value)}
placeholder="Enter permit number"
className="flex-1 px-4 py-2 border rounded"
/>
<button
onClick={handleSearch}
className="px-6 py-2 bg-blue-600 text-white rounded"
>
Search
</button>
</div>
{error && <div className="text-red-600">{error}</div>}
{permit && (
<div className="bg-white shadow rounded-lg p-6">
<h3 className="text-xl font-bold mb-4">Permit {permit.permitNumber}</h3>
<div className="space-y-2">
<div><strong>Type:</strong> {permit.permitType}</div>
<div><strong>Status:</strong> <span className="capitalize">{permit.status}</span></div>
<div><strong>Applicant:</strong> {permit.applicantName}</div>
<div><strong>Project:</strong> {permit.projectAddress}</div>
<div><strong>Submitted:</strong> {new Date(permit.submittedAt).toLocaleDateString()}</div>
</div>
</div>
)}
</div>
);
};
Common Patterns Across Scenarios
Workflow Automation
All scenarios benefit from status workflows:
const workflowStatuses = {
draft: { next: ['submitted'], roles: ['applicant'] },
submitted: { next: ['under_review', 'cancelled'], roles: ['applicant', 'staff'] },
under_review: { next: ['approved', 'denied', 'submitted'], roles: ['reviewer'] },
approved: { next: [], roles: [] },
denied: { next: ['submitted'], roles: ['reviewer', 'applicant'] },
};
Document Management
Shared document upload and verification patterns:
export const DocumentUpload = ({ entityId, entityType }) => {
// Common upload component used across all scenarios
// - Immigration: case documents
// - Property: leases and inspections
// - Healthcare: medical records
// - Education: assignment submissions
// - Permits: application documents
};
Notifications
Automated notifications for status changes:
export async function sendStatusNotification(
entityId: string,
entityType: string,
oldStatus: string,
newStatus: string
) {
await sdk.notifications.send({
to: entityId,
type: 'status_change',
template: `${entityType}_status_change`,
data: { oldStatus, newStatus },
});
}
Next Steps
- Choose a Scenario: Pick the industry closest to your use case
- Clone and Adapt: Copy the Object Types and configs, customize for your needs
- Add Custom Logic: Implement business rules specific to your domain
- Integrate AI: Add AI features using the Platform SDK
- Deploy: Use the Deployment Guide to go live
For more examples, see:
- Code Snippets for reusable patterns
- AI Workflow Patterns for AI assistance
- Component Patterns for UI best practices