Skip to content
Merged
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
36 changes: 36 additions & 0 deletions .devcontainer/compose.devcontainer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
services:
ghost-dev:
# Mount the full repo so VS Code can edit apps/, e2e/, and root config files.
# The original ./ghost:/home/ghost/ghost mount from compose.dev.yaml is
# preserved via merge semantics so nodemon hot-reload still works for anyone
# running the backend the original way.
volumes:
- ./:/workspaces/Ghost:cached
# Override the default `pnpm dev` command. VS Code controls startup and the
# user runs backend/frontend dev servers as tasks (see .vscode/tasks.json).
command: ["sleep", "infinity"]
working_dir: /workspaces/Ghost
# The baseline healthcheck in compose.dev.yaml hits Ghost on :2368, but in
# the devcontainer Ghost isn't running until the user starts the dev task.
# Replace with a trivial check so the gateway's depends_on doesn't time out.
healthcheck:
test: ["CMD", "true"]
interval: 5s
timeout: 2s
retries: 1
start_period: 0s

ghost-dev-gateway:
# Point Caddy at the dev servers running inside the ghost-dev container
# instead of host.docker.internal (which is the default for the hybrid
# host/container dev setup).
environment:
GHOST_BACKEND: ghost-dev:2368
ADMIN_DEV_SERVER: ghost-dev:5174
ADMIN_LIVE_RELOAD_SERVER: ghost-dev:4200
PORTAL_DEV_SERVER: ghost-dev:4175
COMMENTS_DEV_SERVER: ghost-dev:7173
SIGNUP_DEV_SERVER: ghost-dev:6174
SEARCH_DEV_SERVER: ghost-dev:4178
ANNOUNCEMENT_DEV_SERVER: ghost-dev:4177
LEXICAL_DEV_SERVER: ghost-dev:4173
60 changes: 60 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "Ghost",
"dockerComposeFile": [
"../compose.dev.yaml",
"compose.devcontainer.yaml"
],
"service": "ghost-dev",
"workspaceFolder": "/workspaces/Ghost",
"shutdownAction": "stopCompose",
"remoteUser": "root",

// Codespaces prebuild step — runs once when the image is built.
// Primes the pnpm store so first-open is fast.
"onCreateCommand": "corepack enable && corepack prepare --activate && cd /workspaces/Ghost && pnpm install --prefer-offline || true",

// Runs after the workspace mount is ready on every container create.
"postCreateCommand": ".devcontainer/postCreate.sh",

"forwardPorts": [
2368,
3306,
6379,
1025,
8025,
5174,
4200,
4175,
7173,
6174,
4178,
4177,
4173
],
"portsAttributes": {
"2368": {"label": "Ghost (via gateway)", "onAutoForward": "notify"},
"3306": {"label": "MySQL"},
"6379": {"label": "Redis"},
"1025": {"label": "Mailpit SMTP"},
"8025": {"label": "Mailpit Web"},
"5174": {"label": "Admin (Vite)"},
"4200": {"label": "Ember live-reload"},
"4175": {"label": "Portal"},
"7173": {"label": "Comments UI"},
"6174": {"label": "Signup Form"},
"4178": {"label": "Sodo Search"},
"4177": {"label": "Announcement Bar"},
"4173": {"label": "Koenig Lexical"}
},

"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"bradlc.vscode-tailwindcss",
"ms-playwright.playwright",
"editorconfig.editorconfig"
]
}
}
}
11 changes: 11 additions & 0 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail

cd /workspaces/Ghost

corepack enable
corepack prepare --activate

git submodule update --init --recursive

pnpm install --prefer-offline
4 changes: 2 additions & 2 deletions apps/admin-x-design-system/.storybook/adminx-theme.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {create} from '@storybook/theming/create';
import {create} from 'storybook/theming/create';

export default create({
base: 'light',
Expand Down Expand Up @@ -35,4 +35,4 @@ export default create({
inputBorder: '#15171A',
inputTextColor: '#15171A',
inputBorderRadius: 2,
});
});
26 changes: 15 additions & 11 deletions apps/admin-x-design-system/.storybook/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,27 @@ const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
{
name: '@storybook/addon-styling',
},
name: "@storybook/addon-docs",
options: {
mdxPluginOptions: {
mdxCompileOptions: {
providerImportSource: "@storybook/addon-docs/mdx-react-shim"
}
}
}
}
],
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: "tag",
},
async viteFinal(config, options) {
config.resolve!.alias = {
crypto: require.resolve('rollup-plugin-node-builtins')
}
async viteFinal(config) {
config.resolve = config.resolve ?? {};
config.build = config.build ?? {};
config.build.rollupOptions = config.build.rollupOptions ?? {};

delete config.build.rollupOptions.external;
return config;
}
};
Expand Down
4 changes: 2 additions & 2 deletions apps/admin-x-design-system/.storybook/manager.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {addons} from '@storybook/manager-api';
import {addons} from 'storybook/manager-api';
import adminxTheme from './adminx-theme';

addons.setConfig({
theme: adminxTheme
});
});
2 changes: 1 addition & 1 deletion apps/admin-x-design-system/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import '../styles.css';
import './storybook.css';

import type { Preview } from "@storybook/react";
import type { Preview } from "@storybook/react-vite";
import DesignSystemProvider from '../src/providers/design-system-provider';
import adminxTheme from './adminx-theme';

