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,67 @@
// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals
/* globals QUnit,Hammer,utils,Simulator */
var el;
var hammer;
QUnit.module('Pan Gesture', {
beforeEach: function() {
el = document.createElement('div');
document.body.appendChild(el);
hammer = new Hammer(el, { recognizers: [] });
},
afterEach: function() {
document.body.removeChild(el);
hammer.destroy();
}
});
QUnit.test('`panstart` and `panmove` should be recognized', function(assert) {
assert.expect(2);
var panMoveCount = 0;
var pan = new Hammer.Pan({ threshold: 1 });
hammer.add(pan);
hammer.on('panstart', function() {
assert.ok(true, 'Pan start triggered');
});
hammer.on('panmove', function() {
panMoveCount++;
});
utils.dispatchTouchEvent(el, 'start', 50, 50);
utils.dispatchTouchEvent(el, 'move', 70, 50);
utils.dispatchTouchEvent(el, 'move', 90, 50);
assert.equal(panMoveCount, 1, 'exactly one panMove triggered');
});
QUnit.test('Pan event flow should be start -> left -> end', function(assert) {
var done = assert.async();
assert.expect(1);
var pan = new Hammer.Pan({ threshold: 1 });
hammer.add(pan);
var eventflow = '';
var isCalledPanleft = false;
hammer.on('panstart', function() {
eventflow += 'start';
});
hammer.on('panleft', function() {
if (!isCalledPanleft) {
isCalledPanleft = true;
eventflow += 'left';
}
});
hammer.on('panend', function() {
eventflow += 'end';
isCalledPanleft = true;
});
Simulator.gestures.pan(el, { deltaX: -100, deltaY: 0 }, function() {
assert.equal(eventflow, 'startleftend', 'correct event flow');
done();
});
});

View File

@@ -0,0 +1,46 @@
// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals
/* globals QUnit,Hammer,Simulator */
var el;
var hammer;
QUnit.module('Pinch Gesture', {
beforeEach: function() {
el = document.createElement('div');
document.body.appendChild(el);
hammer = new Hammer(el, { recognizers: [] });
},
afterEach: function() {
document.body.removeChild(el);
hammer.destroy();
}
});
QUnit.test('Pinch event flow should be start -> in -> end', function(assert) {
var done = assert.async();
assert.expect(1);
var pinch = new Hammer.Pinch({ enable: true, threshold: 0.1 });
hammer.add(pinch);
var eventflow = '';
var isFiredPinchin = false;
hammer.on('pinchstart', function() {
eventflow += 'start';
});
hammer.on('pinchin', function() {
if (!isFiredPinchin) {
isFiredPinchin = true;
eventflow += 'in';
}
});
hammer.on('pinchend', function() {
eventflow += 'end';
isFiredPinchin = false;
});
Simulator.gestures.pinch(el, { duration: 500, scale: 0.5 }, function() {
assert.equal(eventflow, 'startinend', 'correct event flow');
done();
});
});

View File

@@ -0,0 +1,29 @@
// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals
/* globals QUnit,Hammer,utils,Simulator */
var el;
var hammer;
var swipeCount = 0;
QUnit.module('Swipe Gesture', {
beforeEach: function() {
el = utils.createHitArea();
hammer = new Hammer(el, { recognizers: [] });
swipeCount = 0;
},
afterEach: function() {
hammer.destroy();
}
});
QUnit.test('swipe can be recognized', function(assert) {
assert.expect(1);
var done = assert.async();
var swipe = new Hammer.Swipe({ threshold: 1 });
hammer.add(swipe);
hammer.on('swipe', function() {
assert.ok(true);
done();
});
Simulator.gestures.swipe(el);
});