Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
dcc92f6
chore(admin): migrate SDK admin and host app to Apsara v1 (rc.6)
paanSinghCoder May 12, 2026
c4beddf
Merge branch 'main' into chore/sdk-admin-apsara-v1
paanSinghCoder May 12, 2026
9f95dc3
Merge branch 'main' into chore/sdk-admin-apsara-v1
paanSinghCoder May 13, 2026
2cecb30
fix(admin): drop dead .select-value width:100% override (CLD-3131)
paanSinghCoder May 13, 2026
756a9fe
fix(admin): keep multiselect Checkbox visual-only to avoid double-tog…
paanSinghCoder May 13, 2026
3a28d51
fix(admin): add gap between search and Add Members in project members…
paanSinghCoder May 13, 2026
89cb1c5
fix(admin): drop overlay z-index override so nested Assign Role dialo…
paanSinghCoder May 13, 2026
7e6601c
refactor(admin): update Apsara package references from v1 to v1.0.0-r…
paanSinghCoder May 15, 2026
2a2b9b2
fix(admin): replace Text component with Button for organization ID na…
paanSinghCoder May 15, 2026
92d3ef5
Merge branch 'main' into chore/sdk-admin-apsara-v1
paanSinghCoder May 18, 2026
d4ef801
feat(admin-ui): unify page header height and surface icon prop on Vie…
paanSinghCoder May 19, 2026
7a0339e
refactor(admin-ui): replace always-open Drawer pattern with controlle…
paanSinghCoder May 19, 2026
b1541db
refactor(admin): replace MultiSelect component with Select for improv…
paanSinghCoder May 19, 2026
5406fb7
style(admin): update padding in PageHeader component for improved lay…
paanSinghCoder May 19, 2026
3a89613
style(admin): add custom class to Sidebar main for improved styling
paanSinghCoder May 19, 2026
75de5f5
style(admin): refine sidebar class for improved styling hierarchy
paanSinghCoder May 19, 2026
e68b4b3
Merge branch 'main' into chore/sdk-admin-apsara-v1
paanSinghCoder May 19, 2026
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
1 change: 1 addition & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ WORKDIR /app

COPY Makefile .
COPY web ./web
ENV CI=true
RUN make admin-app

# Build the Go binary
Expand Down
64 changes: 34 additions & 30 deletions docker-compose.yml
Comment thread
paanSinghCoder marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -49,35 +49,31 @@ services:
- FRONTIER_SPICEDB_HOST=spicedb
- FRONTIER_SPICEDB_PRE_SHARED_KEY=frontier

frontier:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "8002:8002" # connect endpoint
- "8083:8083" # ui
- "9000:9000" # metrics
command: ["server", "start"]
restart: on-failure
depends_on:
pg:
condition: service_healthy
frontier-migrate:
condition: service_completed_successfully
spicedb:
condition: service_healthy
environment:
- FRONTIER_DB_DRIVER=postgres
- FRONTIER_DB_URL=postgres://frontier:@pg:5432/frontier?sslmode=disable
- FRONTIER_SPICEDB_PORT=50051
- FRONTIER_SPICEDB_HOST=spicedb
- FRONTIER_SPICEDB_PRE_SHARED_KEY=frontier
- FRONTIER_APP_RESOURCES_CONFIG_PATH=file:///opt
- FRONTIER_UI_PORT=8083
- FRONTIER_AUTHENTICATION_SESSION_HEADERS_CLIENT_IP=x-forwarded-for
- FRONTIER_AUTHENTICATION_SESSION_HEADERS_CLIENT_COUNTRY=x-frontier-country
- FRONTIER_AUTHENTICATION_SESSION_HEADERS_CLIENT_CITY=x-frontier-city
- FRONTIER_AUTHENTICATION_SESSION_HEADERS_CLIENT_USER_AGENT=User-Agent
# frontier:
# build:
# context: .
# dockerfile: Dockerfile.dev
# ports:
# - "8081:8080" # rest endpoint
# - "8082:8081" # grpc endpoint
# - "8083:8083" # ui
# command: ["server", "start"]
# restart: on-failure
# depends_on:
# pg:
# condition: service_healthy
# frontier-migrate:
# condition: service_completed_successfully
# spicedb:
# condition: service_healthy
# environment:
# - FRONTIER_DB_DRIVER=postgres
# - FRONTIER_DB_URL=postgres://frontier:@pg:5432/frontier?sslmode=disable
# - FRONTIER_SPICEDB_PORT=50051
# - FRONTIER_SPICEDB_HOST=spicedb
# - FRONTIER_SPICEDB_PRE_SHARED_KEY=frontier
# - FRONTIER_APP_RESOURCES_CONFIG_PATH=file:///opt
# - FRONTIER_UI_PORT=8083
# - FRONTIER_APP_MAILER_SMTP_HOST=sandbox.smtp.mailtrap.io
# - FRONTIER_APP_MAILER_SMTP_PORT=2525
# - FRONTIER_APP_MAILER_SMTP_USERNAME=
Expand Down Expand Up @@ -119,4 +115,12 @@ services:
pg2:
condition: service_healthy
spicedb-repair:
condition: service_completed_successfully
condition: service_completed_successfully

