How huanglinbao/kid_sec works
Project type and purpose
• This is a full-stack mobile application (“kid_sec”) for parental control.
• The client is a cross-platform Flutter app with native Android (Kotlin) and iOS (Swift) integrations.
• The backend is a Node.js REST API, persisting data in MongoDB, sending push notifications via Firebase Cloud Messaging, and rendering maps via MapBox.
File structure
• Top level: “android/”, “ios/” (platform-specific native code and manifests), “lib/” (Flutter/Dart UI + business logic), “assets/” (static JSON and images), “test/” (widget tests).
• “android/app/src/main/kotlin/com/example/kid_sec/MainActivity.kt” implements platform channels to bridge Flutter ↔ native Android for OS-level permissions.
• “lib/screens/” contains UI screens (login, parent home, child home, etc.).
• “lib/widgets/”, “lib/core/”, “lib/utils/” subdivide reusable components, constants, and helpers.
• “pubspec.yaml” lists Flutter dependencies (including firebase_messaging, mapbox_gl, etc.).
README for additional insights
• Flutter provides the cross-platform UI.
• Kotlin handles Android permissions via platform channels.
• Node.js and MongoDB serve as the backend API and data store.
• Firebase is used exclusively for push notifications.
• MapBox SDK is used for in-app maps (e.g., child location tracking).
Detail
– Split the client into sub-components: UI screens, widget library, network service, platform channel plugin.
– Split the server into API layer, business logic, data access layer.
– Explicitly show data flows: user login flows to Auth API, parent config flows to Settings API, child location polling to Location API → MapBox.
– Show error-handling or retry flows if relevant (e.g., fallback when MapBox is unreachable).