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,8 @@
import { CameraNativeProps, CameraType, FlashMode, CameraProps } from '../Camera.types';
export declare const ConversionTables: {
type: Record<keyof CameraType, CameraNativeProps['facing']>;
flash: Record<keyof FlashMode, CameraNativeProps['flashMode']>;
};
export declare function convertNativeProps(props?: CameraProps): CameraNativeProps;
export declare function ensureNativeProps(props?: CameraProps): CameraNativeProps;
//# sourceMappingURL=props.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/utils/props.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAIxF,eAAO,MAAM,gBAAgB,EAAE;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,UAAU,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5D,KAAK,EAAE,MAAM,CAAC,MAAM,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC;CAIhE,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,iBAAiB,CAgBzE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,iBAAiB,CAaxE"}

View File

@@ -0,0 +1,34 @@
import { Platform } from 'expo-modules-core';
import CameraManager from '../ExpoCameraManager';
// Values under keys from this object will be transformed to native options
export const ConversionTables = {
type: CameraManager.Type,
flash: CameraManager.FlashMode,
};
export function convertNativeProps(props) {
if (!props || typeof props !== 'object') {
return {};
}
const nativeProps = {};
for (const [key, value] of Object.entries(props)) {
if (typeof value === 'string' && ConversionTables[key]) {
nativeProps[key] = ConversionTables[key][value];
}
else {
nativeProps[key] = value;
}
}
return nativeProps;
}
export function ensureNativeProps(props) {
const newProps = convertNativeProps(props);
newProps.barcodeScannerEnabled = !!props?.onBarcodeScanned;
newProps.flashMode = props?.flash ?? 'off';
newProps.mute = props?.mute ?? false;
newProps.autoFocus = props?.autofocus ?? 'off';
if (Platform.OS !== 'web') {
delete newProps.poster;
}
return newProps;
}
//# sourceMappingURL=props.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"props.js","sourceRoot":"","sources":["../../src/utils/props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG7C,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAEjD,2EAA2E;AAC3E,MAAM,CAAC,MAAM,gBAAgB,GAGzB;IACF,IAAI,EAAE,aAAa,CAAC,IAAI;IACxB,KAAK,EAAE,aAAa,CAAC,SAAS;CAC/B,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,KAAmB;IACpD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QACvC,OAAO,EAAE,CAAC;KACX;IAED,MAAM,WAAW,GAAsB,EAAE,CAAC;IAE1C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAChD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,gBAAgB,CAAC,GAAG,CAAC,EAAE;YACtD,WAAW,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;SACjD;aAAM;YACL,WAAW,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;SAC1B;KACF;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAmB;IACnD,MAAM,QAAQ,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAE3C,QAAQ,CAAC,qBAAqB,GAAG,CAAC,CAAC,KAAK,EAAE,gBAAgB,CAAC;IAC3D,QAAQ,CAAC,SAAS,GAAG,KAAK,EAAE,KAAK,IAAI,KAAK,CAAC;IAC3C,QAAQ,CAAC,IAAI,GAAG,KAAK,EAAE,IAAI,IAAI,KAAK,CAAC;IACrC,QAAQ,CAAC,SAAS,GAAG,KAAK,EAAE,SAAS,IAAI,KAAK,CAAC;IAE/C,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;QACzB,OAAO,QAAQ,CAAC,MAAM,CAAC;KACxB;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import { Platform } from 'expo-modules-core';\n\nimport { CameraNativeProps, CameraType, FlashMode, CameraProps } from '../Camera.types';\nimport CameraManager from '../ExpoCameraManager';\n\n// Values under keys from this object will be transformed to native options\nexport const ConversionTables: {\n type: Record<keyof CameraType, CameraNativeProps['facing']>;\n flash: Record<keyof FlashMode, CameraNativeProps['flashMode']>;\n} = {\n type: CameraManager.Type,\n flash: CameraManager.FlashMode,\n};\n\nexport function convertNativeProps(props?: CameraProps): CameraNativeProps {\n if (!props || typeof props !== 'object') {\n return {};\n }\n\n const nativeProps: CameraNativeProps = {};\n\n for (const [key, value] of Object.entries(props)) {\n if (typeof value === 'string' && ConversionTables[key]) {\n nativeProps[key] = ConversionTables[key][value];\n } else {\n nativeProps[key] = value;\n }\n }\n\n return nativeProps;\n}\n\nexport function ensureNativeProps(props?: CameraProps): CameraNativeProps {\n const newProps = convertNativeProps(props);\n\n newProps.barcodeScannerEnabled = !!props?.onBarcodeScanned;\n newProps.flashMode = props?.flash ?? 'off';\n newProps.mute = props?.mute ?? false;\n newProps.autoFocus = props?.autofocus ?? 'off';\n\n if (Platform.OS !== 'web') {\n delete newProps.poster;\n }\n\n return newProps;\n}\n"]}