# sdk:
# build:
# context: ./sdks/js/packages/sdk-demo
# ports:
# - "3000:3000"
# environment:
# - FRONTIER_ENDPOINT=http://frontier:8080
3 changes: 1 addition & 2 deletions web/apps/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@hookform/resolvers": "^3.0.1",
"@radix-ui/react-form": "^0.1.8",
"@radix-ui/react-icons": "^1.3.0",
"@raystack/apsara": "0.56.6",
"@raystack/apsara": "1.0.0-rc.6",
"@raystack/frontier": "workspace:^",
"@raystack/proton": "0.1.0-859ba765e6cfd44736ddcf42664b742fe7fd916e",
"@stitches/react": "^1.2.8",
Expand All @@ -37,7 +37,6 @@
"react-router-dom": "^6.9.0",
"react-select": "^5.8.0",
"slugify": "^1.6.6",
"sonner": "^1.4.41",
"swr": "^2.1.2",
"usehooks-ts": "^3.1.1",
"vite-tsconfig-paths": "^4.0.7",
Expand Down
2 changes: 1 addition & 1 deletion web/apps/admin/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Flex } from "@raystack/apsara";
import { Outlet } from "react-router-dom";
import "@raystack/apsara/style.css";
import "@raystack/apsara/normalize.css";
import "@raystack/apsara/style.css";
import "./App.css";
import IAMSidebar from "./components/Sidebar";

