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,114 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
// Declarations for functionality exposed by the Hermes VM.
//
// For backwards-compatibility, code that uses such functionality must also
// check explicitly at run-time whether the object(s) and method(s) exist, and
// fail safely if not.
/**
* HermesInternalType is an object containing functions used to interact with
* the VM in a way that is not standardized by the JS spec.
* There are limited guarantees about these functions, and they should not be
* widely used. Consult with the Hermes team before using any of these.
* There may be other visible properties on this object; however, those are
* only exposed for testing purposes: do not use them.
*/
declare type $HermesInternalType = {
// All members are optional because they may not exist when OTA'd to older
// VMs.
+getNumGCs?: () => number,
+getGCTime?: () => number,
+getNativeCallTime?: () => number,
+getNativeCallCount?: () => number,
+getGCCPUTime?: () => number,
/**
* Hermes can embed an "epilogue" to the bytecode file with arbitrary bytes.
* At most one epilogue will exist per bytecode module (which can be
* different than a JS module).
* Calling this function will return all such epilogues and convert the
* bytes to numbers in the range of 0-255.
*/
+getEpilogues?: () => Array<Array<number>>,
/**
* Query the VM for various statistics about performance.
* There are no guarantees about what keys exist in it, but they can be
* printed for informational purposes.
* @return An object that maps strings to various types of performance
* statistics.
*/
+getInstrumentedStats?: () => {[string]: number | string, ...},
/**
* Query the VM for any sort of runtime properties that it wants to report.
* There are no guarantees about what keys exist in it, but they can be
* printed for informational purposes.
* @return An object that maps strings to various types of runtime properties.
*/
+getRuntimeProperties?: () => {
'OSS Release Version': string,
Build: string,
[string]: mixed,
},
/**
* Tell Hermes that at this point the surface has transitioned from TTI to
* post-TTI. The VM can change some of its internal behavior to optimize for
* post-TTI scenarios.
* This can be called several times but will have no effect after the first
* call.
*/
+ttiReached?: () => void,
/**
* Tell Hermes that at this point the surface has transitioned from TTRC to
* post-TTRC. The VM can change some of its internal behavior to optimize for
* post-TTRC scenarios.
* This can be called several times but will have no effect after the first
* call.
*/
+ttrcReached?: () => void,
/**
* Query the VM to see whether or not it enabled Promise.
*/
+hasPromise?: () => boolean,
/**
* Enable promise rejection tracking with the given options.
* The API mirrored the `promise` npm package, therefore it's typed same as
* the `enable` function of module `promise/setimmediate/rejection-tracking`
* declared in ./flow-typed/npm/promise_v8.x.x.js.
*/
+enablePromiseRejectionTracker?: (
options: ?{
whitelist?: ?Array<mixed>,
allRejections?: ?boolean,
onUnhandled?: ?(number, mixed) => void,
onHandled?: ?(number, mixed) => void,
},
) => void,
/**
* Query the VM to see whether or not it use the engine Job queue.
*/
+useEngineQueue?: () => boolean,
/**
* Enqueue a JavaScript callback function as a Job into the engine Job queue.
*/
+enqueueJob?: <TArguments: Array<mixed>>(
jobCallback: (...args: TArguments) => mixed,
) => void,
};

View File

@@ -0,0 +1,16 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @nolint
* @format
*/
declare class Position {
coords: Coordinates;
timestamp: number;
mocked: boolean;
}

View File

@@ -0,0 +1,14 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
// This type allows Facebook to internally Override
// this type to allow our internationalization type which
// is a string at runtime but Flow doesn't know that.
declare type Stringish = string;

View File

@@ -0,0 +1,49 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
declare module 'console' {
declare function assert(value: any, ...message: any): void;
declare function dir(
obj: Object,
options: {
showHidden: boolean,
depth: number,
colors: boolean,
...
},
): void;
declare function error(...data: any): void;
declare function info(...data: any): void;
declare function log(...data: any): void;
declare function time(label: any): void;
declare function timeEnd(label: any): void;
declare function trace(first: any, ...rest: any): void;
declare function warn(...data: any): void;
declare class Console {
constructor(stdout: stream$Writable, stdin?: stream$Writable): void;
assert(value: any, ...message: any): void;
dir(
obj: Object,
options: {
showHidden: boolean,
depth: number,
colors: boolean,
...
},
): void;
error(...data: any): void;
info(...data: any): void;
log(...data: any): void;
time(label: any): void;
timeEnd(label: any): void;
trace(first: any, ...rest: any): void;
warn(...data: any): void;
}
}

View File

@@ -0,0 +1,87 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
/**
* `global` is a object containing all the global variables for React Native.
*
* NOTE: Consider cross-platform as well as JS environments compatibility
* when defining the types here. Consider both presence (`?`) as well as
* writeability (`+`) when defining types.
*/
declare var global: {
// setUpGlobals
+window: typeof global,
+self: typeof global,
+process: {
+env: {
+NODE_ENV: 'development' | 'production',
},
+argv?: $ReadOnlyArray<string>,
},
// setUpPerformance
+performance: Performance,
// setUpXHR
+XMLHttpRequest: typeof XMLHttpRequest,
+FormData: typeof FormData,
+fetch: typeof fetch,
+Headers: typeof Headers,
+Request: typeof Request,
+Response: typeof Response,
+WebSocket: typeof WebSocket,
+Blob: typeof Blob,
+File: typeof File,
+FileReader: typeof FileReader,
+URL: typeof URL,
+URLSearchParams: typeof URLSearchParams,
+AbortController: typeof AbortController,
+AbortSignal: typeof AbortSignal,
// setUpAlert
+alert: typeof alert,
// setUpNavigator
+navigator: {
+product: 'ReactNative',
+appName?: ?string,
...
},
// setUpTimers
+setInterval: typeof setInterval,
+clearInterval: typeof clearInterval,
+setTimeout: typeof setTimeout,
+clearTimeout: typeof clearTimeout,
+requestAnimationFrame: typeof requestAnimationFrame,
+cancelAnimationFrame: typeof cancelAnimationFrame,
+requestIdleCallback: typeof requestIdleCallback,
+cancelIdleCallback: typeof cancelIdleCallback,
+queueMicrotask: typeof queueMicrotask,
+setImmediate: typeof setImmediate,
+clearImmediate: typeof clearImmediate,
// Polyfills
+console: typeof console,
// JavaScript environments specific
+HermesInternal: ?$HermesInternalType,
// Internal-specific
+__DEV__?: boolean,
+RN$Bridgeless?: boolean,
// setupDOM
+DOMRect: typeof DOMRect,
+DOMRectReadOnly: typeof DOMRectReadOnly,
// Undeclared properties are implicitly `any`.
[string | symbol]: any,
};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @nolint
* @format
*/
declare opaque type React$Element<
+ElementType: React$ElementType,
+P = React$ElementProps<ElementType>,
>: {...};