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,6 @@
---
Checks: '>
clang-diagnostic-*,
'
InheritParentConfig: true
...

View File

@@ -0,0 +1,22 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
cmake_minimum_required(VERSION 3.13)
set(CMAKE_VERBOSE_MAKEFILE on)
add_compile_options(
-fexceptions
-frtti
-std=c++20
-Wall
-Wpedantic)
file(GLOB_RECURSE runtimeexecutor_SRC CONFIGURE_DEPENDS *.cpp *.h)
add_library(runtimeexecutor SHARED ${runtimeexecutor_SRC})
target_include_directories(runtimeexecutor PUBLIC .)
target_link_libraries(runtimeexecutor jsi)

View File

@@ -0,0 +1,37 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
require "json"
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
version = package['version']
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which were presumably in.
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
else
source[:tag] = "v#{version}"
end
folly_config = get_folly_config()
folly_compiler_flags = folly_config[:compiler_flags]
folly_version = folly_config[:version]
boost_compiler_flags = '-Wno-documentation'
Pod::Spec.new do |s|
s.name = "React-runtimeexecutor"
s.version = version
s.summary = "-" # TODO
s.homepage = "https://reactnative.dev/"
s.license = package["license"]
s.author = "Meta Platforms, Inc. and its affiliates"
s.platforms = min_supported_versions
s.source = source
s.source_files = "**/*.{cpp,h}"
s.header_dir = "ReactCommon"
s.dependency "React-jsi", version
end

View File

@@ -0,0 +1,127 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <mutex>
#include <thread>
#include <jsi/jsi.h>
namespace facebook::react {
/*
* Takes a function and calls it with a reference to a Runtime. The function
* will be called when it is safe to do so (i.e. it ensures non-concurrent
* access) and may be invoked asynchronously, depending on the implementation.
* If you need to access a Runtime, it's encouraged to use a RuntimeExecutor
* instead of storing a pointer to the Runtime itself, which makes it more
* difficult to ensure that the Runtime is being accessed safely.
*/
using RuntimeExecutor =
std::function<void(std::function<void(jsi::Runtime& runtime)>&& callback)>;
/*
* The caller can expect that the callback will be executed sometime later on an
* unspecified thread.
* Use this method when the caller prefers to not be blocked by executing the
* `callback`.
* Note that this method does not provide any guarantees
* about when the `callback` will be executed (before returning to the caller,
* after that, or in parallel), the only thing that is guaranteed is that there
* is no synchronization.
*/
inline static void executeAsynchronously(
const RuntimeExecutor& runtimeExecutor,
std::function<void(jsi::Runtime& runtime)>&& callback) noexcept {
std::thread([callback = std::move(callback), runtimeExecutor]() mutable {
runtimeExecutor(std::move(callback));
}).detach();
}
/*
* Executes a `callback` in a *synchronous* manner using given
* `RuntimeExecutor`.
* Use this method when the caller needs to *be blocked* by executing the
* callback but does not concerned about the particular thread on which the
* `callback` will be executed.
*/
inline static void executeSynchronously_CAN_DEADLOCK(
const RuntimeExecutor& runtimeExecutor,
std::function<void(jsi::Runtime& runtime)>&& callback) noexcept {
std::mutex mutex;
mutex.lock();
runtimeExecutor(
[callback = std::move(callback), &mutex](jsi::Runtime& runtime) {
callback(runtime);
mutex.unlock();
});
mutex.lock();
}
/*
* Executes a `callback` in a *synchronous* manner on the same thread using
* given `RuntimeExecutor`.
* Use this method when the caller needs to *be blocked* by executing the
* `callback` and requires that the callback will be executed on the same
* thread.
*/
inline static void executeSynchronouslyOnSameThread_CAN_DEADLOCK(
const RuntimeExecutor& runtimeExecutor,
std::function<void(jsi::Runtime& runtime)>&& callback) noexcept {
// Note: We need the third mutex to get back to the main thread before
// the lambda is finished (because all mutexes are allocated on the stack).
std::mutex mutex1;
std::mutex mutex2;
std::mutex mutex3;
mutex1.lock();
mutex2.lock();
mutex3.lock();
jsi::Runtime* runtimePtr;
auto threadId = std::this_thread::get_id();
runtimeExecutor([&](jsi::Runtime& runtime) {
runtimePtr = &runtime;
if (threadId == std::this_thread::get_id()) {
// In case of a synchronous call, we should unlock mutexes and return.
mutex1.unlock();
mutex3.unlock();
return;
}
mutex1.unlock();
// `callback` is called somewhere here.
mutex2.lock();
mutex3.unlock();
});
mutex1.lock();
callback(*runtimePtr);
mutex2.unlock();
mutex3.lock();
}
template <typename DataT>
inline static DataT executeSynchronouslyOnSameThread_CAN_DEADLOCK(
const RuntimeExecutor& runtimeExecutor,
std::function<DataT(jsi::Runtime& runtime)>&& callback) noexcept {
DataT data;
executeSynchronouslyOnSameThread_CAN_DEADLOCK(
runtimeExecutor,
[&](jsi::Runtime& runtime) { data = callback(runtime); });
return data;
}
} // namespace facebook::react