6de2455917
- Added GLOBAL_MARKETS_TITLE to all translation files - Updated footer with 12 markets (4 active + 8 upcoming) - Translated market section to: zh-cn, zh-tw, ja, ko, th, vi, id, ms, hi - Built and deployed to production - CloudFront invalidation: I3RTMXVFDJXWLG3SYX208OP1CC
197 lines
8.4 KiB
JavaScript
197 lines
8.4 KiB
JavaScript
/**
|
|
* Reality Alerts™ Product Demo
|
|
* Demonstrates the complete product experience
|
|
*/
|
|
|
|
const { RealityAlertsProduct } = require('../src/services/realityAlerts/product');
|
|
|
|
async function runProductDemo() {
|
|
console.log('🌍 REALITY ALERTS™ - Product Demo');
|
|
console.log('═══════════════════════════════════════════════════════════════');
|
|
console.log('"Transform verified real-world observations into actionable intelligence"');
|
|
console.log('Part of QUIXZOOM - The world\'s infrastructure intelligence network\n');
|
|
|
|
const product = new RealityAlertsProduct();
|
|
|
|
// Display product info
|
|
console.log('📦 PRODUCT POSITIONING');
|
|
console.log('─────────────────────────────────────────────────────────────');
|
|
console.log('Name: Reality Alerts™');
|
|
console.log('Tagline: Transform verified real-world observations into actionable intelligence');
|
|
console.log('Parent: QUIXZOOM - The world\'s infrastructure intelligence network');
|
|
console.log('Role: Real-time observation engine\n');
|
|
|
|
console.log('🎯 VALUE PROPOSITION');
|
|
console.log('─────────────────────────────────────────────────────────────');
|
|
console.log('For Contributors: Get paid for observations that create real value');
|
|
console.log('For Organizations: Receive verified, AI-validated intelligence');
|
|
console.log('For Society: Build comprehensive infrastructure knowledge base\n');
|
|
|
|
console.log('✨ KEY DIFFERENTIATORS');
|
|
console.log('─────────────────────────────────────────────────────────────');
|
|
const differentiators = [
|
|
'No prior knowledge of responsible party required',
|
|
'AI validates relevance and credibility',
|
|
'Automatic identification of responsible stakeholder',
|
|
'Part of larger infrastructure knowledge base',
|
|
'Contributor rewarded only for verified, valuable observations'
|
|
];
|
|
differentiators.forEach((d, i) => console.log(`${i + 1}. ${d}`));
|
|
console.log();
|
|
|
|
// Scenario 1: Diesel Spill
|
|
console.log('🚨 SCENARIO 1: Diesel Spill at Pump Station');
|
|
console.log('─────────────────────────────────────────────────────────────');
|
|
|
|
const obs1 = await product.submitObservation({
|
|
contributorId: 'zoomer-123',
|
|
images: ['https://example.com/diesel-spill-1.jpg'],
|
|
description: 'Dark liquid leaking from pump station',
|
|
location: { lat: 59.3293, lng: 18.0686, accuracy: 5 }
|
|
});
|
|
|
|
console.log(`Observation ID: ${obs1.observationId}`);
|
|
console.log(`State: ${obs1.state}`);
|
|
|
|
// Simulate AI processing
|
|
const observation1 = product.getObservation(obs1.observationId);
|
|
observation1.state = 'verified';
|
|
observation1.analysis = {
|
|
aiConfidence: 0.87,
|
|
detectedObjects: [{ type: 'pump_station' }, { type: 'spill' }],
|
|
anomalies: [{ type: 'spill', severity: 'high' }],
|
|
category: 'leak',
|
|
severity: 'high'
|
|
};
|
|
observation1.routing = {
|
|
identifiedObject: { type: 'pump_station' },
|
|
responsibleParty: { name: 'Stockholm Water Utility' },
|
|
notificationSent: true
|
|
};
|
|
|
|
// Add rewards
|
|
product.addReward(obs1.observationId, {
|
|
amount: 0.50,
|
|
description: 'Observation verified as anomaly'
|
|
});
|
|
product.addReward(obs1.observationId, {
|
|
amount: 2.00,
|
|
description: 'Observation routed to responsible party'
|
|
});
|
|
|
|
console.log(`AI Confidence: 87%`);
|
|
console.log(`Category: leak`);
|
|
console.log(`Severity: HIGH`);
|
|
console.log(`Routed to: Stockholm Water Utility`);
|
|
console.log(`Reward earned: $2.50\n`);
|
|
|
|
// Scenario 2: Missing Manhole Cover
|
|
console.log('🚨 SCENARIO 2: Missing Manhole Cover');
|
|
console.log('─────────────────────────────────────────────────────────────');
|
|
|
|
const obs2 = await product.submitObservation({
|
|
contributorId: 'zoomer-456',
|
|
images: ['https://example.com/missing-manhole-1.jpg'],
|
|
description: 'Manhole cover missing, dangerous hole in sidewalk',
|
|
location: { lat: 59.3421, lng: 18.0554, accuracy: 3 }
|
|
});
|
|
|
|
console.log(`Observation ID: ${obs2.observationId}`);
|
|
console.log(`State: ${obs2.state}`);
|
|
|
|
const observation2 = product.getObservation(obs2.observationId);
|
|
observation2.state = 'verified';
|
|
observation2.analysis = {
|
|
aiConfidence: 0.78,
|
|
detectedObjects: [{ type: 'manhole' }],
|
|
anomalies: [{ type: 'missing', severity: 'high' }],
|
|
category: 'missing',
|
|
severity: 'high'
|
|
};
|
|
observation2.routing = {
|
|
identifiedObject: { type: 'manhole' },
|
|
responsibleParty: { name: 'Stockholm Municipality' },
|
|
notificationSent: true
|
|
};
|
|
|
|
product.addReward(obs2.observationId, {
|
|
amount: 0.50,
|
|
description: 'Observation verified as anomaly'
|
|
});
|
|
product.addReward(obs2.observationId, {
|
|
amount: 2.00,
|
|
description: 'Observation routed to responsible party'
|
|
});
|
|
|
|
console.log(`AI Confidence: 78%`);
|
|
console.log(`Category: missing`);
|
|
console.log(`Severity: HIGH`);
|
|
console.log(`Routed to: Stockholm Municipality`);
|
|
console.log(`Reward earned: $2.50\n`);
|
|
|
|
// Scenario 3: Normal State (Rejected)
|
|
console.log('✅ SCENARIO 3: Normal Heat Pump (Rejected)');
|
|
console.log('─────────────────────────────────────────────────────────────');
|
|
|
|
const obs3 = await product.submitObservation({
|
|
contributorId: 'zoomer-789',
|
|
images: ['https://example.com/normal-heatpump-1.jpg'],
|
|
description: 'Heat pump looks normal',
|
|
location: { lat: 59.3123, lng: 18.0234, accuracy: 8 }
|
|
});
|
|
|
|
console.log(`Observation ID: ${obs3.observationId}`);
|
|
console.log(`State: ${obs3.state}`);
|
|
|
|
const observation3 = product.getObservation(obs3.observationId);
|
|
observation3.state = 'rejected';
|
|
observation3.analysis = {
|
|
aiConfidence: 0.15,
|
|
detectedObjects: [{ type: 'heat_pump' }],
|
|
anomalies: [],
|
|
category: null,
|
|
severity: null
|
|
};
|
|
|
|
product.addReward(obs3.observationId, {
|
|
amount: 0.10,
|
|
description: 'Participation reward'
|
|
});
|
|
|
|
console.log(`AI Confidence: 15%`);
|
|
console.log(`Result: Normal state - no anomaly detected`);
|
|
console.log(`Reward earned: $0.10 (participation)\n`);
|
|
|
|
// Statistics
|
|
console.log('📊 PRODUCT STATISTICS');
|
|
console.log('═══════════════════════════════════════════════════════════════');
|
|
const stats = product.getStatistics();
|
|
console.log(`Total Submitted: ${stats.totalSubmitted}`);
|
|
console.log(`Total Verified: ${stats.totalVerified}`);
|
|
console.log(`Total Rejected: ${stats.totalRejected}`);
|
|
console.log(`Verification Rate: ${stats.verificationRate}%`);
|
|
console.log(`Total Rewarded: ${stats.totalRewarded}`);
|
|
console.log(`Total Paid Out: $${stats.totalPaidOut}`);
|
|
console.log(`Average Reward: $${stats.averageReward}\n`);
|
|
|
|
// Reward structure
|
|
console.log('💰 REWARD STRUCTURE');
|
|
console.log('─────────────────────────────────────────────────────────────');
|
|
console.log('Participation: $0.10 (Any valid submission)');
|
|
console.log('Verification: $0.50 (AI confirms anomaly)');
|
|
console.log('Routing: $2.00 (Routed to responsible party)');
|
|
console.log('Resolution: $5.00 (Issue resolved)');
|
|
console.log('Critical: $10.00 (Prevented serious damage)\n');
|
|
|
|
console.log('✅ Product Demo Complete!');
|
|
console.log('═══════════════════════════════════════════════════════════════');
|
|
console.log('Reality Alerts™ - Transforming observations into intelligence');
|
|
}
|
|
|
|
// Run if called directly
|
|
if (require.main === module) {
|
|
runProductDemo().catch(console.error);
|
|
}
|
|
|
|
module.exports = { runProductDemo };
|