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,69 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _dayjs = _interopRequireDefault(require("dayjs"));
var _constants = require("./constants");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
class IosParser {
splitMessages(raw) {
const messages = [];
let data = raw.toString();
let match = data.match(IosParser.timeRegex);
while (match) {
const timeMatch = match[0];
data = data.slice((match.index || 0) + timeMatch.length);
const nextMatch = data.match(IosParser.timeRegex);
const body = nextMatch ? data.slice(0, nextMatch.index) : data;
messages.push(`${timeMatch} ${body}`);
match = nextMatch;
}
return messages;
}
parseMessages(messages) {
return messages.map(rawMessage => {
const timeMatch = rawMessage.match(IosParser.timeRegex);
if (!timeMatch) {
throw new Error(`Time regex was not matched in message: ${rawMessage}`);
}
const headerMatch = rawMessage.slice(timeMatch[0].length).match(IosParser.headerRegex) || ['', 'Default', '-1', 'unknown'];
const [, priority, pid, tag] = headerMatch;
return {
platform: 'ios',
date: (0, _dayjs.default)(timeMatch[0]).set('millisecond', 0),
pid: parseInt(pid.trim(), 10) || 0,
priority: _constants.Priority.fromName(priority),
tag,
messages: [rawMessage.slice(timeMatch[0].length + headerMatch[0].length).trim()]
};
}).reduce((acc, entry) => {
if (acc.length > 0 && acc[acc.length - 1].date.isSame(entry.date) && acc[acc.length - 1].appId === entry.appId && acc[acc.length - 1].pid === entry.pid && acc[acc.length - 1].priority === entry.priority) {
acc[acc.length - 1].messages.push(...entry.messages);
return acc;
}
return [...acc, entry];
}, []);
}
}
exports.default = IosParser;
_defineProperty(IosParser, "timeRegex", /\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.[\d+]+/m);
_defineProperty(IosParser, "headerRegex", /^\s+[a-z0-9]+\s+(\w+)\s+[a-z0-9]+\s+(\d+)\s+\d+\s+([^:]+):/);
//# sourceMappingURL=IosParser.js.map