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,21 @@
MIT License
Copyright (c) Meta Platforms, Inc. and affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,3 @@
# hermes-estree
Flow types for the Flow-ESTree spec produced by the hermes parser

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
/**
* 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
*/
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _predicates = require("./predicates");
Object.keys(_predicates).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _predicates[key]) return;
exports[key] = _predicates[key];
});

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
* @format
*/
'use strict';
export type * from './selectors';
export type * from './types';
export * from './predicates';

View File

@@ -0,0 +1,158 @@
/**
* 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
*/
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {
isClass: true,
isPropertyDefinitionWithNonComputedName: true,
isClassMember: true,
isClassMemberWithNonComputedName: true,
isComment: true,
isFunction: true,
isMethodDefinitionWithNonComputedName: true,
isMemberExpressionWithNonComputedProperty: true,
isOptionalMemberExpressionWithNonComputedProperty: true,
isObjectPropertyWithShorthand: true,
isObjectPropertyWithNonComputedName: true,
isBigIntLiteral: true,
isBooleanLiteral: true,
isNullLiteral: true,
isNumericLiteral: true,
isRegExpLiteral: true,
isStringLiteral: true,
isExpression: true,
isStatement: true
};
exports.isBigIntLiteral = isBigIntLiteral;
exports.isBooleanLiteral = isBooleanLiteral;
exports.isClass = isClass;
exports.isClassMember = isClassMember;
exports.isClassMemberWithNonComputedName = isClassMemberWithNonComputedName;
exports.isComment = isComment;
exports.isExpression = isExpression;
exports.isFunction = isFunction;
exports.isMemberExpressionWithNonComputedProperty = isMemberExpressionWithNonComputedProperty;
exports.isMethodDefinitionWithNonComputedName = isMethodDefinitionWithNonComputedName;
exports.isNullLiteral = isNullLiteral;
exports.isNumericLiteral = isNumericLiteral;
exports.isObjectPropertyWithNonComputedName = isObjectPropertyWithNonComputedName;
exports.isObjectPropertyWithShorthand = isObjectPropertyWithShorthand;
exports.isOptionalMemberExpressionWithNonComputedProperty = isOptionalMemberExpressionWithNonComputedProperty;
exports.isPropertyDefinitionWithNonComputedName = isPropertyDefinitionWithNonComputedName;
exports.isRegExpLiteral = isRegExpLiteral;
exports.isStatement = isStatement;
exports.isStringLiteral = isStringLiteral;
var _predicates = require("./generated/predicates");
Object.keys(_predicates).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _predicates[key]) return;
exports[key] = _predicates[key];
});
// $FlowFixMe[deprecated-type]
function isClass(node) {
return (0, _predicates.isClassDeclaration)(node) || (0, _predicates.isClassExpression)(node);
}
function isPropertyDefinitionWithNonComputedName(node // $FlowFixMe[deprecated-type]
) {
return (0, _predicates.isPropertyDefinition)(node) && node.computed === false;
} // $FlowFixMe[deprecated-type]
function isClassMember(node) {
return (0, _predicates.isPropertyDefinition)(node) || (0, _predicates.isMethodDefinition)(node);
}
function isClassMemberWithNonComputedName(node // $FlowFixMe[deprecated-type]
) {
return isClassMember(node) && node.computed === false;
} // $FlowFixMe[deprecated-type]
function isComment(node) {
return (0, _predicates.isBlockComment)(node) || (0, _predicates.isLineComment)(node);
} // $FlowFixMe[deprecated-type]
function isFunction(node) {
return (0, _predicates.isArrowFunctionExpression)(node) || (0, _predicates.isFunctionDeclaration)(node) || (0, _predicates.isFunctionExpression)(node);
}
function isMethodDefinitionWithNonComputedName(node // $FlowFixMe[deprecated-type]
) {
return (0, _predicates.isMethodDefinition)(node) && node.computed === false;
}
function isMemberExpressionWithNonComputedProperty(node // $FlowFixMe[deprecated-type]
) {
return (0, _predicates.isMemberExpression)(node) && node.computed === false;
}
function isOptionalMemberExpressionWithNonComputedProperty(node // $FlowFixMe[deprecated-type]
) {
return (0, _predicates.isMemberExpression)(node) && node.computed === false;
} // $FlowFixMe[deprecated-type]
function isObjectPropertyWithShorthand(node) {
return (0, _predicates.isProperty)(node) && node.shorthand === true;
}
function isObjectPropertyWithNonComputedName(node // $FlowFixMe[deprecated-type]
) {
return (0, _predicates.isProperty)(node) && node.computed === false;
} // $FlowFixMe[deprecated-type]
function isBigIntLiteral(node) {
return (0, _predicates.isLiteral)(node) && node.literalType === 'bigint';
} // $FlowFixMe[deprecated-type]
function isBooleanLiteral(node) {
return (0, _predicates.isLiteral)(node) && node.literalType === 'boolean';
} // $FlowFixMe[deprecated-type]
function isNullLiteral(node) {
return (0, _predicates.isLiteral)(node) && node.literalType === 'null';
} // $FlowFixMe[deprecated-type]
function isNumericLiteral(node) {
return (0, _predicates.isLiteral)(node) && node.literalType === 'numeric';
} // $FlowFixMe[deprecated-type]
function isRegExpLiteral(node) {
return (0, _predicates.isLiteral)(node) && node.literalType === 'regexp';
} // $FlowFixMe[deprecated-type]
function isStringLiteral(node) {
return (0, _predicates.isLiteral)(node) && node.literalType === 'string';
} // $FlowFixMe[deprecated-type]
function isExpression(node) {
return (0, _predicates.isThisExpression)(node) || (0, _predicates.isArrayExpression)(node) || (0, _predicates.isObjectExpression)(node) || (0, _predicates.isFunctionExpression)(node) || (0, _predicates.isArrowFunctionExpression)(node) || (0, _predicates.isYieldExpression)(node) || (0, _predicates.isLiteral)(node) || (0, _predicates.isUnaryExpression)(node) || (0, _predicates.isUpdateExpression)(node) || (0, _predicates.isBinaryExpression)(node) || (0, _predicates.isAssignmentExpression)(node) || (0, _predicates.isLogicalExpression)(node) || (0, _predicates.isMemberExpression)(node) || (0, _predicates.isConditionalExpression)(node) || (0, _predicates.isCallExpression)(node) || (0, _predicates.isNewExpression)(node) || (0, _predicates.isSequenceExpression)(node) || (0, _predicates.isTemplateLiteral)(node) || (0, _predicates.isTaggedTemplateExpression)(node) || (0, _predicates.isClassExpression)(node) || (0, _predicates.isMetaProperty)(node) || (0, _predicates.isIdentifier)(node) || (0, _predicates.isAwaitExpression)(node) || (0, _predicates.isImportExpression)(node) || (0, _predicates.isChainExpression)(node) || (0, _predicates.isTypeCastExpression)(node) || (0, _predicates.isAsExpression)(node) || (0, _predicates.isJSXFragment)(node) || (0, _predicates.isJSXElement)(node);
} // $FlowFixMe[deprecated-type]
function isStatement(node) {
return (0, _predicates.isBlockStatement)(node) || (0, _predicates.isBreakStatement)(node) || (0, _predicates.isClassDeclaration)(node) || (0, _predicates.isContinueStatement)(node) || (0, _predicates.isDebuggerStatement)(node) || (0, _predicates.isDeclareClass)(node) || (0, _predicates.isDeclareVariable)(node) || (0, _predicates.isDeclareFunction)(node) || (0, _predicates.isDeclareInterface)(node) || (0, _predicates.isDeclareModule)(node) || (0, _predicates.isDeclareOpaqueType)(node) || (0, _predicates.isDeclareTypeAlias)(node) || (0, _predicates.isDoWhileStatement)(node) || (0, _predicates.isEmptyStatement)(node) || (0, _predicates.isEnumDeclaration)(node) || (0, _predicates.isExpressionStatement)(node) || (0, _predicates.isForInStatement)(node) || (0, _predicates.isForOfStatement)(node) || (0, _predicates.isForStatement)(node) || (0, _predicates.isFunctionDeclaration)(node) || (0, _predicates.isIfStatement)(node) || (0, _predicates.isInterfaceDeclaration)(node) || (0, _predicates.isLabeledStatement)(node) || (0, _predicates.isOpaqueType)(node) || (0, _predicates.isReturnStatement)(node) || (0, _predicates.isSwitchStatement)(node) || (0, _predicates.isThrowStatement)(node) || (0, _predicates.isTryStatement)(node) || (0, _predicates.isTypeAlias)(node) || (0, _predicates.isVariableDeclaration)(node) || (0, _predicates.isWhileStatement)(node) || (0, _predicates.isWithStatement)(node);
}

