How fxbresson/polaris-app works
Project type and purpose
• This is a React Native mobile application (Expo) focused purely on the client side.
• There is no backend folder in the tree, so assume all business logic lives on the client, and any server interactions are via external APIs or services.
File structure
• Top-level entry: App.js (the root component).
• assets/: static assets (fonts, images).
• components/: reusable UI pieces and context provider.
– GlobalContext.js: app-wide state management.
– Other subfolders (doodle, matchs, strats) for feature-specific components.
• navigation/: React Navigation setup (AuthNavigator, MainTabNavigator, AppNavigator).
• screens/: high-level views (AuthLoadingScreen, AuthScreen, HomeScreen, LinksScreen, SettingsScreen).
• __tests__/: unit tests for components and App.
README
• All architectural cues must come from the structure.
Main components and their relationships
a. Mobile App (React Native / Expo)
b. Global Context Layer (GlobalContext.js) – injects state & actions
c. Navigation Layer
– AppNavigator: top-level switch between Auth flow and Main flow
– AuthNavigator: login/signup screens
– MainTabNavigator: bottom tab bar (Home, Links, Settings)
d. Screens: each Tab or Stack screen consumes context and renders feature components
e. Feature Components: doodle/*, matchs/*, strats/* – small UI building blocks
g. Assets: fonts & images used by components
h. (Optional) External Services: REST API or WebSocket endpoints (not in code but implied)
Architectural patterns & principles
• Single-page application pattern on native: one root App.js
• Context API for global state (avoids prop-drilling)
• Clear separation between navigation (in /navigation), screen logic (in /screens), and pure UI (in /components)
• Constants folder centralizes theme and layout data
• Atomic component organization by feature (doodle, matchs, strats)
Detail without over-splitting
• Every folder as a component group
• How they connect up to the root
• Avoid drilling into every .js file—group by folder unless a single file is a critical standalone module (e.g., GlobalContext)