How overtake/telegram works
Project type and purpose
• This is a monolithic macOS client application (Objective-C) for Telegram, with a Share extension (TGShare) and an Updater component.
• Its purpose: provide a full Telegram desktop experience, handling UI, persistence, networking (MTProto), encryption, media codecs, crash reporting, and auto-updates.
File structure
• Top-level frameworks: HockeySDK.framework (crash/feedback), Sparkle.framework (auto-update).
• Submodules: MtProtoKit + Signals (Telegram’s MTProto networking & crypto).
• Static libs: libcrypto.a, libssl.a, opus/ogg/opusfile (audio codec), libwebp (image codec), sqlcipher (encrypted SQLite).
• Application code:
• TelegramTest/ – the main app’s source (view controllers, managers, models, categories).
• TGShare/ – a macOS Share extension to forward content into Telegram.
• YapDatabase/ – embedded core persistence engine.
• Xcode project with multiple targets/schemes: Telegram (main), Updater, TGShare, TGKeeper, etc.
README
• Confirms it is the deprecated Objective-C macOS client.
• New repo uses Swift; this one still integrates all core modules manually.
Main components & interactions
a. UI Layer
• TelegramTest/– NSViewControllers, windows, table views, custom controls (e.g., MessagesViewController, ChatHistoryController, SettingsViewController).
• TGShare/– ShareViewController for the extension.
b. Business Logic & Controllers
• Logic controllers in TelegramTest (e.g., TGSAppManager, TelegramTest/*Manager classes).
• View models and “SenderItem” objects for composing and sending messages.
c. Networking & Crypto
• MtProtoKit + Signals handle MTProto handshake, message encryption.
• TGS-prefixed network classes (TGS_RPCRequest, TGS_MTNetwork).
• Static crypto libs (libcrypto, libssl).
d. Persistence
• YapDatabase stores chats, messages, media metadata.
• sqlcipher for encrypted disk storage.
• FMDatabase wrappers for SQLite support.
e. Media & Codecs
• opus/ogg/opusfile for audio encoding/decoding.
• libwebp for image decoding/encoding.
f. Crash Reporting & Feedback
• HockeySDK.framework to capture and send crash reports & user feedback.
g. Auto-Update
• Sparkle.framework embedded in Updater target to check and install new versions.
h. External Services
• Telegram backend servers (MTProto API endpoints).
• Possibly third-party social service integrations (InstagramServiceDescription, YoutubeServiceDescription).
Architectural patterns & design principles
• MVC: View controllers orchestrate UI, models stored in YapDatabase.
• Modular subsystems: networking, persistence, UI, media codecs.
• Dependency injection via managers (ChatsManager, MessagesManager).
• Separation of concerns: Share extension isolated from main app.
Detailed checklist
• Components: TelegramTest App, TGShare Extension, Updater Target
• Frameworks: HockeySDK, Sparkle, MtProtoKit/Signals, YapDatabase, SQLCipher, media libraries
• Core modules: Managers (ChatsManager, MessagesManager), Network (TGS_MTNetwork), Storage (YapDatabaseConnection)
• External endpoints: Telegram MTProto API, Hockey service
• Data flows:
• User input → UI controllers → Logic → Network → Servers
• Incoming updates → Network → Logic → Persistence → UI
• Crash → HockeySDK → Crash service
• Version check → Sparkle → Download/Install