How neuland-ingolstadt/neuland.app-native works
Main Components Identification
• Mobile Platforms: Represent the two native mobile platforms – Android and iOS. Note that each platform has its own native project structure (the “android” and “ios” directories), including build configurations, resources, and native code.
• Shared React Native Layer: This is the heart of the app. The “src” directory contains all the React Native code including screens, components, hooks, contexts, localization, styles, and utilities. This layer implements the presentation logic (UI components and screens) and business logic.
• API Integration Layer: Under “src/api”, the project contains files for different API endpoints (anonymous API, authenticated API, GraphQL documents, session handling). This layer encapsulates network communication and data fetching with the Neuland GraphQL API.
• Supporting Assets & Configuration: Assets (such as fonts, images, and splash screens), configuration files (e.g., app.config.json, babel.config.js, tsconfig.json) and CI/CD pipelines (GitHub workflows) can be depicted as supporting components that ensure smooth development, building, and deployment processes.
• Documentation & Community: The “docs” directory illustrates an effort toward comprehensive documentation, showing extended support for contribution guidelines, deployment instructions, and localized documentation content.
Relationships and Interactions
• The shared React Native core communicates with the native modules in Android and iOS via platform-specific code when needed, while most of the business and UI logic resides in the “src” folder.
• The CI/CD pipelines and Docker configurations (Dockerfile, .github/workflows) are part of the development and deployment infrastructure that continuously build, test, and deploy the app.
• External services include the GraphQL API backend (which may be hosted separately or integrated with the existing React backend) and beta testing platforms (TestFlight for iOS and Google Play for Android).
Architectural Patterns & Design Principles
• Separation of Concerns: The design clearly splits native platform code from shared React Native code, which in turn separates UI (components and screens), business logic (contexts, hooks), and API communication.
• Modularization: Components are broken down into logical units (e.g., Cards, ContextMenu, Layout, Flow, Food, Map, Timetable). This modular design supports maintainability and scalability.
• API Abstraction: The API layer abstracts different endpoints (anonymous, authenticated, GraphQL) so that the presentation layer remains decoupled from the backend implementation details.
• Use of Modern CI/CD: The existence of multiple GitHub workflows (for Android build, iOS deployment, code quality, tests, and documentation) reflects mature development practices.
Relevant Technologies, Frameworks, and Libraries
• React Native & Expo: Central to building the mobile app and managing cross-platform functionality.
• GraphQL: Evident from the “src/api/gql-documents.ts” and code-generation files.
• State Management/Contexts: Look into the “src/contexts” and “src/hooks” directories for application state and side effects.
• Native build tools: Android build scripts (Gradle) and iOS Xcode project files indicate that platform-specific development is maintained.
• CI/CD: GitHub Actions are configured for automated testing, deployment, and code quality (e.g., CodeQL).