View File

@@ -0,0 +1,258 @@
/**
* 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-local
* @format
*/
'use strict';
import type {ESNode, Token} from './types';
import {
isArrayExpression,
isArrowFunctionExpression,
isAsExpression,
isAssignmentExpression,
isAwaitExpression,
isBinaryExpression,
isBlockComment,
isBlockStatement,
isBreakStatement,
isCallExpression,
isChainExpression,
isClassDeclaration,
isClassExpression,
isConditionalExpression,
isContinueStatement,
isDebuggerStatement,
isDeclareClass,
isDeclareFunction,
isDeclareInterface,
isDeclareModule,
isDeclareOpaqueType,
isDeclareTypeAlias,
isDeclareVariable,
isDoWhileStatement,
isEmptyStatement,
isEnumDeclaration,
isExpressionStatement,
isForInStatement,
isForOfStatement,
isForStatement,
isFunctionDeclaration,
isFunctionExpression,
isIdentifier,
isIfStatement,
isImportExpression,
isInterfaceDeclaration,
isJSXElement,
isJSXFragment,
isLabeledStatement,
isLineComment,
isLiteral,
isLogicalExpression,
isMemberExpression,
isMetaProperty,
isMethodDefinition,
isNewExpression,
isObjectExpression,
isOpaqueType,
isProperty,
isPropertyDefinition,
isReturnStatement,
isSequenceExpression,
isSwitchStatement,
isTaggedTemplateExpression,
isTemplateLiteral,
isThisExpression,
isThrowStatement,
isTryStatement,
isTypeAlias,
isTypeCastExpression,
isUnaryExpression,
isUpdateExpression,
isVariableDeclaration,
isWhileStatement,
isWithStatement,
isYieldExpression,
} from './generated/predicates';
export * from './generated/predicates';
// $FlowFixMe[deprecated-type]
export function isClass(node: ESNode): boolean %checks {
return isClassDeclaration(node) || isClassExpression(node);
}
export function isPropertyDefinitionWithNonComputedName(
node: ESNode,
// $FlowFixMe[deprecated-type]
): boolean %checks {
return isPropertyDefinition(node) && node.computed === false;
}
// $FlowFixMe[deprecated-type]
export function isClassMember(node: ESNode): boolean %checks {
return isPropertyDefinition(node) || isMethodDefinition(node);
}
export function isClassMemberWithNonComputedName(
node: ESNode,
// $FlowFixMe[deprecated-type]
): boolean %checks {
return isClassMember(node) && node.computed === false;
}
// $FlowFixMe[deprecated-type]
export function isComment(node: ESNode | Token): boolean %checks {
return isBlockComment(node) || isLineComment(node);
}
// $FlowFixMe[deprecated-type]
export function isFunction(node: ESNode): boolean %checks {
return (
isArrowFunctionExpression(node) ||
isFunctionDeclaration(node) ||
isFunctionExpression(node)
);
}
export function isMethodDefinitionWithNonComputedName(
node: ESNode,
// $FlowFixMe[deprecated-type]
): boolean %checks {
return isMethodDefinition(node) && node.computed === false;
}
export function isMemberExpressionWithNonComputedProperty(
node: ESNode,
// $FlowFixMe[deprecated-type]
): boolean %checks {
return isMemberExpression(node) && node.computed === false;
}
export function isOptionalMemberExpressionWithNonComputedProperty(
node: ESNode,
// $FlowFixMe[deprecated-type]
): boolean %checks {
return isMemberExpression(node) && node.computed === false;
}
// $FlowFixMe[deprecated-type]
export function isObjectPropertyWithShorthand(node: ESNode): boolean %checks {
return isProperty(node) && node.shorthand === true;
}
export function isObjectPropertyWithNonComputedName(
node: ESNode,
// $FlowFixMe[deprecated-type]
): boolean %checks {
return isProperty(node) && node.computed === false;
}
// $FlowFixMe[deprecated-type]
export function isBigIntLiteral(node: ESNode): boolean %checks {
return isLiteral(node) && node.literalType === 'bigint';
}
// $FlowFixMe[deprecated-type]
export function isBooleanLiteral(node: ESNode): boolean %checks {
return isLiteral(node) && node.literalType === 'boolean';
}
// $FlowFixMe[deprecated-type]
export function isNullLiteral(node: ESNode): boolean %checks {
return isLiteral(node) && node.literalType === 'null';
}
// $FlowFixMe[deprecated-type]
export function isNumericLiteral(node: ESNode): boolean %checks {
return isLiteral(node) && node.literalType === 'numeric';
}
// $FlowFixMe[deprecated-type]
export function isRegExpLiteral(node: ESNode): boolean %checks {
return isLiteral(node) && node.literalType === 'regexp';
}
// $FlowFixMe[deprecated-type]
export function isStringLiteral(node: ESNode): boolean %checks {
return isLiteral(node) && node.literalType === 'string';
}
// $FlowFixMe[deprecated-type]
export function isExpression(node: ESNode): boolean %checks {
return (
isThisExpression(node) ||
isArrayExpression(node) ||
isObjectExpression(node) ||
isFunctionExpression(node) ||
isArrowFunctionExpression(node) ||
isYieldExpression(node) ||
isLiteral(node) ||
isUnaryExpression(node) ||
isUpdateExpression(node) ||
isBinaryExpression(node) ||
isAssignmentExpression(node) ||
isLogicalExpression(node) ||
isMemberExpression(node) ||
isConditionalExpression(node) ||
isCallExpression(node) ||
isNewExpression(node) ||
isSequenceExpression(node) ||
isTemplateLiteral(node) ||
isTaggedTemplateExpression(node) ||
isClassExpression(node) ||
isMetaProperty(node) ||
isIdentifier(node) ||
isAwaitExpression(node) ||
isImportExpression(node) ||
isChainExpression(node) ||
isTypeCastExpression(node) ||
isAsExpression(node) ||
isJSXFragment(node) ||
isJSXElement(node)
);
}
// $FlowFixMe[deprecated-type]
export function isStatement(node: ESNode): boolean %checks {
return (
isBlockStatement(node) ||
isBreakStatement(node) ||
isClassDeclaration(node) ||
isContinueStatement(node) ||
isDebuggerStatement(node) ||
isDeclareClass(node) ||
isDeclareVariable(node) ||
isDeclareFunction(node) ||
isDeclareInterface(node) ||
isDeclareModule(node) ||
isDeclareOpaqueType(node) ||
isDeclareTypeAlias(node) ||
isDoWhileStatement(node) ||
isEmptyStatement(node) ||
isEnumDeclaration(node) ||
isExpressionStatement(node) ||
isForInStatement(node) ||
isForOfStatement(node) ||
isForStatement(node) ||
isFunctionDeclaration(node) ||
isIfStatement(node) ||
isInterfaceDeclaration(node) ||
isLabeledStatement(node) ||
isOpaqueType(node) ||
isReturnStatement(node) ||
isSwitchStatement(node) ||
isThrowStatement(node) ||
isTryStatement(node) ||
isTypeAlias(node) ||
isVariableDeclaration(node) ||
isWhileStatement(node) ||
isWithStatement(node)
);
}

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.
*
*
* @format
*/
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});

