Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/admin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Admin App

Platform administration surface for operators.

Planned responsibilities:
- Channels, model metadata, users, redemption codes, subscription plan management
- System settings and platform operations
- Admin-only workflows under `/admin`

10 changes: 10 additions & 0 deletions apps/chat/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Chat App

Low-technical-skill multimodal chat experience for end users.

Planned responsibilities:
- Conversation workspace under `/chat`
- Model selection based on the same model availability as the API console
- Persisted conversations, messages, files, and multimodal artifacts
- Chat-oriented subscription and package presentation

9 changes: 9 additions & 0 deletions apps/console/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Console App

User-facing API console for developers and API customers.

Planned responsibilities:
- API keys, usage logs, wallet, profile, and developer-oriented billing views
- API documentation and testing surfaces
- Pay-as-you-go usage presentation

9 changes: 9 additions & 0 deletions apps/portal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Portal App

Public landing and authentication surface for the platform.

Planned responsibilities:
- Public entry page at `/`
- Sign in, sign up, password recovery, and OAuth callback pages
- Routing users into Chat or Console after authentication

4 changes: 4 additions & 0 deletions packages/shared-api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Shared API

Shared frontend API client helpers and endpoint contracts.

4 changes: 4 additions & 0 deletions packages/shared-auth/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Shared Auth

Shared authentication shell and helpers for portal, chat, console, and admin apps.

4 changes: 4 additions & 0 deletions packages/shared-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Shared Config

Shared route, product, and runtime configuration constants.

4 changes: 4 additions & 0 deletions packages/shared-types/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Shared Types

Shared TypeScript domain types for user, billing, model, log, and chat entities.

4 changes: 4 additions & 0 deletions packages/shared-ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Shared UI

