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,72 @@
import inspect from "../../jsutils/inspect.mjs";
import { GraphQLError } from "../../error/GraphQLError.mjs";
import { Kind } from "../../language/kinds.mjs";
import { isNonNullType } from "../../type/definition.mjs";
import { typeFromAST } from "../../utilities/typeFromAST.mjs";
import { isTypeSubTypeOf } from "../../utilities/typeComparators.mjs";
/**
* Variables passed to field arguments conform to type
*/
export function VariablesInAllowedPositionRule(context) {
var varDefMap = Object.create(null);
return {
OperationDefinition: {
enter: function enter() {
varDefMap = Object.create(null);
},
leave: function leave(operation) {
var usages = context.getRecursiveVariableUsages(operation);
for (var _i2 = 0; _i2 < usages.length; _i2++) {
var _ref2 = usages[_i2];
var node = _ref2.node;
var type = _ref2.type;
var defaultValue = _ref2.defaultValue;
var varName = node.name.value;
var varDef = varDefMap[varName];
if (varDef && type) {
// A var type is allowed if it is the same or more strict (e.g. is
// a subtype of) than the expected type. It can be more strict if
// the variable type is non-null when the expected type is nullable.
// If both are list types, the variable item type can be more strict
// than the expected item type (contravariant).
var schema = context.getSchema();
var varType = typeFromAST(schema, varDef.type);
if (varType && !allowedVariableUsage(schema, varType, varDef.defaultValue, type, defaultValue)) {
var varTypeStr = inspect(varType);
var typeStr = inspect(type);
context.reportError(new GraphQLError("Variable \"$".concat(varName, "\" of type \"").concat(varTypeStr, "\" used in position expecting type \"").concat(typeStr, "\"."), [varDef, node]));
}
}
}
}
},
VariableDefinition: function VariableDefinition(node) {
varDefMap[node.variable.name.value] = node;
}
};
}
/**
* Returns true if the variable is allowed in the location it was found,
* which includes considering if default values exist for either the variable
* or the location at which it is located.
*/
function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) {
if (isNonNullType(locationType) && !isNonNullType(varType)) {
var hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== Kind.NULL;
var hasLocationDefaultValue = locationDefaultValue !== undefined;
if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {
return false;
}
var nullableLocationType = locationType.ofType;
return isTypeSubTypeOf(schema, varType, nullableLocationType);
}
return isTypeSubTypeOf(schema, varType, locationType);
}