Skip to content

feat: issuer analytics, document bulk export, Stellar network selector, auto-invest rule engine - #654

Merged
TS-mfon merged 7 commits into
StellarState:devfrom
maikNeta:feat/issues-587-588-589-596-analytics-network-export-autoinvest
Oct 17, 2026
Merged

TS-mfon merged 7 commits into
StellarState:devfrom
maikNeta:feat/issues-587-588-589-596-analytics-network-export-autoinvest

Conversation

@maikNeta

Copy link
Copy Markdown
Contributor

Summary

Changes

  • New models: AutoInvestRule, AutoInvestExecution, InvoiceDocument
  • New migrations: AddInvoiceDocuments, AddAutoInvest
  • New services: IssuerAnalyticsService, DocumentExportService, AutoInvestRulesService, AutoInvestRuleEngineService, HorizonAccountBalanceService
  • New middleware: createNetworkContextMiddleware
  • New routes: /api/v1/issuers, /api/v1/invoices (export), /api/v1/auto-invest
  • Added RiskTier and AutoInvestExecutionStatus enums
  • Added category field to Invoice model
  • Added documentExport config block

Conflict Resolution

This PR includes resolution of merge conflicts with the dev branch:

  • Preserved Redis-enabled TTL cache implementation
  • Integrated latest service updates from dev branch
  • All PR features preserved and compatible with current codebase

Closes #587
Closes #588
Closes #589
Closes #596

Chucks1093 and others added 7 commits July 27, 2026 13:02
Resolves StellarState#473
Resolves StellarState#477
Resolves StellarState#478
Resolves StellarState#479

- Investor accreditation acknowledgement tracking with terms versioning
- Funding deadline extension request with admin approval gate
- Platform metrics aggregation endpoints for admin dashboard (60s cache)
- Investor portfolio summary endpoint with P&L calculation and pagination
…478-479

feat: implement issues 473, 477, 478, 479 (acknowledgement, extensions, metrics, portfolio)
…473-477-478-479"

This reverts commit d4302f8, reversing
changes made to e4e8c90.
…73-477-478-479

Revert "feat: implement issues 473, 477, 478, 479"
…t engine

- StellarState#588: X-Stellar-Network header middleware resolves per-network Horizon
  URL/contract id/passphrase onto req.stellarNetwork, defaulting to mainnet
  and 400ing on an invalid value.
- StellarState#587: issuer analytics (funding speed, investor-count trend, on-time
  repayment rate, reputation score) over 30d/90d/all, cached 5 minutes per
  issuer and invalidated on settlement or an invoice becoming FUNDED.
- StellarState#589: invoice_documents table replaces the single-ipfsHash upload with
  one row per document; bulk export fetches each from the IPFS gateway,
  zips them with structured naming, and serves a signed, time-limited
  download URL via an async job (POST to start, GET to poll/download).
  Restricted to KYC-approved issuer or investors in the invoice.
- StellarState#596: auto-invest rules (category/minYield/maxFaceValue/riskTier/
  maxPerInvoice/minWalletBalance) are evaluated against every invoice the
  moment it's published; a match checks the investor's live Horizon balance
  before investing, and every attempt -- executed, skipped for balance, or
  failed -- is recorded as an AutoInvestExecution row.

Closes StellarState#587,
Closes StellarState#588,
Closes StellarState#589,
Closes StellarState#596.
Resolved merge conflicts by keeping dev branch changes:
- src/app.ts, src/config/env.ts, src/index.ts
- src/services: investment, invoice, ipfs, settlement
- src/lib/ttl-cache.ts: kept Redis-enabled version from dev

The PR features (issuer analytics, document export, network selector, auto-invest)
are preserved in the codebase alongside dev's latest updates.
@TS-mfon
TS-mfon merged commit 8eff04c into StellarState:dev Oct 17, 2026
3 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

6 participants