How daylamtayari/microsoft-to-do-export works
Main Components
• User Input/CLI Module – This is where the executable prompts the user for an access token, output format, and output path.
• API Communication Module – Represented by the API.java file, this component handles interactions with Microsoft’s Graph API (using the token provided) to fetch task lists and tasks.
• Data Parsing & Mapping Module – The Parser.java will be responsible for converting received raw JSON data into internal data models.
• Data Models – Represented by Task.java and Lists.java, these components hold information about tasks and task lists.
• Export Module – The Export.java file contains the functionality to format the data into various export types: Todoist CSV, human readable text, and raw JSON.
• Application Entry Point – Main.java controls the overall workflow of the application and glues together the various components.
• Configuration/Manifest – The META-INF/MANIFEST.MF contains configuration metadata for the application’s execution.
Relationships and Interactions
• The application starts at Main.java. This module is responsible for:
• Taking user input (access token, export format, output path).
• Calling the API module to authenticate and fetch task data.
• API.java will perform the necessary API communication and pass back the JSON data.
• The Parser.java takes this JSON and processes it into objects defined in Task.java and Lists.java.
• Once the data is structured into the application’s models, Export.java is invoked. It ensures the output is written in the desired format.
• The overall flow is sequential: User Input → API Communication → Parsing → Data Modeling → Exporting to the desired file format.
Architectural Patterns and Design Principles
• Modularization – Even though it’s a small project, the separation of concerns is clear: each Java class/module focuses on a specific functionality.
• Command-line flow control – The Main class orchestrates the entire application.
• Data abstraction – Using separate classes for tasks and lists makes the system more maintainable and clear.
• Single Responsibility Principle – For example, API.java handles API calls only, Parser.java handles conversion, and Export.java handles data formatting and file output.
Technologies, Frameworks, and Libraries
• Java is the core language used.
• Standard Input/Output for user interactions.
• Microsoft Graph API via HTTP requests (likely using Java’s built-in support or an HTTP library not explicitly shown here).
• The export formats (CSV, JSON, human-readable text) are generated using basic Java libraries.