Skip to content

Design Portfolio Data Model & Database Schema #28

@grantfox-oss

Description

@grantfox-oss

Description:
Design and implement the portfolio data model including tables for portfolios, holdings, transactions, performance metrics, and allocation tracking. Ensure schema supports multi-chain assets and complex structures.

Acceptance Criteria:

  • Portfolio table with metadata (name, type, description, created_at, updated_at)
  • Holdings table with asset information (symbol, chain, quantity, cost_basis, current_value)
  • Transaction history table (type, date, amount, price, fees, chain)
  • Portfolio metrics table (total_value, ROI, allocation)
  • Performance history for backtesting (daily snapshots)
  • Soft delete support for portfolios and holdings
  • Indexes on frequently queried columns
  • Database migrations using TypeORM

Definition of Done:

  • Schema reviewed and approved
  • All tables created with migrations
  • Relationships properly defined
  • Performance: queries execute in < 100ms for typical portfolio

Test Requirements:

  • Migration test
  • Schema validation test
  • Query performance test

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions