Commit Graph
34 Commits
Author SHA1 Message Date
4663003dd7 Add versioning, content, and chat presence/notifications services
- SOR.Versioning: version.check handler, ClientRelease entity + admin UI
- SOR.Content: incremental card sync (DefinitionVersion cursor via Postgres trigger),
  content.sync / content.sets / content.card handlers
- Chat: presence (account_presence) + notifications with unread count and mark-read
- CardDefinition: DefinitionVersion bigint (trigger-assigned) + IsRetired soft-delete
- 3 migrations applied to pg-forge-01 (Identity, Chat, Catalog)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-25 20:35:35 -05:00
348c37b9b5 Add SOR.Bazaar service — store, P2P marketplace, auction house, cosmetics
New project: SOR.Bazaar (12 message handlers)
  Store:       get_store, buy_booster_pack, buy_prebuilt_deck, buy_cosmetic, get_my_balance
  Marketplace: get_listings, get_my_listings, list_card, cancel_listing,
               buy_listing (shared-tx atomicity), place_bid (shared-tx + refund),
               get_transactions

New DB entities:
  BazaarDb:    Cosmetic, PurchaseRecord, BoosterPackCardGrant, AuctionBid
  CollectionDb: PlayerCosmetic
  IdentityDb:  Account.OriginPoints

BoosterPack gets CardSetId for set-scoped card pool draws.
BazaarEnums: PurchaseProductType, CosmeticType.

3 EF migrations applied to pg-forge-01:
  AddOriginPoints, AddBazaarCosmetics, AddPlayerCosmetics

Admin pages: CosmeticsPage, CosmeticEditor, PurchaseRecordsPage (with
  expandable booster pack card grant rows), NavMenu Bazaar submenu updates.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-25 19:02:59 -05:00
2cac55cbd9 Add starter deck system and AI art tracker
- PlayerCard.IsTradeable (default true; false for starter deck grants)
- PrebuiltDeck.IsStarterDeck flag + index
- Account.StarterDeckSelectedAt one-time onboarding gate
- CardAsset.IsAiGenerated + CardAnimationBinding.IsAiGenerated
- Handlers: CollectionGetStarterDecks, CollectionSelectStarterDeck
- CollectionGetCards passes IsTradeable through to PlayerCardDto
- Admin: PrebuiltDeckEditor Starter checkbox, CardEditor AI Generated
  checkboxes on assets and animation rows
- Admin: /content/ai-assets AI Art Tracker page + NavMenu entry
- 4 EF migrations applied to pg-forge-01

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-25 14:46:00 -05:00
3e4a07d4b5 Fix tier-chain warning to distinguish lineage mismatch vs missing intermediate tier
Previously all gaps produced "X is missing" — but if the missing previous
tier is Tier 1 and is not the deck's primary, the player can never add it
(Tier 1 ArchSpirits are blocked from the card list). The message was
technically correct but actionably wrong.

Two distinct messages now:
- Different lineage: "X (Tier N) belongs to a different ArchSpirit lineage
  than your primary and cannot be ascended to in this deck."
- Missing intermediate: "X (Tier N) is in the deck but Y is missing.
  Add the intermediate tier to enable ascension."

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-25 13:30:28 -05:00
c6dc56a350 Add chat service, collection clone/tier rules, social graph
SOR.Chat (new project):
- 10 WebSocket message handlers: send, get_channels, get_messages,
  dm_open, friend_request, friend_respond, friend_remove, block,
  unblock, get_social
- Cursor-based pagination for message history
- Block checks on DM send and dm_open
- Social graph: friends / pending requests (in+out) / blocked list
- Batch identity DB lookups for display names

Collection updates:
- clone_deck handler (copy deck + re-validate)
- Tier-chain validation: deck ArchSpirit must be Tier 1 (hard rule);
  warn on Tier 2+ card without previous tier present (soft warning)
- Tier 2+ ArchSpirits now allowed in card list as ascension targets
- ValidationWarnings field added to DeckSummaryDto + DeckDetailDto

