Skip to content

ByronWilliamsCPA/pp-security-master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

205 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Portfolio-Performance Security-Master & Classification

πŸ“‹ Start Here: MVP Definition | Complete Project Plan | Architecture Decisions

Portfolio Performance App | Forum | Manual


Overview

Portfolio Performance (PP) is a powerful open-source desktop portfolio tracker. However, it lacks an enterprise-grade security master for consistent asset classification and analytics. This project provides a dedicated Security-Master Service that:

  • Data Sovereignty: Complete Portfolio Performance backup generation and restoration
  • Institution Integration: Import transactions from Wells Fargo, Interactive Brokers, AltoIRA
  • Advanced Classification: Automated taxonomy assignment via OpenFIGI and pp-portfolio-classifier
  • Cross-Validation: Compare institution data with Kubera aggregated holdings
  • Database-Centric: PostgreSQL 17 as authoritative source for all financial data

Goal: Transform Portfolio Performance from desktop-only to enterprise-grade with complete data control.


Key Features

MVP (8 weeks)

  • Complete PP Backup Restoration: Generate/import full Portfolio Performance XML backups
  • Institution Transaction Import: Wells Fargo CSV and Interactive Brokers Flex Query parsing
  • Basic Security Classification: Manual taxonomy assignment with database storage
  • CLI Interface: Command-line tools for all import/export operations

Future Releases (See MVP.md for timeline)

  • Automated Classification: OpenFIGI API and pp-portfolio-classifier integration
  • Kubera Integration: Cross-institution validation and variance detection
  • Web UI: Browser-based classification and account management
  • Advanced Analytics: SQL-based reporting and data quality monitoring

Quick Start (Development Phase)

Current Status: Foundation phase - Core architecture and database models implemented

Prerequisites

  • PostgreSQL 17: Running on Unraid server (see Database Setup below)
  • Python: 3.11+ with uv installed
  • Network: Connectivity to PostgreSQL server (default port 5436)

Development Setup

  1. Clone Repository: git clone https://github.com/ByronWilliamsCPA/pp-security-master.git && cd pp-security-master
  2. Install Dependencies: uv sync
  3. Install qlty CLI: curl https://qlty.sh | bash (standalone quality runner, not a Python package)
  4. Configure Environment: Copy .env.example to .env and configure database connection
  5. Verify Database: uv run python tests/test_db_connection.py
  6. Run Tests: uv run pytest -v --cov=src --cov-report=html
  7. Code Quality: uv run nox -s lint for formatting and linting

Note: Database migrations and CLI commands are currently under development

Database Setup

PostgreSQL 17 on Unraid

  1. Install via Unraid Community Apps:

    • Search for "PostgreSQL" in Community Applications

    • Select PostgreSQL 17 container

    • Configure environment variables:

      POSTGRES_DB=pp_master
      POSTGRES_USER=pp_user
      POSTGRES_PASSWORD=[secure_password]
    • Map port: 5436:5432 (or preferred external port)

    • Set persistent storage: /mnt/user/appdata/pp_postgres/data:/var/lib/postgresql/data

  2. Verify Installation:

    # Test network connectivity
    nc -zv [unraid-server-ip] 5436
    
    # Test database connection
    uv run python tests/test_db_connection.py
  3. Troubleshooting: See docs/TROUBLESHOOTING.md for common issues

Detailed Setup: See MVP.md for complete MVP scope and PROJECT_PLAN.md for infrastructure details.


Repository Structure

pp-security-master/
β”œβ”€ README.md                        # This file
β”œβ”€ CLAUDE.md                        # Claude Code configuration
β”œβ”€ LICENSE                          # MIT License
β”œβ”€ Makefile                         # Build automation
β”œβ”€ pyproject.toml                   # Dependencies and project configuration
β”œβ”€ uv.lock                          # Dependency lock file
β”œβ”€ noxfile.py                       # Test automation
β”œβ”€ codecov.yaml                     # Coverage configuration
β”œβ”€ docs/
β”‚  β”œβ”€ adr/                          # Architecture Decision Records
β”‚  β”œβ”€ planning/                     # Phase-based development plans
β”‚  └─ project/                      # Project documentation
β”‚     β”œβ”€ MVP.md                     # Minimum viable product definition
β”‚     β”œβ”€ PROJECT_PLAN.md            # Complete roadmap and technical details
β”‚     β”œβ”€ TAXONOMY_GUIDE.md          # Classification standards
β”‚     └─ ...                        # Additional project docs
β”œβ”€ src/security_master/
β”‚  β”œβ”€ storage/
β”‚  β”‚  β”œβ”€ models.py                  # Core database models
β”‚  β”‚  β”œβ”€ pp_models.py               # Portfolio Performance models
β”‚  β”‚  β”œβ”€ transaction_models.py      # Institution transaction models
β”‚  β”‚  β”œβ”€ views.py                   # Consolidated export views
β”‚  β”‚  └─ schema_export.py           # Database visualization generators
β”‚  β”œβ”€ extractor/                    # Institution-specific parsers
β”‚  β”œβ”€ classifier/                   # Classification engines
β”‚  β”œβ”€ patch/
β”‚  β”‚  └─ pp_xml_export.py           # PP XML backup generation
β”‚  β”œβ”€ cli.py                        # Command-line interface
β”‚  └─ utils.py                      # Shared utilities
β”œβ”€ tests/                           # Test suite
β”œβ”€ sample_data/                     # Portfolio Performance and broker samples
β”œβ”€ schema_exports/                  # Database visualizations (PlantUML, DBML, SQL)
β”œβ”€ scripts/                         # Setup and utility scripts
β”œβ”€ sql/                             # Database migrations and schema
└─ pytest_plugins/                  # Custom pytest extensions

Documentation


License

This project is open-source and available under the MIT License.


References

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors