m2/org/openalice-socialci failure

openalice-social

**Paused product; structure consolidated 2026-07-06 (embed pattern), builds get fixed AT WAKE** (deps → kellnr/Verdaccio registries, env canon, composes).

Features
44
Status
·unknown
Last activity
12d ago
Branch
mvp

Architecture rating

F11d ago
data layerD

19 numbered migrations covering bans, audit_log, channel_permissions, cascade deletes — decent schema evolution; but no RLS or tenant isolation, no GDPR signals, and env-drift on DATABASE_URL/PLATFORM_DB_PASSWORD means connection config is untracked.

docsF

Manifest present+valid with 44 features, AGENTS.md and README exist; but README states 'paused product', 534 missing docstrings, 1 TODO; no in-code architecture notes or @feature annotations beyond manifest.

consistencyF

17 star imports, 327 format issues, 44 god modules, 5 duplicate signatures, 31 missing key props, max complexity 134 vs avg 6.09 — extreme variance; migration numbering is consistent but code conventions are not enforced.

securityF

validate_jwt middleware is unreferenced/dead code; JWT_SECRET and INTERNAL_BROADCAST_SECRET are undeclared env-drift vars with no canonical source; 87 bare/broad excepts can silently swallow auth failures; no evidence of rate-limiting, SSRF guards, or security headers.

reliabilityF

Health probe returns 404, uptime 0%, CI conclusion=failure; 87 bare/broad excepts mask real errors; max cyclomatic complexity 134; no evidence of graceful shutdown, timeouts, retries, or idempotency; product is paused and non-functional.

observabilityF

25 console.log statements (unstructured); health endpoint exists but is broken (404); no evidence of metrics export, distributed tracing, or structured logging; monitoring is effectively absent.

testingF

e2e directory exists but no unit/integration test files visible in repo structure; validate_jwt and two other definitions are unreferenced suggesting zero coverage of auth middleware; CI is failing so even e2e is non-functional.

source · auto-grader-2026-07-07

Ecosystem manifest

.atlas-deps.yml

Discord-style chat + voice frontend (Next.js 16 + React 19) for the OpenAlice social layer.