Expand Down
44 changes: 23 additions & 21 deletions web/apps/admin/src/components/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type React from "react";
import { useContext } from "react";
import {
Avatar,
DropdownMenu,
Menu,
Flex,
Sidebar,
Text,
Expand Down Expand Up @@ -144,7 +144,7 @@ export default function IAMSidebar() {
{BRAND_NAME}
</Text>
</Sidebar.Header>
<Sidebar.Main>
<Sidebar.Main className={styles["sidebar-main"]}>
{navigationItems.map(nav => {
return nav?.subItems?.length ? (
<Sidebar.Group
Expand All @@ -157,7 +157,7 @@ export default function IAMSidebar() {
key={subItem.name}
active={isActive(subItem.to)}
data-test-id={`admin-sidebar-navigation-cell-${subItem.name}`}
as={<Link to={subItem?.to ?? ""} />}>
render={<Link to={subItem?.to ?? ""} />}>
{subItem.name}
</Sidebar.Item>
))}
Expand All @@ -168,7 +168,7 @@ export default function IAMSidebar() {
key={nav.name}
active={isActive(nav.to)}
data-test-id={`admin-sidebar-navigation-cell-${nav.name}`}
as={<Link to={nav?.to ?? ""} />}>
render={<Link to={nav?.to ?? ""} />}>
{nav.name}
</Sidebar.Item>
);
Expand Down Expand Up @@ -207,28 +207,30 @@ function UserDropdown() {
: { icon: <SunIcon />, label: "Light" };

return (
<DropdownMenu placement="top">
<DropdownMenu.Trigger asChild>
<Sidebar.Item
leadingIcon={
<Avatar src={user?.avatar} fallback={userInital} size={3} />
}
data-test-id="frontier-sdk-sidebar-logout">
{user?.email}
</Sidebar.Item>
</DropdownMenu.Trigger>
<DropdownMenu.Content>
<DropdownMenu.Item
<Menu>
<Menu.Trigger
render={
<Sidebar.Item
leadingIcon={
<Avatar src={user?.avatar} fallback={userInital} size={3} />
Comment thread
Shreyag02 marked this conversation as resolved.
}
data-test-id="frontier-sdk-sidebar-logout">
{user?.email}
</Sidebar.Item>
}
/>
<Menu.Content side="top">
<Menu.Item
onClick={toggleTheme}
data-test-id="admin-toggle-theme">
{themeData.icon} {themeData.label}
</DropdownMenu.Item>
<DropdownMenu.Item
</Menu.Item>
<Menu.Item
onClick={() => logoutMutation.mutate({})}
data-test-id="admin-logout-btn">
Logout
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu>
</Menu.Item>
</Menu.Content>
</Menu>
);
}
4 changes: 4 additions & 0 deletions web/apps/admin/src/components/Sidebar/sidebar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
width: 220px !important;
}

.sidebar .sidebar-main {
gap: var(--rs-space-1);
}

.sidebar-group {
margin-top: var(--rs-space-5);
}
28 changes: 15 additions & 13 deletions web/apps/admin/src/components/assign-role.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Flex,
Label,
Text,
toast,
toastManager,
} from "@raystack/apsara";
import { useCallback } from "react";
import type {
Expand Down Expand Up @@ -139,9 +139,9 @@ export const AssignRole = ({
onRoleUpdate();
}

toast.success("Role assigned successfully");
toastManager.add({ title: "Role assigned successfully", type: "success" });
} catch (error) {
toast.error("Failed to assign role");
toastManager.add({ title: "Failed to assign role", type: "error" });
console.error(error);
}
};
Expand Down Expand Up @@ -187,16 +187,18 @@ export const AssignRole = ({
</Flex>
</Dialog.Body>
<Dialog.Footer>
<Dialog.Close asChild>
<Button
type="button"
variant="outline"
color="neutral"
data-test-id="assign-role-cancel-button"
>
Cancel
</Button>
</Dialog.Close>
<Dialog.Close
render={
<Button
type="button"
variant="outline"
color="neutral"
data-test-id="assign-role-cancel-button"
>
Cancel
</Button>
}
/>
<Button
type="submit"
data-test-id="assign-role-update-button"
Expand Down
2 changes: 1 addition & 1 deletion web/apps/admin/src/components/dialog/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function DialogHeader({ title }: DialogHeaderProps) {
align="center"
style={{ padding: "16px 32px", width: "98%", height: "52px" }}
>
<Text style={{ fontSize: "14px", fontWeight: "500" }}>{title}</Text>
<Text size="regular" weight="medium">{title}</Text>
<Image alt="share-image" src="/share.svg" />
</Flex>
);
Expand Down
10 changes: 5 additions & 5 deletions web/apps/admin/src/components/page-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ export default function PageHeader({
style={{ padding: "16px 24px", ...style }}
{...props}
>
<Flex align="center" gap="medium">
<Flex align="center" gap="small" className={styles.breadcrumb}>
<Text style={{ fontSize: "14px", fontWeight: "500" }}>{title}</Text>
<Flex align="center" gap={5}>
<Flex align="center" gap={3} className={styles.breadcrumb}>
<Text size="regular" weight="medium">{title}</Text>
{breadcrumb.map((item) => (
<Link
key={item.name}
to={item?.href ?? ""}
style={{ display: "flex", flexDirection: "row", gap: "8px" }}
>
<Flex align="center">
<Text size={1}>{item.name}</Text>
<Text size="mini">{item.name}</Text>
</Flex>
</Link>
))}
</Flex>
</Flex>
<Flex gap="small">{children}</Flex>
<Flex gap={3}>{children}</Flex>
</Flex>
);
}
2 changes: 1 addition & 1 deletion web/apps/admin/src/components/sheet/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type SheetHeaderProps = {
export function SheetHeader({ title, onClick }: SheetHeaderProps) {
return (
<Flex justify="between" style={styles.header}>
<Text size={4} style={{ fontWeight: "500" }}>
<Text size="regular" weight="medium">
{title}
</Text>
<Cross1Icon
Expand Down
6 changes: 3 additions & 3 deletions web/apps/admin/src/containers/login.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { Box, Flex, Image } from "@raystack/apsara";
import { Header, MagicLink } from "@raystack/frontier/react";
import { AuthHeader, MagicLinkView } from "@raystack/frontier/client";
import { useContext } from "react";
import PageTitle from "~/components/page-title";
import { AppContext } from "~/contexts/App";
Expand All @@ -26,7 +26,7 @@ export default function Login() {
}}
>
<Flex direction="column" gap={5} style={{ width: "100%" }}>
<Header
<AuthHeader
logo={
config?.logo ? (
<Image
Expand All @@ -42,7 +42,7 @@ export default function Login() {
}
title={`Login to ${config?.title || defaultConfig.title}`}
/>
<MagicLink open />
<MagicLinkView open inline />
</Flex>
</Flex>
</Box>
Expand Down
4 changes: 2 additions & 2 deletions web/apps/admin/src/containers/magiclink.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { Flex, Image } from "@raystack/apsara";
import { MagicLinkVerify } from "@raystack/frontier/react";
import { MagicLinkVerifyView } from "@raystack/frontier/client";
import IAMIcon from "~/assets/icons/iam.svg?react";
import { AppContext } from "~/contexts/App";
import { useContext } from "react";
Expand All @@ -15,7 +15,7 @@ export default function MagicLink() {
justify="center"
style={{ height: "100vh", textAlign: "center" }}
>
<MagicLinkVerify
<MagicLinkVerifyView
logo={
config?.logo ? (
<Image
Expand Down
2 changes: 1 addition & 1 deletion web/apps/admin/src/layout/auth.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FrontierProvider } from "@raystack/frontier/react";
import { FrontierProvider } from "@raystack/frontier/client";
import { Outlet } from "react-router-dom";
import { frontierConfig } from "~/configs/frontier";
import { themeConfig } from "~/configs/theme";
Expand Down
11 changes: 6 additions & 5 deletions web/apps/admin/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ThemeProvider, ToastContainer } from "@raystack/apsara";
import { ThemeProvider, Toast } from "@raystack/apsara";
import { SkeletonTheme } from "react-loading-skeleton";
import React from "react";
import ReactDOM from "react-dom/client";
Expand All @@ -20,10 +20,11 @@ ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
baseColor="var(--rs-color-background-base-primary-hover)"
>
<ConnectProvider>
<AppContextProvider>
<Routes />
</AppContextProvider>
<ToastContainer richColors />
<Toast.Provider>
<AppContextProvider>
<Routes />
</AppContextProvider>
</Toast.Provider>
</ConnectProvider>
</SkeletonTheme>
</ThemeProvider>
Expand Down
2 changes: 2 additions & 0 deletions web/apps/admin/src/pages/admins/AdminsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AdminsView, useAdminPaths } from "@raystack/frontier/admin";
import { useNavigate } from "react-router-dom";
import AdminsIcon from "~/assets/icons/admins.svg?react";

export function AdminsPage() {
const navigate = useNavigate();
Expand All @@ -8,6 +9,7 @@ export function AdminsPage() {
return (
<AdminsView
onNavigateToOrg={(orgId: string) => navigate(`/${paths.organizations}/${orgId}`)}
icon={<AdminsIcon />}
/>
);
}
Loading
Loading