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,50 @@
/**
* 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
* @oncall react_native
*/
export interface CustomTransformOptions {
[key: string]: unknown;
}
export type TransformProfile = 'default' | 'hermes-stable' | 'hermes-canary';
export interface BabelTransformerOptions {
readonly customTransformOptions?: CustomTransformOptions;
readonly dev: boolean;
readonly enableBabelRCLookup?: boolean;
readonly enableBabelRuntime: boolean | string;
readonly extendsBabelConfigPath?: string;
readonly experimentalImportSupport?: boolean;
readonly hermesParser?: boolean;
readonly hot: boolean;
readonly minify: boolean;
readonly unstable_disableES6Transforms?: boolean;
readonly platform: string | null;
readonly projectRoot: string;
readonly publicPath: string;
readonly unstable_transformProfile?: TransformProfile;
readonly globalPrefix: string;
}
export interface BabelTransformerArgs {
readonly filename: string;
readonly options: BabelTransformerOptions;
readonly plugins?: unknown;
readonly src: string;
}
export interface BabelTransformer {
transform: (args: BabelTransformerArgs) => {
ast: unknown;
metadata: unknown;
};
getCacheKey?: () => string;
}
export const transform: BabelTransformer['transform'];

View File

@@ -0,0 +1,46 @@
"use strict";
const { parseSync, transformFromAstSync } = require("@babel/core");
const nullthrows = require("nullthrows");
function transform({ filename, options, plugins, src }) {
const OLD_BABEL_ENV = process.env.BABEL_ENV;
process.env.BABEL_ENV = options.dev
? "development"
: process.env.BABEL_ENV || "production";
try {
const babelConfig = {
caller: {
name: "metro",
bundler: "metro",
platform: options.platform,
},
ast: true,
babelrc: options.enableBabelRCLookup,
code: false,
cwd: options.projectRoot,
highlightCode: true,
filename,
plugins,
sourceType: "module",
cloneInputAst: false,
};
const sourceAst = options.hermesParser
? require("hermes-parser").parse(src, {
babel: true,
sourceType: babelConfig.sourceType,
})
: parseSync(src, babelConfig);
const transformResult = transformFromAstSync(sourceAst, src, babelConfig);
return {
ast: nullthrows(transformResult.ast),
metadata: transformResult.metadata,
};
} finally {
if (OLD_BABEL_ENV) {
process.env.BABEL_ENV = OLD_BABEL_ENV;
}
}
}
module.exports = {
transform,
};

View File

@@ -0,0 +1,132 @@
/**
* 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
* @format
* @oncall react_native
*/
'use strict';
import type {BabelCoreOptions, BabelFileMetadata} from '@babel/core';
const {parseSync, transformFromAstSync} = require('@babel/core');
const nullthrows = require('nullthrows');
export type CustomTransformOptions = {
[string]: mixed,
__proto__: null,
...
};
export type TransformProfile = 'default' | 'hermes-stable' | 'hermes-canary';
type BabelTransformerOptions = $ReadOnly<{
customTransformOptions?: CustomTransformOptions,
dev: boolean,
enableBabelRCLookup?: boolean,
enableBabelRuntime: boolean | string,
extendsBabelConfigPath?: string,
experimentalImportSupport?: boolean,
hermesParser?: boolean,
hot: boolean,
minify: boolean,
unstable_disableES6Transforms?: boolean,
platform: ?string,
projectRoot: string,
publicPath: string,
unstable_transformProfile?: TransformProfile,
globalPrefix: string,
inlineRequires?: void,
...
}>;
export type BabelTransformerArgs = $ReadOnly<{
filename: string,
options: BabelTransformerOptions,
plugins?: $PropertyType<BabelCoreOptions, 'plugins'>,
src: string,
}>;
export type BabelFileFunctionMapMetadata = $ReadOnly<{
names: $ReadOnlyArray<string>,
mappings: string,
}>;
export type MetroBabelFileMetadata = {
...BabelFileMetadata,
metro?: ?{
functionMap?: ?BabelFileFunctionMapMetadata,
...
},
...
};
export type BabelTransformer = {
transform: BabelTransformerArgs => {
ast: BabelNodeFile,
// Deprecated, will be removed in a future breaking release. Function maps
// will be generated by an input Babel plugin instead and written into
// `metadata` - transformers don't need to return them explicitly.
functionMap?: BabelFileFunctionMapMetadata,
metadata?: MetroBabelFileMetadata,
...
},
getCacheKey?: () => string,
};
function transform({filename, options, plugins, src}: BabelTransformerArgs) {
const OLD_BABEL_ENV = process.env.BABEL_ENV;
process.env.BABEL_ENV = options.dev
? 'development'
: process.env.BABEL_ENV || 'production';
try {
const babelConfig = {
caller: {name: 'metro', bundler: 'metro', platform: options.platform},
ast: true,
babelrc: options.enableBabelRCLookup,
code: false,
cwd: options.projectRoot,
highlightCode: true,
filename,
plugins,
sourceType: 'module',
// NOTE(EvanBacon): We split the parse/transform steps up to accommodate
// Hermes parsing, but this defaults to cloning the AST which increases
// the transformation time by a fair amount.
// You get this behavior by default when using Babel's `transform` method directly.
cloneInputAst: false,
};
const sourceAst: BabelNodeFile = options.hermesParser
? // $FlowFixMe[incompatible-exact]
require('hermes-parser').parse(src, {
babel: true,
sourceType: babelConfig.sourceType,
})
: parseSync(src, babelConfig);
const transformResult = transformFromAstSync<MetroBabelFileMetadata>(
sourceAst,
src,
babelConfig,
);
return {
ast: nullthrows(transformResult.ast),
metadata: transformResult.metadata,
};
} finally {
if (OLD_BABEL_ENV) {
process.env.BABEL_ENV = OLD_BABEL_ENV;
}
}
}
module.exports = ({
transform,
}: BabelTransformer);