Database:
- CardDefinition.PreviousTierId self-reference FK for ascension chains
- FriendRequest + BlockedUser entities in chat schema
- ChatChannelType.System + FriendRequestStatus enum values
- Migrations: AddArchSpiritTierChain (catalog), AddSocialGraph (chat)

Admin portal:
- ChatOverview (/chat) — stats + channel list with type filter
- ChatChannelViewer (/chat/channel/{id}) — message history + system
  message compose for admins
- SocialModerationPage (/chat/social) — friend/block lookup + actions
- NavMenu: Chat section with Social Graph sub-item

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-25 13:16:43 -05:00
0198aec9e5 Add collection service — deck management + card inventory
SOR.Collection project (new):
- 8 message handlers over WebSocket: get_cards, get_decks, get_deck,
  create_deck, rename_deck, delete_deck, add_card, remove_card
- Deck construction rules (DeckRules.cs): min 20 / max 40 cards,
  max 4 copies per definition, max 20 decks per player
- add_card validates ownership (player must own enough physical copies),
  copy limit, deck size limit, and rejects ArchSpirits from the card list
- RefreshValidityAsync recalculates Deck.IsValid after every mutation
- Cross-context lookups (CollectionDbContext + CatalogDbContext) with
  batch queries — never N+1

Admin portal pages (new):
- /collection — overview stats (total cards, total decks, valid decks,
  unique players) + account ID lookup
- /collection/player/{accountId} — full player collection viewer:
  paginated card grid with name/type/affinity/rarity/foil/serial filters,
  deck list with expanded card tables, Grant Card modal (search + foil
  toggle, grants 1–100 copies), revoke individual card instances

Wiring:
- SOR.slnx + SOR.Host.csproj: added SOR.Collection project reference
- Program.cs: uncommented collection service registration
- NavMenu: added Collection item

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-25 12:28:17 -05:00
925b2b1b3b Add Bazaar store products — booster packs, prebuilt decks, masked listings
- BoosterPack entity: dual pricing (OP + USD), JSONB slot distribution,
  availability window, CDN image, IsActive flag
- PrebuiltDeck entity: dual pricing, ArchSpirit reference (denormalized),
  availability window, CDN image, card list (PrebuiltDeckCard)
- BazaarListing.IsMasked: blind/mystery market — buyers see rarity+type only
- BazaarDbContext: new DbSets, EF config (jsonb column, unique indexes,
  cascade delete on deck cards)
- Migration: AddBazaarStoreProducts (applied to pg-forge-01)
- Admin UI: BoosterPackList, BoosterPackEditor (slot editor, image upload),
  PrebuiltDeckList, PrebuiltDeckEditor (cross-context card search, ArchSpirit picker)
- BazaarOverview: add active packs/decks stat cards with manage links
- NavMenu: add Booster Packs + Prebuilt Decks sub-items under Bazaar

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-25 10:16:09 -05:00
ee4ec43a57 Add CDN layer, harden admin unlock UI, scrub credentials from git
SOR.Cdn (new project):
- ICdnClient / HttpCdnClient — POST /upload?folder= + DELETE /files/{path}
- Typed HttpClient, X-Api-Key auth, 100 MB stream support
- CdnOptions: PublicBaseUrl, UploadBaseUrl, ApiKey (all via k8s env vars)

CardEditor (Assets tab):
- Upload button per asset/animation — streams file through Blazor Server SignalR
  to CDN; auto-fills CdnUrl + MimeType on success
- SignalR MaximumReceiveMessageSize raised to 100 MB for large 3D model uploads
- accept="image/*" for Art2D, ".glb,.gltf,.fbx" for Model3D and animations

AccountDetail:
- Distinguish auto-lockout (≤ 1 h, yellow badge) from admin ban (> 1 h, red badge)
- "Force Unlock" clears lockout immediately + resets failed-attempt counter
- "Unban" for admin-set bans; both call SetLockoutEndDateAsync(null)

