A powerful Kotlin Compose Desktop application for analyzing SEC financial reports with automatic metric extraction and AI-powered insights.
- Drag & Drop Support: Drop any SEC report (PDF, HTML, HTM, TXT) directly into the application
- Automatic PDF Processing: Seamless text extraction using Apache PDFBox
- Key Metrics Extraction: Automatically extracts critical financial data:
- Revenue, Net Income, EPS (Earnings Per Share)
- Total Assets, Liabilities, Equity
- Cash Flow, Operating Income
- And more!
- Smart Parsing: Intelligent detection of company name, report type (10-K, 10-Q, 8-K), and fiscal period
- AI Financial Insights: Comprehensive AI-generated analysis using OpenRouter API
- Industry Comparisons: Compare company performance against industry benchmarks
- Investment Recommendations: AI-driven investment suggestions based on financial health
- Risk Assessment: Automated evaluation of financial risks and opportunities
- Key Insights: AI-extracted critical takeaways from financial reports
- Reanalysis Capability: Re-run AI analysis on existing reports with one click
- Smart Caching: Skips redundant AI calls for already-analyzed documents
- At-a-Glance Assessment: Visual financial health scoring system (A+ to F)
- Strengths & Weaknesses: Clear identification of financial strong points and areas for improvement
- Beginner-Friendly: Simplified explanations designed for non-financial professionals
- Actionable Recommendations: Concrete suggestions based on financial analysis
- Company Search: Search by ticker symbol or company name across all SEC registered entities
- Recent Filings Browser: Browse recent filings (10-K, 10-Q, 8-K, DEF 14A, etc.)
- Direct Browser Access: Open filings directly in SEC EDGAR website
- Quick Analysis: Instant text analysis with keyword detection
- Bookmark Management: Save favorite companies for quick access
- Recent Views: Track recently viewed companies and filings
- Clean Interface: Emoji-free, professional UI design following AGENTS.md principles
- Intuitive Navigation: Tab-based analysis view with clear categorization
- Real-time Updates: Live status updates during document processing
- Error Handling: Graceful error messages with retry capabilities
- Download any SEC filing (HTML, PDF, TXT) from SEC EDGAR
- Launch Papyrus
- Drag and drop the file onto the right panel (or click "Browse Files")
- View automatically extracted financial metrics with formatted values
- Review AI analysis (if configured) including insights, recommendations, and risk assessment
- Check the Financial Health Score for a quick understanding
- Close analysis to return to the main screen
- Type a company name or ticker in the search box (left panel)
- Select a company from the results
- Browse their recent filings with date and type information
- Click "Quick Analyze" to analyze a filing with AI insights
- Click "Open Browser" to view the original document on SEC website
- Bookmark companies for quick access later
- Click the Settings icon (βοΈ) in the top right
- Enter your OpenRouter API key
- Save the configuration
- AI analysis will automatically run on all future document analyses
- Use the "Reanalyze with AI" button to add AI insights to existing analyses
Note: AI analysis is optional. The app provides comprehensive financial analysis even without AI configuration.
The codebase follows AGENTS.md principles: intuitive, concise, and meaningful.
src/main/kotlin/papyrus/
βββ Main.kt # Main application entry point with UI orchestration
βββ core/
β βββ model/
β β βββ BookmarkModels.kt # Bookmark and recently viewed data models
β β βββ FinancialModels.kt # Financial analysis result models
β β βββ NewsModels.kt # Company news data models
β β βββ ParserModels.kt # Financial statement parsing models
β β βββ SecModels.kt # SEC EDGAR API response models
β βββ network/
β β βββ SecApi.kt # SEC EDGAR API client (Ktor HTTP)
β β βββ NewsApi.kt # Financial news API client
β βββ service/
β βββ AiAnalysisService.kt # OpenRouter AI integration for financial analysis
β βββ EnhancedFinancialParser.kt # Advanced financial statement parser
β βββ FinancialAnalyzer.kt # Core financial analysis engine
βββ ui/
β βββ AppTheme.kt # Material Design theme and colors
β βββ Components.kt # Reusable UI components (cards, lists, etc.)
β βββ DragDropPanel.kt # File drag & drop interface
β βββ QuickAnalyzeView.kt # Financial analysis results display
β βββ SettingsDialog.kt # AI API key configuration dialog
βββ util/
βββ BookmarkManager.kt # Bookmark and recent views persistence
βββ FileUtils.kt # File type detection and text extraction
βββ PdfParser.kt # PDF document parser (Apache PDFBox)
βββ SettingsManager.kt # Application settings management
- Java 17 or higher (JDK 17+)
- Internet connection (for SEC API and AI features)
- OpenRouter API Key (optional, for AI analysis features)
On Windows:
.\gradlew runOn macOS/Linux:
./gradlew runCreate a native application package:
# Windows
.\gradlew packageDistributionForCurrentOS
# macOS/Linux
./gradlew packageDistributionForCurrentOSThe built application will be in build/compose/binaries/main/ directory.
-
Get an OpenRouter API Key:
- Visit OpenRouter
- Sign up for a free account
- Generate an API key from the dashboard
-
Configure in Papyrus:
- Click the Settings icon (βοΈ) in the top right
- Paste your API key
- Click "Save"
-
Alternative: Set environment variable:
export OPENROUTER_API_KEY="your-api-key-here"
Application settings are stored in:
- Windows:
%USERPROFILE%\.papyrus\settings.properties - macOS/Linux:
~/.papyrus/settings.properties
- Kotlin 1.9+
- Compose Multiplatform for Desktop UI
- Ktor for HTTP API clients
- Apache PDFBox for PDF text extraction
- Kotlinx Serialization for JSON parsing
- OpenRouter API for AI-powered analysis
- Gradle build system
This project follows the principles outlined in AGENTS.md:
- Intuitive: Code that is obvious to anyone reading it
- Concise: Minimal boilerplate, clear intent
- Meaningful: Self-documenting names and structure
- Financial Precision: Accurate financial calculations using
BigDecimalwhere necessary
Contributions are welcome! Please ensure your code follows the AGENTS.md principles:
- Clear, self-explanatory variable and function names
- Minimal abstraction unless necessary
- Comments only when the code cannot be self-documenting
This project is open source and available under the MIT License.
For issues, questions, or feature requests, please open an issue on GitHub.
Built with β€οΈ using Kotlin and Compose Multiplatform
.\gradlew.bat run- Open the
c:\papyrusfolder as a project - Wait for Gradle sync to complete
- Click the green
βΆοΈ Run button in the toolbar - Or run from terminal:
.\gradlew.bat run
- Framework: Jetpack Compose for Desktop (v1.6.1)
- Language: Kotlin 1.9.23
- HTTP Client: Ktor 2.3.7
- Serialization: kotlinx.serialization
- Drag & Drop: Native Java AWT integration
- The financial analyzer uses pattern matching to extract metrics from HTML documents
- Accuracy depends on document structure and formatting
- For best results, use official SEC EDGAR HTML filings
- User-Agent is configured for SEC compliance; update with your contact info for production use
This is a demonstration project for educational purposes.