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,61 @@
/**
* 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.
*
* @format
*/
import {NativeEventEmitter} from '../EventEmitter/NativeEventEmitter';
import {EmitterSubscription} from '../vendor/emitter/EventEmitter';
export interface LinkingStatic extends NativeEventEmitter {
/**
* Add a handler to Linking changes by listening to the `url` event type
* and providing the handler
*/
addEventListener(
type: 'url',
handler: (event: {url: string}) => void,
): EmitterSubscription;
/**
* Try to open the given url with any of the installed apps.
* You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386"), a contact, or any other URL that can be opened with the installed apps.
* NOTE: This method will fail if the system doesn't know how to open the specified URL. If you're passing in a non-http(s) URL, it's best to check {@code canOpenURL} first.
* NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly!
*/
openURL(url: string): Promise<any>;
/**
* Determine whether or not an installed app can handle a given URL.
* NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly!
* NOTE: As of iOS 9, your app needs to provide the LSApplicationQueriesSchemes key inside Info.plist.
* @param URL the URL to open
*/
canOpenURL(url: string): Promise<boolean>;
/**
* If the app launch was triggered by an app link with, it will give the link url, otherwise it will give null
* NOTE: To support deep linking on Android, refer http://developer.android.com/training/app-indexing/deep-linking.html#handling-intents
*/
getInitialURL(): Promise<string | null>;
/**
* Open the Settings app and displays the apps custom settings, if it has any.
*/
openSettings(): Promise<void>;
/**
* Sends an Android Intent - a broad surface to express Android functions. Useful for deep-linking to settings pages,
* opening an SMS app with a message draft in place, and more. See https://developer.android.com/reference/kotlin/android/content/Intent?hl=en
*/
sendIntent(
action: string,
extras?: Array<{key: string; value: string | number | boolean}>,
): Promise<void>;
}
export const Linking: LinkingStatic;
export type Linking = LinkingStatic;

View File

@@ -0,0 +1,133 @@
/**
* 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.
*
* @format
* @flow strict-local
*/
import type {EventSubscription} from '../vendor/emitter/EventEmitter';
import NativeEventEmitter from '../EventEmitter/NativeEventEmitter';
import Platform from '../Utilities/Platform';
import NativeIntentAndroid from './NativeIntentAndroid';
import NativeLinkingManager from './NativeLinkingManager';
import invariant from 'invariant';
import nullthrows from 'nullthrows';
type LinkingEventDefinitions = {
url: [{url: string}],
};
/**
* `Linking` gives you a general interface to interact with both incoming
* and outgoing app links.
*
* See https://reactnative.dev/docs/linking
*/
class Linking extends NativeEventEmitter<LinkingEventDefinitions> {
constructor() {
super(Platform.OS === 'ios' ? nullthrows(NativeLinkingManager) : undefined);
}
/**
* Add a handler to Linking changes by listening to the `url` event type
* and providing the handler
*
* See https://reactnative.dev/docs/linking#addeventlistener
*/
addEventListener<K: $Keys<LinkingEventDefinitions>>(
eventType: K,
listener: (...$ElementType<LinkingEventDefinitions, K>) => mixed,
context: $FlowFixMe,
): EventSubscription {
return this.addListener(eventType, listener);
}
/**
* Try to open the given `url` with any of the installed apps.
*
* See https://reactnative.dev/docs/linking#openurl
*/
openURL(url: string): Promise<void> {
this._validateURL(url);
if (Platform.OS === 'android') {
return nullthrows(NativeIntentAndroid).openURL(url);
} else {
return nullthrows(NativeLinkingManager).openURL(url);
}
}
/**
* Determine whether or not an installed app can handle a given URL.
*
* See https://reactnative.dev/docs/linking#canopenurl
*/
canOpenURL(url: string): Promise<boolean> {
this._validateURL(url);
if (Platform.OS === 'android') {
return nullthrows(NativeIntentAndroid).canOpenURL(url);
} else {
return nullthrows(NativeLinkingManager).canOpenURL(url);
}
}
/**
* Open app settings.
*
* See https://reactnative.dev/docs/linking#opensettings
*/
openSettings(): Promise<void> {
if (Platform.OS === 'android') {
return nullthrows(NativeIntentAndroid).openSettings();
} else {
return nullthrows(NativeLinkingManager).openSettings();
}
}
/**
* If the app launch was triggered by an app link,
* it will give the link url, otherwise it will give `null`
*
* See https://reactnative.dev/docs/linking#getinitialurl
*/
getInitialURL(): Promise<?string> {
return Platform.OS === 'android'
? nullthrows(NativeIntentAndroid).getInitialURL()
: nullthrows(NativeLinkingManager).getInitialURL();
}
/*
* Launch an Android intent with extras (optional)
*
* @platform android
*
* See https://reactnative.dev/docs/linking#sendintent
*/
sendIntent(
action: string,
extras?: Array<{
key: string,
value: string | number | boolean,
...
}>,
): Promise<void> {
if (Platform.OS === 'android') {
return nullthrows(NativeIntentAndroid).sendIntent(action, extras);
} else {
return new Promise((resolve, reject) => reject(new Error('Unsupported')));
}
}
_validateURL(url: string): void {
invariant(
typeof url === 'string',
'Invalid URL: should be a string. Was: ' + url,
);
invariant(url, 'Invalid URL: cannot be empty');
}
}
module.exports = (new Linking(): Linking);

View File

@@ -0,0 +1,13 @@
/**
* 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
*/
export * from '../../src/private/specs/modules/NativeIntentAndroid';
import NativeIntentAndroid from '../../src/private/specs/modules/NativeIntentAndroid';
export default NativeIntentAndroid;

View File

@@ -0,0 +1,13 @@
/**
* 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
*/
export * from '../../src/private/specs/modules/NativeLinkingManager';
import NativeLinkingManager from '../../src/private/specs/modules/NativeLinkingManager';
export default NativeLinkingManager;