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,55 @@
import ExpoModulesTestCore
@testable import ExpoModulesCore
@testable import ExpoFileSystem
class EXFileSystemSpec: ExpoSpec {
override class func spec() {
let fileSystem = EXFileSystem()
describe("percentEncodedURLFromURIString") {
it("should handle encoded URIs") {
let encodedUriInput = "file:///var/mobile/@username/branch"
let encodedUriExpectedOutput = "file:///var/mobile/@username/branch"
let encodedUri = fileSystem.percentEncodedURL(fromURIString: encodedUriInput)
expect(encodedUri?.absoluteString) == encodedUriExpectedOutput
expect(encodedUri?.scheme) == "file"
}
it("should handle UTF-8 characters") {
let utf8UriInput = "file:///var/mobile/中文"
let utf8UriExpectedOutput = "file:///var/mobile/%E4%B8%AD%E6%96%87"
let utf8Uri = fileSystem.percentEncodedURL(fromURIString: utf8UriInput)
expect(utf8Uri?.absoluteString) == utf8UriExpectedOutput
expect(utf8Uri?.scheme) == "file"
}
it("should handle URI with percent, numbers and UTF-8 characters") {
let input = "file:///document/directory/%40%2F中文"
let expectedOutput = "file:///document/directory/%40%2F%E4%B8%AD%E6%96%87"
let uri = fileSystem.percentEncodedURL(fromURIString: input)
expect(uri?.absoluteString) == expectedOutput
}
it("should not decode percentages in URI") {
let input = "file:///document/hello%2Fworld.txt"
let unexpectedOutput = "file:///document/hello/world.txt"
let uri = fileSystem.percentEncodedURL(fromURIString: input)
// Should not create a directory named "hello"
expect(uri?.absoluteString) != unexpectedOutput
}
it("should handle assets-library URIs") {
let assetsLibraryUriInput = "assets-library://asset/asset.JPG?id=3C1D9C54-9521-488F-BB27-AA1EA0F8AF04/L0/001&ext=JPG"
let assetsLibraryUri = fileSystem.percentEncodedURL(fromURIString: assetsLibraryUriInput)
expect(assetsLibraryUri?.absoluteString) == assetsLibraryUriInput
expect(assetsLibraryUri?.scheme) == "assets-library"
}
}
}
}