Auth lockout: 15 min → 30 min (SOR.Auth + SOR.Admin both updated)

Credentials:
- Removed hardcoded Postgres/Redis creds from all committed appsettings.json
- Production values come from k8s secret env vars (ASP.NET Core env override)
- Added appsettings.Development.json + appsettings.*.Local.json to .gitignore

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-25 09:42:30 -05:00
1974dffdb6 Implement Auth service — login, register, sessions, account properties, OAuth stubs
- auth.proto: add account property CRUD messages + OAuthProvider enum + LoginWithOAuth
  (all OAuth providers disabled via Redis feature flags: oauth_<provider>_enabled)
- SOR.Auth: full AuthGrpcHandler — password auth, session tokens (32-byte random,
  SHA-256 hash in Postgres, raw token in Redis with TTL), ValidateToken with
  Redis fast-path + Postgres slow-path fallback, Logout with dual revocation
- AccountProperty entity: flexible key-value bag per account (snake_case keys,
  string values); upsert semantics; indexed on (AccountId, Key)
- SOR.Auth/ServiceRegistration: registers Identity DbContext + UserManager + roles
- SOR.Host/appsettings.json: add Postgres Default connection string
- AddAccountProperties migration applied to pg-forge-01

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-25 08:07:19 -05:00
6f9ed0668f Add EF Core migrations and SuperAdmin seeder
- Generated InitialCreate migrations for all 5 DbContexts:
  identity, catalog, collection, bazaar, chat (separate Postgres schemas)
- Applied to pg-forge-01 (172.10.1.127) — all schemas live
- Program.cs: SeedAsync() creates SuperAdmin + Admin roles and seeds
  initial SuperAdmin account on startup if none exists
  (email/password overridable via Admin:Email / Admin:Password config)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-25 07:52:30 -05:00
ee2891d38e Add database layer (EF Core + Postgres) and Blazor Server admin site
- SOR.Database: 5 bounded-context DbContexts (identity, catalog, collection,
  bazaar, chat), all entities/enums, JSONB for card abilities, ServiceRegistration
  with per-context connection string fallback to "Default"
- SOR.Admin: Blazor Server (.NET 8) — card editor, account management, bazaar
  overview, feature flags; Identity + cookie auth; FallbackPolicy requires
  Admin/SuperAdmin role; login via minimal API form POST endpoint
- Directory.Packages.props: add Microsoft.AspNetCore.Identity.EntityFrameworkCore
- SOR.slnx: add SOR.Admin + SOR.Database to solution (11 projects, 0 errors, 0 warnings)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-25 07:48:24 -05:00
d21adbc8d0 Add networking foundation — 9-project C# solution (compiles clean)
Implements the modular networking layer for SOR Server:
- SOR.Networking.Abstractions: pure interfaces (ITransport, IClientConnection,
  IMessageSerializer, IMessageDispatcher, IMessageHandler, IEventBus, IClientPush)
- SOR.Networking.WebSocket: ITransport + IClientConnection over System.Net.WebSockets
- SOR.Networking.Nats: IEventBus over NATS.Net (INatsConnection)
- SOR.Networking.Redis: IClientPush over Redis Pub/Sub
- SOR.Shared: ServiceResult<T>, RedisKeys, NatsSubjects, ServerMessage, JSON serializer
- SOR.Shared.Proto: auth.proto with gRPC AuthService contract
- SOR.Gateway: accept loop, auth handshake, dispatcher, Redis push subscriber
- SOR.Auth: stub gRPC handler (placeholder responses)
- SOR.Host: multi-service runner via ENABLED_SERVICES env var; wires all DI

All concrete implementations are wired exclusively in SOR.Host — every transport,
broker, and push implementation can be swapped by changing only Program.cs.

