How conorg-mcc/drivvo-stats works
Project Type & Purpose
• This is a CLI tool for managing Drivvo vehicle data. It accepts command-line arguments for filtering based on vehicle plate and optionally saves the data into JSON files.
• Key functions include logging into the Drivvo API, fetching vehicle data, fueling entries, and servicing records.
Directories & Files
• /src/main.js: Acts as the entry point – it parses command-line arguments, reads the configuration (from environment variables in the .env file), and orchestrates the rest of the application.
• /src/config/config.js: Holds configuration settings (e.g., API credentials) needed for API integration.
• /src/requests: Contains separate modules for different API endpoints:
• login.js: Handles authentication.
• fuellingEntries.js, servicingEntries.js, vehicleEntries.js: Manage fetching various types of vehicle data.
• /src/utilities/util.js: Likely contains helper functions used throughout the project.
• Other top-level files (package.json, template.env, etc.) indicate Node.js package dependencies and environment variable configuration.