How mateuszserafin/glovobot works
Project type and purpose
• This is an open-source Java-based CLI tool (“GlovoBOT”) that automates booking courier slots on Glovo’s Android API by reverse-engineering the official app.
• Its core responsibility is to log in, generate or spoof a device ID, schedule or revoke shifts via HTTP calls, and optionally bypass emulator checks.
File structure
• Top level
• build.gradle, gradlew/gradlew.bat, settings.gradle → standard Gradle build and wrapper
• src/main/java/com/gmail/genek530 → Java source package
• sample-images → README illustrations (not part of runtime)
• In src/main/java/com/gmail/genek530:
• Main.java → entry point, orchestrates tasks
• commons/ → utility code: response parsing, URL construction, generic utilities
• tasks/ → individual functional modules: Login.java, deviceID.java, revoke.java, schedule.java
• userContainer.java → domain model for courier account data
• No database; interactions are purely HTTP calls to Glovo’s backend.
README for additional insights
• Describes reverse-engineering steps (apktool, smali modifications, networkSecurityConfig) → these are developer-side setup steps, not runtime components.
• Emphasizes ability to update the code when Glovo changes its API.
Main components
• A. Command-Line Interface (CLI) / User
• B. Bot Orchestrator (Main.java)
• C. Task Modules (login, deviceID, schedule, revoke)
• D. Commons Library (urlHelper, response, utils)
• E. External Service: Glovo Courier API
Relationships and interactions
• User → submits commands to CLI
• Main.java → parses user input and delegates to a Task Module
• Task Modules → use commons.urlHelper to build HTTP requests
• HTTP requests → sent over the network to Glovo’s API endpoints
• Responses → parsed by commons.response, turned into user-readable output
Architectural patterns and design principles
• Modular tasks pattern: each high-level interaction (login, deviceID, schedule, revoke) is encapsulated in its own class.
• Separation of concerns: request construction (urlHelper), response parsing (response), generic utilities (utils) are factored out of business logic.
• Single executable JAR (via Gradle) with no external persistence; stateless HTTP interactions.
• [ ] Place “User / CLI” on the far left, “Glovo API” on the far right.
• [ ] In the center stack, vertically arrange:
• Main.java (orchestrator)
• Commons library modules below or alongside
• From CLI to Main.java
• From Main.java to each Task module
• From Task modules to Commons.urlHelper/response
• From Commons.urlHelper out to Glovo API
• [ ] Annotate each module with its purpose (e.g. “Login.java – handles authentication token exchange”).