dotnet build SOR.slnx → 0 errors, 0 warnings

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-24 21:01:38 -05:00
0f95a0721b Add C# programming architecture and update tech stack
- Server/architecture.md: full programming architecture reference in C# (.NET 8)
  covering repo/project structure, three-layer handler→service→repository pattern,
  multi-service runner (ENABLED_SERVICES env var for N services per box), DI,
  config (IOptions), gRPC handler pattern, NATS pub/sub, Redis, EF Core + PostgreSQL,
  Serilog logging, error handling (ServiceResult + exceptions), health checks,
  testing patterns (xUnit + Moq + FluentAssertions), naming conventions, and hard rules
- Server/initial-plan.md: add C# 12 (.NET 8), EF Core, Serilog to tech stack table;
  add C# to Decided table; reference architecture.md

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-24 13:46:44 -05:00
acacb1e03f Add server architecture initial plan and legal TODO
- Draft full server architecture in Server/initial-plan.md covering all
  services: Gateway, Auth, Game, Chat, Collection, Bazaar, Admin,
  Leaderboard, Content, Web, and CDN/Asset Pipeline
- Tech stack decisions: PostgreSQL, Redis, NATS, gRPC, Ceph (RADOSGW),
  Kubernetes, Stripe (implemented but disabled)
- Chat persistence: 30-day PostgreSQL hot window, cold archive to remote MySQL
- Leaderboard: Redis Sorted Sets for live rankings, PostgreSQL for history
- Asset pipeline: Admin card builder → Ceph origin → CDN → client
- Create Shared/legal.md with prioritized legal TODO list covering TOS,
  EULA, Privacy Policy, GDPR, Stripe/PCI compliance, CCPA, Cookie Policy,
  and COPPA

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-23 23:46:06 -05:00
dingo 891f422afd abilities.md updates 2026-02-23 13:07:13 -05:00
dingo 80c5c0408a Add ranked matchmaking v1 integration spec and policies 2026-02-23 04:30:56 +00:00
dingo d6a0b393d5 Refine ranked flow and add matchmaking design draft 2026-02-23 04:28:48 +00:00
dingo 8e2a83e21a Draft bazaar economy scene with marketplace, store, sacrifice, and audit chain 2026-02-23 04:24:33 +00:00
dingo 636aa4070e Changes 2026-02-22 15:19:35 -05:00
dingo fd7964c044 Merge hub connection flow into login scene 2026-02-22 15:46:41 +00:00
dingo a7dc4e60e0 Consolidate auth and patch flows: merge AuthGateway/OAuth into Login and PatchCheck into ClientLaunch 2026-02-22 15:44:35 +00:00
dingo f577b121fa Remove outdated client-plan draft file 2026-02-22 15:35:06 +00:00
dingo a5330843a5 Expand settings scene with support, audio, and brightness controls 2026-02-22 14:47:35 +00:00
dingo 4dc5691c51 Restructure: move agnostic context docs to Shared/context-files 2026-02-22 14:17:53 +00:00
dingo d711c50d4e Split scene planning into global + per-scene context files 2026-02-22 14:11:44 +00:00
dingo 34e56d4d3d Add monthly spending cap lock, warnings, and cooldown contract 2026-02-22 14:05:22 +00:00
dingo f8a9c3c8dd Add global settings/bug controls and detailed account management scene spec 2026-02-22 14:02:46 +00:00
dingo f298c73879 Require multi-touch and global input consistency across scenes 2026-02-22 13:44:53 +00:00
dingo f3b271aed1 Add hub input model for touch/mouse camera and node selection 2026-02-22 13:43:44 +00:00
dingo c34d28f630 Expand main scene hub links and background visual direction 2026-02-22 13:29:11 +00:00
dingo 8dd3781b20 Refocus scenes doc on client scene/page/UI mapping 2026-02-22 13:22:04 +00:00
dingo 659010154d Add initial client planning draft 2026-02-22 04:27:29 +00:00
dingo bbbb10d8d9 Adding stub for Server to git 2026-02-21 17:54:23 -05:00
dingo 3bdbfc8c57 Initial commit 2026-02-21 17:47:52 -05:00