How hodinhtuankiet/native-linkedin-cross-platform works
• Client Application: Represent the mobile/app side (located in the “client” directory). Indicate that it’s built on Expo/React Native with screens, navigation, and UI components. Consider labeling important portions like “Authentication Screens,” “Chat/Message Screens,” “Profile & Networking Sections,” etc.
• API Server: Represent the backend (located in the “api” directory) with its controllers, models, and routes. Highlight endpoints for authentication (JWT usage stored in AsyncStorage), connection handling, messaging, post creation, and search functionalities.
• Database & Persistence: Note that the API config files refer to MongoDB, Redis, and possibly connections to Firebase (for articles/media uploads), so show components for a MongoDB database (for user data, posts, messages) and Redis (for caching or session management).
• Docker/Deployment: Show a Docker container component (using Docker Compose, etc.) for containerized deployment of the API server and possibly the client or supporting services.
Interactions and Data Flow
• To show JWT-based authentication flows from the client side to the API server, highlighting token issuance and verification.
• Internal communication between various modules on the API (for instance, controllers calling model methods, and route definitions that map to controller functions).
Architectural Patterns and Design Choices
• Separation of concerns with a clear distinction between the front end (client) and the back end (API server). This separation supports a typical MVC (Controller, Model, Route) or REST API pattern.
• Use of design principles such as modularization (each API functionality divided into specific controllers and routes) and secure API practices (JWT and token management using AsyncStorage on the client).