iOS and Android application for the E.B.H Facturation platform, connected to its Django backend. It follows the web application's business rules, API contracts and Redux conventions, with navigation and reusable controls adapted to mobile.
The application is under active development. Available actions depend on the account's permissions and the selected company's configuration.
- Key capabilities
- Stack
- Local setup
- Project structure
- Builds
- Quality checks
- Dependency updates
- Versions and maintenance
- Troubleshooting
- License
- Shared lists, forms and detail screens across business modules.
- Company-scoped data, authenticated navigation and permission-aware actions.
- Native image editing, PDF previews, notifications and keyboard-aware forms.
- Behavior tests for screens, components, services and application state.
Company-scoped indicators and charts for revenue, cash flow, sales, clients, discounts and margins. Filters include dates, currency, client and project. Administrators configure monthly objectives under Paramètres.
Active and archived lists, creation, editing and details. Client details include document history and printable account statements.
Active and archived lists, creation, editing, photos, pricing and classification. CSV/Excel import, an import guide and stock information use the existing Django endpoints.
List, creation, editing, details, article selection, discounts, totals and status actions. Includes PDF generation and eligible document conversions.
List, creation, editing and details, with article lines, payment terms, purchase-order references, discounts and PDFs. Eligible pro-formas can create client invoices.
Regular and unpaid lists, currency statistics, creation, editing, details and PDFs. Includes payment creation/history, remaining balances and conversion to delivery notes when permitted.
List, currency statistics, creation, details and status-dependent editing. Supports original-invoice prefill, reasons, article lines, discounts, deletion and PDFs.
Regular and uninvoiced lists, creation, editing, details and delivery-person management. Includes price-free PDFs and status/stock-aware actions.
List, editing, details, cancellation, deletion and printable receipts. Payment changes refresh the corresponding invoice balances.
- Balances: quantities by article/location and stock adjustments.
- Movements: read-only movement history and details.
- Receipts: creation, details, validation and cancellation according to permissions.
- Inventories: creation, editing, details and validation.
Stock actions depend on company configuration and account permissions. Historical records remain readable when writes are unavailable.
Company-scoped dashboard and tracking list. Dossier creation, editing and detail actions remain disabled while the corresponding web workflow is in progress.
Supplier list, creation, editing and details under Logistique, including linked dossier history.
User and company lists, creation, editing and details. Includes user deletion, company suspension, managed-company relationships, avatars, company logos and stamps.
Login, password recovery, profile editing, password changes and logout. Paramètres groups profile, password, notification preferences and administrator monthly objectives.
Notification list, read status, unread count and preferences. Nouveautés displays the independent mobile release history published by Django.
- Server-side search, combined filters, sorting, infinite scrolling and pull to refresh.
- Shared cards, selection controls, confirmation dialogs and fixed action bars.
- Camera/gallery selection, image previews and cropping.
- French/English interface, saved light/dark appearance and animated startup branding.
- In-app notifications and system notifications from the active WebSocket connection.
Background push delivery and app-store distribution are not configured.
- Expo SDK 58, Expo Router, React Native 0.88, React 19 and React Compiler.
- TypeScript 7 project compiler, ESLint 10, Prettier and Bun.
- Redux Toolkit, RTK Query, redux-saga and Axios.
- Formik, Zod and date-fns.
- Tailwind CSS through Uniwind, Material icons and Expo UI where appropriate.
- FlashList, shared grid controls and React Native Gifted Charts.
- Expo SecureStore, Keyboard Controller, image modules and native image cropping.
- Jest, jest-expo and React Native Testing Library.
package.json and bun.lock define exact versions. Dependencies use published packages without local package patches. The project compiler is @typescript/native; the separate typescript package supports tools that use its JavaScript API.
- Web application: Altroo/facturation_frontend
- Backend API: Altroo/facturation_backend
- Bun 1.4.4 or newer, and Node.js matching
package.jsonengines. - Xcode for the iOS Simulator, or an Android SDK, compatible JDK and emulator/device.
- A running Django backend and an account with the required permissions.
bun install --frozen-lockfile
cp -n .env.example .envSet these values in .env. Keep the module endpoint paths supplied by .env.example.
| Variable | Purpose |
|---|---|
EXPO_PUBLIC_API_URL |
Backend origin, without /api |
EXPO_PUBLIC_ROOT_API_URL |
API root, including /api |
EXPO_PUBLIC_ROOT_WS_URL |
WebSocket root, including /ws |
Use an address reachable from the device:
| Target | Example API root | Example WebSocket root |
|---|---|---|
| iOS Simulator | http://localhost:8000/api |
ws://localhost:8000/ws |
| Android emulator | http://10.0.2.2:8000/api |
ws://10.0.2.2:8000/ws |
| Physical phone | http://<Mac-LAN-IP>:8000/api |
ws://<Mac-LAN-IP>:8000/ws |
For a physical phone, Django must listen on the LAN and accept that host. A production backend uses its public HTTPS/WSS addresses.
EXPO_PUBLIC_ values are included in the app bundle. Keep credentials and server secrets out of them. Private .env files are ignored by Git. Fully reload the app after changing configuration.
bun run ios
# Or use an Android emulator/device:
bun run androidThese commands build and install a development app. Run them again after adding or changing native dependencies. Image cropping and other native modules require this build; Expo Go is not the target runtime.
bun run devKeep Metro running while using the development app. It uses the default port and prompts if it is occupied. bun run debug restarts it with a cleared cache; bun run web opens a browser preview with limited native functionality.
Screens live directly in src/app/. A typical module uses:
src/app/(app)/(drawer)/clients/
index.tsx List
archived.tsx Archived list
form.tsx Add/edit form
[id]/index.tsx Details
(app) and (drawer) are route groups; their names do not appear in URLs. Forms use an optional route ID to distinguish creation from editing.
src/app/_layout.tsx: startup resources, providers and authentication guards for the complete(app)group.src/app/(app)/_layout.tsx: drawer and required password-change handling.src/app/(app)/(drawer)/_layout.tsx: module screen titles, headers and stack navigation.src/app/login.tsxandsrc/app/reset-password/: public authentication screens.
Native screens own their state, forms and query hooks directly. They do not need Next.js server/client component wrappers. Django handles business data and permission enforcement.
src/components/nativeElements/: individual controls such as inputs, buttons, selects and radios.src/components/shared/: reusable compositions and logic such as lists, form sections, detail cards, dialogs and action bars.src/components/layouts/: shared authentication and navigation layouts.src/components/portals/: global feedback, including toasts.
Declare the local Props type in the component's source file. Put contracts shared by several components in src/types/.
src/store/: actions, services, sagas, slices and selectors.src/contexts/andsrc/providers/: initialization, sessions, language, appearance and feedback.src/Storage/andsrc/local/auth/: session/recovery storage and persistence adapters.
Native sessions use SecureStore instead of web cookies. Browser previews use an in-memory session. RTK Query handles requests and caching; initialization effects, actions and sagas synchronize account data and application events.
src/models/andsrc/types/: domain classes and shared contracts.src/utils/: hooks, API helpers, routes, raw data, themes and validation schemas.src/styles/,src/translations/andassets/: styling, translations, fonts and branding.
Follow its web implementation and the closest existing native module. Keep screens in the module's route folder, reuse shared controls, and register routes and navigation entries in the existing layouts.
When adding an API service, register its reducer, middleware and logout cleanup. Keep search/filter/sort behavior on the server, as in the existing lists.
app.json, its plugins and assets/ define native behavior and branding. Expo generates ios/ and android/; these folders are ignored by Git. Keep configuration changes in their source files and rebuild the native app to apply them.
Camera/gallery permission messages are configured in app.json. Grant the requested camera, photo or notification access when testing the corresponding feature.
Create a local .env.production with the intended backend addresses, then run:
bun run build:android:productionOutput: android/app/build/outputs/apk/release/app-release.apk.
Connect an authorized USB-debugging device, then run:
bun run android:production --deviceThe release bundles its JavaScript and assets and runs without Metro. Distribution signing is a separate step.
bun run iosThis runs a local development build on the simulator. No iOS release build or physical iPhone is required for simulator testing.
bun run buildThis exports JavaScript and assets for all platforms. It does not create an installable APK or IPA. Native splash, icon, permission and dependency changes require a native rebuild.
bun run lint
bun run typecheckUse the direct ESLint script to preserve eslint.config.ts. Do not run expo lint.
bun run test --coverage=false
bun run test:watch
bun run test:coverageUse bun run test, not bare bun test: the project uses Jest. To run one file:
bun run test --coverage=false --runTestsByPath src/components/layouts/auth/authLayout.test.tsxComponent, utility, service and config tests sit beside the files they cover. Screen tests live in src/__tests__/app/, mirroring the route folders, so Expo Router does not treat them as pages.
Shared test setup lives directly in src/__tests__/. New screens and reusable components should include matching behavior tests.
bun run check
bun run format:checkcheck runs TypeScript, ESLint and Jest. Verify shared UI changes on an emulator or device as well; mocked component tests do not measure the rendered native layout.
bun run upgrade:check
bun run upgrade
bun run doctorupgrade runs expo install --fix --bun to align packages with the installed SDK. A major SDK upgrade is a separate migration.
bun x expo install <package> --bunRebuild the development app if it contains native code. bun run outdated lists newer releases without installing them; retain versions required by Expo compatibility.
Keep package.json and app.json versions aligned. Mobile has its own version sequence, independent of the web.
Django's version_mobile controls mobile update notices; version controls web notices. Publish the mobile version only once that build is available to install.
Installed releases explain when a newer app is available. Closing the notice does not install an update. Automatic downloads and store links are not configured.
src/app/api/app-version+api.ts provides the local development version endpoint. Installed mobile releases use Django's maintenance/version data.
Publish bilingual entries through Mobile changelog in Django administration. The mobile app requests the changelog with platform=mobile, excluding web-only entries, drafts and future publications.
Check the configured backend address from the device's network, then inspect the Django response/logs. A phone's localhost refers to the phone, not the Mac. Production releases need the intended addresses in .env.production before rebuilding.
Run bun install --frozen-lockfile, then rebuild with bun run ios or bun run android. Restarting Metro alone cannot add a native module to an installed app.
Development builds need the matching project's Metro server. Production builds contain a bundled snapshot of the code, so rebuild and reinstall them after changes. Use bun run debug if the development bundle cache is stale.
Check device permissions for images and confirm the backend request succeeds. PDFs are generated by Django and opened through the native preview; check both the API response and device logs when previewing fails.
The application continues to grow alongside the web platform. This repository documents the implemented modules and shared conventions; credentials and private runtime configuration remain outside Git.
See LICENSE.