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,57 @@
import * as React from 'react';
import { createTheming } from '../..';
type Theme = {
primaryColor: string;
accentColor: string;
backgroundColor: string;
textColor: string;
secondaryColor: string;
};
const themes: { [key: string]: Theme } = {
default: {
primaryColor: '#FFA72A',
accentColor: '#458622',
backgroundColor: '#FFC777',
textColor: '#504f4d',
secondaryColor: '#7F5315',
},
dark: {
primaryColor: '#FFA72A',
accentColor: '#458622',
backgroundColor: '#504f4d',
textColor: '#FFC777',
secondaryColor: '#252525',
},
};
const { ThemeProvider, withTheme } = createTheming<Theme>(themes.default);
type TitleComponentProps = {
title: string;
theme: Theme;
};
const TitleComponent = ({ title, theme }: TitleComponentProps) => (
<div
style={{
backgroundColor: theme.backgroundColor,
color: theme.primaryColor,
}}
>
{title}
</div>
);
const ThemedTitle = withTheme(TitleComponent);
const App = () => (
<ThemeProvider theme={themes.default}>
<ThemedTitle
title="React Theme Provider"
theme={{ primaryColor: 'pink' }}
/>
<ThemedTitle title="Second title" />
</ThemeProvider>
);

View File

@@ -0,0 +1,80 @@
// Type definitions for hoist-non-react-statics 3.3
// Project: https://github.com/mridgway/hoist-non-react-statics#readme
// Definitions by: JounQin <https://github.com/JounQin>, James Reggio <https://github.com/jamesreggio>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from 'react';
interface REACT_STATICS {
childContextTypes: true;
contextType: true;
contextTypes: true;
defaultProps: true;
displayName: true;
getDefaultProps: true;
getDerivedStateFromError: true;
getDerivedStateFromProps: true;
mixins: true;
propTypes: true;
type: true;
}
interface KNOWN_STATICS {
name: true;
length: true;
prototype: true;
caller: true;
callee: true;
arguments: true;
arity: true;
}
interface MEMO_STATICS {
$$typeof: true;
compare: true;
defaultProps: true;
displayName: true;
propTypes: true;
type: true;
}
interface FORWARD_REF_STATICS {
$$typeof: true;
render: true;
defaultProps: true;
displayName: true;
propTypes: true;
}
declare namespace hoistNonReactStatics {
type NonReactStatics<
S extends React.ComponentType<any>,
C extends {
[key: string]: true;
} = {}
> = {
[key in Exclude<
keyof S,
S extends React.MemoExoticComponent<any>
? keyof MEMO_STATICS | keyof C
: S extends React.ForwardRefExoticComponent<any>
? keyof FORWARD_REF_STATICS | keyof C
: keyof REACT_STATICS | keyof KNOWN_STATICS | keyof C
>]: S[key]
};
}
declare function hoistNonReactStatics<
T extends React.ComponentType<any>,
S extends React.ComponentType<any>,
C extends {
[key: string]: true;
} = {}
>(
TargetComponent: T,
SourceComponent: S,
customStatic?: C
): T & hoistNonReactStatics.NonReactStatics<S, C>;
export = hoistNonReactStatics;

View File

@@ -0,0 +1,21 @@
// Type definitions for @callstack/react-theme-provider 1.0.2
// TypeScript version 3.0.3
import * as React from 'react';
import hoistNonReactStatics = require('./hoist-non-react-statics');
type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
export type ThemingType<Theme> = {
ThemeProvider: React.ComponentType<{children: React.ReactNode, theme?: Theme }>;
withTheme: <Props extends { theme: Theme }, C>(
WrappedComponent: React.ComponentType<Props> & C
) => React.ComponentType<
$Without<Props, 'theme'> & { theme?: $DeepPartial<Theme> }
> &
hoistNonReactStatics.NonReactStatics<typeof WrappedComponent>;
useTheme<T = Theme>(overrides?: $DeepPartial<T>): T;
};
export const createTheming: <Theme>(defaultTheme: Theme) => ThemingType<Theme>;