Commit graph

226 commits

Author SHA1 Message Date
AeThex
f1bcc957f9 fix: Discord Activity token exchange, CSP headers, subscription routes, and static asset 404
- Remove redirect_uri from Discord token exchange (Activities use proxy auth, not redirect flow)
- Add Content-Security-Policy with frame-ancestors for Discord embedding (was only in vercel.json)
- Wire up subscription create-checkout and manage routes in Express
- Add Studio arm to ArmSwitcher with external link
- Prevent SPA catch-all from serving HTML for missing static assets (fixes script.js Unexpected token error)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 23:49:50 +00:00
AeThex
34368e1dde fix: server-side OG/Twitter meta injection for crawler visibility
Some checks failed
Security Scan / semgrep (push) Has been cancelled
Security Scan / dependency-check (push) Has been cancelled
Build / build (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
Lint & Type Check / lint (push) Has been cancelled
Test / test (18.x) (push) Has been cancelled
Test / test (20.x) (push) Has been cancelled
Crawlers (Twitter, Discord, Slack) don't execute JavaScript, so the
client-side SEO.tsx useEffect was invisible to them. Every page looked
identical — the hardcoded homepage defaults in index.html.

- node-build.ts: replace simple sendFile with async SSR meta middleware
  that injects per-route title/description/og:*/twitter:* before sending
  HTML. Static route map covers ~15 routes; dynamic lookup queries
  Supabase for /projects/:uuid (title, description, image_url) and
  /passport/:username (full_name, bio) so shared project/profile links
  render correct cards in Discord/Twitter/Slack unfurls.
- index.html: add twitter:site @aethexcorp; SSO.tsx useEffect still
  runs for browser tab updates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 14:30:47 +00:00
AeThex
1599d0e690 fix: prevent false session logouts and wire up remember-me
- Narrow the unhandledrejection error handler: removed "unauthorized"
  and "auth/" patterns which were too broad and cleared sessions on
  unrelated API 401s or any URL containing "auth/". Now only matches
  specific Supabase strings (invalid refresh token, jwt expired, etc.)
- Wire up the Remember Me checkbox in Login — was purely decorative
  before. Defaults to checked, stores aethex_remember_me in localStorage
- Authentik SSO callback now sets a 30-day cookie so SSO sessions
  survive browser restarts (AuthContext promotes it to localStorage)
- AuthContext clears local session on load if remember-me flag is absent
  (respects user's choice to not stay logged in)
- signOut now removes aethex_remember_me from localStorage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 08:15:47 +00:00
AeThex
7fec93e05c feat: Authentik SSO, nav systems, project pages, and schema fixes
Some checks are pending
Build / build (push) Waiting to run
Deploy / deploy (push) Waiting to run
Lint & Type Check / lint (push) Waiting to run
Security Scan / dependency-check (push) Waiting to run
Security Scan / semgrep (push) Waiting to run
Test / test (18.x) (push) Waiting to run
Test / test (20.x) (push) Waiting to run
Auth & SSO
- Wire Authentik (auth.aethex.tech) as OIDC PKCE SSO provider
- Server-side only flow with HMAC-signed stateless state token
- Account linking via authentik_sub in user metadata
- AeThex ID connection card in Dashboard connections tab
- Unlink endpoint POST /api/auth/authentik/unlink
- Fix node:https helper to bypass undici DNS bug on Node 18
- Fix resolv.conf to use 1.1.1.1/8.8.8.8 in container

Schema & types
- Regenerate database.types.ts from live Supabase schema (23k lines)
- Fix 511 TypeScript errors caused by stale 582-line types file
- Fix UserProfile import in aethex-database-adapter.ts
- Add notifications migration (title, message, read columns)

Server fixes
- Remove badge_color from achievements seed/upsert (column doesn't exist)
- Rename name→title, add slug field in achievements seed
- Remove email from all user_profiles select queries (column doesn't exist)
- Fix email-based achievement target lookup via auth.admin.listUsers
- Add GET /api/projects/:projectId endpoint
- Fix import.meta.dirname → fileURLToPath for Node 18 compatibility
- Expose VITE_APP_VERSION from package.json at build time

Navigation systems
- DevPlatformNav: reorganize into Learn/Build grouped dropdowns with descriptions
- Migrate all 11 dev-platform pages from main Layout to DevPlatformLayout
- Remove dead isDevMode context nav swap from main Layout
- EthosLayout: purple-accented tab bar (Library, Artists, Licensing, Settings)
  with member-only gating and guest CTA — migrate 4 Ethos pages
- GameForgeLayout: orange-branded sidebar with Studio section and lock icons
  for unauthenticated users — migrate GameForge + GameForgeDashboard
- SysBar: live latency ping, status dot (green/yellow/red), real version

Layout dropdown
- Role-gate Admin (owner/admin/founder only) and Internal Docs (+ staff)
- Add Internal section label with separator
- Fix settings link from /dashboard?tab=profile#settings to /dashboard?tab=settings

Project pages
- Add ProjectDetail page at /projects/:projectId
- Fix ProfilePassport "View mission" link from /projects/new to /projects/:id

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 05:01:10 +00:00
MrPiglr
25d584fd46
feat: Complete database migration and developer platform
- Applied all 31 pending Supabase migrations successfully
- Fixed 100+ policy/trigger/index duplication errors for shared database
- Resolved foundation_contributions schema mismatch (added user_id, contribution_type, resource_id, points columns)
- Added DROP IF EXISTS statements for all policies, triggers, and indexes
- Wrapped storage.objects operations in permission-safe DO blocks

Developer Platform (10 Phases Complete):
- API key management dashboard with RLS and SHA-256 hashing
- Complete API documentation (8 endpoint categories)
- 9 template starters + 9 marketplace products + 12 code examples
- Quick start guide and SDK distribution
- Testing framework and QA checklist

Database Schema Now Includes:
- Ethos: Artist/guild tracking, verification, tracks, storage
- GameForge: Games, assets, monetization
- Foundation: Courses, mentorship, resources, contributions
- Nexus: Creator marketplace, portfolios, contracts, escrow
- Corp Hub: Invoices, contracts, team management, projects
- Developer: API keys, usage logs, profiles

Platform Status: Production Ready 
2026-01-10 02:05:15 +00:00
sirpiglr
3312263460 Improve security by removing fallback secret from bot webhook
Remove hardcoded fallback secret from Discord bot webhook endpoint and enforce environment variable.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: ae4568da-c4e0-465b-a931-10365c02b678
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/j2GzDqZ
Replit-Helium-Checkpoint-Created: true
2025-12-13 10:07:23 +00:00
sirpiglr
e100c4eff1 Update Discord verification flow to include expired code cleanup and bot notifications
Add POST /api/discord/verify-callback webhook and implement expired verification code cleanup and bot notification logic within the /api/discord/verify-code endpoint.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: d6ce3cc9-6ce5-4141-b001-c604c9ee9c81
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/v3HFq8K
Replit-Helium-Checkpoint-Created: true
2025-12-13 10:05:46 +00:00
sirpiglr
210fd1f556 Add real data endpoints for Discord Activity features
Remove restrictions on API and server files, then add new API endpoints to server/index.ts for Discord Activity features including events and teams.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 23be2175-1279-4bfb-862e-78464f0f79d3
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/139vJay
Replit-Helium-Checkpoint-Created: true
2025-12-13 07:51:17 +00:00
sirpiglr
a7d0f4d256 Update server to bind to all interfaces and use correct port
Modify server/node-build.ts to bind to host "0.0.0.0" and use port 5000 for production deployments.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: b9d17033-bdc5-48c2-8dbe-b1b7c3faf64a
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/qPXTzuE
Replit-Helium-Checkpoint-Created: true
2025-12-07 23:20:18 +00:00
MrPiglr
577ef68dad Sync local changes 2025-12-07 00:17:04 +00:00
sirpiglr
4fcda7c56a Add AI chat functionality with fallback for unconfigured services
Update AIChat component to handle AI service configuration errors and register new API routes for AI chat and title generation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 33138a67-a89c-47ac-a551-6b983481ce56
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/BDxFKG1
Replit-Helium-Checkpoint-Created: true
2025-12-06 04:00:55 +00:00
sirpiglr
1cbff4ed56 Improve security by securing endpoints and fixing data leaks
Implement JWT authentication for achievements activation endpoint and secure Nexus payouts and payment-history endpoints by filtering data at the database level.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 947d796e-4b26-4a17-afb1-6d7696b3c297
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/OjpZ7xP
Replit-Helium-Checkpoint-Created: true
2025-12-06 01:23:38 +00:00
sirpiglr
8d2508dbf9 Update achievement activation to also award achievements to users
Modify the `/api/achievements/activate` endpoint to seed and award achievements, resolving foreign key constraint errors by ensuring `user_achievements` is populated correctly.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: ec6ee112-a299-40f7-9649-dc69aa3eaf2f
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/lX9tyiI
Replit-Helium-Checkpoint-Created: true
2025-12-06 00:14:46 +00:00
sirpiglr
f0e5f40100 Add authentication to profile updates and dashboard requests
Introduce Bearer token authentication for the /api/profile/update endpoint, ensuring users can only modify their own profiles. Update the Dashboard to include the authentication token in all API requests, enhancing security and data integrity.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 35bff579-2fa1-4c42-a661-d861f25fa2b6
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/AJbgVVq
Replit-Helium-Checkpoint-Created: true
2025-12-04 09:19:42 +00:00
sirpiglr
a283e81c5e Add a secure bot management panel and new Discord commands
Implement server-side proxy endpoints for bot management, add admin token authentication, and introduce new Discord slash commands for help, stats, leaderboards, and posting.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: f0eccab4-b258-4b1c-a2a5-e7b2b3c56c44
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/ryY0zvi
Replit-Helium-Checkpoint-Created: true
2025-12-04 02:44:05 +00:00
sirpiglr
68b1d5cc51 Add logging for post creation API requests and responses
Adds console logs to the /api/posts endpoint in server/index.ts to capture incoming payloads and successful post creation data, aiding in debugging.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: f65c3e3d-c2a9-489d-b74e-9278ae76aed3
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/zMxtXds
Replit-Helium-Checkpoint-Created: true
2025-12-03 19:01:14 +00:00
sirpiglr
e5e5f1d483 Remove direct Discord post synchronization from server
Removes the HTTP-based Discord post synchronization logic from the server, as the Discord bot now handles this directly via polling Supabase.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: eb03098a-a2c8-4077-bc43-43ade85b9f51
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/duiWnI1
Replit-Helium-Checkpoint-Created: true
2025-12-03 18:56:42 +00:00
sirpiglr
be7ed554cd Implement bidirectional Discord and feed channel synchronization
Add an HTTP endpoint to the Discord bot to receive posts from the main server and call the Discord API to send these posts as rich embeds to the configured feed channel. Also, update the main server to call this new Discord bot endpoint when a new post is created.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 82d93ef8-d6c2-4d69-96c4-6fa5da4ec508
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/duiWnI1
Replit-Helium-Checkpoint-Created: true
2025-12-03 03:36:05 +00:00
Builder.io
f9465d75c2 Prettier format pending files 2025-11-17 03:02:34 +00:00
Builder.io
b6d92415d2 completionId: cgen-607c6d1ed83c473f855870bd562fc762
cgen-607c6d1ed83c473f855870bd562fc762
2025-11-17 02:57:30 +00:00
Builder.io
09a2f18e61 Revert Supabase URL priority - both URLs point to same instance
cgen-cc40fd4d808e44d8bfc2690e18895cb4
2025-11-16 10:45:43 +00:00
Builder.io
1c3c5226a0 Fix Supabase URL priority in Express server to use main instance
cgen-3bc9aaf1a33b43ed938c38a77fa4f5cd
2025-11-16 10:43:53 +00:00
Builder.io
a355f2c9fd completionId: cgen-19a49fcb88134d9f8c20fca743291e9e
cgen-19a49fcb88134d9f8c20fca743291e9e
2025-11-16 10:18:46 +00:00
Builder.io
cbca474bdf completionId: cgen-08fa625668f648cda5412804ddf28635
cgen-08fa625668f648cda5412804ddf28635
2025-11-16 10:17:15 +00:00
Builder.io
c5f18f2d71 Fix Ghost API response types in ghost-admin-api (both occurrences)
cgen-bc811bd702c248eeb7018530ee10bb51
2025-11-16 07:07:51 +00:00
Builder.io
1a680a424f Prettier format pending files 2025-11-15 21:13:01 +00:00
Builder.io
04a8939261 completionId: cgen-91850cb5a0bf4f06af7d95cd8ab9a615
cgen-91850cb5a0bf4f06af7d95cd8ab9a615
2025-11-15 20:33:29 +00:00
Builder.io
92f9268a73 completionId: cgen-89ab62ec948342ecb3aca1e025dc02c1
cgen-89ab62ec948342ecb3aca1e025dc02c1
2025-11-15 20:33:26 +00:00
Builder.io
0df5193de7 Create Ghost Admin API utility with JWT signing
cgen-cf3cf436ab8e466f9dbadc4d66e15cb6
2025-11-15 20:04:42 +00:00
Builder.io
2fa397cca4 completionId: cgen-4e3165dcabf047248b1d4b9c9add57ad
cgen-4e3165dcabf047248b1d4b9c9add57ad
2025-11-15 02:23:50 +00:00
Builder.io
aaac82137c Prettier format pending files 2025-11-15 02:11:47 +00:00
Builder.io
2ca344ece6 completionId: cgen-154f92d142df4243bef1eb6389bfb1f6
cgen-154f92d142df4243bef1eb6389bfb1f6
2025-11-15 02:10:55 +00:00
Builder.io
fe6a7b5217 Add wallet verification API endpoint (/api/profile/wallet-verify)
cgen-3eb7dbbe2a9f43ceb8f6ac4418b0ff2e
2025-11-15 01:34:56 +00:00
Builder.io
f66bac82c8 Add API endpoints for subdomain-based passport lookups
cgen-b26825e479d94092b9641e9ba1219f83
2025-11-15 01:25:49 +00:00
Builder.io
df6d634ba5 Add subdomain detection middleware for aethex.me and aethex.space
cgen-61439ec9fab24a76b86cd0e0cf7dea21
2025-11-15 01:25:40 +00:00
Builder.io
ccc280001e Prettier format pending files 2025-11-13 03:58:48 +00:00
Builder.io
85b7a48abf completionId: cgen-f46ea2e584e94c9abc1ecea955930d8b
cgen-f46ea2e584e94c9abc1ecea955930d8b
2025-11-13 03:58:30 +00:00
Builder.io
c4c66fa83a completionId: cgen-2a6d955965e14d43bd0b5417fbd04ba6
cgen-2a6d955965e14d43bd0b5417fbd04ba6
2025-11-13 03:43:31 +00:00
Builder.io
e4effdb956 completionId: cgen-2d571f85f810430e8c759a14c5315dba
cgen-2d571f85f810430e8c759a14c5315dba
2025-11-13 03:39:19 +00:00
Builder.io
e75bde98e9 completionId: cgen-f0e5498443774fa8af7b48894e4726fc
cgen-f0e5498443774fa8af7b48894e4726fc
2025-11-13 03:31:01 +00:00
Builder.io
91403037b9 completionId: cgen-b67fee4f05f24719b1b2b181c102bd40
cgen-b67fee4f05f24719b1b2b181c102bd40
2025-11-13 03:24:20 +00:00
Builder.io
9f5567eda7 completionId: cgen-944f3dcef2da4de7b489215b2292fd28
cgen-944f3dcef2da4de7b489215b2292fd28
2025-11-13 03:24:17 +00:00
Builder.io
97329235b7 completionId: cgen-b4dc4d6401d54645acd0ea532e57c8d2
cgen-b4dc4d6401d54645acd0ea532e57c8d2
2025-11-12 05:52:33 +00:00
Builder.io
afce869619 completionId: cgen-488f70f95dbb4230b7733a9fd3eca651
cgen-488f70f95dbb4230b7733a9fd3eca651
2025-11-12 05:49:09 +00:00
Builder.io
82eaaf70d1 completionId: cgen-74345a6e0fb74dcb9dc299cb43d5b8b9
cgen-74345a6e0fb74dcb9dc299cb43d5b8b9
2025-11-12 05:41:31 +00:00
Builder.io
de73c53ddb completionId: cgen-521885b40d834bdc894efab2e7082cfa
cgen-521885b40d834bdc894efab2e7082cfa
2025-11-12 05:41:26 +00:00
Builder.io
325c6cf525 completionId: cgen-381c869efb4d419bba612587c3fff4d2
cgen-381c869efb4d419bba612587c3fff4d2
2025-11-12 05:41:21 +00:00
Builder.io
c989c54b9e completionId: cgen-b6010f8c895e452e9100f093f024a805
cgen-b6010f8c895e452e9100f093f024a805
2025-11-12 05:39:00 +00:00
Builder.io
9f182cacc2 completionId: cgen-f37c2d5937fa47db8dbfac94aaf48a69
cgen-f37c2d5937fa47db8dbfac94aaf48a69
2025-11-12 05:38:55 +00:00
Builder.io
14789583e3 completionId: cgen-2eeca07ad4df4ac29d5db467aec95dbd
cgen-2eeca07ad4df4ac29d5db467aec95dbd
2025-11-12 05:38:51 +00:00