View File

@@ -0,0 +1,28 @@
/**
* 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
*/
'use strict';
import type {ESQueryNodeSelectorsWithoutFallback} from './generated/HermesESTreeSelectorTypes';
export type ESQueryNodeSelectors = {
...ESQueryNodeSelectorsWithoutFallback,
// We want to allow consumers to manually type their weird selectors.
// If we use the \`ESNode\` type here then flow will error on cases like this:
// 'FunctionDeclaration[id="foo"]'(node: FunctionDeclaration) {...}
// But this sucks as it means someone would then have to manually do an \`if\`
// check inside the selector body.
+[selector: string]: (node: $FlowFixMe) => void,
};
export type {ESQueryNodeSelectorsWithoutFallback} from './generated/HermesESTreeSelectorTypes';
export {};

View File

@@ -0,0 +1,39 @@
/**
* 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
*/
'use strict';
/**
*
* IMPORTANT NOTE
*
* This file intentionally uses interfaces and `+` for readonly.
*
* - `$ReadOnly` is an "evaluated" utility type in flow; meaning that flow does
* not actually calculate the resulting type until it is used. This creates
* a copy of the type at each usage site - ballooning memory and processing
* times.
* Usually this isn't a problem as a type might only be used one or two times
* - but in this giant circular-referencing graph that is the AST types, this
* causes check times for consumers to be awful.
*
* Thus instead we manually annotate properties with `+` to avoid the `$ReadOnly` type.
*
* - `...Type` spreads do not preserve the readonly-ness of the properties. If
* we used object literal types then we would have to `$ReadOnly` all spreads
* (see point 1). On the other hand extending an interface does preserve
* readonlyness of properties.
*
* Thus instead of object literals, we use interfaces.
*
*** Please ensure all properties are marked as readonly! ***
*/
Object.defineProperty(exports, "__esModule", {
value: true
});

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
{
"name": "hermes-estree",
"version": "0.19.1",
"description": "Flow types for the Flow-ESTree spec produced by the hermes parser",
"main": "dist/index.js",
"license": "MIT",
"repository": {
"type": "git",
"url": "git@github.com:facebook/hermes.git"
},
"files": [
"dist",
"LICENCE",
"README.md"
]
}