A unified, enterprise-grade design system powering Aggarly Platform — built for workspace admins, supervisors, educators, workspace members, and students.
Colors, spacing, radius, typography, shadows, z-index. All themeable at runtime via CSS variables.
Opinionated, production-ready layout helpers: stacks, spacing, flex/grid utilities, readability helpers, and docs surfaces.
Enterprise components that compose cleanly: forms, navigation, overlays, feedback, data display. Predictable props. Accessible defaults.
The design system SCSS should be loaded once in the root layout so all tokens, themes, utilities, and components are available everywhere.
// src/app/layout.tsx (or src/app/[locale]/layout.tsx)
import "@/design-system/scss/index.scss";
Prefer importing components from the design system component modules. Keep usage consistent with docs examples.
import { Button } from "@/design-system/components/Button";
import { Card } from "@/design-system/components/Card";
import { InlineNotice } from "@/design-system/components/InlineNotice";
export function Example() {
return (
<Card title="Example" >
<InlineNotice tone="info" title="Tip">
Use tokens + utilities — avoid hard-coded values.
</InlineNotice>
<div className="flex gap-sm flex-wrap">
<Button variant="primary" size="sm">Primary</Button>
<Button variant="ghost" size="sm">Secondary</Button>
</div>
</Card>
);
}
Tokens are defined in a single source file and compiled into CSS variables + SCSS references. After edits, rebuild tokens.
// Edit the SOURCE OF TRUTH:
src/design-system/scss/tokens/source-tokens.ts
// Then regenerate token outputs:
npm run tokens:build
Use this to quickly orient yourself. Most daily work happens in components/ and scss/components/.
E:\aggarly.com\aggarly-frontend\src\design-system
├── arct
│ ├── doc.tree
│ └── tree.sql
├── components
│ ├── data
│ │ ├── AuditLog.tsx
│ │ ├── DataToolbar.tsx
│ │ ├── EmptyState.tsx
│ │ ├── index.ts
│ │ ├── PermissionBadge.tsx
│ │ ├── StatCard.tsx
│ │ ├── StatusDot.tsx
│ │ └── Timeline.tsx
│ ├── form
│ │ ├── Form.tsx
│ │ ├── FormError.tsx
│ │ ├── FormField.tsx
│ │ ├── FormFooter.tsx
│ │ ├── FormHint.tsx
│ │ ├── FormLabel.tsx
│ │ ├── FormRow.tsx
│ │ ├── FormSection.tsx
│ │ └── index.ts
│ ├── Accordion.tsx
│ ├── Alert.tsx
│ ├── Avatar.tsx
│ ├── Badge.tsx
│ ├── Banner.tsx
│ ├── BrandMark.tsx
│ ├── Breadcrumbs.tsx
│ ├── Button.tsx
│ ├── ButtonGroup.tsx
│ ├── Callout.tsx
│ ├── Card.tsx
│ ├── Checkbox.tsx
│ ├── ConfirmDialog.tsx
│ ├── Dropdown.tsx
│ ├── Grid.tsx
│ ├── InlineNotice.tsx
│ ├── Input.tsx
│ ├── List.tsx
│ ├── Loader.tsx
│ ├── Modal.tsx
│ ├── Navbar.tsx
│ ├── Offcanvas.tsx
│ ├── Pagination.tsx
│ ├── Pill.tsx
│ ├── Popover.tsx
│ ├── Progress.tsx
│ ├── Radio.tsx
│ ├── Ribbon.tsx
│ ├── Select.tsx
│ ├── Spinner.tsx
│ ├── Stepper.tsx
│ ├── Switch.tsx
│ ├── Tabs.tsx
│ ├── Toast.tsx
│ └── Tooltip.tsx
├── hooks
│ ├── useDirection.ts
│ └── useTheme.ts
├── scss
│ ├── base
│ │ ├── index.scss
│ │ ├── _globals.scss
│ │ ├── _reset.scss
│ │ └── _typography.scss
│ ├── components
│ │ ├── index.scss
│ │ ├── _accordion.scss
│ │ ├── _alert.scss
│ │ ├── _avatar.scss
│ │ ├── _badge.scss
│ │ ├── _banner.scss
│ │ ├── _brandmark.scss
│ │ ├── _breadcrumbs.scss
│ │ ├── _button-group.scss
│ │ ├── _button.scss
│ │ ├── _callout.scss
│ │ ├── _card.scss
│ │ ├── _checkbox.scss
│ │ ├── _confirm-dialog.scss
│ │ ├── _data.scss
│ │ ├── _docs.scss
│ │ ├── _dropdown.scss
│ │ ├── _form.scss
│ │ ├── _grid.scss
│ │ ├── _inline-notice.scss
│ │ ├── _input.scss
│ │ ├── _list.scss
│ │ ├── _loader.scss
│ │ ├── _modal.scss
│ │ ├── _navbar.scss
│ │ ├── _offcanvas.scss
│ │ ├── _pagination.scss
│ │ ├── _pill.scss
│ │ ├── _popover.scss
│ │ ├── _progress.scss
│ │ ├── _radio.scss
│ │ ├── _ribbon.scss
│ │ ├── _select.scss
│ │ ├── _sessions-premium.scss
│ │ ├── _sidebar.scss
│ │ ├── _spinner.scss
│ │ ├── _stepper.scss
│ │ ├── _switch.scss
│ │ ├── _table.scss
│ │ ├── _tabs.scss
│ │ ├── _theme-preview.scss
│ │ ├── _toast.scss
│ │ ├── _token-grid.scss
│ │ ├── _tooltip.scss
│ │ └── _topbar.scss
│ ├── mixins
│ │ ├── index.scss
│ │ ├── _breakpoints.scss
│ │ ├── _glass.scss
│ │ ├── _gradient.scss
│ │ ├── _helpers.scss
│ │ ├── _hover.scss
│ │ ├── _rtl.scss
│ │ └── _theme.scss
│ ├── pages
│ │ └── _landing.scss
│ ├── themes
│ │ ├── index.scss
│ │ ├── _dark.scss
│ │ └── _light.scss
│ ├── tokens
│ │ ├── index.scss
│ │ ├── source-tokens.ts
│ │ ├── _colors.scss
│ │ ├── _radius.scss
│ │ ├── _shadows.scss
│ │ ├── _spacing.scss
│ │ ├── _typography.scss
│ │ └── _zindex.scss
│ ├── utilities
│ │ ├── index.scss
│ │ ├── _animations.scss
│ │ ├── _flex.scss
│ │ ├── _grid.scss
│ │ ├── _helpers.scss
│ │ ├── _layout.scss
│ │ ├── _lists.scss
│ │ └── _spacing.scss
│ └── index.scss
├── types
│ └── theme.ts
├── index.ts
└── README.md
// 1) Component implementation
src/design-system/components/MyComponent.tsx
// 2) Component styling
src/design-system/scss/components/_my-component.scss
// 3) Export SCSS (components index)
src/design-system/scss/components/index.scss
@forward "./my-component";
// 4) Export TS component
src/design-system/components/index.ts
export * from "./MyComponent";
// 5) Add docs page
src/app/[locale]/docs/components/my-component/page.tsx
Interfaces remain readable and low-noise. Visual hierarchy comes from spacing, typography, and restrained emphasis—not heavy ornamentation.
Components are built to support progress tracking, mastery, audits, and accountability patterns.
Tokens define visual decisions. Utilities encode layout patterns. Components compose those decisions into repeatable UI primitives.