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,22 @@
The MIT License (MIT)
Copyright (c) 2015 650 Industries
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,45 @@
# freeport-async
Finds an available port for your application to use.
You can specify a range where to look for an available port.
And can also find a range of available ports for you to use.
You can also be used to test to see if a given port is available.
All functions are async and return Promises.
## Usage
### Basic
```js
let freeportAsync = require("freeport-async");
let portICanUse = await freeportAsync();
```
### Advanced
```js
let freeportAsync = require("freeport-async");
let portIn9000Range = await freeportAsync(9000);
let portAvailableForAnyOrLocalhost = await freeportAsync(9000, {
hostnames: [null, "localhost"]
});
let isPort5000Available = await freeportAsync.availableAsync(5000);
let listOf5ConsecutiveAvailablePorts = await freeportAsync.rangeAsync(5);
let freeRangeIn12000Range = await freeportAsync.rangeAsync(3, 12000);
```
## Important Note
Note that this code just finds available ports, but doesn't reserve them in any way.
This means that if you have other code that might be looking for a port in the same range at the same time, you could run into issues.
Also, if you call `freeportAsync` twice in a row, it will often return the same port number twice. If you want to find two (or more) ports you can use, you need to call `freeportAsync.rangeAsync(<number-of-ports>, [startSearchFrom])`.
See also https://gist.github.com/mikeal/1840641

View File

@@ -0,0 +1,64 @@
const net = require("net");
const DEFAULT_PORT_RANGE_START = 11000;
function testPortAsync(port, hostname) {
return new Promise(function(fulfill, reject) {
var server = net.createServer();
server.listen({ port: port, host: hostname }, function(err) {
server.once("close", function() {
setTimeout(() => fulfill(true), 0);
});
server.close();
});
server.on("error", function(err) {
setTimeout(() => fulfill(false), 0);
});
});
}
async function availableAsync(port, options = {}) {
const hostnames =
options.hostnames && options.hostnames.length ? options.hostnames : [null];
for (const hostname of hostnames) {
if (!(await testPortAsync(port, hostname))) {
return false;
}
}
return true;
}
function freePortRangeAsync(rangeSize, rangeStart, options = {}) {
rangeSize = rangeSize || 1;
return new Promise((fulfill, reject) => {
var lowPort = rangeStart || DEFAULT_PORT_RANGE_START;
var awaitables = [];
for (var i = 0; i < rangeSize; i++) {
awaitables.push(availableAsync(lowPort + i, options));
}
return Promise.all(awaitables).then(function(results) {
var ports = [];
for (var i = 0; i < results.length; i++) {
if (!results[i]) {
return freePortRangeAsync(
rangeSize,
lowPort + rangeSize,
options
).then(fulfill, reject);
}
ports.push(lowPort + i);
}
fulfill(ports);
});
});
}
async function freePortAsync(rangeStart, options = {}) {
const result = await freePortRangeAsync(1, rangeStart, options);
return result[0];
}
module.exports = freePortAsync;
module.exports.availableAsync = availableAsync;
module.exports.rangeAsync = freePortRangeAsync;

View File

@@ -0,0 +1,35 @@
{
"name": "freeport-async",
"version": "2.0.0",
"description": "Finds an available port for your application to use.",
"license": "MIT",
"main": "index.js",
"engines": {
"node": ">=8"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/expo/freeport-async.git"
},
"keywords": [
"port",
"free",
"open",
"new",
"fresh",
"clean",
"networking",
"mikeal"
],
"author": "Expo",
"bugs": {
"url": "https://github.com/expo/freeport-async/issues"
},
"homepage": "https://github.com/expo/freeport-async/blob/master/README.md",
"devDependencies": {
"project-repl": "^1.5.0"
}
}

2
smart-app-city/frontend/node_modules/freeport-async/repl generated vendored Executable file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env sh
node --experimental-repl-await -i -e "require('project-repl')('.', (x) => require(x));" $*

View File

@@ -0,0 +1,42 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
minimatch@3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
dependencies:
brace-expansion "^1.1.7"
project-repl@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/project-repl/-/project-repl-1.5.0.tgz#695d945235594eebe32d80c7ebea2318cb81487f"
integrity sha512-ss831p9dFzv8JEp3qFJSOsCOk66Z4afwMxvyXrkICpce5jytqyqncuaPJjQfVNpS3fxpOCwwqE2gZ3AcbrmdCA==
dependencies:
recursive-readdir "^2.2.2"
recursive-readdir@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f"
integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==
dependencies:
minimatch "3.0.4"