How supperfreddo/lala-sync works
Main Components
• Configuration Manager: This component uses the config.json file to store synchronization settings like character_id and bearer_token.
• Data Manager: Split into two main parts:
• Categories Data: Stored in data/categories. These files provide pre-defined lists (e.g., fashions, emotes, etc.) that likely serve as reference data.
• Import Files Manager: Located in data/imports. These JSON files contain arrays of entries to be added during synchronization.
• Utility Module: Represented by data_utils.py. This module likely provides functions for parsing JSON files, data validation, or transformation operations.
• Core Sync Orchestrator: The main script (main.py) which ties everything together: it reads the configuration, loads data/import files (and perhaps uses reference data to verify or enrich information), and performs API calls to the external Lala Achievements site.
• External API Interface: While not a separate module in code, the design must account for the interaction with the Lala Achievements API (handling POST/DELETE calls with proper delay and batch sizing as per the guidelines).
Architectural/Design Principles
• Separation of Concerns: Configuration, Data Processing, and API Interaction are handled by distinct components.
• Data Flow: Emphasize sequential processing from reading configuration → processing data (imports and categories) → formatting and calling the external API.
• Extensibility: If additional data categories are introduced or if the API interaction evolves, this architecture is modular enough to accommodate such changes.