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,44 @@
#!/usr/bin/env node
var recast = require("recast");
var types = recast.types;
var n = types.namedTypes;
var b = types.builders;
require("recast").run(function(ast, callback) {
recast.visit(ast, {
visitIfStatement: function(path) {
var stmt = path.node;
stmt.consequent = fix(stmt.consequent);
var alt = stmt.alternate;
if (!n.IfStatement.check(alt)) {
stmt.alternate = fix(alt);
}
this.traverse(path);
},
visitWhileStatement: visitLoop,
visitForStatement: visitLoop,
visitForInStatement: visitLoop
});
callback(ast);
});
function visitLoop(path) {
var loop = path.node;
loop.body = fix(loop.body);
this.traverse(path);
}
function fix(clause) {
if (clause) {
if (!n.BlockStatement.check(clause)) {
clause = b.blockStatement([clause]);
}
}
return clause;
}

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env node
// This script should reprint the contents of the given file without
// reusing the original source, but with identical AST structure.
var recast = require("recast");
recast.run(function(ast, callback) {
recast.visit(ast, {
visitNode: function(path) {
this.traverse(path);
path.node.original = null;
}
});
callback(ast);
});

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env node
// This script should echo the contents of the given file without
// modification.
require("recast").run(function(ast, callback) {
callback(ast);
});

84
smart-app-city/frontend/node_modules/recast/example/to-while generated vendored Executable file
View File

@@ -0,0 +1,84 @@
#!/usr/bin/env node
// This script converts for and do-while loops into equivalent while loops.
// Note that for-in statements are left unmodified, as they do not have a
// simple analogy to while loops. Also note that labeled continue statements
// are not correctly handled at this point, and will trigger an assertion
// failure if encountered.
var assert = require("assert");
var recast = require("recast");
var types = recast.types;
var n = types.namedTypes;
var b = types.builders;
recast.run(function(ast, callback) {
recast.visit(ast, {
visitForStatement: function(path) {
var fst = path.node;
path.replace(
fst.init,
b.whileStatement(
fst.test,
insertBeforeLoopback(fst, fst.update)
)
);
this.traverse(path);
},
visitDoWhileStatement: function(path) {
var dwst = path.node;
return b.whileStatement(
b.literal(true),
insertBeforeLoopback(
dwst,
b.ifStatement(
dwst.test,
b.breakStatement()
)
)
);
}
});
callback(ast);
});
function insertBeforeLoopback(loop, toInsert) {
var body = loop.body;
if (!n.Statement.check(toInsert)) {
toInsert = b.expressionStatement(toInsert);
}
if (n.BlockStatement.check(body)) {
body.body.push(toInsert);
} else {
body = b.blockStatement([body, toInsert]);
loop.body = body;
}
recast.visit(body, {
visitContinueStatement: function(path) {
var cst = path.node;
assert.equal(
cst.label, null,
"Labeled continue statements are not yet supported."
);
path.replace(toInsert, path.node);
return false;
},
// Do not descend into nested loops.
visitWhileStatement: function() {},
visitForStatement: function() {},
visitForInStatement: function() {},
visitDoWhileStatement: function() {}
});
return body;
}