Shared UI primitives and cross-app layout elements.

Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function MobileUserProfile({ user, onNavigate }: MobileUserProfileProps) {

{/* Navigation links - same style as top nav */}
<Link
to='/profile'
to='/console/profile'
onClick={onNavigate}
className='text-primary/60 hover:text-primary/80 border-border flex items-center gap-2.5 border-b p-2.5 transition-colors'
>
Expand All @@ -121,7 +121,7 @@ function MobileUserProfile({ user, onNavigate }: MobileUserProfileProps) {
</Link>

<Link
to='/wallet'
to='/console/wallet'
onClick={onNavigate}
className='text-primary/60 hover:text-primary/80 border-border flex items-center gap-2.5 border-b p-2.5 transition-colors'
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,11 @@ export function PublicHeader(props: PublicHeaderProps) {
>
{showAuthButtons && (
<Link
to={isAuthenticated ? '/dashboard' : '/sign-in'}
to={isAuthenticated ? '/console' : '/sign-in'}
onClick={() => setMobileOpen(false)}
className='bg-foreground text-background inline-flex h-10 items-center justify-center rounded-lg text-sm font-medium transition-opacity hover:opacity-90 active:opacity-80'
>
{isAuthenticated ? t('Go to Dashboard') : t('Sign in')}
{isAuthenticated ? t('Open API Console') : t('Sign in')}
</Link>
)}
</div>
Expand Down
164 changes: 164 additions & 0 deletions web/default/src/components/layout/config/platform-nav.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
/*
Copyright (C) 2023-2026 QuantumNous

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

For commercial licensing, please contact support@quantumnous.com
*/
import type { TFunction } from 'i18next'
import {
Activity,
Box,
CreditCard,
FileText,
FlaskConical,
Key,
LayoutDashboard,
ListTodo,
MessageSquare,
Radio,
Settings,
Ticket,
User,
Users,
Wallet,
} from 'lucide-react'
import { PLATFORM_ROUTES } from '@/lib/platform-routes'
import type { NavGroup } from '../types'

export function getConsoleNavGroups(t: TFunction): NavGroup[] {
return [
{
id: 'console',
title: t('API Console'),
items: [
{
title: t('Playground'),
url: '/console/playground',
icon: FlaskConical,
},
{
title: t('Overview'),
url: '/console/dashboard/overview',
icon: Activity,
},
{
title: t('Dashboard'),
url: '/console/dashboard/models',
icon: LayoutDashboard,
},
{
title: t('API Keys'),
url: '/console/keys',
icon: Key,
},
{
title: t('Usage Logs'),
url: '/console/usage-logs/common',
icon: FileText,
},
{
title: t('Task Logs'),
url: '/console/usage-logs/task',
activeUrls: ['/console/usage-logs/drawing'],
configUrls: [
'/console/usage-logs/drawing',
'/console/usage-logs/task',
],
icon: ListTodo,
},
],
},
{
id: 'personal',
title: t('Personal'),
items: [
{
title: t('Wallet'),
url: '/console/wallet',
icon: Wallet,
},
{
title: t('Profile'),
url: '/console/profile',
icon: User,
},
],
},
]
}

export function getAdminNavGroups(t: TFunction): NavGroup[] {
return [
{
id: 'admin',
title: t('Admin'),
items: [
{
title: t('Channels'),
url: '/admin/channels',
icon: Radio,
},
{
title: t('Models'),
url: '/admin/models/metadata',
icon: Box,
},
{
title: t('Users'),
url: '/admin/users',
icon: Users,
},
{
title: t('Redemption Codes'),
url: '/admin/redemption-codes',
icon: Ticket,
},
{
title: t('Subscription Management'),
url: '/admin/subscriptions',
icon: CreditCard,
},
{
title: t('System Settings'),
url: '/admin/system-settings/site',
activeUrls: ['/admin/system-settings'],
icon: Settings,
},
],
},
]
}

export function getChatNavGroups(t: TFunction): NavGroup[] {
return [
{
id: 'chat',
title: t('Chat'),
items: [
{
title: t('Chat Workspace'),
url: PLATFORM_ROUTES.chat,
icon: MessageSquare,
},
{
title: t('API Console'),
url: PLATFORM_ROUTES.console,
icon: Key,
},
],
},
]
}

28 changes: 27 additions & 1 deletion web/default/src/components/layout/lib/workspace-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { type TFunction } from 'i18next'
import {
getAdminNavGroups,
getChatNavGroups,
getConsoleNavGroups,
} from '../config/platform-nav.config'
import {
getSystemSettingsNavGroups,
WORKSPACE_SYSTEM_SETTINGS_ID,
Expand All @@ -25,6 +30,9 @@ import type { NavGroup } from '../types'

export const WORKSPACE_IDS = {
SYSTEM_SETTINGS: WORKSPACE_SYSTEM_SETTINGS_ID,
ADMIN: 'admin',
CHAT: 'chat',
CONSOLE: 'console',
DEFAULT: 'default',
} as const

Expand Down Expand Up @@ -64,9 +72,27 @@ const workspaceRegistry: WorkspaceConfig[] = [
{
id: WORKSPACE_IDS.SYSTEM_SETTINGS,
name: 'System Settings',
pathPattern: /^\/system-settings/,
pathPattern: /^\/admin\/system-settings/,
getNavGroups: getSystemSettingsNavGroups,
},
{
id: WORKSPACE_IDS.ADMIN,
name: 'Admin',
pathPattern: /^\/admin/,
getNavGroups: getAdminNavGroups,
},
{
id: WORKSPACE_IDS.CHAT,
name: 'Chat',
pathPattern: /^\/chat/,
getNavGroups: getChatNavGroups,
},
{
id: WORKSPACE_IDS.CONSOLE,
name: 'Console',
pathPattern: /^\/console/,
getNavGroups: getConsoleNavGroups,
},
// Default workspace (must be last)
{
id: WORKSPACE_IDS.DEFAULT,
Expand Down
6 changes: 3 additions & 3 deletions web/default/src/components/profile-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ export function ProfileDropdown() {

<DropdownMenuSeparator />

<DropdownMenuItem onClick={() => navigate({ to: '/profile' })}>
<DropdownMenuItem onClick={() => navigate({ to: '/console/profile' })}>
<User className='size-4' />
{t('Profile')}
</DropdownMenuItem>

<DropdownMenuItem onClick={() => navigate({ to: '/wallet' })}>
<DropdownMenuItem onClick={() => navigate({ to: '/console/wallet' })}>
<Wallet className='size-4' />
{t('Wallet')}
</DropdownMenuItem>
Expand All @@ -113,7 +113,7 @@ export function ProfileDropdown() {
<DropdownMenuItem
onClick={() =>
navigate({
to: '/system-settings/site/$section',
to: '/admin/system-settings/site/$section',
params: { section: 'system-info' },
})
}
Expand Down
2 changes: 1 addition & 1 deletion web/default/src/features/auth/hooks/use-auth-redirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function useAuthRedirect() {
}

// Navigate to target page
const targetPath = redirectTo || '/dashboard'
const targetPath = redirectTo || '/console'
navigate({ to: targetPath, replace: true })
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ export function useChannelsColumns(): ColumnDef<Channel>[] {
onClick={(e) => {
e.stopPropagation()
if (!deploymentId) return
const targetUrl = `/models/deployments?dFilter=${encodeURIComponent(String(deploymentId))}`
const targetUrl = `/admin/models/deployments?dFilter=${encodeURIComponent(String(deploymentId))}`
window.open(targetUrl, '_blank', 'noopener')
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import { useChannelsColumns } from './channels-columns'
import { useChannels } from './channels-provider'
import { DataTableBulkActions } from './data-table-bulk-actions'

const route = getRouteApi('/_authenticated/channels/')
const route = getRouteApi('/_authenticated/admin/channels/')

const CHANNEL_SORTABLE_COLUMNS = new Set<ChannelSortBy>([
'id',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,10 @@ function FailureStatusContent({
size='sm'
className='h-7 w-fit px-2 text-xs'
onClick={() =>
window.open('/system-settings/billing/model-pricing', '_blank')
window.open(
'/admin/system-settings/billing/model-pricing',
'_blank'
)
}
>
<Settings className='mr-1 h-3 w-3 shrink-0' />
Expand Down
Loading
Loading