19 Commits
Author SHA1 Message Date
mahdium bc2b38a3b0 feat: add Docker support and CI workflow
- Created a Dockerfile to build and deploy the application using a multi-stage build process.
- Added a GitHub Actions workflow to automatically build and publish the Docker image to GitHub Container Registry on pushes to the main branch.
- Updated go.mod and go.sum to reflect dependency upgrades and changes.
- Modified the RSS generator to extend the photo expiration time from 10 minutes to 12 hours.
- Updated rate limiter configuration to allow for environment variable customization.
2026-05-08 13:54:04 +03:30
mahdium 0686614c54 fix: fixed gin not reconizing its mode 2026-03-14 00:37:08 +03:30
mahdium 5c5d06722d fix: added AppEnv to configs return 2026-03-14 00:02:21 +03:30
mahdium 940cfa8626 feat: implement image HMAC generator and integrate into image handling and RSS generation 2026-03-13 23:34:59 +03:30
mahdium e210acb810 feat: add BaseURL config, RSS image enclosure, and separate rate limiters
- Load and validate BASE_URL, store in Config
- RSSGenerator now receives Config; adds <enclosure> for photo messages using BaseURL
- RateLimiter tracks feed and image limiters; provide FeedRateLimit and ImageRateLimit middleware
- Update routes to use the new middlewares and inject Config into RSSGenerator
2026-03-13 22:11:01 +03:30
mahdium 7aab3f55ed feat: add ImageHandler and ImageService for image retrieval from channels 2026-03-13 17:18:08 +03:30
mahdium 71a2c756c2 feat: add feed cache implementation and integrate with channel handler 2026-03-11 18:13:22 +03:30
mahdiumandQwen-Coder 5a37903a72 fix: rate limiter ticker leak and context cancellation bug
- Stop ticker and signal goroutine exit in RegisterCleanup OnStop hook
- Call cancel() explicitly after AuthStatus instead of defer to prevent premature context cancellation
- Use consistent logger parameter in OnStop hook

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-11 16:18:18 +03:30
mahdium a053d577ef feat: implement rate‑limiter cleanup task and register it in the FX lifecycle. 2026-03-11 16:05:21 +03:30
mahdium 4ebcc08fe1 feat: add configurable AppHost and AppPort to config and use them in server startup. 2026-03-11 14:14:56 +03:30
mahdium ee5534a2ce feat: add rate limiting to feed endpoint and update route paths
- Implement per-client rate limiting (5 requests per 3 seconds)
- Change /channel/:id routes to /feed/:id for consistency
- Add data/ to .gitignore
- Include RateLimit middleware on GET /feed/:id endpoint
2026-03-11 00:36:40 +03:30
mahdium e4877ce0d0 feat: improve RSS output and auth flow
- Add proper XML headers, content type, and marshaling for RSS
- Conditionally expose auth endpoints based on Telegram auth state
- Add device model to Telegram client config
- Improve logging and caching behavior in auth service
2026-03-10 10:54:47 +03:30
mahdiumandQwen-Coder 6ce4236dc5 perf: Cache auth status and centralize timeout configuration
- Add caching for AuthStatus to eliminate redundant Telegram API calls
- Create centralized timeout constants for consistent configuration
- Update handlers and telegram provider to use shared timeout values

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-10 01:05:27 +03:30
mahdium abf21381a0 feat: Enhance Telegram service with authentication status management and improve RSS feed generation error handling 2026-03-10 00:55:22 +03:30
mahdium 381cdd42aa feat: Add RSS feed generation for channel messages and update route handling 2026-03-10 00:23:42 +03:30
mahdium c538bfb799 feat: Add authorization handlers and improve message retrieval limits
- Introduced NewAuthHandler and integrated it into the server routes.
- Added limit query parameter with default value handling in GetLatestMessages.
- Improved error handling for invalid limit values.
- Refactored Config struct to remove unnecessary fields and clean up loading logic.
- Updated Telegram client connection handling to enhance stability.
2026-03-09 18:11:30 +03:30
mahdium b6771fe6dd Implement channel handler and simplify the main function 2026-03-09 10:44:00 +03:30
mahdium c6a7fc4676 feat: update Telegram client to support proxy configuration and enhance error handling 2026-02-24 14:16:01 +03:30
mahdium 29cbe6a38d feat: initialize project structure with configuration, logging, and Telegram integration
- Added configuration loading from environment variables with default session path handling.
- Implemented a logger using Uber's zap library.
- Created a basic HTTP server with Gin and CORS support.
- Established Telegram client and service for message retrieval.
- Introduced initial API routes and handlers.
- Added necessary dependencies in go.sum.
2026-02-24 12:38:23 +03:30