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,35 @@
'use strict';
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
import { runOnUI } from '../core';
import { prepareUIRegistry } from './FrameCallbackRegistryUI';
export default class FrameCallbackRegistryJS {
constructor() {
_defineProperty(this, "nextCallbackId", 0);
prepareUIRegistry();
}
registerFrameCallback(callback) {
if (!callback) {
return -1;
}
const callbackId = this.nextCallbackId;
this.nextCallbackId++;
runOnUI(() => {
global._frameCallbackRegistry.registerFrameCallback(callback, callbackId);
})();
return callbackId;
}
unregisterFrameCallback(callbackId) {
runOnUI(() => {
global._frameCallbackRegistry.unregisterFrameCallback(callbackId);
})();
}
manageStateFrameCallback(callbackId, state) {
runOnUI(() => {
global._frameCallbackRegistry.manageStateFrameCallback(callbackId, state);
})();
}
}
//# sourceMappingURL=FrameCallbackRegistryJS.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","runOnUI","prepareUIRegistry","FrameCallbackRegistryJS","constructor","registerFrameCallback","callback","callbackId","nextCallbackId","global","_frameCallbackRegistry","unregisterFrameCallback","manageStateFrameCallback","state"],"sources":["FrameCallbackRegistryJS.ts"],"sourcesContent":["'use strict';\nimport { runOnUI } from '../core';\nimport type { FrameInfo } from './FrameCallbackRegistryUI';\nimport { prepareUIRegistry } from './FrameCallbackRegistryUI';\n\nexport default class FrameCallbackRegistryJS {\n private nextCallbackId = 0;\n\n constructor() {\n prepareUIRegistry();\n }\n\n registerFrameCallback(callback: (frameInfo: FrameInfo) => void): number {\n if (!callback) {\n return -1;\n }\n\n const callbackId = this.nextCallbackId;\n this.nextCallbackId++;\n\n runOnUI(() => {\n global._frameCallbackRegistry.registerFrameCallback(callback, callbackId);\n })();\n\n return callbackId;\n }\n\n unregisterFrameCallback(callbackId: number): void {\n runOnUI(() => {\n global._frameCallbackRegistry.unregisterFrameCallback(callbackId);\n })();\n }\n\n manageStateFrameCallback(callbackId: number, state: boolean): void {\n runOnUI(() => {\n global._frameCallbackRegistry.manageStateFrameCallback(callbackId, state);\n })();\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,c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CAACC,sBAAsB,CAACC,uBAAuB,CAACJ,UAAU,CAAC;IACnE,CAAC,CAAC,CAAC,CAAC;EACN;EAEAK,wBAAwBA,CAACL,UAAkB,EAAEM,KAAc,EAAQ;IACjEZ,OAAO,CAAC,MAAM;MACZQ,MAAM,CAACC,sBAAsB,CAACE,wBAAwB,CAACL,UAAU,EAAEM,KAAK,CAAC;IAC3E,CAAC,CAAC,CAAC,CAAC;EACN;AACF","ignoreList":[]}

View File

@@ -0,0 +1,87 @@
'use strict';
import { runOnUIImmediately } from '../threads';
export const prepareUIRegistry = runOnUIImmediately(() => {
'worklet';
const frameCallbackRegistry = {
frameCallbackRegistry: new Map(),
activeFrameCallbacks: new Set(),
previousFrameTimestamp: null,
nextCallId: 0,
runCallbacks(callId) {
const loop = timestamp => {
if (callId !== this.nextCallId) {
return;
}
if (this.previousFrameTimestamp === null) {
this.previousFrameTimestamp = timestamp;
}
const delta = timestamp - this.previousFrameTimestamp;
this.activeFrameCallbacks.forEach(callbackId => {
const callbackDetails = this.frameCallbackRegistry.get(callbackId);
const {
startTime
} = callbackDetails;
if (startTime === null) {
// First frame
callbackDetails.startTime = timestamp;
callbackDetails.callback({
timestamp,
timeSincePreviousFrame: null,
timeSinceFirstFrame: 0
});
} else {
// Next frame
callbackDetails.callback({
timestamp,
timeSincePreviousFrame: delta,
timeSinceFirstFrame: timestamp - startTime
});
}
});
if (this.activeFrameCallbacks.size > 0) {
this.previousFrameTimestamp = timestamp;
requestAnimationFrame(loop);
} else {
this.previousFrameTimestamp = null;
}
};
// runCallback() should only be called after registering a callback,
// so if there is only one active callback, then it means that there were
// zero previously and the loop isn't running yet.
if (this.activeFrameCallbacks.size === 1 && callId === this.nextCallId) {
requestAnimationFrame(loop);
}
},
registerFrameCallback(callback, callbackId) {
this.frameCallbackRegistry.set(callbackId, {
callback,
startTime: null
});
},
unregisterFrameCallback(callbackId) {
this.manageStateFrameCallback(callbackId, false);
this.frameCallbackRegistry.delete(callbackId);
},
manageStateFrameCallback(callbackId, state) {
if (callbackId === -1) {
return;
}
if (state) {
this.activeFrameCallbacks.add(callbackId);
this.runCallbacks(this.nextCallId);
} else {
const callback = this.frameCallbackRegistry.get(callbackId);
callback.startTime = null;
this.activeFrameCallbacks.delete(callbackId);
if (this.activeFrameCallbacks.size === 0) {
this.nextCallId += 1;
}
}
}
};
global._frameCallbackRegistry = frameCallbackRegistry;
});
//# sourceMappingURL=FrameCallbackRegistryUI.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
'use strict';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["'use strict';\nexport type { FrameInfo } from './FrameCallbackRegistryUI';\n"],"mappings":"AAAA,YAAY","ignoreList":[]}