Expand Down
14 changes: 4 additions & 10 deletions apps/admin-x-design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,9 @@
"@codemirror/state": "6.6.0",
"@dnd-kit/utilities": "^3.2.2",
"@radix-ui/react-tooltip": "1.2.8",
"@storybook/addon-essentials": "8.6.14",
"@storybook/addon-interactions": "8.6.14",
"@storybook/addon-links": "8.6.14",
"@storybook/addon-styling": "1.3.7",
"@storybook/blocks": "8.6.14",
"@storybook/preview-api": "^8.6.14",
"@storybook/react": "8.6.14",
"@storybook/react-vite": "8.6.14",
"@storybook/testing-library": "0.2.2",
"@storybook/addon-docs": "10.3.5",
"@storybook/addon-links": "10.3.5",
"@storybook/react-vite": "10.3.5",
"@tailwindcss/postcss": "4.2.1",
"@testing-library/react": "14.3.1",
"@testing-library/react-hooks": "8.0.1",
Expand All @@ -62,7 +56,7 @@
"react-dom": "18.3.1",
"rollup-plugin-node-builtins": "2.1.2",
"sinon": "18.0.1",
"storybook": "8.6.15",
"storybook": "10.3.5",
"tailwindcss": "4.2.1",
"typescript": "5.9.3",
"validator": "13.12.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/admin-x-design-system/src/boilerplate.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import BoilerPlate from './boilerplate';

Expand Down
2 changes: 1 addition & 1 deletion apps/admin-x-design-system/src/docs/Colors.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, ColorPalette, ColorItem } from '@storybook/blocks';
import { Meta, ColorPalette, ColorItem } from '@storybook/addon-docs/blocks';


<Meta title="Foundations / Colors" />
Expand Down
2 changes: 1 addition & 1 deletion apps/admin-x-design-system/src/docs/ErrorHandling.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import SBLocalError from './assets/local-error-example.png';
import SBPageError from './assets/page-error-example.png';
import SBGlobalError from './assets/global-error-example.png';
Expand Down
2 changes: 1 addition & 1 deletion apps/admin-x-design-system/src/docs/Icons.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import StreamlineSettings from './assets/streamline-settings.png';

<Meta title="Foundations / Icons" />
Expand Down
2 changes: 1 addition & 1 deletion apps/admin-x-design-system/src/docs/Layout.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import SBPageViewContainer from './assets/page-viewcontainer.png';

<Meta title="Foundations / Layout" />
Expand Down
2 changes: 1 addition & 1 deletion apps/admin-x-design-system/src/docs/Welcome.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import WelcomeImage from './assets/adminx-screenshot.png';
import BlocksIcon from './assets/blocks.svg';
import CircleMenu from './assets/circle-menu.svg';
Expand Down
2 changes: 1 addition & 1 deletion apps/admin-x-design-system/src/global/avatar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import Avatar from './avatar';

Expand Down
2 changes: 1 addition & 1 deletion apps/admin-x-design-system/src/global/banner.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import Banner from './banner';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import Breadcrumbs from './breadcrumbs';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import ButtonGroup from './button-group';
import {ButtonProps} from './button';
Expand Down
2 changes: 1 addition & 1 deletion apps/admin-x-design-system/src/global/button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import Button from './button';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import Button from '../button';
import ButtonGroup from '../button-group';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ReactNode} from 'react';
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import DesktopChrome from './desktop-chrome';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ReactNode} from 'react';
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import MobileChrome from './mobile-chrome';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ErrorBoundary from './error-boundary';
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

const meta = {
title: 'Global / Error Boundary',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import CheckboxGroup from './checkbox-group';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ReactNode} from 'react';
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import Checkbox from './checkbox';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {html} from '@codemirror/lang-html';
import {useArgs} from '@storybook/preview-api';
import type {Meta, StoryObj} from '@storybook/react';
import {useArgs} from 'storybook/preview-api';
import type {Meta, StoryObj} from '@storybook/react-vite';

import CodeEditor from './code-editor';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import ColorIndicator from './color-indicator';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import ColorPickerField from './color-picker-field';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import ColorPicker from './color-picker';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {ReactNode} from 'react';
import {useArgs} from '@storybook/preview-api';
import type {Meta, StoryObj} from '@storybook/react';
import {useArgs} from 'storybook/preview-api';
import type {Meta, StoryObj} from '@storybook/react-vite';

import CurrencyField from './currency-field';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import FileUpload from './file-upload';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import * as CheckboxGroupStories from './checkbox-group.stories';
import * as TextFieldStories from './text-field.stories';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import HtmlField from './html-field';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ReactNode} from 'react';
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import ImageUpload from './image-upload';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {useArgs} from '@storybook/preview-api';
import type {Meta, StoryObj} from '@storybook/react';
import {useArgs} from 'storybook/preview-api';
import type {Meta, StoryObj} from '@storybook/react-vite';

import MultiSelect from './multi-select';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ReactNode} from 'react';
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from '@storybook/react-vite';

import Radio, {RadioOption} from './radio';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {ReactNode} from 'react';
import {useArgs} from '@storybook/preview-api';
import type {Meta, StoryObj} from '@storybook/react';
import {useArgs} from 'storybook/preview-api';
import type {Meta, StoryObj} from '@storybook/react-vite';

import SelectWithOther from './select-with-other';
import type {SelectOption} from './select';
Expand Down
Loading
Loading