Commit Graph

58 Commits

Author SHA1 Message Date
tiennm99 aeba0ccb90 Update Main.java 2025-11-13 21:48:03 +07:00
tiennm99 250c48ba45 Update AddAppleAppCommand.java 2025-11-13 21:40:20 +07:00
tiennm99 7400360dc4 refactor: cleanup code
And test docker build time
2025-11-13 21:29:24 +07:00
tiennm99 d6a7396ca4 Update Dockerfile 2025-11-13 21:27:06 +07:00
tiennm99 1d4d957ea5 Update Dockerfile 2025-11-13 21:24:40 +07:00
tiennm99 3d5368bc67 Update Dockerfile 2025-11-13 21:18:13 +07:00
tiennm99 7c8af88b9a Update CouchbaseUtil.java 2025-11-13 21:05:33 +07:00
tiennm99 e3f2e0ad6e feat(docker): minify 2025-11-13 21:00:44 +07:00
tiennm99 a39a9bbcf6 feat(docker): use temurin instead of corretto 2025-11-13 20:51:07 +07:00
tiennm99 34b345c744 feat(loki): send logs to loki to centralize logs 2025-11-13 18:24:13 +07:00
tiennm99 d59cd35476 feat(bot): add delgoogle 2025-11-12 10:08:26 +07:00
tiennm99 f7b8fd5562 feat(api): update base url 2025-11-11 20:59:56 +07:00
tiennm99 de46765d0c feat(apple): correct api response 2025-11-10 11:32:00 +07:00
tiennm99 f67b175f27 feat(app score): round score 2025-11-10 11:16:06 +07:00
tiennm99 3c1d60b248 feat(score): add score text 2025-11-10 11:04:42 +07:00
tiennm99 a4646c91ca Add raw app response commands for Apple and Google
Introduces RawAppleAppCommand and RawGoogleAppCommand to allow admins to fetch and download raw JSON responses from the Apple App Store and Google Play Store scrapers. Refactors AppStoreScraper and GooglePlayScraper to expose rawApp methods and improves method naming for clarity. Updates StoreScrapeBot to register the new commands and adjusts .env.example for better configuration clarity.
2025-11-09 10:12:19 +07:00
tiennm99 21f6b25601 Update Dockerfile 2025-11-09 01:11:22 +07:00
tiennm99 63a8d448c5 Update Dockerfile 2025-11-09 01:08:42 +07:00
tiennm99 a51cc227d8 Update Dockerfile 2025-11-09 01:06:54 +07:00
tiennm99 f6019f12ea Update Dockerfile 2025-11-09 00:59:46 +07:00
tiennm99 b3c3ca9cf3 Format long sendMessage calls for readability
Refactored sendMessage calls in DeleteAppleAppCommand and InfoCommand to split long lines for improved code readability. No functional changes were made.
2025-11-08 01:28:53 +07:00
tiennm99 a1acac424d Update Dockerfile 2025-11-08 01:13:46 +07:00
tiennm99 c0facd5ba2 Refactor repository structure for Couchbase collections
Introduced AbstractCollectionRepository and AbstractSingletonRepository to clarify repository types and encapsulate logic for single-key and collection-based repositories. Updated AdminRepository, AppleAppRepository, GoogleAppRepository, and GroupRepository to extend the appropriate abstract classes. Removed COMMON_COLLECTION_NAME from Constant.java and enforced collection name restrictions in AbstractRepository.
2025-11-08 00:05:09 +07:00
tiennm99 7349501086 Add scheduled app update checks and notifications
Introduces a scheduled task that checks for apps not updated within a warning threshold and sends notifications to groups. Adds scheduling utilities, constants for scheduling, and logic to format and send update reports for both Apple and Google apps. Also includes a new NonUpdatedApp record and improvements to the Table class for better formatting.
2025-11-07 23:45:30 +07:00
tiennm99 77f4e08946 Refactor config to Environment and add Table utility
Replaces Config with Environment throughout the codebase for environment variable management. Introduces a Table utility class for formatting tabular data in bot commands, refactoring commands to use this for improved output formatting. Removes unused AppType enum. Updates test cases and build configuration for better IDE integration.
2025-11-07 23:11:16 +07:00
tiennm99 4c62fde11f Replace SOURCE_VERSION with SOURCE_COMMIT in config
Renamed the SOURCE_VERSION constant to SOURCE_COMMIT in Config.java and updated its usage in Main.java. The environment variable and related references now consistently use SOURCE_COMMIT to better reflect the tracked value.
2025-11-07 21:08:05 +07:00
tiennm99 cced06fda9 Notify creator on bot startup and enhance config
Added a startup notification to the creator with the current bot version. Refactored ADMIN_IDS to a List, introduced CREATOR_ID and SOURCE_VERSION constants in Config, and improved environment variable handling.
2025-11-07 21:04:02 +07:00
tiennm99 b67aa4f77f Update build.gradle.kts 2025-11-07 19:27:00 +07:00
tiennm99 59b03b6f9a Add country support for Apple app commands
Refactored Apple app-related commands and data structures to include country information, allowing users to specify a country when adding or querying Apple apps. Updated method signatures, command help texts, and output formatting to reflect this change. This improves accuracy for apps that require country-specific data.
2025-11-07 14:21:04 +07:00
tiennm99 7857f29a58 test(api): some apple will need country to work 2025-11-07 13:56:38 +07:00
tiennm99 25c5d6d191 Add app ratings retrieval for Apple apps
Introduces a new method getAppRatings in AppStoreScraper to fetch app ratings. Updates CheckAppScoreCommand to display ratings instead of reviews, and refactors AppleAppRequest for improved parameter handling.
2025-11-06 23:50:13 +07:00
tiennm99 3ea1e824fd Refactor app tracking to use app info records
Replaces string-based app tracking in Group with AppleAppInfo and GoogleAppInfo records, enabling storage of additional metadata (e.g., country for Google apps). Updates all related commands and logic to use the new records, improves command argument handling, and enhances output formatting for app lists and checks.
2025-11-06 23:18:49 +07:00
tiennm99 e46c842b3e Add app score checking and refactor app info retrieval
Introduces CheckAppScoreCommand to display app scores and reviews/ratings for Apple and Google apps. Refactors AppStoreScraper and GooglePlayScraper to provide methods for retrieving app scores, reviews, and updated dates, and improves AddAppleAppCommand and AddGoogleAppCommand to validate and fetch app info before adding. Updates AdminRepository to use a common collection and single-key logic, and modifies Constant to use a common collection name.
2025-11-06 22:21:33 +07:00
tiennm99 dac6a82b71 Migrate from Redis to Couchbase for data storage
Replaces Redis with Couchbase as the primary data store. Updates environment variables, dependencies, and Docker Compose configuration to use Couchbase. Refactors repository and model classes to use Couchbase APIs, removes Redis utility and related code, and adds Couchbase utility for collection management. Updates AdminRepository to use 'admin' as the key instead of an empty string.
2025-11-06 20:30:16 +07:00
tiennm99 7363d772ad Update CheckAppCommand.java 2025-11-06 14:40:18 +07:00
tiennm99 56dbe72814 fix(api): add default lang and country 2025-11-06 14:33:02 +07:00
tiennm99 27ef9080a1 Update GoogleAppResponse.java 2025-11-06 14:03:29 +07:00
tiennm99 8bb2122397 Update StoreScrapeBot.java 2025-11-05 23:10:18 +07:00
tiennm99 5554d75534 Add app and group management commands to bot
Introduces commands for adding, deleting, listing, and checking Apple and Google apps per group, as well as group management commands. Refactors models for app and group storage, adds caching for app data, and updates repositories to support cache expiration. Improves bot initialization and command registration logic.
2025-11-05 23:06:24 +07:00
tiennm99 def45c7402 Migrate data storage from Couchbase to Redis
Replaces Couchbase with Redis for data persistence, updating environment variables, Docker Compose files, and repository logic. Removes Couchbase and Jackson dependencies, introduces Gson for JSON serialization, and refactors models and repositories to support Redis. Adds utility classes for Redis and Gson, and updates tests and scrapers to use Gson.
2025-11-05 21:47:58 +07:00
tiennm99 a532c34d99 Update compose.yml 2025-11-05 00:34:17 +07:00
tiennm99 dc2ce111dc Update compose.yml 2025-11-05 00:28:55 +07:00
tiennm99 992ceba83f Update compose.yml 2025-11-05 00:23:10 +07:00
tiennm99 022d201593 Update build.gradle.kts 2025-11-05 00:13:49 +07:00
tiennm99 de687c1a8f Revert "Update build.gradle.kts"
This reverts commit ac4d95aad7.
2025-11-05 00:12:30 +07:00
tiennm99 ac4d95aad7 Update build.gradle.kts 2025-11-05 00:11:36 +07:00
tiennm99 bae876b086 Refactor bot client and add group management commands
Replaced ScoreScrapeBotTelegramClient with StoreScrapeBotTelegramClient and updated related references. Added BaseStoreScraperBotCommand for command error handling. Implemented AddGroupCommand and GetGroupCommand for managing allowed groups via admin commands. Improved CouchbaseUtil to ensure scope and collection creation. Updated logging configuration and environment example. Minor model and repository adjustments for initialization and group handling.
2025-11-04 23:06:46 +07:00
tiennm99 774355ee2b Create log4j2.xml 2025-11-04 21:50:50 +07:00
tiennm99 2230fc2683 Update build.gradle.kts 2025-11-04 21:50:48 +07:00
tiennm99 e96fc0869a Update build.gradle.kts 2025-11-04 21:38:14 +07:00