diff --git a/apps/activitypub/.eslintrc.cjs b/apps/activitypub/.eslintrc.cjs
index 952b37443d0..eab59b3c4dc 100644
--- a/apps/activitypub/.eslintrc.cjs
+++ b/apps/activitypub/.eslintrc.cjs
@@ -20,6 +20,9 @@ module.exports = {
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
+ // Enforce kebab-case (lowercase with hyphens) for all filenames
+ 'ghost/filenames/match-regex': ['error', '^[a-z0-9.-]+$', false],
+
// sort multiple import lines into alphabetical groups
'ghost/sort-imports-es6-autofix/sort-imports-es6': ['error', {
memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple']
diff --git a/apps/activitypub/package.json b/apps/activitypub/package.json
index 3aeb26d28df..c2b924a939e 100644
--- a/apps/activitypub/package.json
+++ b/apps/activitypub/package.json
@@ -1,6 +1,6 @@
{
"name": "@tryghost/activitypub",
- "version": "3.0.4",
+ "version": "3.0.5",
"license": "MIT",
"repository": {
"type": "git",
diff --git a/apps/activitypub/src/App.tsx b/apps/activitypub/src/app.tsx
similarity index 100%
rename from apps/activitypub/src/App.tsx
rename to apps/activitypub/src/app.tsx
diff --git a/apps/activitypub/src/components/activities/ActivityItem.tsx b/apps/activitypub/src/components/activities/activity-item.tsx
similarity index 100%
rename from apps/activitypub/src/components/activities/ActivityItem.tsx
rename to apps/activitypub/src/components/activities/activity-item.tsx
diff --git a/apps/activitypub/src/components/articleBodyStyles.ts b/apps/activitypub/src/components/article-body-styles.ts
similarity index 100%
rename from apps/activitypub/src/components/articleBodyStyles.ts
rename to apps/activitypub/src/components/article-body-styles.ts
diff --git a/apps/activitypub/src/components/feed/DeletedFeedItem.tsx b/apps/activitypub/src/components/feed/deleted-feed-item.tsx
similarity index 100%
rename from apps/activitypub/src/components/feed/DeletedFeedItem.tsx
rename to apps/activitypub/src/components/feed/deleted-feed-item.tsx
diff --git a/apps/activitypub/src/components/feed/FeedItemMenu.tsx b/apps/activitypub/src/components/feed/feed-item-menu.tsx
similarity index 100%
rename from apps/activitypub/src/components/feed/FeedItemMenu.tsx
rename to apps/activitypub/src/components/feed/feed-item-menu.tsx
diff --git a/apps/activitypub/src/components/feed/FeedItemStats.tsx b/apps/activitypub/src/components/feed/feed-item-stats.tsx
similarity index 99%
rename from apps/activitypub/src/components/feed/FeedItemStats.tsx
rename to apps/activitypub/src/components/feed/feed-item-stats.tsx
index 8e64d7b1eaa..42079cab5a7 100644
--- a/apps/activitypub/src/components/feed/FeedItemStats.tsx
+++ b/apps/activitypub/src/components/feed/feed-item-stats.tsx
@@ -1,4 +1,4 @@
-import NewNoteModal from '@components/modals/NewNoteModal';
+import NewNoteModal from '@components/modals/new-note-modal';
import React, {useEffect, useRef, useState} from 'react';
import {ActorProperties, ObjectProperties} from '@tryghost/admin-x-framework/api/activitypub';
import {AnimatedNumber, Button, LucideIcon, formatNumber} from '@tryghost/shade';
diff --git a/apps/activitypub/src/components/feed/FeedItem.tsx b/apps/activitypub/src/components/feed/feed-item.tsx
similarity index 99%
rename from apps/activitypub/src/components/feed/FeedItem.tsx
rename to apps/activitypub/src/components/feed/feed-item.tsx
index 387927a2d23..2bf519e0309 100644
--- a/apps/activitypub/src/components/feed/FeedItem.tsx
+++ b/apps/activitypub/src/components/feed/feed-item.tsx
@@ -1,14 +1,14 @@
-import FeedItemMenu from './FeedItemMenu';
+import FeedItemMenu from './feed-item-menu';
import React, {useEffect, useRef, useState} from 'react';
import {ActorProperties, ObjectProperties} from '@tryghost/admin-x-framework/api/activitypub';
import {Button, H4, LucideIcon, Skeleton} from '@tryghost/shade';
import {toast} from 'sonner';
-import APAvatar from '../global/APAvatar';
-import ImageLightbox, {useLightboxImages} from '../global/ImageLightbox';
-import ProfilePreviewHoverCard from '../global/ProfilePreviewHoverCard';
+import APAvatar from '../global/ap-avatar';
+import ImageLightbox, {useLightboxImages} from '../global/image-lightbox';
+import ProfilePreviewHoverCard from '../global/profile-preview-hover-card';
-import FeedItemStats from './FeedItemStats';
+import FeedItemStats from './feed-item-stats';
import clsx from 'clsx';
import getReadingTime from '../../utils/get-reading-time';
import getUsername from '../../utils/get-username';
diff --git a/apps/activitypub/src/components/feed/TableOfContents.tsx b/apps/activitypub/src/components/feed/table-of-contents.tsx
similarity index 100%
rename from apps/activitypub/src/components/feed/TableOfContents.tsx
rename to apps/activitypub/src/components/feed/table-of-contents.tsx
diff --git a/apps/activitypub/src/components/global/APAvatar.tsx b/apps/activitypub/src/components/global/ap-avatar.tsx
similarity index 100%
rename from apps/activitypub/src/components/global/APAvatar.tsx
rename to apps/activitypub/src/components/global/ap-avatar.tsx
diff --git a/apps/activitypub/src/components/global/APReplyBox.tsx b/apps/activitypub/src/components/global/ap-reply-box.tsx
similarity index 95%
rename from apps/activitypub/src/components/global/APReplyBox.tsx
rename to apps/activitypub/src/components/global/ap-reply-box.tsx
index 3e2383d3a21..05561b78d9d 100644
--- a/apps/activitypub/src/components/global/APReplyBox.tsx
+++ b/apps/activitypub/src/components/global/ap-reply-box.tsx
@@ -1,7 +1,7 @@
import React, {HTMLProps, useState} from 'react';
-import APAvatar from './APAvatar';
-import NewNoteModal from '@components/modals/NewNoteModal';
+import APAvatar from './ap-avatar';
+import NewNoteModal from '@components/modals/new-note-modal';
import getUsername from '../../utils/get-username';
import {ActorProperties, ObjectProperties} from '@tryghost/admin-x-framework/api/activitypub';
import {useUserDataForUser} from '@hooks/use-activity-pub-queries';
diff --git a/apps/activitypub/src/components/global/BackButton.tsx b/apps/activitypub/src/components/global/back-button.tsx
similarity index 100%
rename from apps/activitypub/src/components/global/BackButton.tsx
rename to apps/activitypub/src/components/global/back-button.tsx
diff --git a/apps/activitypub/src/components/global/EmptyViewIndicator.tsx b/apps/activitypub/src/components/global/empty-view-indicator.tsx
similarity index 100%
rename from apps/activitypub/src/components/global/EmptyViewIndicator.tsx
rename to apps/activitypub/src/components/global/empty-view-indicator.tsx
diff --git a/apps/activitypub/src/components/global/FollowButton.tsx b/apps/activitypub/src/components/global/follow-button.tsx
similarity index 100%
rename from apps/activitypub/src/components/global/FollowButton.tsx
rename to apps/activitypub/src/components/global/follow-button.tsx
diff --git a/apps/activitypub/src/components/global/ImageLightbox.tsx b/apps/activitypub/src/components/global/image-lightbox.tsx
similarity index 99%
rename from apps/activitypub/src/components/global/ImageLightbox.tsx
rename to apps/activitypub/src/components/global/image-lightbox.tsx
index 2691530742f..dbf1e306b76 100644
--- a/apps/activitypub/src/components/global/ImageLightbox.tsx
+++ b/apps/activitypub/src/components/global/image-lightbox.tsx
@@ -1,7 +1,7 @@
import React, {useCallback, useEffect, useState} from 'react';
import {Button, Dialog, DialogClose, DialogContent, LucideIcon} from '@tryghost/shade';
import {ObjectProperties} from '@tryghost/admin-x-framework/api/activitypub';
-import {getAttachment} from '@components/feed/FeedItem';
+import {getAttachment} from '@components/feed/feed-item';
export interface LightboxImage {
url: string;
diff --git a/apps/activitypub/src/components/global/ProfilePreviewHoverCard.tsx b/apps/activitypub/src/components/global/profile-preview-hover-card.tsx
similarity index 99%
rename from apps/activitypub/src/components/global/ProfilePreviewHoverCard.tsx
rename to apps/activitypub/src/components/global/profile-preview-hover-card.tsx
index 961d5cc68c5..4560f2f7dbb 100644
--- a/apps/activitypub/src/components/global/ProfilePreviewHoverCard.tsx
+++ b/apps/activitypub/src/components/global/profile-preview-hover-card.tsx
@@ -1,4 +1,4 @@
-import FollowButton from './FollowButton';
+import FollowButton from './follow-button';
import React, {useEffect, useState} from 'react';
import getUsername from '../../utils/get-username';
import {Account} from '@src/api/activitypub';
diff --git a/apps/activitypub/src/components/global/Separator.tsx b/apps/activitypub/src/components/global/separator.tsx
similarity index 100%
rename from apps/activitypub/src/components/global/Separator.tsx
rename to apps/activitypub/src/components/global/separator.tsx
diff --git a/apps/activitypub/src/components/global/ShowRepliesButton.tsx b/apps/activitypub/src/components/global/show-replies-button.tsx
similarity index 100%
rename from apps/activitypub/src/components/global/ShowRepliesButton.tsx
rename to apps/activitypub/src/components/global/show-replies-button.tsx
diff --git a/apps/activitypub/src/components/global/SuggestedProfiles.tsx b/apps/activitypub/src/components/global/suggested-profiles.tsx
similarity index 95%
rename from apps/activitypub/src/components/global/SuggestedProfiles.tsx
rename to apps/activitypub/src/components/global/suggested-profiles.tsx
index 1d67716fcde..95faa439323 100644
--- a/apps/activitypub/src/components/global/SuggestedProfiles.tsx
+++ b/apps/activitypub/src/components/global/suggested-profiles.tsx
@@ -1,7 +1,7 @@
-import APAvatar from './APAvatar';
-import ActivityItem from '../activities/ActivityItem';
-import FollowButton from './FollowButton';
-import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard';
+import APAvatar from './ap-avatar';
+import ActivityItem from '../activities/activity-item';
+import FollowButton from './follow-button';
+import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';
import React from 'react';
import {type Account} from '../../api/activitypub';
import {Skeleton} from '@tryghost/shade';
diff --git a/apps/activitypub/src/components/layout/Error/index.ts b/apps/activitypub/src/components/layout/Error/index.ts
deleted file mode 100644
index de801561ea0..00000000000
--- a/apps/activitypub/src/components/layout/Error/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export {default} from './Error';
diff --git a/apps/activitypub/src/components/layout/Header/index.tsx b/apps/activitypub/src/components/layout/Header/index.tsx
deleted file mode 100644
index 0e9c8972da3..00000000000
--- a/apps/activitypub/src/components/layout/Header/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export {default} from './Header';
diff --git a/apps/activitypub/src/components/layout/Onboarding/index.tsx b/apps/activitypub/src/components/layout/Onboarding/index.tsx
deleted file mode 100644
index 693bf82dc72..00000000000
--- a/apps/activitypub/src/components/layout/Onboarding/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export {default, useOnboardingStatus} from './Onboarding';
diff --git a/apps/activitypub/src/components/layout/Sidebar/index.tsx b/apps/activitypub/src/components/layout/Sidebar/index.tsx
deleted file mode 100644
index 9a4831443a4..00000000000
--- a/apps/activitypub/src/components/layout/Sidebar/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export {default} from './Sidebar';
diff --git a/apps/activitypub/src/components/layout/Error/Error.tsx b/apps/activitypub/src/components/layout/error/error.tsx
similarity index 98%
rename from apps/activitypub/src/components/layout/Error/Error.tsx
rename to apps/activitypub/src/components/layout/error/error.tsx
index 8019efa5f31..52ac33e92bf 100644
--- a/apps/activitypub/src/components/layout/Error/Error.tsx
+++ b/apps/activitypub/src/components/layout/error/error.tsx
@@ -1,6 +1,6 @@
-import Layout from '@components/layout/Layout';
+import Layout from '@components/layout/layout';
import {Button, H4, LucideIcon} from '@tryghost/shade';
-import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/EmptyViewIndicator';
+import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator';
import {useNavigate} from '@tryghost/admin-x-framework';
import {useRouteError} from 'react-router';
diff --git a/apps/activitypub/src/components/layout/error/index.ts b/apps/activitypub/src/components/layout/error/index.ts
new file mode 100644
index 00000000000..d740cfdc899
--- /dev/null
+++ b/apps/activitypub/src/components/layout/error/index.ts
@@ -0,0 +1 @@
+export {default} from './error';
diff --git a/apps/activitypub/src/components/layout/Header/Header.tsx b/apps/activitypub/src/components/layout/header/header.tsx
similarity index 98%
rename from apps/activitypub/src/components/layout/Header/Header.tsx
rename to apps/activitypub/src/components/layout/header/header.tsx
index fdcc8159921..fd32d006c26 100644
--- a/apps/activitypub/src/components/layout/Header/Header.tsx
+++ b/apps/activitypub/src/components/layout/header/header.tsx
@@ -2,7 +2,7 @@ import React from 'react';
import {Button, H1, LucideIcon} from '@tryghost/shade';
import {useNavigationStack, useRouteHasParams} from '@tryghost/admin-x-framework';
-import BackButton from '@src/components/global/BackButton';
+import BackButton from '@src/components/global/back-button';
import useActiveRoute from '@src/hooks/use-active-route';
import {useCurrentPage} from '@src/hooks/use-current-page';
diff --git a/apps/activitypub/src/components/layout/header/index.tsx b/apps/activitypub/src/components/layout/header/index.tsx
new file mode 100644
index 00000000000..d2c82545f88
--- /dev/null
+++ b/apps/activitypub/src/components/layout/header/index.tsx
@@ -0,0 +1 @@
+export {default} from './header';
diff --git a/apps/activitypub/src/components/layout/Header/SearchInput.tsx b/apps/activitypub/src/components/layout/header/search-input.tsx
similarity index 100%
rename from apps/activitypub/src/components/layout/Header/SearchInput.tsx
rename to apps/activitypub/src/components/layout/header/search-input.tsx
diff --git a/apps/activitypub/src/components/layout/index.tsx b/apps/activitypub/src/components/layout/index.tsx
index 59f9dfc0eff..7697cdd23c4 100644
--- a/apps/activitypub/src/components/layout/index.tsx
+++ b/apps/activitypub/src/components/layout/index.tsx
@@ -1 +1 @@
-export {default} from './Layout';
+export {default} from './layout';
diff --git a/apps/activitypub/src/components/layout/Layout.tsx b/apps/activitypub/src/components/layout/layout.tsx
similarity index 94%
rename from apps/activitypub/src/components/layout/Layout.tsx
rename to apps/activitypub/src/components/layout/layout.tsx
index 2b49a288439..fab7cedb586 100644
--- a/apps/activitypub/src/components/layout/Layout.tsx
+++ b/apps/activitypub/src/components/layout/layout.tsx
@@ -1,8 +1,8 @@
-import Header from './Header';
-import NewNoteModal from '@components/modals/NewNoteModal';
-import Onboarding, {useOnboardingStatus} from './Onboarding';
+import Header from './header';
+import NewNoteModal from '@components/modals/new-note-modal';
+import Onboarding, {useOnboardingStatus} from './onboarding';
import React, {useRef, useState} from 'react';
-import Sidebar from './Sidebar';
+import Sidebar from './sidebar';
import {Navigate, ScrollRestoration} from '@tryghost/admin-x-framework';
import {useAppBasePath} from '@src/hooks/use-app-base-path';
import {useCurrentPage} from '@src/hooks/use-current-page';
diff --git a/apps/activitypub/src/components/layout/Onboarding/components/Header.tsx b/apps/activitypub/src/components/layout/onboarding/components/header.tsx
similarity index 100%
rename from apps/activitypub/src/components/layout/Onboarding/components/Header.tsx
rename to apps/activitypub/src/components/layout/onboarding/components/header.tsx
diff --git a/apps/activitypub/src/components/layout/onboarding/index.tsx b/apps/activitypub/src/components/layout/onboarding/index.tsx
new file mode 100644
index 00000000000..77b1b94fa53
--- /dev/null
+++ b/apps/activitypub/src/components/layout/onboarding/index.tsx
@@ -0,0 +1 @@
+export {default, useOnboardingStatus} from './onboarding';
diff --git a/apps/activitypub/src/components/layout/Onboarding/Onboarding.tsx b/apps/activitypub/src/components/layout/onboarding/onboarding.tsx
similarity index 100%
rename from apps/activitypub/src/components/layout/Onboarding/Onboarding.tsx
rename to apps/activitypub/src/components/layout/onboarding/onboarding.tsx
diff --git a/apps/activitypub/src/components/layout/Onboarding/Step1.tsx b/apps/activitypub/src/components/layout/onboarding/step-1.tsx
similarity index 99%
rename from apps/activitypub/src/components/layout/Onboarding/Step1.tsx
rename to apps/activitypub/src/components/layout/onboarding/step-1.tsx
index eb0a1a51701..b552830f75e 100644
--- a/apps/activitypub/src/components/layout/Onboarding/Step1.tsx
+++ b/apps/activitypub/src/components/layout/onboarding/step-1.tsx
@@ -1,4 +1,4 @@
-import APAvatar from '@src/components/global/APAvatar';
+import APAvatar from '@src/components/global/ap-avatar';
import React, {useState} from 'react';
import apNodes from '@assets/images/onboarding/ap-nodes.png';
import apNodesDark from '@assets/images/onboarding/ap-nodes-dark.png';
diff --git a/apps/activitypub/src/components/layout/Onboarding/Step2.tsx b/apps/activitypub/src/components/layout/onboarding/step-2.tsx
similarity index 99%
rename from apps/activitypub/src/components/layout/Onboarding/Step2.tsx
rename to apps/activitypub/src/components/layout/onboarding/step-2.tsx
index 6c2d29b5401..940762f495e 100644
--- a/apps/activitypub/src/components/layout/Onboarding/Step2.tsx
+++ b/apps/activitypub/src/components/layout/onboarding/step-2.tsx
@@ -1,4 +1,4 @@
-import Header from './components/Header';
+import Header from './components/header';
import React, {ReactNode} from 'react';
import apDashedLines from '@assets/images/onboarding/ap-dashed-lines.png';
import apDashedLinesDark from '@assets/images/onboarding/ap-dashed-lines-dark.png';
diff --git a/apps/activitypub/src/components/layout/Onboarding/Step3.tsx b/apps/activitypub/src/components/layout/onboarding/step-3.tsx
similarity index 99%
rename from apps/activitypub/src/components/layout/Onboarding/Step3.tsx
rename to apps/activitypub/src/components/layout/onboarding/step-3.tsx
index d4672836a96..2a421c3f2cb 100644
--- a/apps/activitypub/src/components/layout/Onboarding/Step3.tsx
+++ b/apps/activitypub/src/components/layout/onboarding/step-3.tsx
@@ -1,4 +1,4 @@
-import Header from './components/Header';
+import Header from './components/header';
import React, {ReactNode, useEffect, useState} from 'react';
import caseyAvatar from '@assets/images/onboarding/avatar-casey.png';
import creatorScienceAvatar from '@assets/images/onboarding/avatar-creator-science.png';
@@ -18,7 +18,7 @@ import tangleCover from '@assets/images/onboarding/cover-tangle.png';
import {Avatar, AvatarFallback, AvatarImage, Button, H1, LucideIcon, Separator} from '@tryghost/shade';
import {useAccountForUser, useTopicsForUser} from '@src/hooks/use-activity-pub-queries';
import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';
-import {useOnboardingStatus} from './Onboarding';
+import {useOnboardingStatus} from './onboarding';
const MenuItem: React.FC<{
children?: ReactNode,
diff --git a/apps/activitypub/src/components/layout/Sidebar/FeedbackBox.tsx b/apps/activitypub/src/components/layout/sidebar/feedback-box.tsx
similarity index 100%
rename from apps/activitypub/src/components/layout/Sidebar/FeedbackBox.tsx
rename to apps/activitypub/src/components/layout/sidebar/feedback-box.tsx
diff --git a/apps/activitypub/src/components/layout/sidebar/index.tsx b/apps/activitypub/src/components/layout/sidebar/index.tsx
new file mode 100644
index 00000000000..736e161681a
--- /dev/null
+++ b/apps/activitypub/src/components/layout/sidebar/index.tsx
@@ -0,0 +1 @@
+export {default} from './sidebar';
diff --git a/apps/activitypub/src/components/layout/Sidebar/Recommendations.tsx b/apps/activitypub/src/components/layout/sidebar/recommendations.tsx
similarity index 95%
rename from apps/activitypub/src/components/layout/Sidebar/Recommendations.tsx
rename to apps/activitypub/src/components/layout/sidebar/recommendations.tsx
index 6081ece3597..19092185863 100644
--- a/apps/activitypub/src/components/layout/Sidebar/Recommendations.tsx
+++ b/apps/activitypub/src/components/layout/sidebar/recommendations.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
-import APAvatar from '@components/global/APAvatar';
-import ActivityItem from '@components/activities/ActivityItem';
-import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard';
+import APAvatar from '@components/global/ap-avatar';
+import ActivityItem from '@components/activities/activity-item';
+import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';
import {Button, H4, LucideIcon, Skeleton} from '@tryghost/shade';
import {handleProfileClick} from '@utils/handle-profile-click';
import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';
diff --git a/apps/activitypub/src/components/layout/Sidebar/SidebarMenuLink.tsx b/apps/activitypub/src/components/layout/sidebar/sidebar-menu-link.tsx
similarity index 100%
rename from apps/activitypub/src/components/layout/Sidebar/SidebarMenuLink.tsx
rename to apps/activitypub/src/components/layout/sidebar/sidebar-menu-link.tsx
diff --git a/apps/activitypub/src/components/layout/Sidebar/Sidebar.tsx b/apps/activitypub/src/components/layout/sidebar/sidebar.tsx
similarity index 95%
rename from apps/activitypub/src/components/layout/Sidebar/Sidebar.tsx
rename to apps/activitypub/src/components/layout/sidebar/sidebar.tsx
index 82b3e38dbd9..37785d48c9f 100644
--- a/apps/activitypub/src/components/layout/Sidebar/Sidebar.tsx
+++ b/apps/activitypub/src/components/layout/sidebar/sidebar.tsx
@@ -1,10 +1,10 @@
import * as React from 'react';
-import FeedbackBox from './FeedbackBox';
-import NewNoteModal from '@src/components/modals/NewNoteModal';
-import Recommendations from './Recommendations';
-import Search from '@src/components/modals/Search';
-import SearchInput from '../Header/SearchInput';
-import SidebarMenuLink from './SidebarMenuLink';
+import FeedbackBox from './feedback-box';
+import NewNoteModal from '@src/components/modals/new-note-modal';
+import Recommendations from './recommendations';
+import Search from '@src/components/modals/search';
+import SearchInput from '../header/search-input';
+import SidebarMenuLink from './sidebar-menu-link';
import {Button, Dialog, DialogContent, DialogTrigger, LucideIcon} from '@tryghost/shade';
import {useAppBasePath} from '@src/hooks/use-app-base-path';
import {useCurrentUser} from '@tryghost/admin-x-framework/api/current-user';
diff --git a/apps/activitypub/src/components/modals/NewNoteModal.tsx b/apps/activitypub/src/components/modals/new-note-modal.tsx
similarity index 99%
rename from apps/activitypub/src/components/modals/NewNoteModal.tsx
rename to apps/activitypub/src/components/modals/new-note-modal.tsx
index da2887ae41c..8861712a159 100644
--- a/apps/activitypub/src/components/modals/NewNoteModal.tsx
+++ b/apps/activitypub/src/components/modals/new-note-modal.tsx
@@ -1,6 +1,6 @@
import * as FormPrimitive from '@radix-ui/react-form';
-import APAvatar from '@components/global/APAvatar';
-import FeedItem from '@components/feed/FeedItem';
+import APAvatar from '@components/global/ap-avatar';
+import FeedItem from '@components/feed/feed-item';
import getUsername from '@utils/get-username';
import {ActorProperties, ObjectProperties} from '@tryghost/admin-x-framework/api/activitypub';
import {Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Input, LoadingIndicator, LucideIcon, Skeleton} from '@tryghost/shade';
diff --git a/apps/activitypub/src/components/modals/Search.tsx b/apps/activitypub/src/components/modals/search.tsx
similarity index 97%
rename from apps/activitypub/src/components/modals/Search.tsx
rename to apps/activitypub/src/components/modals/search.tsx
index 0f6fa97f151..359aa9a2dac 100644
--- a/apps/activitypub/src/components/modals/Search.tsx
+++ b/apps/activitypub/src/components/modals/search.tsx
@@ -1,11 +1,11 @@
-import APAvatar from '@components/global/APAvatar';
-import ActivityItem from '@components/activities/ActivityItem';
-import FollowButton from '@components/global/FollowButton';
-import ProfilePreviewHoverCard from '../global/ProfilePreviewHoverCard';
+import APAvatar from '@components/global/ap-avatar';
+import ActivityItem from '@components/activities/activity-item';
+import FollowButton from '@components/global/follow-button';
+import ProfilePreviewHoverCard from '../global/profile-preview-hover-card';
import React, {useEffect, useMemo, useRef, useState} from 'react';
import {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub';
import {Button, H4, Input, LoadingIndicator, LucideIcon, NoValueLabel, NoValueLabelIcon} from '@tryghost/shade';
-import {SuggestedProfiles} from '../global/SuggestedProfiles';
+import {SuggestedProfiles} from '../global/suggested-profiles';
import {useAccountForUser, useSearchForUser, useSuggestedProfilesForUser, useTopicsForUser} from '@hooks/use-activity-pub-queries';
import {useDebounce} from 'use-debounce';
import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';
diff --git a/apps/activitypub/src/components/TopicFilter.tsx b/apps/activitypub/src/components/topic-filter.tsx
similarity index 100%
rename from apps/activitypub/src/components/TopicFilter.tsx
rename to apps/activitypub/src/components/topic-filter.tsx
diff --git a/apps/activitypub/src/index.tsx b/apps/activitypub/src/index.tsx
index cb20f2b5899..74d98a5b9cf 100644
--- a/apps/activitypub/src/index.tsx
+++ b/apps/activitypub/src/index.tsx
@@ -1,5 +1,5 @@
import './styles/index.css';
-import App from './App';
+import App from './app';
export {
App as AdminXApp
diff --git a/apps/activitypub/src/routes.tsx b/apps/activitypub/src/routes.tsx
index f8ac66ebac3..dba3df5dfe5 100644
--- a/apps/activitypub/src/routes.tsx
+++ b/apps/activitypub/src/routes.tsx
@@ -1,17 +1,17 @@
-import BlueskySharing from '@views/Preferences/components/BlueskySharing';
-import Error from '@components/layout/Error';
-import Explore from '@views/Explore';
-import Feed from './views/Feed/Feed';
-import Inbox from '@views/Inbox';
-import Moderation from '@views/Preferences/components/Moderation';
-import Note from './views/Feed/Note';
-import Notifications from '@views/Notifications';
-import Onboarding from '@components/layout/Onboarding';
-import OnboardingStep1 from '@components/layout/Onboarding/Step1';
-import OnboardingStep2 from '@components/layout/Onboarding/Step2';
-import OnboardingStep3 from '@components/layout/Onboarding/Step3';
-import Preferences from '@views/Preferences';
-import Profile from '@views/Profile';
+import AppError from '@components/layout/error';
+import BlueskySharing from '@views/preferences/components/bluesky-sharing';
+import Explore from '@views/explore';
+import Feed from './views/feed/feed';
+import Inbox from '@views/inbox';
+import Moderation from '@views/preferences/components/moderation';
+import Note from './views/feed/note';
+import Notifications from '@views/notifications';
+import Onboarding from '@components/layout/onboarding';
+import OnboardingStep1 from '@components/layout/onboarding/step-1';
+import OnboardingStep2 from '@components/layout/onboarding/step-2';
+import OnboardingStep3 from '@components/layout/onboarding/step-3';
+import Preferences from '@views/preferences';
+import Profile from '@views/profile';
import {Navigate, Outlet, RouteObject} from '@tryghost/admin-x-framework';
const basePath = import.meta.env.VITE_TEST ? '' : 'activitypub';
@@ -27,7 +27,7 @@ export const routes: CustomRouteObject[] = [
// Root route that defines the app's base path
path: basePath,
element: ,
- errorElement: , // This will catch all errors in child routes
+ errorElement: , // This will catch all errors in child routes
handle: 'activitypub-basepath',
children: [
{
@@ -147,7 +147,7 @@ export const routes: CustomRouteObject[] = [
},
{
path: '*',
- element:
+ element:
}
]
}
diff --git a/apps/activitypub/src/standalone.tsx b/apps/activitypub/src/standalone.tsx
index dd723c833c7..c4419c578c8 100644
--- a/apps/activitypub/src/standalone.tsx
+++ b/apps/activitypub/src/standalone.tsx
@@ -1,5 +1,5 @@
import './styles/index.css';
-import App from './App.tsx';
+import App from './app.tsx';
import renderStandaloneApp from '@tryghost/admin-x-framework/test/render';
renderStandaloneApp(App, {});
diff --git a/apps/activitypub/src/views/Explore/index.tsx b/apps/activitypub/src/views/Explore/index.tsx
deleted file mode 100644
index 69f9d9c33da..00000000000
--- a/apps/activitypub/src/views/Explore/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export {default} from './Explore';
diff --git a/apps/activitypub/src/views/Inbox/index.tsx b/apps/activitypub/src/views/Inbox/index.tsx
deleted file mode 100644
index 73f043d35d1..00000000000
--- a/apps/activitypub/src/views/Inbox/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export {default} from './Inbox';
diff --git a/apps/activitypub/src/views/Notifications/index.tsx b/apps/activitypub/src/views/Notifications/index.tsx
deleted file mode 100644
index 47525d48703..00000000000
--- a/apps/activitypub/src/views/Notifications/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export {default} from './Notifications';
diff --git a/apps/activitypub/src/views/Preferences/index.tsx b/apps/activitypub/src/views/Preferences/index.tsx
deleted file mode 100644
index 1294ce63a1e..00000000000
--- a/apps/activitypub/src/views/Preferences/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export {default} from './Preferences';
diff --git a/apps/activitypub/src/views/Profile/index.tsx b/apps/activitypub/src/views/Profile/index.tsx
deleted file mode 100644
index 8585fc7dead..00000000000
--- a/apps/activitypub/src/views/Profile/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export {default} from './Profile';
diff --git a/apps/activitypub/src/views/Explore/Explore.tsx b/apps/activitypub/src/views/explore/explore.tsx
similarity index 96%
rename from apps/activitypub/src/views/Explore/Explore.tsx
rename to apps/activitypub/src/views/explore/explore.tsx
index fd42ed80122..cce5e61b4ef 100644
--- a/apps/activitypub/src/views/Explore/Explore.tsx
+++ b/apps/activitypub/src/views/explore/explore.tsx
@@ -1,15 +1,15 @@
-import APAvatar from '@src/components/global/APAvatar';
-import FollowButton from '@src/components/global/FollowButton';
+import APAvatar from '@src/components/global/ap-avatar';
+import FollowButton from '@src/components/global/follow-button';
import Layout from '@components/layout';
-import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard';
+import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';
import React, {useEffect} from 'react';
-import TopicFilter, {type Topic} from '@src/components/TopicFilter';
+import TopicFilter, {type Topic} from '@src/components/topic-filter';
import {type Account, type ExploreAccount} from '@src/api/activitypub';
import {Button, H4, LoadingIndicator, LucideIcon, Skeleton} from '@tryghost/shade';
import {openLinksInNewTab, stripHtml} from '@src/utils/content-formatters';
import {useAccountForUser, useExploreProfilesForUserByTopic} from '@hooks/use-activity-pub-queries';
import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';
-import {useOnboardingStatus} from '@src/components/layout/Onboarding';
+import {useOnboardingStatus} from '@src/components/layout/onboarding';
import {useParams} from '@tryghost/admin-x-framework';
interface ExploreProfileProps {
diff --git a/apps/activitypub/src/views/explore/index.tsx b/apps/activitypub/src/views/explore/index.tsx
new file mode 100644
index 00000000000..625f16d884c
--- /dev/null
+++ b/apps/activitypub/src/views/explore/index.tsx
@@ -0,0 +1 @@
+export {default} from './explore';
diff --git a/apps/activitypub/src/views/Feed/components/FeedInput.tsx b/apps/activitypub/src/views/feed/components/feed-input.tsx
similarity index 90%
rename from apps/activitypub/src/views/Feed/components/FeedInput.tsx
rename to apps/activitypub/src/views/feed/components/feed-input.tsx
index dc590727a8a..9e31e91dcac 100644
--- a/apps/activitypub/src/views/Feed/components/FeedInput.tsx
+++ b/apps/activitypub/src/views/feed/components/feed-input.tsx
@@ -1,5 +1,5 @@
-import APAvatar from '@src/components/global/APAvatar';
-import NewNoteModal from '@src/components/modals/NewNoteModal';
+import APAvatar from '@src/components/global/ap-avatar';
+import NewNoteModal from '@src/components/modals/new-note-modal';
import {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub';
const FeedInput: React.FC<{user?: ActorProperties}> = ({user}) => {
diff --git a/apps/activitypub/src/views/Feed/components/FeedList.tsx b/apps/activitypub/src/views/feed/components/feed-list.tsx
similarity index 96%
rename from apps/activitypub/src/views/Feed/components/FeedList.tsx
rename to apps/activitypub/src/views/feed/components/feed-list.tsx
index e50bb7c1ddb..6e2ce7af334 100644
--- a/apps/activitypub/src/views/Feed/components/FeedList.tsx
+++ b/apps/activitypub/src/views/feed/components/feed-list.tsx
@@ -1,12 +1,12 @@
-import FeedInput from './FeedInput';
-import FeedItem from '@src/components/feed/FeedItem';
+import FeedInput from './feed-input';
+import FeedItem from '@src/components/feed/feed-item';
import Layout from '@src/components/layout';
-import NewNoteModal from '@src/components/modals/NewNoteModal';
-import SuggestedProfiles from './SuggestedProfiles';
+import NewNoteModal from '@src/components/modals/new-note-modal';
+import SuggestedProfiles from './suggested-profiles';
import {Activity} from '@src/api/activitypub';
import {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub';
import {Button, LoadingIndicator, LucideIcon, Separator} from '@tryghost/shade';
-import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/EmptyViewIndicator';
+import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator';
import {isPendingActivity} from '@src/utils/pending-activity';
import {useEffect, useRef} from 'react';
import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';
diff --git a/apps/activitypub/src/views/Feed/components/SuggestedProfiles.tsx b/apps/activitypub/src/views/feed/components/suggested-profiles.tsx
similarity index 97%
rename from apps/activitypub/src/views/Feed/components/SuggestedProfiles.tsx
rename to apps/activitypub/src/views/feed/components/suggested-profiles.tsx
index c2d9641ee2c..e2473d6eb15 100644
--- a/apps/activitypub/src/views/Feed/components/SuggestedProfiles.tsx
+++ b/apps/activitypub/src/views/feed/components/suggested-profiles.tsx
@@ -1,6 +1,6 @@
-import APAvatar from '@src/components/global/APAvatar';
-import FollowButton from '@src/components/global/FollowButton';
-import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard';
+import APAvatar from '@src/components/global/ap-avatar';
+import FollowButton from '@src/components/global/follow-button';
+import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';
import {Account} from '@src/api/activitypub';
import {Button, H4, LucideIcon, Separator, Skeleton} from '@tryghost/shade';
import {useEffect, useRef, useState} from 'react';
diff --git a/apps/activitypub/src/views/Feed/Feed.tsx b/apps/activitypub/src/views/feed/feed.tsx
similarity index 83%
rename from apps/activitypub/src/views/Feed/Feed.tsx
rename to apps/activitypub/src/views/feed/feed.tsx
index 11f04ab9b4a..bb713511703 100644
--- a/apps/activitypub/src/views/Feed/Feed.tsx
+++ b/apps/activitypub/src/views/feed/feed.tsx
@@ -1,5 +1,5 @@
-import Error from '@components/layout/Error';
-import FeedList from './components/FeedList';
+import AppError from '@components/layout/error';
+import FeedList from './components/feed-list';
import React from 'react';
import {isApiError} from '@src/api/activitypub';
import {
@@ -16,7 +16,7 @@ const Feed: React.FC = () => {
const {data: user} = useUserDataForUser('index');
if (error && isApiError(error)) {
- return ;
+ return ;
}
return {
const topicNotFound = error && isApiError(error) && error.statusCode === 404 && topic !== 'following';
if (error && isApiError(error) && !topicNotFound) {
- return ;
+ return ;
}
const activities = topicNotFound ? [] : (data?.pages.flatMap(page => page.posts) ?? Array.from({length: 5}, (_, index) => ({id: `placeholder-${index}`, object: {}})));
diff --git a/apps/activitypub/src/views/inbox/index.tsx b/apps/activitypub/src/views/inbox/index.tsx
new file mode 100644
index 00000000000..2024584ca65
--- /dev/null
+++ b/apps/activitypub/src/views/inbox/index.tsx
@@ -0,0 +1 @@
+export {default} from './inbox';
diff --git a/apps/activitypub/src/views/Notifications/components/NotificationIcon.tsx b/apps/activitypub/src/views/notifications/components/notification-icon.tsx
similarity index 100%
rename from apps/activitypub/src/views/Notifications/components/NotificationIcon.tsx
rename to apps/activitypub/src/views/notifications/components/notification-icon.tsx
diff --git a/apps/activitypub/src/views/Notifications/components/NotificationItem.tsx b/apps/activitypub/src/views/notifications/components/notification-item.tsx
similarity index 98%
rename from apps/activitypub/src/views/Notifications/components/NotificationItem.tsx
rename to apps/activitypub/src/views/notifications/components/notification-item.tsx
index a075ad10776..3d1e27eb16e 100644
--- a/apps/activitypub/src/views/Notifications/components/NotificationItem.tsx
+++ b/apps/activitypub/src/views/notifications/components/notification-item.tsx
@@ -1,4 +1,4 @@
-import NotificationIcon, {NotificationIconSize, NotificationType} from './NotificationIcon';
+import NotificationIcon, {NotificationIconSize, NotificationType} from './notification-icon';
import React from 'react';
// Context to share common props between compound components
diff --git a/apps/activitypub/src/views/notifications/index.tsx b/apps/activitypub/src/views/notifications/index.tsx
new file mode 100644
index 00000000000..69a1db57178
--- /dev/null
+++ b/apps/activitypub/src/views/notifications/index.tsx
@@ -0,0 +1 @@
+export {default} from './notifications';
diff --git a/apps/activitypub/src/views/Notifications/Notifications.tsx b/apps/activitypub/src/views/notifications/notifications.tsx
similarity index 97%
rename from apps/activitypub/src/views/Notifications/Notifications.tsx
rename to apps/activitypub/src/views/notifications/notifications.tsx
index 0835914e940..dd0ca7d4f44 100644
--- a/apps/activitypub/src/views/Notifications/Notifications.tsx
+++ b/apps/activitypub/src/views/notifications/notifications.tsx
@@ -2,19 +2,19 @@ import React, {useEffect, useRef} from 'react';
import {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub';
import {Button, LoadingIndicator, LucideIcon, Skeleton} from '@tryghost/shade';
-import APAvatar from '@components/global/APAvatar';
-import Error from '@components/layout/Error';
-import FeedItemStats from '@components/feed/FeedItemStats';
-import FollowButton from '@components/global/FollowButton';
+import APAvatar from '@components/global/ap-avatar';
+import AppError from '@components/layout/error';
+import FeedItemStats from '@components/feed/feed-item-stats';
+import FollowButton from '@components/global/follow-button';
import Layout from '@components/layout';
-import NotificationIcon from './components/NotificationIcon';
-import NotificationItem from './components/NotificationItem';
-import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard';
-import Separator from '@components/global/Separator';
-import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/EmptyViewIndicator';
+import NotificationIcon from './components/notification-icon';
+import NotificationItem from './components/notification-item';
+import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';
+import Separator from '@components/global/separator';
+import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator';
import {Notification, isApiError} from '@src/api/activitypub';
import {handleProfileClick} from '@utils/handle-profile-click';
-import {renderFeedAttachment} from '@components/feed/FeedItem';
+import {renderFeedAttachment} from '@components/feed/feed-item';
import {renderTimestamp} from '@src/utils/render-timestamp';
import {stripHtml} from '@src/utils/content-formatters';
import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';
@@ -283,7 +283,7 @@ const Notifications: React.FC = () => {
};
if (error && isApiError(error)) {
- return ;
+ return ;
}
return (
diff --git a/apps/activitypub/src/views/Preferences/components/BlueskySharing.tsx b/apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx
similarity index 99%
rename from apps/activitypub/src/views/Preferences/components/BlueskySharing.tsx
rename to apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx
index d0ecbd58455..642c9fa84a7 100644
--- a/apps/activitypub/src/views/Preferences/components/BlueskySharing.tsx
+++ b/apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx
@@ -1,5 +1,5 @@
-import APAvatar from '@src/components/global/APAvatar';
-import EditProfile from '@src/views/Preferences/components/EditProfile';
+import APAvatar from '@src/components/global/ap-avatar';
+import EditProfile from '@src/views/preferences/components/edit-profile';
import Layout from '@src/components/layout';
import React, {useCallback, useEffect, useRef, useState} from 'react';
import {AlertDialog,
diff --git a/apps/activitypub/src/views/Preferences/components/DotsPattern.tsx b/apps/activitypub/src/views/preferences/components/dots-pattern.tsx
similarity index 100%
rename from apps/activitypub/src/views/Preferences/components/DotsPattern.tsx
rename to apps/activitypub/src/views/preferences/components/dots-pattern.tsx
diff --git a/apps/activitypub/src/views/Preferences/components/EditProfile.tsx b/apps/activitypub/src/views/preferences/components/edit-profile.tsx
similarity index 100%
rename from apps/activitypub/src/views/Preferences/components/EditProfile.tsx
rename to apps/activitypub/src/views/preferences/components/edit-profile.tsx
diff --git a/apps/activitypub/src/views/Preferences/components/Moderation.tsx b/apps/activitypub/src/views/preferences/components/moderation.tsx
similarity index 97%
rename from apps/activitypub/src/views/Preferences/components/Moderation.tsx
rename to apps/activitypub/src/views/preferences/components/moderation.tsx
index 3cc5f614e5a..c1599af5a35 100644
--- a/apps/activitypub/src/views/Preferences/components/Moderation.tsx
+++ b/apps/activitypub/src/views/preferences/components/moderation.tsx
@@ -1,7 +1,7 @@
-import APAvatar from '@src/components/global/APAvatar';
-import ActivityItem from '@src/components/activities/ActivityItem';
-import Layout from '@src/components/layout';
-import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard';
+import APAvatar from '@components/global/ap-avatar';
+import ActivityItem from '@components/activities/activity-item';
+import Layout from '@components/layout';
+import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';
import React, {useState} from 'react';
import {Account} from '@src/api/activitypub';
import {Button, H2, LucideIcon, NoValueLabel, NoValueLabelIcon, Skeleton, Tabs, TabsContent, TabsList, TabsTrigger} from '@tryghost/shade';
diff --git a/apps/activitypub/src/views/Preferences/components/Profile.tsx b/apps/activitypub/src/views/preferences/components/profile.tsx
similarity index 99%
rename from apps/activitypub/src/views/Preferences/components/Profile.tsx
rename to apps/activitypub/src/views/preferences/components/profile.tsx
index ee92db17e26..bc254074534 100644
--- a/apps/activitypub/src/views/Preferences/components/Profile.tsx
+++ b/apps/activitypub/src/views/preferences/components/profile.tsx
@@ -1,7 +1,7 @@
import {memo, useCallback, useEffect, useRef, useState} from 'react';
-import APAvatar from '@src/components/global/APAvatar';
-import DotsPattern from './DotsPattern';
+import APAvatar from '@src/components/global/ap-avatar';
+import DotsPattern from './dots-pattern';
import ProfileCardShadow from '@assets/images/profile-card-shadow.png';
import ProfileCardShadowSquare from '@assets/images/profile-card-shadow-square.png';
import html2canvas from 'html2canvas-objectfit-fix';
diff --git a/apps/activitypub/src/views/Preferences/components/Settings.tsx b/apps/activitypub/src/views/preferences/components/settings.tsx
similarity index 99%
rename from apps/activitypub/src/views/Preferences/components/Settings.tsx
rename to apps/activitypub/src/views/preferences/components/settings.tsx
index 83436ce165e..7ad056fac3a 100644
--- a/apps/activitypub/src/views/Preferences/components/Settings.tsx
+++ b/apps/activitypub/src/views/preferences/components/settings.tsx
@@ -1,4 +1,4 @@
-import EditProfile from './EditProfile';
+import EditProfile from './edit-profile';
import React, {useState} from 'react';
import {Account} from '@src/api/activitypub';
import {Button, Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, H4, LucideIcon, cn} from '@tryghost/shade';
diff --git a/apps/activitypub/src/views/preferences/index.tsx b/apps/activitypub/src/views/preferences/index.tsx
new file mode 100644
index 00000000000..235668f1a9b
--- /dev/null
+++ b/apps/activitypub/src/views/preferences/index.tsx
@@ -0,0 +1 @@
+export {default} from './preferences';
diff --git a/apps/activitypub/src/views/Preferences/Preferences.tsx b/apps/activitypub/src/views/preferences/preferences.tsx
similarity index 75%
rename from apps/activitypub/src/views/Preferences/Preferences.tsx
rename to apps/activitypub/src/views/preferences/preferences.tsx
index 66f2a4a0e73..c942b78c482 100644
--- a/apps/activitypub/src/views/Preferences/Preferences.tsx
+++ b/apps/activitypub/src/views/preferences/preferences.tsx
@@ -1,8 +1,8 @@
-import Error from '@components/layout/Error';
+import AppError from '@components/layout/error';
import Layout from '@components/layout';
-import Profile from './components/Profile';
+import Profile from './components/profile';
import React from 'react';
-import Settings from './components/Settings';
+import Settings from './components/settings';
import {isApiError} from '@src/api/activitypub';
import {useAccountForUser} from '@hooks/use-activity-pub-queries';
@@ -10,7 +10,7 @@ const Preferences: React.FC = () => {
const {data: account, isLoading: isLoadingAccount, error: accountError} = useAccountForUser('index', 'me');
if (accountError && isApiError(accountError)) {
- return ;
+ return ;
}
return (
diff --git a/apps/activitypub/src/views/Profile/components/ActorList.tsx b/apps/activitypub/src/views/profile/components/actor-list.tsx
similarity index 95%
rename from apps/activitypub/src/views/Profile/components/ActorList.tsx
rename to apps/activitypub/src/views/profile/components/actor-list.tsx
index 8d7390f8e42..6ed76aa87a9 100644
--- a/apps/activitypub/src/views/Profile/components/ActorList.tsx
+++ b/apps/activitypub/src/views/profile/components/actor-list.tsx
@@ -1,7 +1,7 @@
-import APAvatar from '@src/components/global/APAvatar';
-import ActivityItem from '@src/components/activities/ActivityItem';
-import FollowButton from '@src/components/global/FollowButton';
-import ProfilePreviewHoverCard from '@components/global/ProfilePreviewHoverCard';
+import APAvatar from '@src/components/global/ap-avatar';
+import ActivityItem from '@src/components/activities/activity-item';
+import FollowButton from '@src/components/global/follow-button';
+import ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';
import React, {useEffect, useRef} from 'react';
import getName from '@src/utils/get-name';
import getUsername from '@src/utils/get-username';
diff --git a/apps/activitypub/src/views/Profile/components/Likes.tsx b/apps/activitypub/src/views/profile/components/likes.tsx
similarity index 98%
rename from apps/activitypub/src/views/Profile/components/Likes.tsx
rename to apps/activitypub/src/views/profile/components/likes.tsx
index 561625c1270..4bf253f56c9 100644
--- a/apps/activitypub/src/views/Profile/components/Likes.tsx
+++ b/apps/activitypub/src/views/profile/components/likes.tsx
@@ -1,4 +1,4 @@
-import FeedItem from '@src/components/feed/FeedItem';
+import FeedItem from '@src/components/feed/feed-item';
import {Activity} from '@src/api/activitypub';
import {LoadingIndicator, LucideIcon, NoValueLabel, NoValueLabelIcon, Separator} from '@tryghost/shade';
import {useEffect, useRef} from 'react';
diff --git a/apps/activitypub/src/views/Profile/components/Posts.tsx b/apps/activitypub/src/views/profile/components/posts.tsx
similarity index 98%
rename from apps/activitypub/src/views/Profile/components/Posts.tsx
rename to apps/activitypub/src/views/profile/components/posts.tsx
index f40d61f29a4..9722933abd8 100644
--- a/apps/activitypub/src/views/Profile/components/Posts.tsx
+++ b/apps/activitypub/src/views/profile/components/posts.tsx
@@ -1,4 +1,4 @@
-import FeedItem from '@src/components/feed/FeedItem';
+import FeedItem from '@src/components/feed/feed-item';
import {Activity} from '@src/api/activitypub';
import {LoadingIndicator, LucideIcon, NoValueLabel, NoValueLabelIcon, Separator} from '@tryghost/shade';
import {useEffect, useRef} from 'react';
diff --git a/apps/activitypub/src/views/Profile/components/ProfileMenu.tsx b/apps/activitypub/src/views/profile/components/profile-menu.tsx
similarity index 99%
rename from apps/activitypub/src/views/Profile/components/ProfileMenu.tsx
rename to apps/activitypub/src/views/profile/components/profile-menu.tsx
index 13bfa885b7a..dd7913662af 100644
--- a/apps/activitypub/src/views/Profile/components/ProfileMenu.tsx
+++ b/apps/activitypub/src/views/profile/components/profile-menu.tsx
@@ -1,5 +1,5 @@
import React, {useState} from 'react';
-import UnblockDialog from './UnblockDialog';
+import UnblockDialog from './unblock-dialog';
import {Account} from '@src/api/activitypub';
import {
AlertDialog,
diff --git a/apps/activitypub/src/views/Profile/components/ProfilePage.tsx b/apps/activitypub/src/views/profile/components/profile-page.tsx
similarity index 97%
rename from apps/activitypub/src/views/Profile/components/ProfilePage.tsx
rename to apps/activitypub/src/views/profile/components/profile-page.tsx
index 17eccebb3f0..1895ce54844 100644
--- a/apps/activitypub/src/views/Profile/components/ProfilePage.tsx
+++ b/apps/activitypub/src/views/profile/components/profile-page.tsx
@@ -1,20 +1,20 @@
-import APAvatar from '@src/components/global/APAvatar';
-import EditProfile from '@src/views/Preferences/components/EditProfile';
-import FollowButton from '@src/components/global/FollowButton';
+import APAvatar from '@src/components/global/ap-avatar';
+import EditProfile from '@src/views/preferences/components/edit-profile';
+import FollowButton from '@src/components/global/follow-button';
import Layout from '@src/components/layout';
-import ProfileMenu from './ProfileMenu';
-import UnblockButton from './UnblockButton';
+import ProfileMenu from './profile-menu';
+import UnblockButton from './unblock-button';
import {Account} from '@src/api/activitypub';
import {Badge, Button, Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, H2, H4, LucideIcon, NoValueLabel, NoValueLabelIcon, Skeleton, Tabs, TabsContent, TabsList, TabsTrigger, TabsTriggerCount, abbreviateNumber} from '@tryghost/shade';
-import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/EmptyViewIndicator';
-import {SettingAction} from '@src/views/Preferences/components/Settings';
+import {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator';
+import {SettingAction} from '@src/views/preferences/components/settings';
import {openLinksInNewTab, stripHtml} from '@src/utils/content-formatters';
import {toast} from 'sonner';
import {useAccountForUser, useBlockDomainMutationForUser, useBlockMutationForUser, useUnblockDomainMutationForUser, useUnblockMutationForUser} from '@src/hooks/use-activity-pub-queries';
import {useEffect, useMemo, useRef, useState} from 'react';
import {useLocation, useNavigationStack, useParams} from '@tryghost/admin-x-framework';
import {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';
-import type {ProfileTab} from '../Profile';
+import type {ProfileTab} from '../profile';
const noop = () => {};
diff --git a/apps/activitypub/src/views/Profile/components/UnblockButton.tsx b/apps/activitypub/src/views/profile/components/unblock-button.tsx
similarity index 96%
rename from apps/activitypub/src/views/Profile/components/UnblockButton.tsx
rename to apps/activitypub/src/views/profile/components/unblock-button.tsx
index 12f7d304927..e1b66be20bf 100644
--- a/apps/activitypub/src/views/Profile/components/UnblockButton.tsx
+++ b/apps/activitypub/src/views/profile/components/unblock-button.tsx
@@ -1,5 +1,5 @@
import React, {useState} from 'react';
-import UnblockDialog from './UnblockDialog';
+import UnblockDialog from './unblock-dialog';
import {Account} from '@src/api/activitypub';
import {Button} from '@tryghost/shade';
diff --git a/apps/activitypub/src/views/Profile/components/UnblockDialog.tsx b/apps/activitypub/src/views/profile/components/unblock-dialog.tsx
similarity index 100%
rename from apps/activitypub/src/views/Profile/components/UnblockDialog.tsx
rename to apps/activitypub/src/views/profile/components/unblock-dialog.tsx
diff --git a/apps/activitypub/src/views/profile/index.tsx b/apps/activitypub/src/views/profile/index.tsx
new file mode 100644
index 00000000000..905b30cbd66
--- /dev/null
+++ b/apps/activitypub/src/views/profile/index.tsx
@@ -0,0 +1 @@
+export {default} from './profile';
diff --git a/apps/activitypub/src/views/Profile/Profile.tsx b/apps/activitypub/src/views/profile/profile.tsx
similarity index 94%
rename from apps/activitypub/src/views/Profile/Profile.tsx
rename to apps/activitypub/src/views/profile/profile.tsx
index 7faa0cde1dc..e2ba7acdadb 100644
--- a/apps/activitypub/src/views/Profile/Profile.tsx
+++ b/apps/activitypub/src/views/profile/profile.tsx
@@ -1,8 +1,8 @@
-import ActorList from './components/ActorList';
-import Error from '@components/layout/Error';
-import Likes from './components/Likes';
-import Posts from './components/Posts';
-import ProfilePage from './components/ProfilePage';
+import ActorList from './components/actor-list';
+import AppError from '@components/layout/error';
+import Likes from './components/likes';
+import Posts from './components/posts';
+import ProfilePage from './components/profile-page';
import React, {useEffect} from 'react';
import {Activity, isApiError} from '@src/api/activitypub';
import {useAccountFollowsForUser, useAccountForUser, usePostsByAccount, usePostsLikedByAccount} from '@hooks/use-activity-pub-queries';
@@ -146,7 +146,7 @@ const Profile: React.FC = ({}) => {
}, [params.handle, refetch]);
if (accountError && isApiError(accountError) && accountError.statusCode !== 404) {
- return ;
+ return ;
}
const customFields = Object.keys(account?.customFields || {}).map((key) => {
diff --git a/apps/activitypub/test/.eslintrc.cjs b/apps/activitypub/test/.eslintrc.cjs
index 42f8e77355a..7e1fcbff2b4 100644
--- a/apps/activitypub/test/.eslintrc.cjs
+++ b/apps/activitypub/test/.eslintrc.cjs
@@ -2,5 +2,9 @@ module.exports = {
plugins: ['ghost'],
extends: [
'plugin:ghost/ts-test'
- ]
+ ],
+ rules: {
+ // Enforce kebab-case (lowercase with hyphens) for all filenames
+ 'ghost/filenames/match-regex': ['error', '^[a-z0-9.-]+$', false]
+ }
};