Runtime deps
  • via NEXT_PUBLIC_API_URL (AuthProvider)
    SSO — AuthProvider validates oa_session JWTs and issues the shared OpenAliceClient.
  • via NEXT_PUBLIC_API_URL
    All CRUD: servers, channels, messages, friends, DMs, file uploads, presence, push subscriptions.
  • via VOICE_WS_URL (wss://voice.blal.pro/ws)
    P2P-mesh WebRTC signalling — join/leave rooms, relay ICE/SDP between peers.
  • openalice-cdnhttpoptional
    via NEXT_PUBLIC_API_URL (upload path)
    Serve uploaded files and user avatars returned as URLs from social-api.
Consumed env
  • NEXT_PUBLIC_API_URL
  • NEXT_PUBLIC_VAPID_PUBLIC_KEY
  • NEXT_PUBLIC_TURN_URLS
  • NEXT_PUBLIC_TURN_USERNAME
  • NEXT_PUBLIC_TURN_CREDENTIAL
  • NEXT_PUBLIC_USE_MOCKS
Exposes
  • docker_image: openalice-social-web
  • http_endpoint: https://social.blal.pro
Env drift · manifest ⇄ code

Atlas grepped the repo's source for env reads (rust env::var · ts process.env · py os.environ · shell $VAR) and diffed against the manifest's consumes_env. Two lists below: stale declarations and undeclared reads.

Code reads, manifest omits
  • AUTH_INTERNAL_URL
  • DATABASE_URL
  • E2E_BASE_URL
  • INTERNAL_BROADCAST_SECRET
  • JWT_SECRET
  • NEXT_PUBLIC_AUTH_URL
  • NEXT_PUBLIC_WORLD_URL
  • OPENALICE_AUTH_URL
  • PLATFORM_DB_PASSWORD
  • S3_ENDPOINT
  • S3_PUBLIC_URL
  • S3_UPLOAD_PREFIX
  • SOCIAL_API_PORT
  • UPDATES_DATA_DIR
  • UPLOAD_DIR
  • UPLOAD_MAX_SIZE
  • UPLOAD_URL_PREFIX
  • VOICE_SFU_URL
Observed reads: 24 · declared: 6

Code composition

tokei · loc
28.5kloc
  • TSX57.5%
  • Rust27.3%
  • TypeScript12.1%
  • CSS1.2%
  • SQL1.1%
  • Other0.8%
  • TSX57.5%· 16,403
  • Rust27.3%· 7,784
  • TypeScript12.1%· 3,446
  • CSS1.2%· 347
  • SQL1.1%· 320
  • JSON0.4%· 101
  • JavaScript0.2%· 56
  • TOML0.1%· 41
  • +2 more0.1%· 34 · 6 files
Language% codecodecommentsblanksfiles
TSX57.5%16,4036291,26768
Rust27.3%7,78432093837
TypeScript12.1%3,44650448921
CSS1.2%34737651
SQL1.1%320453819
JSON0.4%101003
JavaScript0.2%56263
TOML0.1%411132
Dockerfile0.1%291681
SVG0.0%5005
Markdown0.0%0124504

Telemetry ribbon · last 90 days

9 events
MAYJUNJUL2026-05-21 · commit · new commit 7f8e9dd → 86b93182026-05-23 · commit · new commit 86b9318 → 7e7cc042026-05-23 · commit · new commit 7e7cc04 → cc28e682026-06-01 · commit · new commit cc28e68 → 8ee51d62026-06-02 · commit · new commit 8ee51d6 → 707a98e2026-06-17 · commit · new commit 707a98e → 4e00a772026-06-17 · commit · new commit 4e00a77 → a7aa60d2026-07-04 · commit · new commit a7aa60d → 4c09a092026-07-06 · commit · new commit 4c09a09 → 31d6a27NOW
commitmanifestlifecyclekind

social/agents

4 features
  • social.agents.add-dialog
    social-web/src/components/social/AddAgentDialog.tsx:1
    Dialog for adding an AI agent to a server. Configures agent URL, trigger keywords, target channels, and optional vision capture (frame interval, quality, collage mode). Persists agent list to localStorage under openalice:agents:{serverId}.
  • social.agents.card
    social-web/src/components/social/AgentCard.tsx:1
    Agent management card in the server agents list. Shows name, online/offline status, trigger keywords, assigned channels, vision config summary, and configure/remove actions.
  • social.agents.mention-badge
    social-web/src/components/social/AgentMentionBadge.tsx:1
    Inline badge rendered inside message content when a @agent name is detected. Visually distinguishes agent mentions from user mentions with a Bot icon.
  • social.agents.mention-detection
    social-web/src/hooks/useAgentReactions.ts:1
    Reads agent names from localStorage (openalice:agents:{serverId} keys) and exposes useAgentReactions to detect @agent mentions in outgoing messages. Used by MessageInput to auto-trigger agent reply flows.

social/api

3 features
  • social.api.client
    social-web/src/lib/sdk-client.ts:1
    Thin re-export of OpenAliceClient from @openalicelabs/sdk (promoted from a local 780-line copy in sdk 0.4.0). All server/channel/friend/DM/agent CRUD calls flow through this client, authenticated via localStorage JWT.
  • social.api.hooks
    social-web/src/hooks/useSocial.ts:1
    Async data-fetching hooks built on @openalicelabs/sdk: useMe, useServers, useServer, useServerMembers, useChannels, useFriends, useDmChannels, useDmMessages, useRoles, usePublicUser. Each wraps a generic useAsync helper with loading/error/refetch state.
  • social.api.types
    social-web/src/lib/sdk-types.ts:1
    Re-export of all Rust-API wire types from @openalicelabs/sdk. Covers Server, Channel, ChannelMessage, DmChannel, DmMessage, Friendship, PublicUser, Role, Webhook, Invite, IncomingCallEvent, SearchResult, and more.

social/calls

3 features
  • social.calls.controls
    social-web/src/components/social/CallControls.tsx:1
    In-call control bar with mute/unmute, camera on/off, screen-share toggle, and hang-up button. Rendered inside the active-call panel during a DM voice call.
  • social.calls.dm-voice
    social-web/src/hooks/useCall.ts:1
    1-on-1 DM voice call lifecycle hook. Handles incoming call events from the platform WS (incoming_call, call_accepted, call_declined, call_ended, call_missed), exposes initiateCall/acceptCall/declineCall/endCall, and tracks callDuration.
  • social.calls.incoming-overlay
    social-web/src/components/social/CallOverlay.tsx:1
    Floating incoming-call notification overlay. Plays a procedural Web Audio ringtone (oscillator, no audio file), shows caller name/avatar, and exposes accept/decline buttons wired to useCall accept/declineCall.

social/channels

4 features
  • social.channels.header
    social-web/src/components/social/ChannelHeader.tsx:1
    Channel top bar showing channel name, topic, pinned-message count, member-list toggle, global search trigger, and channel settings modal access. Adapts between text-channel and DM contexts.
  • social.channels.member-list
    social-web/src/components/social/MemberList.tsx:1
    Right-rail member panel. Groups members by role (Admin, Moderator, Member, Bot), shows online/idle/dnd/invisible status dots, supports kick/ban via confirm dialog, and opens UserCard popover on click. Virtualized via ScrollArea.
  • social.channels.settings
    social-web/src/components/social/ChannelSettings.tsx:1
    Per-channel settings modal. Covers channel name/topic edit, NSFW toggle, per-role permission overrides (view/send/manage), and channel delete. Supports both text and voice channel types.
  • social.channels.sidebar
    social-web/src/components/social/ChannelSidebar.tsx:1
    Per-server channel list sidebar. Groups channels by category (Text/Voice), shows voice-channel occupancy via useVoiceRoomParticipants, renders unread badges, exposes mute toggles, and hosts the voice-control footer (mute/deafen/leave).

social/chat

5 features
  • social.chat.emoji-picker
    social-web/src/components/social/EmojiPicker.tsx:1
    Full emoji picker with category tabs, search, recent-emoji tracking, and skin-tone modifier. Lazy-loaded via next/dynamic to keep the initial bundle light. Used by both MessageInput (send emoji) and MessageArea (add reaction).
  • social.chat.link-embed
    social-web/src/components/social/LinkEmbed.tsx:1
    Auto-fetches OpenGraph metadata for URLs in messages via the social-api /og endpoint and renders title/description/image previews inline beneath the message.
  • social.chat.message-area
    social-web/src/components/social/MessageArea.tsx:1
    Virtualised message list with infinite scroll / load-more, read-receipt marking, reaction picker (EmojiPicker lazy-loaded), reply-to preview, message edit/delete context menu, typing indicator, link embeds, attachment thumbnails, thread open, and user-card popover on avatar click.
  • social.chat.message-input
    social-web/src/components/social/MessageInput.tsx:1
    Rich message composer with typing-indicator debounce (wsSendTyping), reply-to banner, emoji/GIF/sticker pickers (all lazy-loaded), file attachment button, scheduled-send (clock picker), unsent-message queue to localStorage on failure, and keyboard shortcut to edit last own message.
  • social.chat.thread-sidebar
    social-web/src/components/social/ThreadSidebar.tsx:1
    Slide-in thread panel for channel message replies. Loads thread history from API, subscribes to real-time APPEND_THREAD_MESSAGE actions, and renders a compact message + reply composer. Closes via CLOSE_THREAD action.

social/friends

2 features
  • social.friends.list
    social-web/src/components/social/FriendsContent.tsx:1
    Friends panel with All / Online / Pending / Blocked tabs. Supports add-friend by username#discriminator, accept/decline incoming requests, remove friends, and open DM directly from the friend entry. Filters by search query.
  • social.friends.request
    social-api/src/routes/friends.rs:12
    Send a friend request to another user — they accept or decline.
    api:POST /api/v1/friends/request
    since 0.1.0

social/layout

1 feature
  • social.layout.root
    social-web/src/components/social/SocialLayout.tsx:1
    Top-level shell that mounts SocialContext provider, bootstraps API data (servers, channels, DMs, friends), wires usePlatformWs and useNotifications, and renders the three-panel layout (ServerBar + ChannelSidebar + main content area) with global search, call overlay, toast, and persona sidebar.

social/messaging

3 features
  • social.dms.create
    social-api/src/routes/dms.rs:14
    Create a 1:1 or group DM channel between two or more users.
    api:POST /api/v1/dms
    since 0.1.0
  • social.messages.search
    social-api/src/routes/messages.rs:13
    Case-insensitive content search within a channel, paged by limit.
    api:GET /api/v1/servers/:server_id/channels/:channel_id/messages/search
    since 0.1.0
  • social.messages.send
    social-api/src/routes/messages.rs:282
    Send a message into a server channel — broadcast over WebSocket to channel subscribers.
    api:POST /api/v1/servers/:server_id/channels/:channel_id/messages
    since 0.1.0

social/moderation

1 feature
  • social.moderation.capability-matrix
    social-web/src/components/social/ModerationCapabilityMatrix.tsx:1
    Static reference matrix that surfaces which chat-moderation capabilities are available on which platform. Replaces the old transient "not supported here" runtime toast with a persistent, scannable table so moderators can see the full support picture at a glance instead of discovering limits by trial.

social/notifications

1 feature
  • social.notifications.push
    social-web/src/hooks/useNotifications.ts:1
    Browser push notification hook. Subscribes to Web Push via service worker, sends subscription to API, and fires desktop notifications + optional sound on incoming messages when the tab is backgrounded or blurred.

social/presence

1 feature
  • social.presence.user-card
    social-web/src/components/social/UserCard.tsx:1
    Hover/click popover showing user avatar, display name, status, custom status text, join date, and shared servers. Actions: send DM, add/remove friend, view full profile. Rendered via portal to escape z-index stacking contexts.

social/realtime

2 features
  • social.realtime.platform-ws
    social-web/src/hooks/usePlatformWs.ts:595
    Realtime WebSocket bridging messages, typing, presence, pins, reactions, calls into the social store.
    hook:usePlatformWs
    since 0.1.0
  • social.realtime.ws
    social-api/src/ws.rs:222
    WebSocket gateway pushing channel events (message, edit, delete, presence) with JWT auth.
    api:WS /ws
    since 0.1.0

social/servers

5 features
  • social.channels.create
    social-api/src/routes/channels.rs:14
    Create a text/voice/announcement channel inside a server.
    api:POST /api/v1/servers/:server_id/channels
    since 0.1.0
  • social.servers.bar
    social-web/src/components/social/ServerBar.tsx:1
    Left-rail server icon strip. Renders server icons with unread badges, supports server folders (drag-to-group), create-server modal, server discovery, and jump-to-DMs. Navigates via Next.js router on server select.
  • social.servers.create
    social-api/src/routes/servers.rs:13
    Create a new server (Discord-like) — owner becomes first member with admin role.
    api:POST /api/v1/servers
    since 0.1.0
  • social.servers.folders
    social-web/src/components/social/ServerFolder.tsx:1
    Collapsible server-folder grouping in the ServerBar. Drag-to-group servers, persist folder structure to localStorage, expand/collapse with animated chevron. Exports useServerFolders hook for folder CRUD.
  • social.servers.settings
    social-web/src/components/social/ServerSettings.tsx:1
    Server management modal with tabs for Overview (name/icon/description), Roles (create/edit/delete RBAC roles), Members (search, kick, ban, role assignment), Invites (create/revoke), Webhooks (create/list), and Danger Zone (delete server).

social/settings

5 features
  • social.settings.appearance
    social-web/src/app/settings/appearance/page.tsx:1
    Appearance settings page. Choose theme (dark/light/system), font size, and message display density (cozy/compact). Persisted via useTheme hook and applied globally via CSS variables through ThemeInitializer.
  • social.settings.notifications
    social-web/src/app/settings/notifications/page.tsx:1
    Notification settings page. Toggle desktop notifications and sound globally, configure email notification categories, and set a per-server notification level (all / mentions / mute) for each server the user is in. Global toggles persist via getNotificationSettings / saveNotificationSettings; email and per-server overrides persist via usePreferences (localStorage + API).
  • social.settings.preferences
    social-web/src/hooks/usePreferences.ts:1
    User preferences hook. Persists voice device IDs, volume, noise suppression, echo cancellation, appearance theme/font-size, and notification toggles to both localStorage and the API for cross-device sync.
  • social.settings.profile
    social-web/src/app/settings/profile/page.tsx:1
    User profile settings page. Edit display name, username, bio, avatar URL, and presence status (online/idle/dnd/invisible). Changes are persisted via API and propagated to the social store on save.
  • social.settings.voice
    social-web/src/app/settings/voice/page.tsx:1
    Voice & audio settings page. Select input/output devices, adjust input volume, toggle noise suppression and echo cancellation, and run a microphone test. Settings persisted to localStorage and synced via usePreferences.

social/state

1 feature
  • social.state.store
    social-web/src/stores/social.ts:1
    Central useReducer-based state store for the entire social UI. Owns all normalized types (SocialUser, SocialServer, SocialChannel, SocialMessage, SocialDm) and the full action set covering messages, threads, pins, reactions, unread tracking, mute, DM/friend mutations, channel reorder, and toasts. Exposed via SocialContext.

social/uploads

1 feature
  • social.upload.file
    social-api/src/routes/upload.rs:166
    Upload an attachment with MIME validation via magic bytes; S3 (MinIO) primary, local-disk fallback.
    api:POST /api/v1/upload
    since 0.1.0

social/voice

2 features
  • social.voice.channel
    social-web/src/hooks/useVoiceChannel.ts:1244
    P2P-mesh WebRTC voice channel with mute/deafen, screen share, webcam, noise suppression.
    hook:useVoiceChannel
    since 0.2.0
  • social.voice.video-grid
    social-web/src/components/social/VideoGrid.tsx:1
    Video tile grid for voice channels. Renders local (screen share / webcam) and remote P2P video streams, adapts layout (1–N tiles), shows mute/deafen badges, speaking-ring highlight, and fullscreen expand per tile.