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,3 @@
<manifest>
</manifest>

View File

@@ -0,0 +1,59 @@
package expo.modules.keepawake
import android.app.Activity
import android.view.WindowManager
import expo.modules.core.ModuleRegistry
import expo.modules.core.errors.CurrentActivityNotFoundException
import expo.modules.core.interfaces.ActivityProvider
import expo.modules.core.interfaces.InternalModule
import expo.modules.core.interfaces.services.KeepAwakeManager
class ExpoKeepAwakeManager : KeepAwakeManager, InternalModule {
private val tags: MutableSet<String> = HashSet()
private lateinit var moduleRegistry: ModuleRegistry
override fun onCreate(moduleRegistry: ModuleRegistry) {
this.moduleRegistry = moduleRegistry
}
@get:Throws(CurrentActivityNotFoundException::class)
private val currentActivity: Activity
get() {
val activityProvider = moduleRegistry.getModule(ActivityProvider::class.java)
?: throw CurrentActivityNotFoundException()
return if (activityProvider.currentActivity != null) {
activityProvider.currentActivity
} else {
throw CurrentActivityNotFoundException()
}
}
@Throws(CurrentActivityNotFoundException::class)
override fun activate(tag: String, done: Runnable) {
val activity = currentActivity
if (!isActivated) {
activity.runOnUiThread { activity.window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) }
}
tags.add(tag)
done.run()
}
@Throws(CurrentActivityNotFoundException::class)
override fun deactivate(tag: String, done: Runnable) {
val activity = currentActivity
if (tags.size == 1 && tags.contains(tag)) {
activity.runOnUiThread { activity.window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) }
}
tags.remove(tag)
done.run()
}
override fun isActivated(): Boolean {
return tags.isNotEmpty()
}
override fun getExportedInterfaces(): List<Class<*>?> {
return listOf(KeepAwakeManager::class.java)
}
}

View File

@@ -0,0 +1,12 @@
package expo.modules.keepawake
import expo.modules.kotlin.exception.CodedException
internal class ActivateKeepAwakeException :
CodedException("Unable to activate keep awake")
internal class DeactivateKeepAwakeException :
CodedException("Unable to deactivate keep awake. However, it probably is deactivated already")
internal class MissingModuleException(moduleName: String) :
CodedException("Module '$moduleName' not found. Are you sure all modules are linked correctly?")

View File

@@ -0,0 +1,37 @@
// Copyright 2015-present 650 Industries. All rights reserved.
package expo.modules.keepawake
import expo.modules.core.errors.CurrentActivityNotFoundException
import expo.modules.core.interfaces.services.KeepAwakeManager
import expo.modules.kotlin.Promise
import expo.modules.kotlin.modules.Module
import expo.modules.kotlin.modules.ModuleDefinition
class KeepAwakeModule : Module() {
private val keepAwakeManager: KeepAwakeManager
get() = appContext.legacyModule() ?: throw MissingModuleException("KeepAwakeManager")
override fun definition() = ModuleDefinition {
Name("ExpoKeepAwake")
AsyncFunction("activate") { tag: String, promise: Promise ->
try {
keepAwakeManager.activate(tag) { promise.resolve(true) }
} catch (ex: CurrentActivityNotFoundException) {
promise.reject(ActivateKeepAwakeException())
}
}
AsyncFunction("deactivate") { tag: String, promise: Promise ->
try {
keepAwakeManager.deactivate(tag) { promise.resolve(true) }
} catch (ex: CurrentActivityNotFoundException) {
promise.reject(DeactivateKeepAwakeException())
}
}
AsyncFunction<Boolean>("isActivated") {
return@AsyncFunction keepAwakeManager.isActivated
}
}
}

View File

@@ -0,0 +1,12 @@
package expo.modules.keepawake
import android.content.Context
import expo.modules.core.interfaces.InternalModule
import expo.modules.core.interfaces.Package
class KeepAwakePackage : Package {
override fun createInternalModules(context: Context): List<InternalModule> {
return listOf(ExpoKeepAwakeManager())
}
}