Skip to content

Private Repository#4

Merged
hayesZach merged 18 commits intomasterfrom
feature/private-repository
Dec 30, 2025
Merged

Private Repository#4
hayesZach merged 18 commits intomasterfrom
feature/private-repository

Conversation

@hayesZach
Copy link
Copy Markdown
Collaborator

@hayesZach hayesZach commented Dec 23, 2025

This PR adds the Private Repository implementation as well as the secret package used to generate API keys.


Note

Implements a persistent private data layer and API key generation.

  • New private repository using GORM with SQLite (private.db), auto-migrates Key, Marketplace, AdminAudit, enables FK + WAL, and seeds csfloat marketplace
  • Bootstraps an admin API key per environment via a new secret key generator; logs the formatted one-time key and stores its SHA-256 hash as Key.ID
  • Refactors models.Key to use string ID (hash), adds CreatedAt/UpdatedAt, and Environment; enforces env presence and admin scope constraints in BeforeCreate
  • Updates RawKey to include string id and environment; adds Permissions.AddAllPermissions()
  • Adjusts repository and service interfaces to use string IDs for keys; introduces domain/secret interfaces and concrete internal/secret implementation (env-based prefixes, random generation, hashed ID)
  • Dependencies: adds gorm.io/driver/sqlite and related transitive deps

Written by Cursor Bugbot for commit 0cd285b. This will update automatically on new commits. Configure here.

@hayesZach hayesZach self-assigned this Dec 23, 2025
@hayesZach hayesZach added the Enhancement New feature or request label Dec 23, 2025
@hayesZach hayesZach marked this pull request as ready for review December 23, 2025 22:14
@hayesZach hayesZach requested a review from Step7750 December 23, 2025 22:15
@hayesZach hayesZach requested a review from Step7750 December 29, 2025 01:40
@Step7750
Copy link
Copy Markdown
Member

@cursor Review

@hayesZach hayesZach merged commit 8725061 into master Dec 30, 2025
1 check passed
@hayesZach hayesZach deleted the feature/private-repository branch December 30, 2025 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants