feat(smart-app): implement complete mobile app MVP

- App.tsx: full navigation (Auth stack + Main tabs with 5 screens)
- Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen
- HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors
- MapScreen: interactive map with layer toggles (6 layers)
- MarketplaceScreen: categories (6), products (5), search
- ChatScreen: AI chat with quick prompts (4), bot responses
- ProfileScreen: user info, stats, menu (9 items), logout
- AlertsScreen: alert list with severity, acknowledge
- SensorsScreen: sensor list with type filters (6 types), search
- ZonesScreen: zone cards with stats
- SettingsScreen: language picker (FR/EN/ES/DE), privacy, about
- Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n
- Hooks: useSensors, useAlerts, useNotifications, useLocation
- Components: Card, Button, LoadingSpinner, ErrorBoundary, Header
- Services: iotService, notificationService (with axios API client)
- Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN)
- Theme: colors.ts with full design system (Blue Ocean palette)
- Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
This commit is contained in:
Eric FELIXINE
2026-06-01 18:00:35 -04:00
parent 08ca495bde
commit e30ae8ed09
35578 changed files with 3703534 additions and 43 deletions

View File

@@ -0,0 +1,6 @@
export declare function computeNextBackoffInterval(initialBackoff: number, previousRetryCount: number, { multiplier, randomizationFactor, minBackoff, maxBackoff, }?: {
multiplier?: number | undefined;
randomizationFactor?: number | undefined;
minBackoff?: number | undefined;
maxBackoff?: number | undefined;
}): number;

View File

@@ -0,0 +1,19 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const assert_1 = __importDefault(require("assert"));
function computeNextBackoffInterval(initialBackoff, previousRetryCount, { multiplier = 1.5, randomizationFactor = 0.25, minBackoff = initialBackoff, maxBackoff = Infinity, } = {}) {
assert_1.default(initialBackoff > 0, `The initial backoff interval must be positive`);
assert_1.default(previousRetryCount >= 0, `The previous retry count must not be negative`);
assert_1.default(multiplier >= 1, `The backoff multiplier must be greater than or equal to 1`);
assert_1.default(0 <= randomizationFactor && randomizationFactor <= 1, `The randomization factor must be between 0 and 1, inclusive`);
assert_1.default(minBackoff >= 0, `The minimum backoff interval must be positive`);
let nextBackoff = initialBackoff * multiplier ** previousRetryCount;
// Apply jitter within the negative to positive range of the randomization factor
let jitterFactor = 1 - randomizationFactor + 2 * randomizationFactor * Math.random();
return Math.min(Math.max(nextBackoff * jitterFactor, minBackoff), maxBackoff);
}
exports.computeNextBackoffInterval = computeNextBackoffInterval;
//# sourceMappingURL=backoff.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"backoff.js","sourceRoot":"","sources":["../src/backoff.ts"],"names":[],"mappings":";;;;;AAAA,oDAA4B;AAE5B,SAAgB,0BAA0B,CACxC,cAAsB,EACtB,kBAA0B,EAC1B,EACE,UAAU,GAAG,GAAG,EAChB,mBAAmB,GAAG,IAAI,EAC1B,UAAU,GAAG,cAAc,EAC3B,UAAU,GAAG,QAAQ,GACtB,GAAG,EAAE;IAEN,gBAAM,CAAC,cAAc,GAAG,CAAC,EAAE,+CAA+C,CAAC,CAAC;IAC5E,gBAAM,CAAC,kBAAkB,IAAI,CAAC,EAAE,+CAA+C,CAAC,CAAC;IACjF,gBAAM,CAAC,UAAU,IAAI,CAAC,EAAE,2DAA2D,CAAC,CAAC;IACrF,gBAAM,CACJ,CAAC,IAAI,mBAAmB,IAAI,mBAAmB,IAAI,CAAC,EACpD,6DAA6D,CAC9D,CAAC;IACF,gBAAM,CAAC,UAAU,IAAI,CAAC,EAAE,+CAA+C,CAAC,CAAC;IAEzE,IAAI,WAAW,GAAG,cAAc,GAAG,UAAU,IAAI,kBAAkB,CAAC;IACpE,iFAAiF;IACjF,IAAI,YAAY,GAAG,CAAC,GAAG,mBAAmB,GAAG,CAAC,GAAG,mBAAmB,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IACrF,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,GAAG,YAAY,EAAE,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC;AAChF,CAAC;AAvBD,gEAuBC","sourcesContent":["import assert from 'assert';\n\nexport function computeNextBackoffInterval(\n initialBackoff: number,\n previousRetryCount: number,\n {\n multiplier = 1.5,\n randomizationFactor = 0.25,\n minBackoff = initialBackoff,\n maxBackoff = Infinity,\n } = {},\n): number {\n assert(initialBackoff > 0, `The initial backoff interval must be positive`);\n assert(previousRetryCount >= 0, `The previous retry count must not be negative`);\n assert(multiplier >= 1, `The backoff multiplier must be greater than or equal to 1`);\n assert(\n 0 <= randomizationFactor && randomizationFactor <= 1,\n `The randomization factor must be between 0 and 1, inclusive`,\n );\n assert(minBackoff >= 0, `The minimum backoff interval must be positive`);\n\n let nextBackoff = initialBackoff * multiplier ** previousRetryCount;\n // Apply jitter within the negative to positive range of the randomization factor\n let jitterFactor = 1 - randomizationFactor + 2 * randomizationFactor * Math.random();\n return Math.min(Math.max(nextBackoff * jitterFactor, minBackoff), maxBackoff);\n}\n"]}