Skip to content

Every analytics tool wants a subscription. And your data. I built Twiligent instead. YouTube stats. Instagram stats. One dashboard. Runs locally on your machine.

chore(ts): add TypeScript tooling and rename sources to .ts and .tsx

spacesdrive5f18044cffb2
diff --git a/backend/lib/cache.js b/backend/lib/cache.ts
similarity index 99%
rename from backend/lib/cache.js
rename to backend/lib/cache.ts
index 86f8591..bd37adc 100644
--- a/backend/lib/cache.js
+++ b/backend/lib/cache.ts
@@ -1,5 +1,5 @@
// every helper is a no-op without redis: the cache is optional
-export { createOAuthState, verifyOAuthState } from './oauthState.js';
+export { createOAuthState, verifyOAuthState } from './oauthState.ts';
// stats change constantly, so cached analytics expire instead of going stale
const ANALYTICS_TTL_SECONDS = 6 * 60 * 60;
diff --git a/backend/lib/crypto.js b/backend/lib/crypto.ts
similarity index 100%
rename from backend/lib/crypto.js
rename to backend/lib/crypto.ts
diff --git a/backend/lib/db.js b/backend/lib/db.ts
similarity index 100%
rename from backend/lib/db.js
rename to backend/lib/db.ts
diff --git a/backend/lib/oauthState.js b/backend/lib/oauthState.ts
similarity index 100%
rename from backend/lib/oauthState.js
rename to backend/lib/oauthState.ts
diff --git a/backend/lib/redis.js b/backend/lib/redis.ts
similarity index 100%
rename from backend/lib/redis.js
rename to backend/lib/redis.ts
diff --git a/backend/lib/safeAccount.js b/backend/lib/safeAccount.ts
similarity index 100%
rename from backend/lib/safeAccount.js
rename to backend/lib/safeAccount.ts
diff --git a/backend/lib/supabase.js b/backend/lib/supabase.ts
similarity index 100%
rename from backend/lib/supabase.js
rename to backend/lib/supabase.ts
diff --git a/backend/middleware/auth.js b/backend/middleware/auth.ts
similarity index 89%
rename from backend/middleware/auth.js
rename to backend/middleware/auth.ts
index 73e441d..483d37b 100644
--- a/backend/middleware/auth.js
+++ b/backend/middleware/auth.ts
@@ -1,4 +1,4 @@
-import { getSupabaseAuth } from '../lib/supabase.js';
+import { getSupabaseAuth } from '../lib/supabase.ts';
export async function requireAuth(c, next) {
const token = c.req.header('Authorization')?.replace('Bearer ', '');
diff --git a/backend/package.json b/backend/package.json
index 7db133c..51387ef 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -6,7 +6,8 @@
"dev": "wrangler dev",
"deploy": "wrangler deploy",
"start": "wrangler dev",
- "test": "node --test \"tests/**/*.test.js\""
+ "test": "node --test \"tests/**/*.test.ts\"",
+ "typecheck": "tsc -p tsconfig.json && tsc -p tests/tsconfig.json"
},
"dependencies": {
"@supabase/supabase-js": "^2.49.4",
@@ -14,6 +15,7 @@
"hono": "^4.6.0"
},
"devDependencies": {
+ "@cloudflare/workers-types": "^5.20261013.1",
"wrangler": "^3.0.0"
}
}
diff --git a/backend/routes/accounts.js b/backend/routes/accounts.ts
similarity index 97%
rename from backend/routes/accounts.js
rename to backend/routes/accounts.ts
index d25f971..94ade5f 100644
--- a/backend/routes/accounts.js
+++ b/backend/routes/accounts.ts
@@ -1,12 +1,12 @@
import { Hono } from 'hono';
-import { getAccounts, getAccountById, deleteAccount } from '../lib/db.js';
-import { deleteVideosCache, deleteIGCache, deleteRedditCache } from '../lib/cache.js';
-import { resolveChannelId, fetchChannelData } from '../services/youtube.js';
+import { getAccounts, getAccountById, deleteAccount } from '../lib/db.ts';
+import { deleteVideosCache, deleteIGCache, deleteRedditCache } from '../lib/cache.ts';
+import { resolveChannelId, fetchChannelData } from '../services/youtube.ts';
import {
addYouTubeAccount, addRedditAccount, addInstagramAccount, refreshInstagramToken,
-} from '../services/accountConnect.js';
-import { refreshAccount, refreshAllAccounts } from '../services/accountRefresh.js';
-import { safeAccount } from '../lib/safeAccount.js';
+} from '../services/accountConnect.ts';
+import { refreshAccount, refreshAllAccounts } from '../services/accountRefresh.ts';
+import { safeAccount } from '../lib/safeAccount.ts';
const app = new Hono();
diff --git a/backend/routes/analytics.js b/backend/routes/analytics.ts
similarity index 98%
rename from backend/routes/analytics.js
rename to backend/routes/analytics.ts
index 08f7d93..60e864f 100644
--- a/backend/routes/analytics.js
+++ b/backend/routes/analytics.ts
@@ -1,10 +1,10 @@
import { Hono } from 'hono';
-import { getAccounts, getAccountById, updateAccount } from '../lib/db.js';
-import { getVideosCache, setVideosCache, getIGCache, setIGCache } from '../lib/cache.js';
-import { fetchAllVideos, computeVideoAnalytics } from '../services/youtube.js';
-import { fetchInstagramProfile, fetchInstagramMedia, computeInstagramAnalytics } from '../services/instagram.js';
-import { channelMetrics, accountComparison, filterAndSortVideos } from '../services/youtubeLibrary.js';
-import { backfillChannelData } from '../services/accountRefresh.js';
+import { getAccounts, getAccountById, updateAccount } from '../lib/db.ts';
+import { getVideosCache, setVideosCache, getIGCache, setIGCache } from '../lib/cache.ts';
+import { fetchAllVideos, computeVideoAnalytics } from '../services/youtube.ts';
+import { fetchInstagramProfile, fetchInstagramMedia, computeInstagramAnalytics } from '../services/instagram.ts';
+import { channelMetrics, accountComparison, filterAndSortVideos } from '../services/youtubeLibrary.ts';
+import { backfillChannelData } from '../services/accountRefresh.ts';
const app = new Hono();
diff --git a/backend/routes/instagramAuth.js b/backend/routes/instagramAuth.ts
similarity index 95%
rename from backend/routes/instagramAuth.js
rename to backend/routes/instagramAuth.ts
index 8833fb9..894849f 100644
--- a/backend/routes/instagramAuth.js
+++ b/backend/routes/instagramAuth.ts
@@ -1,7 +1,7 @@
-import { verifyOAuthState } from '../lib/oauthState.js';
+import { verifyOAuthState } from '../lib/oauthState.ts';
import {
readInstagramOAuthConfig, buildAuthorizationUrl, connectInstagramFromOAuth,
-} from '../services/instagramOAuth.js';
+} from '../services/instagramOAuth.ts';
// GET /api/auth/instagram/url - protected; returns the frontend redirect url
export async function urlHandler(c) {
diff --git a/backend/routes/keys.js b/backend/routes/keys.ts
similarity index 100%
rename from backend/routes/keys.js
rename to backend/routes/keys.ts
diff --git a/backend/routes/overview.js b/backend/routes/overview.ts
similarity index 94%
rename from backend/routes/overview.js
rename to backend/routes/overview.ts
index 8406ea1..d7b39be 100644
--- a/backend/routes/overview.js
+++ b/backend/routes/overview.ts
@@ -1,6 +1,6 @@
import { Hono } from 'hono';
-import { getAccounts, getTrackedPosts } from '../lib/db.js';
-import { summarizeAccountCaches } from '../services/overviewSummary.js';
+import { getAccounts, getTrackedPosts } from '../lib/db.ts';
+import { summarizeAccountCaches } from '../services/overviewSummary.ts';
const router = new Hono();
diff --git a/backend/routes/publishing.js b/backend/routes/publishing.ts
similarity index 97%
rename from backend/routes/publishing.js
rename to backend/routes/publishing.ts
index d7b0c4c..da83154 100644
--- a/backend/routes/publishing.js
+++ b/backend/routes/publishing.ts
@@ -1,6 +1,6 @@
import { Hono } from 'hono';
-import { getAccountById } from '../lib/db.js';
-import { buildMediaParams } from '../services/instagram.js';
+import { getAccountById } from '../lib/db.ts';
+import { buildMediaParams } from '../services/instagram.ts';
const app = new Hono();
diff --git a/backend/routes/reddit.js b/backend/routes/reddit.ts
similarity index 94%
rename from backend/routes/reddit.js
rename to backend/routes/reddit.ts
index cafdf1b..9c13de1 100644
--- a/backend/routes/reddit.js
+++ b/backend/routes/reddit.ts
@@ -1,7 +1,7 @@
import { Hono } from 'hono';
-import { getAccountById } from '../lib/db.js';
-import { getRedditCache, setRedditCache } from '../lib/cache.js';
-import { fetchRedditProfile, fetchRedditPosts, computeRedditAnalytics } from '../services/reddit.js';
+import { getAccountById } from '../lib/db.ts';
+import { getRedditCache, setRedditCache } from '../lib/cache.ts';
+import { fetchRedditProfile, fetchRedditPosts, computeRedditAnalytics } from '../services/reddit.ts';
const router = new Hono();
diff --git a/backend/routes/scheduledPosts.js b/backend/routes/scheduledPosts.ts
similarity index 98%
rename from backend/routes/scheduledPosts.js
rename to backend/routes/scheduledPosts.ts
index 0744024..1c148b5 100644
--- a/backend/routes/scheduledPosts.js
+++ b/backend/routes/scheduledPosts.ts
@@ -1,6 +1,6 @@
import { Hono } from 'hono';
-import { getPosts, getPostById, createPost, updatePost, deletePost, deleteAllPosts } from '../lib/db.js';
-import { generateId, processScheduledPosts } from '../utils/scheduler.js';
+import { getPosts, getPostById, createPost, updatePost, deletePost, deleteAllPosts } from '../lib/db.ts';
+import { generateId, processScheduledPosts } from '../utils/scheduler.ts';
const app = new Hono();
diff --git a/backend/routes/settings.js b/backend/routes/settings.ts
similarity index 94%
rename from backend/routes/settings.js
rename to backend/routes/settings.ts
index 2e3e475..2bce6d4 100644
--- a/backend/routes/settings.js
+++ b/backend/routes/settings.ts
@@ -1,5 +1,5 @@
import { Hono } from 'hono';
-import { getSettings, saveSettings } from '../lib/db.js';
+import { getSettings, saveSettings } from '../lib/db.ts';
const app = new Hono();
diff --git a/backend/routes/trackedContent.js b/backend/routes/trackedContent.ts
similarity index 97%
rename from backend/routes/trackedContent.js
rename to backend/routes/trackedContent.ts
index d090e8a..761fbdb 100644
--- a/backend/routes/trackedContent.js
+++ b/backend/routes/trackedContent.ts
@@ -7,10 +7,10 @@ import {
patchTrackedPostData,
deleteTrackedPost,
getAccountById,
-} from '../lib/db.js';
-import { fetchTrackedPostData } from '../services/reddit.js';
-import { fetchTrackedYouTubeData } from '../services/youtube.js';
-import { detectContentType, manualViewsPatch, imageUrlPatch } from '../services/trackedContent.js';
+} from '../lib/db.ts';
+import { fetchTrackedPostData } from '../services/reddit.ts';
+import { fetchTrackedYouTubeData } from '../services/youtube.ts';
+import { detectContentType, manualViewsPatch, imageUrlPatch } from '../services/trackedContent.ts';
const router = new Hono();
diff --git a/backend/server.js b/backend/server.ts
similarity index 70%
rename from backend/server.js
rename to backend/server.ts
index e5bfc83..c1681ee 100644
--- a/backend/server.js
+++ b/backend/server.ts
@@ -1,21 +1,21 @@
import { Hono } from 'hono';
import { cors } from 'hono/cors';
-import { getSupabase } from './lib/supabase.js';
-import { getRedis } from './lib/redis.js';
-import { requireAuth } from './middleware/auth.js';
-import keysRouter from './routes/keys.js';
-import accountsRouter from './routes/accounts.js';
-import analyticsRouter from './routes/analytics.js';
-import publishingRouter from './routes/publishing.js';
-import scheduledPostsRouter from './routes/scheduledPosts.js';
-import settingsRouter from './routes/settings.js';
-import redditRouter from './routes/reddit.js';
-import trackedContentRouter from './routes/trackedContent.js';
-import overviewRouter from './routes/overview.js';
-import { urlHandler, callbackHandler } from './routes/instagramAuth.js';
-import { processScheduledPosts } from './utils/scheduler.js';
-import { autoRefreshInstagramTokens } from './services/instagram.js';
-import { autoRefreshRedditSessions } from './services/reddit.js';
+import { getSupabase } from './lib/supabase.ts';
+import { getRedis } from './lib/redis.ts';
+import { requireAuth } from './middleware/auth.ts';
+import keysRouter from './routes/keys.ts';
+import accountsRouter from './routes/accounts.ts';
+import analyticsRouter from './routes/analytics.ts';
+import publishingRouter from './routes/publishing.ts';
+import scheduledPostsRouter from './routes/scheduledPosts.ts';
+import settingsRouter from './routes/settings.ts';
+import redditRouter from './routes/reddit.ts';
+import trackedContentRouter from './routes/trackedContent.ts';
+import overviewRouter from './routes/overview.ts';
+import { urlHandler, callbackHandler } from './routes/instagramAuth.ts';
+import { processScheduledPosts } from './utils/scheduler.ts';
+import { autoRefreshInstagramTokens } from './services/instagram.ts';
+import { autoRefreshRedditSessions } from './services/reddit.ts';
const app = new Hono();
diff --git a/backend/services/accountConnect.js b/backend/services/accountConnect.ts
similarity index 94%
rename from backend/services/accountConnect.js
rename to backend/services/accountConnect.ts
index 123cc6e..e336a39 100644
--- a/backend/services/accountConnect.js
+++ b/backend/services/accountConnect.ts
@@ -1,9 +1,9 @@
-import { getAccounts, getAccountById, createAccount, updateAccount } from '../lib/db.js';
-import { resolveChannelId, fetchChannelData } from './youtubeChannels.js';
-import { fetchRedditProfile } from './reddit.js';
-import { fetchInstagramProfile } from './instagramApi.js';
-import { exchangeForLongLivedToken, refreshLongLivedToken } from './instagramTokens.js';
-import { buildYouTubeAccount, buildRedditAccount, buildInstagramAccount } from './accountFactory.js';
+import { getAccounts, getAccountById, createAccount, updateAccount } from '../lib/db.ts';
+import { resolveChannelId, fetchChannelData } from './youtubeChannels.ts';
+import { fetchRedditProfile } from './reddit.ts';
+import { fetchInstagramProfile } from './instagramApi.ts';
+import { exchangeForLongLivedToken, refreshLongLivedToken } from './instagramTokens.ts';
+import { buildYouTubeAccount, buildRedditAccount, buildInstagramAccount } from './accountFactory.ts';
const DEFAULT_TOKEN_LIFETIME_S = 5184000;
diff --git a/backend/services/accountFactory.js b/backend/services/accountFactory.ts
similarity index 100%
rename from backend/services/accountFactory.js
rename to backend/services/accountFactory.ts
diff --git a/backend/services/accountRefresh.js b/backend/services/accountRefresh.ts
similarity index 96%
rename from backend/services/accountRefresh.js
rename to backend/services/accountRefresh.ts
index bac0f18..e887608 100644
--- a/backend/services/accountRefresh.js
+++ b/backend/services/accountRefresh.ts
@@ -1,7 +1,7 @@
-import { getAccounts, getAccountById, updateAccount } from '../lib/db.js';
-import { fetchChannelData } from './youtubeChannels.js';
-import { fetchRedditProfile } from './reddit.js';
-import { fetchInstagramProfile } from './instagramApi.js';
+import { getAccounts, getAccountById, updateAccount } from '../lib/db.ts';
+import { fetchChannelData } from './youtubeChannels.ts';
+import { fetchRedditProfile } from './reddit.ts';
+import { fetchInstagramProfile } from './instagramApi.ts';
const NO_COOKIE_MESSAGE = 'No session cookie stored - re-add this account with a session cookie from reddit.com DevTools';
diff --git a/backend/services/analyticsMath.js b/backend/services/analyticsMath.ts
similarity index 100%
rename from backend/services/analyticsMath.js
rename to backend/services/analyticsMath.ts
diff --git a/backend/services/instagram.js b/backend/services/instagram.ts
similarity index 56%
rename from backend/services/instagram.js
rename to backend/services/instagram.ts
index 2d5cfc4..c1a977e 100644
--- a/backend/services/instagram.js
+++ b/backend/services/instagram.ts
@@ -1,8 +1,8 @@
-export { fetchInstagramProfile } from './instagramApi.js';
-export { exchangeForLongLivedToken, refreshLongLivedToken, autoRefreshInstagramTokens } from './instagramTokens.js';
+export { fetchInstagramProfile } from './instagramApi.ts';
+export { exchangeForLongLivedToken, refreshLongLivedToken, autoRefreshInstagramTokens } from './instagramTokens.ts';
export {
classifyInstagramMedia, extractInstagramViews, normalizeInstagramMedia, fetchInstagramMedia,
-} from './instagramMedia.js';
-export { CONTENT_TYPES, summarizeContentTypes } from './instagramContentTypes.js';
-export { computeInstagramAnalytics } from './instagramAnalytics.js';
-export { buildMediaParams } from './instagramPublishing.js';
+} from './instagramMedia.ts';
+export { CONTENT_TYPES, summarizeContentTypes } from './instagramContentTypes.ts';
+export { computeInstagramAnalytics } from './instagramAnalytics.ts';
+export { buildMediaParams } from './instagramPublishing.ts';
diff --git a/backend/services/instagramAnalytics.js b/backend/services/instagramAnalytics.ts
similarity index 97%
rename from backend/services/instagramAnalytics.js
rename to backend/services/instagramAnalytics.ts
index 97fa280..6c7d6bc 100644
--- a/backend/services/instagramAnalytics.js
+++ b/backend/services/instagramAnalytics.ts
@@ -1,10 +1,10 @@
import {
sumOf, roundedAverage, medianOf, countWithinDays, postFrequency,
consistencyScore, bestToAverageRatio,
-} from './analyticsMath.js';
-import { CONTENT_TYPES, buildContentTypeStats } from './instagramContentTypes.js';
-import { summarizeTiming } from './instagramTiming.js';
-import { buildHashtagAnalysis, buildCaptionLengthCorrelation } from './instagramCaptions.js';
+} from './analyticsMath.ts';
+import { CONTENT_TYPES, buildContentTypeStats } from './instagramContentTypes.ts';
+import { summarizeTiming } from './instagramTiming.ts';
+import { buildHashtagAnalysis, buildCaptionLengthCorrelation } from './instagramCaptions.ts';
function emptyInstagramAnalytics(profile) {
return {
diff --git a/backend/services/instagramApi.js b/backend/services/instagramApi.ts
similarity index 100%
rename from backend/services/instagramApi.js
rename to backend/services/instagramApi.ts
diff --git a/backend/services/instagramCaptions.js b/backend/services/instagramCaptions.ts
similarity index 96%
rename from backend/services/instagramCaptions.js
rename to backend/services/instagramCaptions.ts
index 17822e9..8957bdd 100644
--- a/backend/services/instagramCaptions.js
+++ b/backend/services/instagramCaptions.ts
@@ -1,4 +1,4 @@
-import { sumOf, roundedAverage } from './analyticsMath.js';
+import { sumOf, roundedAverage } from './analyticsMath.ts';
const HASHTAG_PATTERN = /#[\wÀ-ɏ]+/g;
const MAX_HASHTAGS = 20;
diff --git a/backend/services/instagramContentTypes.js b/backend/services/instagramContentTypes.ts
similarity index 96%
rename from backend/services/instagramContentTypes.js
rename to backend/services/instagramContentTypes.ts
index bcd2259..79b7165 100644
--- a/backend/services/instagramContentTypes.js
+++ b/backend/services/instagramContentTypes.ts
@@ -1,4 +1,4 @@
-import { roundedAverage } from './analyticsMath.js';
+import { roundedAverage } from './analyticsMath.ts';
export const CONTENT_TYPES = ['reel', 'post', 'video'];
diff --git a/backend/services/instagramMedia.js b/backend/services/instagramMedia.ts
similarity index 98%
rename from backend/services/instagramMedia.js
rename to backend/services/instagramMedia.ts
index fd7966f..ca9d5c8 100644
--- a/backend/services/instagramMedia.js
+++ b/backend/services/instagramMedia.ts
@@ -1,4 +1,4 @@
-import { igFetch } from './instagramApi.js';
+import { igFetch } from './instagramApi.ts';
const MEDIA_FIELDS = 'id,caption,media_type,media_product_type,media_url,thumbnail_url,cover_url,permalink,timestamp,like_count,comments_count';
const VIEWS_FIELD = 'insights.metric(views)';
diff --git a/backend/services/instagramOAuth.js b/backend/services/instagramOAuth.ts
similarity index 94%
rename from backend/services/instagramOAuth.js
rename to backend/services/instagramOAuth.ts
index 2ca15d0..d8e9d47 100644
--- a/backend/services/instagramOAuth.js
+++ b/backend/services/instagramOAuth.ts
@@ -1,7 +1,7 @@
-import { createOAuthState } from '../lib/oauthState.js';
-import { createAccount, getAccounts } from '../lib/db.js';
-import { fetchInstagramProfile } from './instagramApi.js';
-import { buildInstagramAccount } from './accountFactory.js';
+import { createOAuthState } from '../lib/oauthState.ts';
+import { createAccount, getAccounts } from '../lib/db.ts';
+import { fetchInstagramProfile } from './instagramApi.ts';
+import { buildInstagramAccount } from './accountFactory.ts';
const DEFAULT_BACKEND_URL = 'http://localhost:8787';
const DEFAULT_FRONTEND_URL = 'http://localhost:5173';
diff --git a/backend/services/instagramPublishing.js b/backend/services/instagramPublishing.ts
similarity index 100%
rename from backend/services/instagramPublishing.js
rename to backend/services/instagramPublishing.ts
diff --git a/backend/services/instagramTiming.js b/backend/services/instagramTiming.ts
similarity index 99%
rename from backend/services/instagramTiming.js
rename to backend/services/instagramTiming.ts
index b051329..2c33ec4 100644
--- a/backend/services/instagramTiming.js
+++ b/backend/services/instagramTiming.ts
@@ -1,4 +1,4 @@
-import { DAY_NAMES, roundedAverage, pickHighest, monthKey } from './analyticsMath.js';
+import { DAY_NAMES, roundedAverage, pickHighest, monthKey } from './analyticsMath.ts';
function emptyBuckets(size) {
return Array(size).fill(null).map(() => ({ count: 0, likes: 0, comments: 0 }));
diff --git a/backend/services/instagramTokens.js b/backend/services/instagramTokens.ts
similarity index 95%
rename from backend/services/instagramTokens.js
rename to backend/services/instagramTokens.ts
index e0694ce..7a8a54e 100644
--- a/backend/services/instagramTokens.js
+++ b/backend/services/instagramTokens.ts
@@ -1,5 +1,5 @@
-import { getAccounts, updateAccount } from '../lib/db.js';
-import { igFetch } from './instagramApi.js';
+import { getAccounts, updateAccount } from '../lib/db.ts';
+import { igFetch } from './instagramApi.ts';
const DEFAULT_TOKEN_LIFETIME_S = 5184000;
const REFRESH_WINDOW_MS = 15 * 24 * 60 * 60 * 1000;
diff --git a/backend/services/overviewSummary.js b/backend/services/overviewSummary.ts
similarity index 96%
rename from backend/services/overviewSummary.js
rename to backend/services/overviewSummary.ts
index 949fa67..5cc14b7 100644
--- a/backend/services/overviewSummary.js
+++ b/backend/services/overviewSummary.ts
@@ -1,7 +1,7 @@
-import { getVideosCache, setVideosCache, getIGCache, setIGCache, getRedditCache, setRedditCache } from '../lib/cache.js';
-import { fetchAllVideos } from './youtube.js';
-import { fetchInstagramMedia, summarizeContentTypes } from './instagram.js';
-import { fetchRedditProfile, fetchRedditPosts, computeRedditAnalytics } from './reddit.js';
+import { getVideosCache, setVideosCache, getIGCache, setIGCache, getRedditCache, setRedditCache } from '../lib/cache.ts';
+import { fetchAllVideos } from './youtube.ts';
+import { fetchInstagramMedia, summarizeContentTypes } from './instagram.ts';
+import { fetchRedditProfile, fetchRedditPosts, computeRedditAnalytics } from './reddit.ts';
function sumBy(items, pick) {
return items.reduce((total, item) => total + pick(item), 0);
diff --git a/backend/services/reddit.js b/backend/services/reddit.ts
similarity index 98%
rename from backend/services/reddit.js
rename to backend/services/reddit.ts
index 7f2a81b..132e640 100644
--- a/backend/services/reddit.js
+++ b/backend/services/reddit.ts
@@ -1,4 +1,4 @@
-export { computeRedditAnalytics } from './redditAnalytics.js';
+export { computeRedditAnalytics } from './redditAnalytics.ts';
// fetch is a worker global; requests send the stored reddit_session cookie
const REDDIT_BASE = 'https://www.reddit.com';
diff --git a/backend/services/redditAnalytics.js b/backend/services/redditAnalytics.ts
similarity index 99%
rename from backend/services/redditAnalytics.js
rename to backend/services/redditAnalytics.ts
index a1fdffa..66e0125 100644
--- a/backend/services/redditAnalytics.js
+++ b/backend/services/redditAnalytics.ts
@@ -1,7 +1,7 @@
import {
DAY_NAMES, sumOf, roundedAverage, medianOf, countWithinDays, postFrequency,
consistencyScore, bestToAverageRatio, pickHighest, monthKey,
-} from './analyticsMath.js';
+} from './analyticsMath.ts';
const MAX_SUBREDDITS = 20;
diff --git a/backend/services/trackedContent.js b/backend/services/trackedContent.ts
similarity index 100%
rename from backend/services/trackedContent.js
rename to backend/services/trackedContent.ts
diff --git a/backend/services/youtube.js b/backend/services/youtube.js
deleted file mode 100644
index c645941..0000000
--- a/backend/services/youtube.js
+++ /dev/null
@@ -1,4 +0,0 @@
-export { resolveChannelId, fetchChannelData } from './youtubeChannels.js';
-export { fetchAllVideos } from './youtubeVideos.js';
-export { fetchTrackedYouTubeData } from './youtubeTracked.js';
-export { computeVideoAnalytics } from './youtubeAnalytics.js';
diff --git a/backend/services/youtube.ts b/backend/services/youtube.ts
new file mode 100644
index 0000000..a33c2b9
--- /dev/null
+++ b/backend/services/youtube.ts
@@ -0,0 +1,4 @@
+export { resolveChannelId, fetchChannelData } from './youtubeChannels.ts';
+export { fetchAllVideos } from './youtubeVideos.ts';
+export { fetchTrackedYouTubeData } from './youtubeTracked.ts';
+export { computeVideoAnalytics } from './youtubeAnalytics.ts';
diff --git a/backend/services/youtubeAnalytics.js b/backend/services/youtubeAnalytics.ts
similarity index 99%
rename from backend/services/youtubeAnalytics.js
rename to backend/services/youtubeAnalytics.ts
index 9d2bada..cf9df1e 100644
--- a/backend/services/youtubeAnalytics.js
+++ b/backend/services/youtubeAnalytics.ts
@@ -1,9 +1,9 @@
-import { DAY_MS, sumOf, roundedAverage, medianOf } from './analyticsMath.js';
-import { parseDuration, formatDuration, formatVideoSummary } from './youtubeFormat.js';
+import { DAY_MS, sumOf, roundedAverage, medianOf } from './analyticsMath.ts';
+import { parseDuration, formatDuration, formatVideoSummary } from './youtubeFormat.ts';
import {
buildPublishTiming, buildCategoryDistribution, buildTagFrequency, countRecentUploads,
buildUploadFrequency, weeklyConsistencyScore, buildViewsDistribution, buildMonthlyTrends,
-} from './youtubeTrends.js';
+} from './youtubeTrends.ts';
// shorts are judged by duration alone: any video up to 60 seconds counts
const SHORT_MAX_SECONDS = 60;
diff --git a/backend/services/youtubeApi.js b/backend/services/youtubeApi.ts
similarity index 100%
rename from backend/services/youtubeApi.js
rename to backend/services/youtubeApi.ts
diff --git a/backend/services/youtubeChannels.js b/backend/services/youtubeChannels.ts
similarity index 98%
rename from backend/services/youtubeChannels.js
rename to backend/services/youtubeChannels.ts
index 167892c..f53afb9 100644
--- a/backend/services/youtubeChannels.js
+++ b/backend/services/youtubeChannels.ts
@@ -1,4 +1,4 @@
-import { ytFetch } from './youtubeApi.js';
+import { ytFetch } from './youtubeApi.ts';
const CHANNEL_ID_PATTERN = /^UC[\w-]{22}$/;
const CHANNEL_URL_PATTERNS = [
diff --git a/backend/services/youtubeFormat.js b/backend/services/youtubeFormat.ts
similarity index 100%
rename from backend/services/youtubeFormat.js
rename to backend/services/youtubeFormat.ts
diff --git a/backend/services/youtubeLibrary.js b/backend/services/youtubeLibrary.ts
similarity index 98%
rename from backend/services/youtubeLibrary.js
rename to backend/services/youtubeLibrary.ts
index d9242d3..aefdf4c 100644
--- a/backend/services/youtubeLibrary.js
+++ b/backend/services/youtubeLibrary.ts
@@ -1,4 +1,4 @@
-import { DAY_MS } from './analyticsMath.js';
+import { DAY_MS } from './analyticsMath.ts';
// a channel without a creation date is treated as a year old
export function channelMetrics(account) {
diff --git a/backend/services/youtubeTracked.js b/backend/services/youtubeTracked.ts
similarity index 96%
rename from backend/services/youtubeTracked.js
rename to backend/services/youtubeTracked.ts
index 24b65fe..9c1f649 100644
--- a/backend/services/youtubeTracked.js
+++ b/backend/services/youtubeTracked.ts
@@ -1,4 +1,4 @@
-import { ytFetch, optionalCount } from './youtubeApi.js';
+import { ytFetch, optionalCount } from './youtubeApi.ts';
export function extractYouTubeVideoId(url) {
let parsedUrl;
diff --git a/backend/services/youtubeTrends.js b/backend/services/youtubeTrends.ts
similarity index 97%
rename from backend/services/youtubeTrends.js
rename to backend/services/youtubeTrends.ts
index 0f6f871..4f73b94 100644
--- a/backend/services/youtubeTrends.js
+++ b/backend/services/youtubeTrends.ts
@@ -1,5 +1,5 @@
-import { DAY_NAMES, DAY_MS, monthKey } from './analyticsMath.js';
-import { formatCompact } from './youtubeFormat.js';
+import { DAY_NAMES, DAY_MS, monthKey } from './analyticsMath.ts';
+import { formatCompact } from './youtubeFormat.ts';
const WEEK_MS = 7 * DAY_MS;
const HISTOGRAM_BUCKETS = 10;
diff --git a/backend/services/youtubeVideos.js b/backend/services/youtubeVideos.ts
similarity index 98%
rename from backend/services/youtubeVideos.js
rename to backend/services/youtubeVideos.ts
index 20cbc31..76ec263 100644
--- a/backend/services/youtubeVideos.js
+++ b/backend/services/youtubeVideos.ts
@@ -1,4 +1,4 @@
-import { ytFetch, optionalCount } from './youtubeApi.js';
+import { ytFetch, optionalCount } from './youtubeApi.ts';
export function normalizeYouTubeVideo(video) {
const { snippet, contentDetails, statistics, status } = video;
diff --git a/backend/tests/fixtures/fakeFetch.js b/backend/tests/fixtures/fakeFetch.ts
similarity index 100%
rename from backend/tests/fixtures/fakeFetch.js
rename to backend/tests/fixtures/fakeFetch.ts
diff --git a/backend/tests/fixtures/fakeSupabase.js b/backend/tests/fixtures/fakeSupabase.ts
similarity index 100%
rename from backend/tests/fixtures/fakeSupabase.js
rename to backend/tests/fixtures/fakeSupabase.ts
diff --git a/backend/tests/fixtures/golden.js b/backend/tests/fixtures/golden.ts
similarity index 100%
rename from backend/tests/fixtures/golden.js
rename to backend/tests/fixtures/golden.ts
diff --git a/backend/tests/fixtures/instagramFixtures.js b/backend/tests/fixtures/instagramFixtures.ts
similarity index 100%
rename from backend/tests/fixtures/instagramFixtures.js
rename to backend/tests/fixtures/instagramFixtures.ts
diff --git a/backend/tests/fixtures/redditFixtures.js b/backend/tests/fixtures/redditFixtures.ts
similarity index 100%
rename from backend/tests/fixtures/redditFixtures.js
rename to backend/tests/fixtures/redditFixtures.ts
diff --git a/backend/tests/fixtures/routeHarness.js b/backend/tests/fixtures/routeHarness.ts
similarity index 100%
rename from backend/tests/fixtures/routeHarness.js
rename to backend/tests/fixtures/routeHarness.ts
diff --git a/backend/tests/fixtures/youtubeFixtures.js b/backend/tests/fixtures/youtubeFixtures.ts
similarity index 100%
rename from backend/tests/fixtures/youtubeFixtures.js
rename to backend/tests/fixtures/youtubeFixtures.ts
diff --git a/backend/tests/lib/cache.test.js b/backend/tests/lib/cache.test.ts
similarity index 98%
rename from backend/tests/lib/cache.test.js
rename to backend/tests/lib/cache.test.ts
index 628d52f..41c4c3e 100644
--- a/backend/tests/lib/cache.test.js
+++ b/backend/tests/lib/cache.test.ts
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
import {
getVideosCache, setVideosCache, deleteVideosCache,
getIGCache, setIGCache, getRedditCache, setRedditCache,
-} from '../../lib/cache.js';
+} from '../../lib/cache.ts';
function memoryRedis() {
const store = new Map();
diff --git a/backend/tests/lib/oauthState.test.js b/backend/tests/lib/oauthState.test.ts
similarity index 99%
rename from backend/tests/lib/oauthState.test.js
rename to backend/tests/lib/oauthState.test.ts
index c189bfe..287af50 100644
--- a/backend/tests/lib/oauthState.test.js
+++ b/backend/tests/lib/oauthState.test.ts
@@ -1,6 +1,6 @@
import { test, mock } from 'node:test';
import assert from 'node:assert/strict';
-import { createOAuthState, verifyOAuthState } from '../../lib/oauthState.js';
+import { createOAuthState, verifyOAuthState } from '../../lib/oauthState.ts';
test('a state verifies back to its user id', async () => {
const state = await createOAuthState('user-123', 'secret');
diff --git a/backend/tests/lib/safeAccount.test.js b/backend/tests/lib/safeAccount.test.ts
similarity index 93%
rename from backend/tests/lib/safeAccount.test.js
rename to backend/tests/lib/safeAccount.test.ts
index c9efda7..8b5a46c 100644
--- a/backend/tests/lib/safeAccount.test.js
+++ b/backend/tests/lib/safeAccount.test.ts
@@ -1,7 +1,7 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { safeAccount } from '../../lib/safeAccount.js';
-import { buildMediaParams } from '../../services/instagram.js';
+import { safeAccount } from '../../lib/safeAccount.ts';
+import { buildMediaParams } from '../../services/instagram.ts';
test('safeAccount strips every credential and reports cookie presence', () => {
const out = safeAccount({
diff --git a/backend/tests/routes/accounts.test.js b/backend/tests/routes/accounts.test.ts
similarity index 97%
rename from backend/tests/routes/accounts.test.js
rename to backend/tests/routes/accounts.test.ts
index f2e8a26..2079e5b 100644
--- a/backend/tests/routes/accounts.test.js
+++ b/backend/tests/routes/accounts.test.ts
@@ -2,11 +2,11 @@
process.removeAllListeners('warning');
import { test, describe, before, after, beforeEach, afterEach, mock } from 'node:test';
-import accountsRouter from '../../routes/accounts.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { installFetch, reply } from '../fixtures/fakeFetch.js';
-import { fakeSupabase, accountRow } from '../fixtures/fakeSupabase.js';
-import { mountWithContext, callRoute, fakeRedis } from '../fixtures/routeHarness.js';
+import accountsRouter from '../../routes/accounts.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { installFetch, reply } from '../fixtures/fakeFetch.ts';
+import { fakeSupabase, accountRow } from '../fixtures/fakeSupabase.ts';
+import { mountWithContext, callRoute, fakeRedis } from '../fixtures/routeHarness.ts';
// a byte order mark that pasted secrets sometimes start with
const BOM = String.fromCharCode(0xfeff);
diff --git a/backend/tests/routes/analytics.test.js b/backend/tests/routes/analytics.test.ts
similarity index 96%
rename from backend/tests/routes/analytics.test.js
rename to backend/tests/routes/analytics.test.ts
index 0e0f057..0f7e71b 100644
--- a/backend/tests/routes/analytics.test.js
+++ b/backend/tests/routes/analytics.test.ts
@@ -2,12 +2,12 @@
process.removeAllListeners('warning');
import { test, describe, before, after, afterEach, mock } from 'node:test';
-import analyticsRouter from '../../routes/analytics.js';
-import overviewRouter from '../../routes/overview.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { installFetch, reply } from '../fixtures/fakeFetch.js';
-import { fakeSupabase, accountRow, tableRow } from '../fixtures/fakeSupabase.js';
-import { mountWithContext, callRoute } from '../fixtures/routeHarness.js';
+import analyticsRouter from '../../routes/analytics.ts';
+import overviewRouter from '../../routes/overview.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { installFetch, reply } from '../fixtures/fakeFetch.ts';
+import { fakeSupabase, accountRow, tableRow } from '../fixtures/fakeSupabase.ts';
+import { mountWithContext, callRoute } from '../fixtures/routeHarness.ts';
const FIXED_NOW = Date.parse('2026-09-01T12:00:00Z');
const ENV = { YOUTUBE_API_KEY: 'YTKEY' };
diff --git a/backend/tests/routes/instagramAuth.test.js b/backend/tests/routes/instagramAuth.test.ts
similarity index 96%
rename from backend/tests/routes/instagramAuth.test.js
rename to backend/tests/routes/instagramAuth.test.ts
index 366104d..35014f4 100644
--- a/backend/tests/routes/instagramAuth.test.js
+++ b/backend/tests/routes/instagramAuth.test.ts
@@ -2,12 +2,12 @@
process.removeAllListeners('warning');
import { test, describe, before, after, beforeEach, afterEach, mock } from 'node:test';
-import { urlHandler, callbackHandler } from '../../routes/instagramAuth.js';
-import { createOAuthState } from '../../lib/cache.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { installFetch, reply } from '../fixtures/fakeFetch.js';
-import { fakeSupabase, accountRow } from '../fixtures/fakeSupabase.js';
-import { mountWithContext, callRoute } from '../fixtures/routeHarness.js';
+import { urlHandler, callbackHandler } from '../../routes/instagramAuth.ts';
+import { createOAuthState } from '../../lib/cache.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { installFetch, reply } from '../fixtures/fakeFetch.ts';
+import { fakeSupabase, accountRow } from '../fixtures/fakeSupabase.ts';
+import { mountWithContext, callRoute } from '../fixtures/routeHarness.ts';
// a byte order mark that pasted secrets sometimes start with
const BOM = String.fromCharCode(0xfeff);
diff --git a/backend/tests/routes/trackedContent.test.js b/backend/tests/routes/trackedContent.test.ts
similarity index 96%
rename from backend/tests/routes/trackedContent.test.js
rename to backend/tests/routes/trackedContent.test.ts
index d0da792..481ed22 100644
--- a/backend/tests/routes/trackedContent.test.js
+++ b/backend/tests/routes/trackedContent.test.ts
@@ -1,9 +1,9 @@
import { test, describe, before, after, afterEach, mock } from 'node:test';
-import trackedContentRouter from '../../routes/trackedContent.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { installFetch, reply } from '../fixtures/fakeFetch.js';
-import { fakeSupabase, accountRow, tableRow } from '../fixtures/fakeSupabase.js';
-import { mountWithContext, callRoute } from '../fixtures/routeHarness.js';
+import trackedContentRouter from '../../routes/trackedContent.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { installFetch, reply } from '../fixtures/fakeFetch.ts';
+import { fakeSupabase, accountRow, tableRow } from '../fixtures/fakeSupabase.ts';
+import { mountWithContext, callRoute } from '../fixtures/routeHarness.ts';
const FIXED_NOW = Date.parse('2026-09-01T12:00:00Z');
const ENV = { YOUTUBE_API_KEY: 'YTKEY' };
diff --git a/backend/tests/services/accountFactory.test.js b/backend/tests/services/accountFactory.test.ts
similarity index 98%
rename from backend/tests/services/accountFactory.test.js
rename to backend/tests/services/accountFactory.test.ts
index 412aa35..8038508 100644
--- a/backend/tests/services/accountFactory.test.js
+++ b/backend/tests/services/accountFactory.test.ts
@@ -2,7 +2,7 @@ import { test, describe, before, after, beforeEach, afterEach, mock } from 'node
import assert from 'node:assert/strict';
import {
newAccountId, tokenExpiryIso, buildYouTubeAccount, buildRedditAccount, buildInstagramAccount,
-} from '../../services/accountFactory.js';
+} from '../../services/accountFactory.ts';
const FIXED_NOW = Date.parse('2026-09-01T12:00:00Z');
const NOW_ISO = '2026-09-01T12:00:00.000Z';
diff --git a/backend/tests/services/analyticsMath.test.js b/backend/tests/services/analyticsMath.test.ts
similarity index 98%
rename from backend/tests/services/analyticsMath.test.js
rename to backend/tests/services/analyticsMath.test.ts
index bb4a9fa..8cace8e 100644
--- a/backend/tests/services/analyticsMath.test.js
+++ b/backend/tests/services/analyticsMath.test.ts
@@ -5,7 +5,7 @@ import assert from 'node:assert/strict';
import {
DAY_NAMES, DAY_MS, sumOf, roundedAverage, medianOf, countWithinDays, postFrequency,
consistencyScore, bestToAverageRatio, pickHighest, monthKey,
-} from '../../services/analyticsMath.js';
+} from '../../services/analyticsMath.ts';
const NOW = Date.parse('2026-09-01T12:00:00Z');
const daysAgo = (days) => new Date(NOW - days * DAY_MS);
diff --git a/backend/tests/services/instagram.test.js b/backend/tests/services/instagram.test.ts
similarity index 99%
rename from backend/tests/services/instagram.test.js
rename to backend/tests/services/instagram.test.ts
index eb3c51a..7c8d592 100644
--- a/backend/tests/services/instagram.test.js
+++ b/backend/tests/services/instagram.test.ts
@@ -7,7 +7,7 @@ import {
fetchInstagramMedia,
summarizeContentTypes,
computeInstagramAnalytics,
-} from '../../services/instagram.js';
+} from '../../services/instagram.ts';
const viewsInsight = (value) => ({ data: [{ name: 'views', period: 'lifetime', values: [{ value }] }] });
diff --git a/backend/tests/services/instagramAnalytics.test.js b/backend/tests/services/instagramAnalytics.test.ts
similarity index 93%
rename from backend/tests/services/instagramAnalytics.test.js
rename to backend/tests/services/instagramAnalytics.test.ts
index 0480c7e..a6ead0e 100644
--- a/backend/tests/services/instagramAnalytics.test.js
+++ b/backend/tests/services/instagramAnalytics.test.ts
@@ -1,9 +1,9 @@
process.env.TZ = 'UTC';
import { test, describe, before, after, mock } from 'node:test';
-import { computeInstagramAnalytics } from '../../services/instagramAnalytics.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { FIXED_NOW, richMedia, zeroEngagementMedia, generatedMedia } from '../fixtures/instagramFixtures.js';
+import { computeInstagramAnalytics } from '../../services/instagramAnalytics.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { FIXED_NOW, richMedia, zeroEngagementMedia, generatedMedia } from '../fixtures/instagramFixtures.ts';
describe('computeInstagramAnalytics golden output', () => {
before(() => mock.timers.enable({ apis: ['Date'], now: FIXED_NOW }));
diff --git a/backend/tests/services/instagramApi.test.js b/backend/tests/services/instagramApi.test.ts
similarity index 95%
rename from backend/tests/services/instagramApi.test.js
rename to backend/tests/services/instagramApi.test.ts
index ea475d2..708633e 100644
--- a/backend/tests/services/instagramApi.test.js
+++ b/backend/tests/services/instagramApi.test.ts
@@ -1,7 +1,7 @@
import { test, describe, afterEach } from 'node:test';
-import { fetchInstagramProfile } from '../../services/instagramApi.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { installFetch, reply } from '../fixtures/fakeFetch.js';
+import { fetchInstagramProfile } from '../../services/instagramApi.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { installFetch, reply } from '../fixtures/fakeFetch.ts';
let fetchMock = null;
afterEach(() => fetchMock?.restore());
diff --git a/backend/tests/services/instagramContentTypes.test.js b/backend/tests/services/instagramContentTypes.test.ts
similarity index 89%
rename from backend/tests/services/instagramContentTypes.test.js
rename to backend/tests/services/instagramContentTypes.test.ts
index c53ccd6..2af5250 100644
--- a/backend/tests/services/instagramContentTypes.test.js
+++ b/backend/tests/services/instagramContentTypes.test.ts
@@ -1,7 +1,7 @@
import { test, describe } from 'node:test';
-import { CONTENT_TYPES, summarizeContentTypes } from '../../services/instagramContentTypes.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { richMedia, generatedMedia } from '../fixtures/instagramFixtures.js';
+import { CONTENT_TYPES, summarizeContentTypes } from '../../services/instagramContentTypes.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { richMedia, generatedMedia } from '../fixtures/instagramFixtures.ts';
describe('summarizeContentTypes golden output', () => {
test('summarizes media of every type, unknown types and missing counts', () => {
diff --git a/backend/tests/services/instagramMedia.test.js b/backend/tests/services/instagramMedia.test.ts
similarity index 95%
rename from backend/tests/services/instagramMedia.test.js
rename to backend/tests/services/instagramMedia.test.ts
index 21a6b82..5f33412 100644
--- a/backend/tests/services/instagramMedia.test.js
+++ b/backend/tests/services/instagramMedia.test.ts
@@ -1,7 +1,7 @@
import { test, describe, afterEach } from 'node:test';
-import { classifyInstagramMedia, extractInstagramViews, normalizeInstagramMedia, fetchInstagramMedia } from '../../services/instagramMedia.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { installFetch, reply } from '../fixtures/fakeFetch.js';
+import { classifyInstagramMedia, extractInstagramViews, normalizeInstagramMedia, fetchInstagramMedia } from '../../services/instagramMedia.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { installFetch, reply } from '../fixtures/fakeFetch.ts';
let fetchMock = null;
afterEach(() => fetchMock?.restore());
diff --git a/backend/tests/services/instagramPublishing.test.js b/backend/tests/services/instagramPublishing.test.ts
similarity index 96%
rename from backend/tests/services/instagramPublishing.test.js
rename to backend/tests/services/instagramPublishing.test.ts
index 5578016..0484a1d 100644
--- a/backend/tests/services/instagramPublishing.test.js
+++ b/backend/tests/services/instagramPublishing.test.ts
@@ -1,6 +1,6 @@
import { test, describe } from 'node:test';
-import { buildMediaParams } from '../../services/instagramPublishing.js';
-import { assertGolden } from '../fixtures/golden.js';
+import { buildMediaParams } from '../../services/instagramPublishing.ts';
+import { assertGolden } from '../fixtures/golden.ts';
const fullPost = {
mediaUrl: 'https://cdn.example/file.jpg',
diff --git a/backend/tests/services/instagramTokens.test.js b/backend/tests/services/instagramTokens.test.ts
similarity index 94%
rename from backend/tests/services/instagramTokens.test.js
rename to backend/tests/services/instagramTokens.test.ts
index 908bfe7..e755104 100644
--- a/backend/tests/services/instagramTokens.test.js
+++ b/backend/tests/services/instagramTokens.test.ts
@@ -1,9 +1,9 @@
import { test, describe, before, after, afterEach, mock } from 'node:test';
-import { exchangeForLongLivedToken, refreshLongLivedToken, autoRefreshInstagramTokens } from '../../services/instagramTokens.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { installFetch, reply } from '../fixtures/fakeFetch.js';
-import { fakeSupabase, accountRow } from '../fixtures/fakeSupabase.js';
-import { FIXED_NOW } from '../fixtures/instagramFixtures.js';
+import { exchangeForLongLivedToken, refreshLongLivedToken, autoRefreshInstagramTokens } from '../../services/instagramTokens.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { installFetch, reply } from '../fixtures/fakeFetch.ts';
+import { fakeSupabase, accountRow } from '../fixtures/fakeSupabase.ts';
+import { FIXED_NOW } from '../fixtures/instagramFixtures.ts';
const DAY_MS = 86400000;
let fetchMock = null;
diff --git a/backend/tests/services/reddit.test.js b/backend/tests/services/reddit.test.ts
similarity index 95%
rename from backend/tests/services/reddit.test.js
rename to backend/tests/services/reddit.test.ts
index 6ce2d26..2b13c69 100644
--- a/backend/tests/services/reddit.test.js
+++ b/backend/tests/services/reddit.test.ts
@@ -1,8 +1,8 @@
import { test, describe, before, after, afterEach, mock } from 'node:test';
-import { fetchRedditProfile, fetchRedditPosts, fetchTrackedPostData, autoRefreshRedditSessions } from '../../services/reddit.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { installFetch, reply } from '../fixtures/fakeFetch.js';
-import { FIXED_NOW, rawRedditPosts } from '../fixtures/redditFixtures.js';
+import { fetchRedditProfile, fetchRedditPosts, fetchTrackedPostData, autoRefreshRedditSessions } from '../../services/reddit.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { installFetch, reply } from '../fixtures/fakeFetch.ts';
+import { FIXED_NOW, rawRedditPosts } from '../fixtures/redditFixtures.ts';
let fetchMock = null;
afterEach(() => fetchMock?.restore());
diff --git a/backend/tests/services/redditAnalytics.test.js b/backend/tests/services/redditAnalytics.test.ts
similarity index 93%
rename from backend/tests/services/redditAnalytics.test.js
rename to backend/tests/services/redditAnalytics.test.ts
index 0779d66..a08963e 100644
--- a/backend/tests/services/redditAnalytics.test.js
+++ b/backend/tests/services/redditAnalytics.test.ts
@@ -1,9 +1,9 @@
process.env.TZ = 'UTC';
import { test, describe, before, after, mock } from 'node:test';
-import { computeRedditAnalytics } from '../../services/redditAnalytics.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { FIXED_NOW, richPosts, zeroScorePosts, generatedPosts } from '../fixtures/redditFixtures.js';
+import { computeRedditAnalytics } from '../../services/redditAnalytics.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { FIXED_NOW, richPosts, zeroScorePosts, generatedPosts } from '../fixtures/redditFixtures.ts';
const profile = { username: 'ribbon', totalKarma: 900 };
diff --git a/backend/tests/services/trackedContent.test.js b/backend/tests/services/trackedContent.test.ts
similarity index 98%
rename from backend/tests/services/trackedContent.test.js
rename to backend/tests/services/trackedContent.test.ts
index 5e3c129..c393535 100644
--- a/backend/tests/services/trackedContent.test.js
+++ b/backend/tests/services/trackedContent.test.ts
@@ -1,6 +1,6 @@
import { test, describe } from 'node:test';
import assert from 'node:assert/strict';
-import { detectContentType, manualViewsPatch, imageUrlPatch } from '../../services/trackedContent.js';
+import { detectContentType, manualViewsPatch, imageUrlPatch } from '../../services/trackedContent.ts';
describe('detectContentType', () => {
test('recognises reddit and youtube links in any case', () => {
diff --git a/backend/tests/services/youtube.test.js b/backend/tests/services/youtube.test.ts
similarity index 99%
rename from backend/tests/services/youtube.test.js
rename to backend/tests/services/youtube.test.ts
index bbee006..f82f322 100644
--- a/backend/tests/services/youtube.test.js
+++ b/backend/tests/services/youtube.test.ts
@@ -1,6 +1,6 @@
import { test, afterEach } from 'node:test';
import assert from 'node:assert/strict';
-import { resolveChannelId, fetchTrackedYouTubeData } from '../../services/youtube.js';
+import { resolveChannelId, fetchTrackedYouTubeData } from '../../services/youtube.ts';
const realFetch = globalThis.fetch;
afterEach(() => { globalThis.fetch = realFetch; });
diff --git a/backend/tests/services/youtubeAnalytics.test.js b/backend/tests/services/youtubeAnalytics.test.ts
similarity index 92%
rename from backend/tests/services/youtubeAnalytics.test.js
rename to backend/tests/services/youtubeAnalytics.test.ts
index 16b6d7a..6307571 100644
--- a/backend/tests/services/youtubeAnalytics.test.js
+++ b/backend/tests/services/youtubeAnalytics.test.ts
@@ -1,9 +1,9 @@
process.env.TZ = 'UTC';
import { test, describe, before, after, mock } from 'node:test';
-import { computeVideoAnalytics } from '../../services/youtubeAnalytics.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { FIXED_NOW, richVideos, zeroViewVideos, generatedVideos } from '../fixtures/youtubeFixtures.js';
+import { computeVideoAnalytics } from '../../services/youtubeAnalytics.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { FIXED_NOW, richVideos, zeroViewVideos, generatedVideos } from '../fixtures/youtubeFixtures.ts';
describe('computeVideoAnalytics golden output', () => {
before(() => mock.timers.enable({ apis: ['Date'], now: FIXED_NOW }));
diff --git a/backend/tests/services/youtubeChannels.test.js b/backend/tests/services/youtubeChannels.test.ts
similarity index 95%
rename from backend/tests/services/youtubeChannels.test.js
rename to backend/tests/services/youtubeChannels.test.ts
index 554f8c0..207cbc1 100644
--- a/backend/tests/services/youtubeChannels.test.js
+++ b/backend/tests/services/youtubeChannels.test.ts
@@ -1,7 +1,7 @@
import { test, describe, afterEach } from 'node:test';
-import { resolveChannelId, fetchChannelData } from '../../services/youtubeChannels.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { installFetch, reply } from '../fixtures/fakeFetch.js';
+import { resolveChannelId, fetchChannelData } from '../../services/youtubeChannels.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { installFetch, reply } from '../fixtures/fakeFetch.ts';
let fetchMock = null;
afterEach(() => fetchMock?.restore());
diff --git a/backend/tests/services/youtubeTracked.test.js b/backend/tests/services/youtubeTracked.test.ts
similarity index 91%
rename from backend/tests/services/youtubeTracked.test.js
rename to backend/tests/services/youtubeTracked.test.ts
index bc0089c..28a4a00 100644
--- a/backend/tests/services/youtubeTracked.test.js
+++ b/backend/tests/services/youtubeTracked.test.ts
@@ -1,8 +1,8 @@
import { test, describe, before, after, afterEach, mock } from 'node:test';
-import { fetchTrackedYouTubeData } from '../../services/youtubeTracked.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { installFetch, reply } from '../fixtures/fakeFetch.js';
-import { FIXED_NOW } from '../fixtures/youtubeFixtures.js';
+import { fetchTrackedYouTubeData } from '../../services/youtubeTracked.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { installFetch, reply } from '../fixtures/fakeFetch.ts';
+import { FIXED_NOW } from '../fixtures/youtubeFixtures.ts';
let fetchMock = null;
afterEach(() => fetchMock?.restore());
diff --git a/backend/tests/services/youtubeVideos.test.js b/backend/tests/services/youtubeVideos.test.ts
similarity index 94%
rename from backend/tests/services/youtubeVideos.test.js
rename to backend/tests/services/youtubeVideos.test.ts
index 6b992fe..d2c4278 100644
--- a/backend/tests/services/youtubeVideos.test.js
+++ b/backend/tests/services/youtubeVideos.test.ts
@@ -1,8 +1,8 @@
import { test, describe, afterEach } from 'node:test';
-import { fetchAllVideos } from '../../services/youtubeVideos.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { installFetch, reply } from '../fixtures/fakeFetch.js';
-import { rawPlaylistItem, rawVideos } from '../fixtures/youtubeFixtures.js';
+import { fetchAllVideos } from '../../services/youtubeVideos.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { installFetch, reply } from '../fixtures/fakeFetch.ts';
+import { rawPlaylistItem, rawVideos } from '../fixtures/youtubeFixtures.ts';
let fetchMock = null;
afterEach(() => fetchMock?.restore());
diff --git a/backend/tests/tsconfig.json b/backend/tests/tsconfig.json
new file mode 100644
index 0000000..8dde62d
--- /dev/null
+++ b/backend/tests/tsconfig.json
@@ -0,0 +1,8 @@
+{
+ "extends": "../tsconfig.json",
+ "compilerOptions": {
+ "types": ["@cloudflare/workers-types", "node"]
+ },
+ "include": ["**/*.ts", "../**/*.ts"],
+ "exclude": ["../node_modules", "../.wrangler"]
+}
diff --git a/backend/tests/utils/scheduler.test.js b/backend/tests/utils/scheduler.test.ts
similarity index 95%
rename from backend/tests/utils/scheduler.test.js
rename to backend/tests/utils/scheduler.test.ts
index 1264ff6..0ef0591 100644
--- a/backend/tests/utils/scheduler.test.js
+++ b/backend/tests/utils/scheduler.test.ts
@@ -1,8 +1,8 @@
import { test, describe, before, after, afterEach, mock } from 'node:test';
-import { processScheduledPosts } from '../../utils/scheduler.js';
-import { assertGolden } from '../fixtures/golden.js';
-import { installFetch, reply } from '../fixtures/fakeFetch.js';
-import { fakeSupabase, accountRow, tableRow } from '../fixtures/fakeSupabase.js';
+import { processScheduledPosts } from '../../utils/scheduler.ts';
+import { assertGolden } from '../fixtures/golden.ts';
+import { installFetch, reply } from '../fixtures/fakeFetch.ts';
+import { fakeSupabase, accountRow, tableRow } from '../fixtures/fakeSupabase.ts';
const FIXED_NOW = Date.parse('2026-09-01T12:00:00Z');
diff --git a/backend/tsconfig.json b/backend/tsconfig.json
new file mode 100644
index 0000000..ec6fc29
--- /dev/null
+++ b/backend/tsconfig.json
@@ -0,0 +1,8 @@
+{
+ "extends": "../tsconfig.base.json",
+ "compilerOptions": {
+ "types": ["@cloudflare/workers-types"]
+ },
+ "include": ["**/*.ts"],
+ "exclude": ["node_modules", ".wrangler", "tests"]
+}
diff --git a/backend/utils/scheduler.js b/backend/utils/scheduler.ts
similarity index 97%
rename from backend/utils/scheduler.js
rename to backend/utils/scheduler.ts
index c21bd86..61791df 100644
--- a/backend/utils/scheduler.js
+++ b/backend/utils/scheduler.ts
@@ -1,6 +1,6 @@
// fetch is a global in Cloudflare Workers.
-import { getDuePosts, updatePost, getAccountById, claimPost } from '../lib/db.js';
-import { buildMediaParams } from '../services/instagram.js';
+import { getDuePosts, updatePost, getAccountById, claimPost } from '../lib/db.ts';
+import { buildMediaParams } from '../services/instagram.ts';
const GRAPH_API = 'https://graph.instagram.com/v25.0';
diff --git a/backend/wrangler.toml b/backend/wrangler.toml
index 39b889d..db4ed76 100644
--- a/backend/wrangler.toml
+++ b/backend/wrangler.toml
@@ -1,5 +1,5 @@
name = "twiligent"
-main = "server.js"
+main = "server.ts"
compatibility_date = "2025-01-01"
[triggers]
diff --git a/eslint.config.mjs b/eslint.config.mjs
index 7bb66c6..cf81ea9 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -2,45 +2,46 @@ import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
+import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'
export default defineConfig([
globalIgnores(['**/dist', '**/.wrangler', '**/node_modules']),
{
- files: ['frontend/**/*.{js,jsx}'],
+ files: ['**/*.{ts,tsx}'],
+ extends: [js.configs.recommended, tseslint.configs.recommended],
+ },
+ {
+ files: ['frontend/**/*.{ts,tsx}'],
extends: [
- js.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
languageOptions: {
- ecmaVersion: 2020,
globals: globals.browser,
- parserOptions: {
- ecmaVersion: 'latest',
- ecmaFeatures: { jsx: true },
- sourceType: 'module',
- },
},
rules: {
- 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
+ '@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
},
},
{
// the worker runs on the web platform, so it gets service worker globals, not node
- files: ['backend/**/*.js'],
- extends: [js.configs.recommended],
+ files: ['backend/**/*.ts'],
languageOptions: {
- ecmaVersion: 'latest',
- sourceType: 'module',
globals: globals.serviceworker,
},
rules: {
- 'no-unused-vars': ['error', { varsIgnorePattern: '^_', argsIgnorePattern: '^_', caughtErrors: 'none' }],
+ '@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '^_', argsIgnorePattern: '^_', caughtErrors: 'none' }],
+ },
+ },
+ {
+ files: ['backend/tests/**/*.ts', 'frontend/tests/**/*.ts', 'frontend/vite.config.ts', 'scripts/**/*.ts'],
+ languageOptions: {
+ globals: globals.node,
},
},
{
- files: ['backend/tests/**/*.js', 'scripts/**/*.js', '*.js', '*.mjs'],
+ files: ['*.js', '*.mjs'],
extends: [js.configs.recommended],
languageOptions: {
ecmaVersion: 'latest',
diff --git a/frontend/components.json b/frontend/components.json
index 9c80a40..15addee 100644
--- a/frontend/components.json
+++ b/frontend/components.json
@@ -2,7 +2,7 @@
"$schema": "https://ui.shadcn.com/schema.json",
"style": "base-nova",
"rsc": false,
- "tsx": false,
+ "tsx": true,
"tailwind": {
"config": "",
"css": "src/index.css",
diff --git a/frontend/index.html b/frontend/index.html
index f4b9459..c0f30e2 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -19,7 +19,7 @@
<body>
<div id="root"></div>
- <script type="module" src="/src/main.jsx"></script>
+ <script type="module" src="/src/main.tsx"></script>
</body>
</html>
diff --git a/frontend/jsconfig.json b/frontend/jsconfig.json
deleted file mode 100644
index c2a0d02..0000000
--- a/frontend/jsconfig.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "compilerOptions": {
- "ignoreDeprecations": "6.0",
- "baseUrl": ".",
- "paths": {
- "@/*": [
- "./src/*"
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/frontend/package.json b/frontend/package.json
index edb816b..aa0e5e1 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -8,7 +8,8 @@
"build": "vite build",
"lint": "eslint .",
"preview": "vite preview",
- "test": "node --test \"tests/**/*.test.js\""
+ "test": "node --test \"tests/**/*.test.ts\"",
+ "typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.node.json"
},
"dependencies": {
"@base-ui/react": "^1.5.0",
diff --git a/frontend/src/App.jsx b/frontend/src/App.tsx
similarity index 100%
rename from frontend/src/App.jsx
rename to frontend/src/App.tsx
diff --git a/frontend/src/components/ChartPanel.jsx b/frontend/src/components/ChartPanel.tsx
similarity index 100%
rename from frontend/src/components/ChartPanel.jsx
rename to frontend/src/components/ChartPanel.tsx
diff --git a/frontend/src/components/ChoiceCard.jsx b/frontend/src/components/ChoiceCard.tsx
similarity index 100%
rename from frontend/src/components/ChoiceCard.jsx
rename to frontend/src/components/ChoiceCard.tsx
diff --git a/frontend/src/components/ColumnHint.jsx b/frontend/src/components/ColumnHint.tsx
similarity index 100%
rename from frontend/src/components/ColumnHint.jsx
rename to frontend/src/components/ColumnHint.tsx
diff --git a/frontend/src/components/CommandPalette.jsx b/frontend/src/components/CommandPalette.tsx
similarity index 100%
rename from frontend/src/components/CommandPalette.jsx
rename to frontend/src/components/CommandPalette.tsx
diff --git a/frontend/src/components/ConfirmDialog.jsx b/frontend/src/components/ConfirmDialog.tsx
similarity index 100%
rename from frontend/src/components/ConfirmDialog.jsx
rename to frontend/src/components/ConfirmDialog.tsx
diff --git a/frontend/src/components/DetailPanel.jsx b/frontend/src/components/DetailPanel.tsx
similarity index 100%
rename from frontend/src/components/DetailPanel.jsx
rename to frontend/src/components/DetailPanel.tsx
diff --git a/frontend/src/components/FilterChips.jsx b/frontend/src/components/FilterChips.tsx
similarity index 100%
rename from frontend/src/components/FilterChips.jsx
rename to frontend/src/components/FilterChips.tsx
diff --git a/frontend/src/components/GoogleSignInButton.jsx b/frontend/src/components/GoogleSignInButton.tsx
similarity index 100%
rename from frontend/src/components/GoogleSignInButton.jsx
rename to frontend/src/components/GoogleSignInButton.tsx
diff --git a/frontend/src/components/HoldToConfirmButton.jsx b/frontend/src/components/HoldToConfirmButton.tsx
similarity index 100%
rename from frontend/src/components/HoldToConfirmButton.jsx
rename to frontend/src/components/HoldToConfirmButton.tsx
diff --git a/frontend/src/components/ImageLightbox.jsx b/frontend/src/components/ImageLightbox.tsx
similarity index 100%
rename from frontend/src/components/ImageLightbox.jsx
rename to frontend/src/components/ImageLightbox.tsx
diff --git a/frontend/src/components/InstagramTesterNotice.jsx b/frontend/src/components/InstagramTesterNotice.tsx
similarity index 100%
rename from frontend/src/components/InstagramTesterNotice.jsx
rename to frontend/src/components/InstagramTesterNotice.tsx
diff --git a/frontend/src/components/ListRow.jsx b/frontend/src/components/ListRow.tsx
similarity index 100%
rename from frontend/src/components/ListRow.jsx
rename to frontend/src/components/ListRow.tsx
diff --git a/frontend/src/components/MediaCard.jsx b/frontend/src/components/MediaCard.tsx
similarity index 100%
rename from frontend/src/components/MediaCard.jsx
rename to frontend/src/components/MediaCard.tsx
diff --git a/frontend/src/components/MetricAreaChart.jsx b/frontend/src/components/MetricAreaChart.tsx
similarity index 100%
rename from frontend/src/components/MetricAreaChart.jsx
rename to frontend/src/components/MetricAreaChart.tsx
diff --git a/frontend/src/components/MetricBox.jsx b/frontend/src/components/MetricBox.tsx
similarity index 100%
rename from frontend/src/components/MetricBox.jsx
rename to frontend/src/components/MetricBox.tsx
diff --git a/frontend/src/components/PageHeader.jsx b/frontend/src/components/PageHeader.tsx
similarity index 100%
rename from frontend/src/components/PageHeader.jsx
rename to frontend/src/components/PageHeader.tsx
diff --git a/frontend/src/components/Pager.jsx b/frontend/src/components/Pager.tsx
similarity index 100%
rename from frontend/src/components/Pager.jsx
rename to frontend/src/components/Pager.tsx
diff --git a/frontend/src/components/ProtectedRoute.jsx b/frontend/src/components/ProtectedRoute.tsx
similarity index 100%
rename from frontend/src/components/ProtectedRoute.jsx
rename to frontend/src/components/ProtectedRoute.tsx
diff --git a/frontend/src/components/SearchField.jsx b/frontend/src/components/SearchField.tsx
similarity index 100%
rename from frontend/src/components/SearchField.jsx
rename to frontend/src/components/SearchField.tsx
diff --git a/frontend/src/components/SectionHeader.jsx b/frontend/src/components/SectionHeader.tsx
similarity index 100%
rename from frontend/src/components/SectionHeader.jsx
rename to frontend/src/components/SectionHeader.tsx
diff --git a/frontend/src/components/StateViews.jsx b/frontend/src/components/StateViews.tsx
similarity index 100%
rename from frontend/src/components/StateViews.jsx
rename to frontend/src/components/StateViews.tsx
diff --git a/frontend/src/components/SurfaceBox.jsx b/frontend/src/components/SurfaceBox.tsx
similarity index 100%
rename from frontend/src/components/SurfaceBox.jsx
rename to frontend/src/components/SurfaceBox.tsx
diff --git a/frontend/src/components/brand/Logo.jsx b/frontend/src/components/brand/Logo.tsx
similarity index 100%
rename from frontend/src/components/brand/Logo.jsx
rename to frontend/src/components/brand/Logo.tsx
diff --git a/frontend/src/components/brand/platform-icons.jsx b/frontend/src/components/brand/platform-icons.tsx
similarity index 100%
rename from frontend/src/components/brand/platform-icons.jsx
rename to frontend/src/components/brand/platform-icons.tsx
diff --git a/frontend/src/components/platform.jsx b/frontend/src/components/platform.tsx
similarity index 100%
rename from frontend/src/components/platform.jsx
rename to frontend/src/components/platform.tsx
diff --git a/frontend/src/components/ui/alert-dialog.jsx b/frontend/src/components/ui/alert-dialog.tsx
similarity index 100%
rename from frontend/src/components/ui/alert-dialog.jsx
rename to frontend/src/components/ui/alert-dialog.tsx
diff --git a/frontend/src/components/ui/alert.jsx b/frontend/src/components/ui/alert.tsx
similarity index 100%
rename from frontend/src/components/ui/alert.jsx
rename to frontend/src/components/ui/alert.tsx
diff --git a/frontend/src/components/ui/avatar.jsx b/frontend/src/components/ui/avatar.tsx
similarity index 100%
rename from frontend/src/components/ui/avatar.jsx
rename to frontend/src/components/ui/avatar.tsx
diff --git a/frontend/src/components/ui/badge.jsx b/frontend/src/components/ui/badge.tsx
similarity index 100%
rename from frontend/src/components/ui/badge.jsx
rename to frontend/src/components/ui/badge.tsx
diff --git a/frontend/src/components/ui/breadcrumb.jsx b/frontend/src/components/ui/breadcrumb.tsx
similarity index 100%
rename from frontend/src/components/ui/breadcrumb.jsx
rename to frontend/src/components/ui/breadcrumb.tsx
diff --git a/frontend/src/components/ui/button.jsx b/frontend/src/components/ui/button.tsx
similarity index 100%
rename from frontend/src/components/ui/button.jsx
rename to frontend/src/components/ui/button.tsx
diff --git a/frontend/src/components/ui/card.jsx b/frontend/src/components/ui/card.tsx
similarity index 100%
rename from frontend/src/components/ui/card.jsx
rename to frontend/src/components/ui/card.tsx
diff --git a/frontend/src/components/ui/chart.jsx b/frontend/src/components/ui/chart.tsx
similarity index 100%
rename from frontend/src/components/ui/chart.jsx
rename to frontend/src/components/ui/chart.tsx
diff --git a/frontend/src/components/ui/checkbox.jsx b/frontend/src/components/ui/checkbox.tsx
similarity index 100%
rename from frontend/src/components/ui/checkbox.jsx
rename to frontend/src/components/ui/checkbox.tsx
diff --git a/frontend/src/components/ui/collapsible.jsx b/frontend/src/components/ui/collapsible.tsx
similarity index 100%
rename from frontend/src/components/ui/collapsible.jsx
rename to frontend/src/components/ui/collapsible.tsx
diff --git a/frontend/src/components/ui/command.jsx b/frontend/src/components/ui/command.tsx
similarity index 100%
rename from frontend/src/components/ui/command.jsx
rename to frontend/src/components/ui/command.tsx
diff --git a/frontend/src/components/ui/dialog.jsx b/frontend/src/components/ui/dialog.tsx
similarity index 100%
rename from frontend/src/components/ui/dialog.jsx
rename to frontend/src/components/ui/dialog.tsx
diff --git a/frontend/src/components/ui/dropdown-menu.jsx b/frontend/src/components/ui/dropdown-menu.tsx
similarity index 100%
rename from frontend/src/components/ui/dropdown-menu.jsx
rename to frontend/src/components/ui/dropdown-menu.tsx
diff --git a/frontend/src/components/ui/empty.jsx b/frontend/src/components/ui/empty.tsx
similarity index 100%
rename from frontend/src/components/ui/empty.jsx
rename to frontend/src/components/ui/empty.tsx
diff --git a/frontend/src/components/ui/field.jsx b/frontend/src/components/ui/field.tsx
similarity index 100%
rename from frontend/src/components/ui/field.jsx
rename to frontend/src/components/ui/field.tsx
diff --git a/frontend/src/components/ui/input-group.jsx b/frontend/src/components/ui/input-group.tsx
similarity index 100%
rename from frontend/src/components/ui/input-group.jsx
rename to frontend/src/components/ui/input-group.tsx
diff --git a/frontend/src/components/ui/input.jsx b/frontend/src/components/ui/input.tsx
similarity index 100%
rename from frontend/src/components/ui/input.jsx
rename to frontend/src/components/ui/input.tsx
diff --git a/frontend/src/components/ui/label.jsx b/frontend/src/components/ui/label.tsx
similarity index 100%
rename from frontend/src/components/ui/label.jsx
rename to frontend/src/components/ui/label.tsx
diff --git a/frontend/src/components/ui/pagination.jsx b/frontend/src/components/ui/pagination.tsx
similarity index 100%
rename from frontend/src/components/ui/pagination.jsx
rename to frontend/src/components/ui/pagination.tsx
diff --git a/frontend/src/components/ui/popover.jsx b/frontend/src/components/ui/popover.tsx
similarity index 100%
rename from frontend/src/components/ui/popover.jsx
rename to frontend/src/components/ui/popover.tsx
diff --git a/frontend/src/components/ui/progress.jsx b/frontend/src/components/ui/progress.tsx
similarity index 100%
rename from frontend/src/components/ui/progress.jsx
rename to frontend/src/components/ui/progress.tsx
diff --git a/frontend/src/components/ui/scroll-area.jsx b/frontend/src/components/ui/scroll-area.tsx
similarity index 100%
rename from frontend/src/components/ui/scroll-area.jsx
rename to frontend/src/components/ui/scroll-area.tsx
diff --git a/frontend/src/components/ui/select.jsx b/frontend/src/components/ui/select.tsx
similarity index 100%
rename from frontend/src/components/ui/select.jsx
rename to frontend/src/components/ui/select.tsx
diff --git a/frontend/src/components/ui/separator.jsx b/frontend/src/components/ui/separator.tsx
similarity index 100%
rename from frontend/src/components/ui/separator.jsx
rename to frontend/src/components/ui/separator.tsx
diff --git a/frontend/src/components/ui/sheet.jsx b/frontend/src/components/ui/sheet.tsx
similarity index 100%
rename from frontend/src/components/ui/sheet.jsx
rename to frontend/src/components/ui/sheet.tsx
diff --git a/frontend/src/components/ui/sidebar.jsx b/frontend/src/components/ui/sidebar.tsx
similarity index 100%
rename from frontend/src/components/ui/sidebar.jsx
rename to frontend/src/components/ui/sidebar.tsx
diff --git a/frontend/src/components/ui/skeleton.jsx b/frontend/src/components/ui/skeleton.tsx
similarity index 100%
rename from frontend/src/components/ui/skeleton.jsx
rename to frontend/src/components/ui/skeleton.tsx
diff --git a/frontend/src/components/ui/sonner.jsx b/frontend/src/components/ui/sonner.tsx
similarity index 100%
rename from frontend/src/components/ui/sonner.jsx
rename to frontend/src/components/ui/sonner.tsx
diff --git a/frontend/src/components/ui/spinner.jsx b/frontend/src/components/ui/spinner.tsx
similarity index 100%
rename from frontend/src/components/ui/spinner.jsx
rename to frontend/src/components/ui/spinner.tsx
diff --git a/frontend/src/components/ui/switch.jsx b/frontend/src/components/ui/switch.tsx
similarity index 100%
rename from frontend/src/components/ui/switch.jsx
rename to frontend/src/components/ui/switch.tsx
diff --git a/frontend/src/components/ui/table.jsx b/frontend/src/components/ui/table.tsx
similarity index 100%
rename from frontend/src/components/ui/table.jsx
rename to frontend/src/components/ui/table.tsx
diff --git a/frontend/src/components/ui/tabs.jsx b/frontend/src/components/ui/tabs.tsx
similarity index 100%
rename from frontend/src/components/ui/tabs.jsx
rename to frontend/src/components/ui/tabs.tsx
diff --git a/frontend/src/components/ui/textarea.jsx b/frontend/src/components/ui/textarea.tsx
similarity index 100%
rename from frontend/src/components/ui/textarea.jsx
rename to frontend/src/components/ui/textarea.tsx
diff --git a/frontend/src/components/ui/toggle-group.jsx b/frontend/src/components/ui/toggle-group.tsx
similarity index 100%
rename from frontend/src/components/ui/toggle-group.jsx
rename to frontend/src/components/ui/toggle-group.tsx
diff --git a/frontend/src/components/ui/toggle.jsx b/frontend/src/components/ui/toggle.tsx
similarity index 100%
rename from frontend/src/components/ui/toggle.jsx
rename to frontend/src/components/ui/toggle.tsx
diff --git a/frontend/src/components/ui/tooltip.jsx b/frontend/src/components/ui/tooltip.tsx
similarity index 100%
rename from frontend/src/components/ui/tooltip.jsx
rename to frontend/src/components/ui/tooltip.tsx
diff --git a/frontend/src/context/AppContext.jsx b/frontend/src/context/AppContext.tsx
similarity index 100%
rename from frontend/src/context/AppContext.jsx
rename to frontend/src/context/AppContext.tsx
diff --git a/frontend/src/context/AuthContext.jsx b/frontend/src/context/AuthContext.tsx
similarity index 100%
rename from frontend/src/context/AuthContext.jsx
rename to frontend/src/context/AuthContext.tsx
diff --git a/frontend/src/docs/DocsHeader.jsx b/frontend/src/docs/DocsHeader.tsx
similarity index 100%
rename from frontend/src/docs/DocsHeader.jsx
rename to frontend/src/docs/DocsHeader.tsx
diff --git a/frontend/src/docs/DocsLayout.jsx b/frontend/src/docs/DocsLayout.tsx
similarity index 100%
rename from frontend/src/docs/DocsLayout.jsx
rename to frontend/src/docs/DocsLayout.tsx
diff --git a/frontend/src/docs/DocsMobileNav.jsx b/frontend/src/docs/DocsMobileNav.tsx
similarity index 100%
rename from frontend/src/docs/DocsMobileNav.jsx
rename to frontend/src/docs/DocsMobileNav.tsx
diff --git a/frontend/src/docs/DocsPager.jsx b/frontend/src/docs/DocsPager.tsx
similarity index 100%
rename from frontend/src/docs/DocsPager.jsx
rename to frontend/src/docs/DocsPager.tsx
diff --git a/frontend/src/docs/DocsSearch.jsx b/frontend/src/docs/DocsSearch.tsx
similarity index 100%
rename from frontend/src/docs/DocsSearch.jsx
rename to frontend/src/docs/DocsSearch.tsx
diff --git a/frontend/src/docs/DocsSidebarNav.jsx b/frontend/src/docs/DocsSidebarNav.tsx
similarity index 100%
rename from frontend/src/docs/DocsSidebarNav.jsx
rename to frontend/src/docs/DocsSidebarNav.tsx
diff --git a/frontend/src/docs/DocsToc.jsx b/frontend/src/docs/DocsToc.tsx
similarity index 100%
rename from frontend/src/docs/DocsToc.jsx
rename to frontend/src/docs/DocsToc.tsx
diff --git a/frontend/src/docs/components.jsx b/frontend/src/docs/components.tsx
similarity index 100%
rename from frontend/src/docs/components.jsx
rename to frontend/src/docs/components.tsx
diff --git a/frontend/src/docs/nav.js b/frontend/src/docs/nav.ts
similarity index 100%
rename from frontend/src/docs/nav.js
rename to frontend/src/docs/nav.ts
diff --git a/frontend/src/docs/pages/Overview.jsx b/frontend/src/docs/pages/Overview.tsx
similarity index 100%
rename from frontend/src/docs/pages/Overview.jsx
rename to frontend/src/docs/pages/Overview.tsx
diff --git a/frontend/src/docs/pages/Reference.jsx b/frontend/src/docs/pages/Reference.tsx
similarity index 100%
rename from frontend/src/docs/pages/Reference.jsx
rename to frontend/src/docs/pages/Reference.tsx
diff --git a/frontend/src/docs/pages/SelfHost.jsx b/frontend/src/docs/pages/SelfHost.tsx
similarity index 100%
rename from frontend/src/docs/pages/SelfHost.jsx
rename to frontend/src/docs/pages/SelfHost.tsx
diff --git a/frontend/src/docs/pages/Use.jsx b/frontend/src/docs/pages/Use.tsx
similarity index 100%
rename from frontend/src/docs/pages/Use.jsx
rename to frontend/src/docs/pages/Use.tsx
diff --git a/frontend/src/docs/pages/reference/Environment.jsx b/frontend/src/docs/pages/reference/Environment.tsx
similarity index 100%
rename from frontend/src/docs/pages/reference/Environment.jsx
rename to frontend/src/docs/pages/reference/Environment.tsx
diff --git a/frontend/src/docs/pages/reference/FAQ.jsx b/frontend/src/docs/pages/reference/FAQ.tsx
similarity index 100%
rename from frontend/src/docs/pages/reference/FAQ.jsx
rename to frontend/src/docs/pages/reference/FAQ.tsx
diff --git a/frontend/src/docs/pages/reference/Scheduling.jsx b/frontend/src/docs/pages/reference/Scheduling.tsx
similarity index 100%
rename from frontend/src/docs/pages/reference/Scheduling.jsx
rename to frontend/src/docs/pages/reference/Scheduling.tsx
diff --git a/frontend/src/docs/pages/reference/Security.jsx b/frontend/src/docs/pages/reference/Security.tsx
similarity index 100%
rename from frontend/src/docs/pages/reference/Security.jsx
rename to frontend/src/docs/pages/reference/Security.tsx
diff --git a/frontend/src/docs/pages/selfHost/Checklist.jsx b/frontend/src/docs/pages/selfHost/Checklist.tsx
similarity index 100%
rename from frontend/src/docs/pages/selfHost/Checklist.jsx
rename to frontend/src/docs/pages/selfHost/Checklist.tsx
diff --git a/frontend/src/docs/pages/selfHost/Cloudinary.jsx b/frontend/src/docs/pages/selfHost/Cloudinary.tsx
similarity index 100%
rename from frontend/src/docs/pages/selfHost/Cloudinary.jsx
rename to frontend/src/docs/pages/selfHost/Cloudinary.tsx
diff --git a/frontend/src/docs/pages/selfHost/DeployBackend.jsx b/frontend/src/docs/pages/selfHost/DeployBackend.tsx
similarity index 100%
rename from frontend/src/docs/pages/selfHost/DeployBackend.jsx
rename to frontend/src/docs/pages/selfHost/DeployBackend.tsx
diff --git a/frontend/src/docs/pages/selfHost/DeployFrontend.jsx b/frontend/src/docs/pages/selfHost/DeployFrontend.tsx
similarity index 100%
rename from frontend/src/docs/pages/selfHost/DeployFrontend.jsx
rename to frontend/src/docs/pages/selfHost/DeployFrontend.tsx
diff --git a/frontend/src/docs/pages/selfHost/GitHub.jsx b/frontend/src/docs/pages/selfHost/GitHub.tsx
similarity index 100%
rename from frontend/src/docs/pages/selfHost/GitHub.jsx
rename to frontend/src/docs/pages/selfHost/GitHub.tsx
diff --git a/frontend/src/docs/pages/selfHost/GoogleSignIn.jsx b/frontend/src/docs/pages/selfHost/GoogleSignIn.tsx
similarity index 100%
rename from frontend/src/docs/pages/selfHost/GoogleSignIn.jsx
rename to frontend/src/docs/pages/selfHost/GoogleSignIn.tsx
diff --git a/frontend/src/docs/pages/selfHost/Instagram.jsx b/frontend/src/docs/pages/selfHost/Instagram.tsx
similarity index 100%
rename from frontend/src/docs/pages/selfHost/Instagram.jsx
rename to frontend/src/docs/pages/selfHost/Instagram.tsx
diff --git a/frontend/src/docs/pages/selfHost/Overview.jsx b/frontend/src/docs/pages/selfHost/Overview.tsx
similarity index 100%
rename from frontend/src/docs/pages/selfHost/Overview.jsx
rename to frontend/src/docs/pages/selfHost/Overview.tsx
diff --git a/frontend/src/docs/pages/selfHost/Redis.jsx b/frontend/src/docs/pages/selfHost/Redis.tsx
similarity index 100%
rename from frontend/src/docs/pages/selfHost/Redis.jsx
rename to frontend/src/docs/pages/selfHost/Redis.tsx
diff --git a/frontend/src/docs/pages/selfHost/Supabase.jsx b/frontend/src/docs/pages/selfHost/Supabase.tsx
similarity index 100%
rename from frontend/src/docs/pages/selfHost/Supabase.jsx
rename to frontend/src/docs/pages/selfHost/Supabase.tsx
diff --git a/frontend/src/docs/pages/selfHost/YouTube.jsx b/frontend/src/docs/pages/selfHost/YouTube.tsx
similarity index 100%
rename from frontend/src/docs/pages/selfHost/YouTube.jsx
rename to frontend/src/docs/pages/selfHost/YouTube.tsx
diff --git a/frontend/src/docs/pages/selfHost/selfHostSql.js b/frontend/src/docs/pages/selfHost/selfHostSql.ts
similarity index 100%
rename from frontend/src/docs/pages/selfHost/selfHostSql.js
rename to frontend/src/docs/pages/selfHost/selfHostSql.ts
diff --git a/frontend/src/docs/pages/use/AdminLink.jsx b/frontend/src/docs/pages/use/AdminLink.tsx
similarity index 100%
rename from frontend/src/docs/pages/use/AdminLink.jsx
rename to frontend/src/docs/pages/use/AdminLink.tsx
diff --git a/frontend/src/docs/pages/use/Analytics.jsx b/frontend/src/docs/pages/use/Analytics.tsx
similarity index 100%
rename from frontend/src/docs/pages/use/Analytics.jsx
rename to frontend/src/docs/pages/use/Analytics.tsx
diff --git a/frontend/src/docs/pages/use/ConnectAccounts.jsx b/frontend/src/docs/pages/use/ConnectAccounts.tsx
similarity index 100%
rename from frontend/src/docs/pages/use/ConnectAccounts.jsx
rename to frontend/src/docs/pages/use/ConnectAccounts.tsx
diff --git a/frontend/src/docs/pages/use/GettingStarted.jsx b/frontend/src/docs/pages/use/GettingStarted.tsx
similarity index 100%
rename from frontend/src/docs/pages/use/GettingStarted.jsx
rename to frontend/src/docs/pages/use/GettingStarted.tsx
diff --git a/frontend/src/docs/pages/use/Publishing.jsx b/frontend/src/docs/pages/use/Publishing.tsx
similarity index 100%
rename from frontend/src/docs/pages/use/Publishing.jsx
rename to frontend/src/docs/pages/use/Publishing.tsx
diff --git a/frontend/src/docs/pages/use/TrackedContent.jsx b/frontend/src/docs/pages/use/TrackedContent.tsx
similarity index 100%
rename from frontend/src/docs/pages/use/TrackedContent.jsx
rename to frontend/src/docs/pages/use/TrackedContent.tsx
diff --git a/frontend/src/docs/pages/use/Troubleshooting.jsx b/frontend/src/docs/pages/use/Troubleshooting.tsx
similarity index 100%
rename from frontend/src/docs/pages/use/Troubleshooting.jsx
rename to frontend/src/docs/pages/use/Troubleshooting.tsx
diff --git a/frontend/src/docs/routes.js b/frontend/src/docs/routes.ts
similarity index 100%
rename from frontend/src/docs/routes.js
rename to frontend/src/docs/routes.ts
diff --git a/frontend/src/docs/slug.js b/frontend/src/docs/slug.ts
similarity index 100%
rename from frontend/src/docs/slug.js
rename to frontend/src/docs/slug.ts
diff --git a/frontend/src/docs/useTableOfContents.js b/frontend/src/docs/useTableOfContents.ts
similarity index 100%
rename from frontend/src/docs/useTableOfContents.js
rename to frontend/src/docs/useTableOfContents.ts
diff --git a/frontend/src/features/accounts/AccountCard.jsx b/frontend/src/features/accounts/AccountCard.tsx
similarity index 100%
rename from frontend/src/features/accounts/AccountCard.jsx
rename to frontend/src/features/accounts/AccountCard.tsx
diff --git a/frontend/src/features/accounts/AccountManager.jsx b/frontend/src/features/accounts/AccountManager.tsx
similarity index 100%
rename from frontend/src/features/accounts/AccountManager.jsx
rename to frontend/src/features/accounts/AccountManager.tsx
diff --git a/frontend/src/features/accounts/AccountSection.jsx b/frontend/src/features/accounts/AccountSection.tsx
similarity index 100%
rename from frontend/src/features/accounts/AccountSection.jsx
rename to frontend/src/features/accounts/AccountSection.tsx
diff --git a/frontend/src/features/accounts/AccountsEmptyState.jsx b/frontend/src/features/accounts/AccountsEmptyState.tsx
similarity index 100%
rename from frontend/src/features/accounts/AccountsEmptyState.jsx
rename to frontend/src/features/accounts/AccountsEmptyState.tsx
diff --git a/frontend/src/features/accounts/AddAccountDialog.jsx b/frontend/src/features/accounts/AddAccountDialog.tsx
similarity index 100%
rename from frontend/src/features/accounts/AddAccountDialog.jsx
rename to frontend/src/features/accounts/AddAccountDialog.tsx
diff --git a/frontend/src/features/accounts/AddAccountFooter.jsx b/frontend/src/features/accounts/AddAccountFooter.tsx
similarity index 100%
rename from frontend/src/features/accounts/AddAccountFooter.jsx
rename to frontend/src/features/accounts/AddAccountFooter.tsx
diff --git a/frontend/src/features/accounts/RedditAccountFields.jsx b/frontend/src/features/accounts/RedditAccountFields.tsx
similarity index 100%
rename from frontend/src/features/accounts/RedditAccountFields.jsx
rename to frontend/src/features/accounts/RedditAccountFields.tsx
diff --git a/frontend/src/features/accounts/YouTubeAccountFields.jsx b/frontend/src/features/accounts/YouTubeAccountFields.tsx
similarity index 100%
rename from frontend/src/features/accounts/YouTubeAccountFields.jsx
rename to frontend/src/features/accounts/YouTubeAccountFields.tsx
diff --git a/frontend/src/features/accounts/accountManagerData.js b/frontend/src/features/accounts/accountManagerData.ts
similarity index 95%
rename from frontend/src/features/accounts/accountManagerData.js
rename to frontend/src/features/accounts/accountManagerData.ts
index a40413e..47a4a59 100644
--- a/frontend/src/features/accounts/accountManagerData.js
+++ b/frontend/src/features/accounts/accountManagerData.ts
@@ -1,5 +1,5 @@
-import { ADMIN_EMAIL } from '../../lib/contact.js';
-import { accountHandle } from '../../lib/accounts.js';
+import { ADMIN_EMAIL } from '../../lib/contact.ts';
+import { accountHandle } from '../../lib/accounts.ts';
export const TESTER_HINT = `If your account is not an Instagram tester yet, email ${ADMIN_EMAIL} to be added, then accept the invite in Instagram.`;
diff --git a/frontend/src/features/accounts/platformChoices.js b/frontend/src/features/accounts/platformChoices.ts
similarity index 100%
rename from frontend/src/features/accounts/platformChoices.js
rename to frontend/src/features/accounts/platformChoices.ts
diff --git a/frontend/src/features/accounts/useAccountDelete.js b/frontend/src/features/accounts/useAccountDelete.ts
similarity index 100%
rename from frontend/src/features/accounts/useAccountDelete.js
rename to frontend/src/features/accounts/useAccountDelete.ts
diff --git a/frontend/src/features/accounts/useAccountRefresh.js b/frontend/src/features/accounts/useAccountRefresh.ts
similarity index 100%
rename from frontend/src/features/accounts/useAccountRefresh.js
rename to frontend/src/features/accounts/useAccountRefresh.ts
diff --git a/frontend/src/features/accounts/useAddAccount.js b/frontend/src/features/accounts/useAddAccount.ts
similarity index 100%
rename from frontend/src/features/accounts/useAddAccount.js
rename to frontend/src/features/accounts/useAddAccount.ts
diff --git a/frontend/src/features/accounts/useInstagramOAuthReturn.js b/frontend/src/features/accounts/useInstagramOAuthReturn.ts
similarity index 100%
rename from frontend/src/features/accounts/useInstagramOAuthReturn.js
rename to frontend/src/features/accounts/useInstagramOAuthReturn.ts
diff --git a/frontend/src/features/analytics/channel/ChannelAnalytics.jsx b/frontend/src/features/analytics/channel/ChannelAnalytics.tsx
similarity index 100%
rename from frontend/src/features/analytics/channel/ChannelAnalytics.jsx
rename to frontend/src/features/analytics/channel/ChannelAnalytics.tsx
diff --git a/frontend/src/features/analytics/channel/ChannelContentTab.jsx b/frontend/src/features/analytics/channel/ChannelContentTab.tsx
similarity index 99%
rename from frontend/src/features/analytics/channel/ChannelContentTab.jsx
rename to frontend/src/features/analytics/channel/ChannelContentTab.tsx
index 490141b..d4153bf 100644
--- a/frontend/src/features/analytics/channel/ChannelContentTab.jsx
+++ b/frontend/src/features/analytics/channel/ChannelContentTab.tsx
@@ -4,7 +4,7 @@ import MetricBox from '@/components/MetricBox';
import ChartPanel from '@/components/ChartPanel';
import { SERIES, axisProps, axisTick, gridProps, legendStyle, tooltipCursor, tooltipStyle } from '@/lib/chart';
import { fmtPercent } from '../../../utils/formatters';
-import { categoryDataOf, durationDataOf, viewRangeDataOf } from './channelChartData.js';
+import { categoryDataOf, durationDataOf, viewRangeDataOf } from './channelChartData.ts';
export default function ChannelContentTab({ analytics }) {
const durationData = durationDataOf(analytics.durationDistribution);
diff --git a/frontend/src/features/analytics/channel/ChannelEngagementTab.jsx b/frontend/src/features/analytics/channel/ChannelEngagementTab.tsx
similarity index 96%
rename from frontend/src/features/analytics/channel/ChannelEngagementTab.jsx
rename to frontend/src/features/analytics/channel/ChannelEngagementTab.tsx
index d7b1c3a..896c829 100644
--- a/frontend/src/features/analytics/channel/ChannelEngagementTab.jsx
+++ b/frontend/src/features/analytics/channel/ChannelEngagementTab.tsx
@@ -4,7 +4,7 @@ import ChartPanel from '@/components/ChartPanel';
import SectionHeader from '@/components/SectionHeader';
import { SERIES } from '@/lib/chart';
import { fmtNum, fmtPercent } from '../../../utils/formatters';
-import { likesPerComment, rateOf } from './channelChartData.js';
+import { likesPerComment, rateOf } from './channelChartData.ts';
import ChannelVideoTable from './ChannelVideoTable';
import TrendArea from './TrendArea';
diff --git a/frontend/src/features/analytics/channel/ChannelGrowthTab.jsx b/frontend/src/features/analytics/channel/ChannelGrowthTab.tsx
similarity index 96%
rename from frontend/src/features/analytics/channel/ChannelGrowthTab.jsx
rename to frontend/src/features/analytics/channel/ChannelGrowthTab.tsx
index 32bd8e7..d45fa21 100644
--- a/frontend/src/features/analytics/channel/ChannelGrowthTab.jsx
+++ b/frontend/src/features/analytics/channel/ChannelGrowthTab.tsx
@@ -4,7 +4,7 @@ import MetricBox from '@/components/MetricBox';
import ChartPanel from '@/components/ChartPanel';
import { SERIES, axisProps, gridProps, tooltipCursor, tooltipStyle } from '@/lib/chart';
import { fmtNum } from '../../../utils/formatters';
-import { uploadsByMonthOf } from './channelChartData.js';
+import { uploadsByMonthOf } from './channelChartData.ts';
import MetricGrid from './MetricGrid';
import TrendArea from './TrendArea';
diff --git a/frontend/src/features/analytics/channel/ChannelHeader.jsx b/frontend/src/features/analytics/channel/ChannelHeader.tsx
similarity index 94%
rename from frontend/src/features/analytics/channel/ChannelHeader.jsx
rename to frontend/src/features/analytics/channel/ChannelHeader.tsx
index 4ca59ee..32a8a2f 100644
--- a/frontend/src/features/analytics/channel/ChannelHeader.jsx
+++ b/frontend/src/features/analytics/channel/ChannelHeader.tsx
@@ -3,7 +3,7 @@ import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
import PageHeader from '@/components/PageHeader';
import { AccountAvatar } from '@/components/platform';
-import { channelMeta } from './channelChartData.js';
+import { channelMeta } from './channelChartData.ts';
export default function ChannelHeader({ account, channel, back, onRefresh }) {
return (
diff --git a/frontend/src/features/analytics/channel/ChannelNoVideos.jsx b/frontend/src/features/analytics/channel/ChannelNoVideos.tsx
similarity index 100%
rename from frontend/src/features/analytics/channel/ChannelNoVideos.jsx
rename to frontend/src/features/analytics/channel/ChannelNoVideos.tsx
diff --git a/frontend/src/features/analytics/channel/ChannelOverviewTab.jsx b/frontend/src/features/analytics/channel/ChannelOverviewTab.tsx
similarity index 99%
rename from frontend/src/features/analytics/channel/ChannelOverviewTab.jsx
rename to frontend/src/features/analytics/channel/ChannelOverviewTab.tsx
index b45ac7d..b6d9d80 100644
--- a/frontend/src/features/analytics/channel/ChannelOverviewTab.jsx
+++ b/frontend/src/features/analytics/channel/ChannelOverviewTab.tsx
@@ -5,7 +5,7 @@ import MetricBox from '@/components/MetricBox';
import SectionHeader from '@/components/SectionHeader';
import MediaCard, { MediaChip } from '@/components/MediaCard';
import { fmtNum, fmtNumFull, fmtPercent } from '../../../utils/formatters';
-import { bestVideosOf, likesLabel, watchUrl } from './channelChartData.js';
+import { bestVideosOf, likesLabel, watchUrl } from './channelChartData.ts';
import MetricGrid from './MetricGrid';
function BestVideos({ analytics }) {
diff --git a/frontend/src/features/analytics/channel/ChannelPublishingTab.jsx b/frontend/src/features/analytics/channel/ChannelPublishingTab.tsx
similarity index 99%
rename from frontend/src/features/analytics/channel/ChannelPublishingTab.jsx
rename to frontend/src/features/analytics/channel/ChannelPublishingTab.tsx
index d964ac0..fa965c9 100644
--- a/frontend/src/features/analytics/channel/ChannelPublishingTab.jsx
+++ b/frontend/src/features/analytics/channel/ChannelPublishingTab.tsx
@@ -3,7 +3,7 @@ import { Calendar, Clock, Trophy, Zap } from 'lucide-react';
import MetricBox from '@/components/MetricBox';
import ChartPanel from '@/components/ChartPanel';
import { SERIES, axisProps, gridProps, tooltipCursor, tooltipStyle } from '@/lib/chart';
-import { dayDataOf, hourDataOf, peakHourLabel } from './channelChartData.js';
+import { dayDataOf, hourDataOf, peakHourLabel } from './channelChartData.ts';
import MetricGrid from './MetricGrid';
export default function ChannelPublishingTab({ analytics }) {
diff --git a/frontend/src/features/analytics/channel/ChannelShortsTab.jsx b/frontend/src/features/analytics/channel/ChannelShortsTab.tsx
similarity index 99%
rename from frontend/src/features/analytics/channel/ChannelShortsTab.jsx
rename to frontend/src/features/analytics/channel/ChannelShortsTab.tsx
index a73abe5..82321a8 100644
--- a/frontend/src/features/analytics/channel/ChannelShortsTab.jsx
+++ b/frontend/src/features/analytics/channel/ChannelShortsTab.tsx
@@ -4,7 +4,7 @@ import MetricBox from '@/components/MetricBox';
import ChartPanel from '@/components/ChartPanel';
import { SERIES, axisProps, gridProps, legendStyle, tooltipCursor, tooltipStyle } from '@/lib/chart';
import { fmtNum, fmtNumFull } from '../../../utils/formatters';
-import { shortsComparisonOf, splitDataOf } from './channelChartData.js';
+import { shortsComparisonOf, splitDataOf } from './channelChartData.ts';
import MetricGrid from './MetricGrid';
function fullNumber(value) {
diff --git a/frontend/src/features/analytics/channel/ChannelTagsTab.jsx b/frontend/src/features/analytics/channel/ChannelTagsTab.tsx
similarity index 100%
rename from frontend/src/features/analytics/channel/ChannelTagsTab.jsx
rename to frontend/src/features/analytics/channel/ChannelTagsTab.tsx
diff --git a/frontend/src/features/analytics/channel/ChannelVideoTable.jsx b/frontend/src/features/analytics/channel/ChannelVideoTable.tsx
similarity index 98%
rename from frontend/src/features/analytics/channel/ChannelVideoTable.jsx
rename to frontend/src/features/analytics/channel/ChannelVideoTable.tsx
index abafd10..0903cb6 100644
--- a/frontend/src/features/analytics/channel/ChannelVideoTable.jsx
+++ b/frontend/src/features/analytics/channel/ChannelVideoTable.tsx
@@ -4,7 +4,7 @@ import { Badge } from '@/components/ui/badge';
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table';
import SurfaceBox from '@/components/SurfaceBox';
import { fmtCount, fmtDate, fmtDuration, fmtNum, fmtPercent } from '../../../utils/formatters';
-import { watchUrl } from './channelChartData.js';
+import { watchUrl } from './channelChartData.ts';
function VideoRow({ video, rank }) {
return (
diff --git a/frontend/src/features/analytics/channel/ChannelVideosTab.jsx b/frontend/src/features/analytics/channel/ChannelVideosTab.tsx
similarity index 99%
rename from frontend/src/features/analytics/channel/ChannelVideosTab.jsx
rename to frontend/src/features/analytics/channel/ChannelVideosTab.tsx
index fb05ffc..23f9a4a 100644
--- a/frontend/src/features/analytics/channel/ChannelVideosTab.jsx
+++ b/frontend/src/features/analytics/channel/ChannelVideosTab.tsx
@@ -2,7 +2,7 @@ import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip as ReTooltip, Legen
import ChartPanel from '@/components/ChartPanel';
import { SERIES, axisProps, axisTick, gridProps, legendStyle, tooltipCursor, tooltipStyle } from '@/lib/chart';
import { fmtNum, fmtNumFull } from '../../../utils/formatters';
-import { topVideoRowsOf, topVideosChartOf } from './channelChartData.js';
+import { topVideoRowsOf, topVideosChartOf } from './channelChartData.ts';
import ChannelVideoTable from './ChannelVideoTable';
function fullNumber(value) {
diff --git a/frontend/src/features/analytics/channel/MetricGrid.jsx b/frontend/src/features/analytics/channel/MetricGrid.tsx
similarity index 100%
rename from frontend/src/features/analytics/channel/MetricGrid.jsx
rename to frontend/src/features/analytics/channel/MetricGrid.tsx
diff --git a/frontend/src/features/analytics/channel/TagCloud.jsx b/frontend/src/features/analytics/channel/TagCloud.tsx
similarity index 100%
rename from frontend/src/features/analytics/channel/TagCloud.jsx
rename to frontend/src/features/analytics/channel/TagCloud.tsx
diff --git a/frontend/src/features/analytics/channel/TrendArea.jsx b/frontend/src/features/analytics/channel/TrendArea.tsx
similarity index 100%
rename from frontend/src/features/analytics/channel/TrendArea.jsx
rename to frontend/src/features/analytics/channel/TrendArea.tsx
diff --git a/frontend/src/features/analytics/channel/channelChartData.js b/frontend/src/features/analytics/channel/channelChartData.ts
similarity index 98%
rename from frontend/src/features/analytics/channel/channelChartData.js
rename to frontend/src/features/analytics/channel/channelChartData.ts
index f4e931f..425d369 100644
--- a/frontend/src/features/analytics/channel/channelChartData.js
+++ b/frontend/src/features/analytics/channel/channelChartData.ts
@@ -1,5 +1,5 @@
-import { SERIES } from '../../../lib/chart.js';
-import { CATEGORY_MAP, fmtDate, fmtNum, fmtPercent } from '../../../utils/formatters.js';
+import { SERIES } from '../../../lib/chart.ts';
+import { CATEGORY_MAP, fmtDate, fmtNum, fmtPercent } from '../../../utils/formatters.ts';
export function watchUrl(videoId) {
return `https://www.youtube.com/watch?v=${videoId}`;
diff --git a/frontend/src/features/analytics/channel/useChannelAnalytics.js b/frontend/src/features/analytics/channel/useChannelAnalytics.ts
similarity index 100%
rename from frontend/src/features/analytics/channel/useChannelAnalytics.js
rename to frontend/src/features/analytics/channel/useChannelAnalytics.ts
diff --git a/frontend/src/features/analytics/instagram/InstagramAnalytics.jsx b/frontend/src/features/analytics/instagram/InstagramAnalytics.tsx
similarity index 97%
rename from frontend/src/features/analytics/instagram/InstagramAnalytics.jsx
rename to frontend/src/features/analytics/instagram/InstagramAnalytics.tsx
index afc7ce3..4c95695 100644
--- a/frontend/src/features/analytics/instagram/InstagramAnalytics.jsx
+++ b/frontend/src/features/analytics/instagram/InstagramAnalytics.tsx
@@ -8,7 +8,7 @@ import { useAppContext } from '../../../context/AppContext';
import { useAccountAnalytics } from '../../../hooks/use-account-analytics';
import { api } from '../../../services/api';
import { timeAgo } from '../../../utils/formatters';
-import { instagramChartsOf } from './instagramAnalyticsData.js';
+import { instagramChartsOf } from './instagramAnalyticsData.ts';
import InstagramHeader from './InstagramHeader';
import InstagramMetrics from './InstagramMetrics';
import InstagramInsightChips from './InstagramInsightChips';
diff --git a/frontend/src/features/analytics/instagram/InstagramEngagementCharts.jsx b/frontend/src/features/analytics/instagram/InstagramEngagementCharts.tsx
similarity index 100%
rename from frontend/src/features/analytics/instagram/InstagramEngagementCharts.jsx
rename to frontend/src/features/analytics/instagram/InstagramEngagementCharts.tsx
diff --git a/frontend/src/features/analytics/instagram/InstagramHashtags.jsx b/frontend/src/features/analytics/instagram/InstagramHashtags.tsx
similarity index 100%
rename from frontend/src/features/analytics/instagram/InstagramHashtags.jsx
rename to frontend/src/features/analytics/instagram/InstagramHashtags.tsx
diff --git a/frontend/src/features/analytics/instagram/InstagramHeader.jsx b/frontend/src/features/analytics/instagram/InstagramHeader.tsx
similarity index 100%
rename from frontend/src/features/analytics/instagram/InstagramHeader.jsx
rename to frontend/src/features/analytics/instagram/InstagramHeader.tsx
diff --git a/frontend/src/features/analytics/instagram/InstagramInsightChips.jsx b/frontend/src/features/analytics/instagram/InstagramInsightChips.tsx
similarity index 100%
rename from frontend/src/features/analytics/instagram/InstagramInsightChips.jsx
rename to frontend/src/features/analytics/instagram/InstagramInsightChips.tsx
diff --git a/frontend/src/features/analytics/instagram/InstagramMetrics.jsx b/frontend/src/features/analytics/instagram/InstagramMetrics.tsx
similarity index 99%
rename from frontend/src/features/analytics/instagram/InstagramMetrics.jsx
rename to frontend/src/features/analytics/instagram/InstagramMetrics.tsx
index 3953952..6803e44 100644
--- a/frontend/src/features/analytics/instagram/InstagramMetrics.jsx
+++ b/frontend/src/features/analytics/instagram/InstagramMetrics.tsx
@@ -4,7 +4,7 @@ import {
import MetricBox from '@/components/MetricBox';
import { fmtNum, fmtNumFull } from '../../../utils/formatters';
import { IG_CONTENT_TYPES, IG_CONTENT_TYPE_META } from '../../../utils/instagramContent';
-import { followerRatio, typeViewsSubtitle } from './instagramAnalyticsData.js';
+import { followerRatio, typeViewsSubtitle } from './instagramAnalyticsData.ts';
const CONTENT_TYPE_ICONS = { reel: Clapperboard, post: Image, video: Film };
diff --git a/frontend/src/features/analytics/instagram/InstagramPostCharts.jsx b/frontend/src/features/analytics/instagram/InstagramPostCharts.tsx
similarity index 100%
rename from frontend/src/features/analytics/instagram/InstagramPostCharts.jsx
rename to frontend/src/features/analytics/instagram/InstagramPostCharts.tsx
diff --git a/frontend/src/features/analytics/instagram/InstagramRecentGrid.jsx b/frontend/src/features/analytics/instagram/InstagramRecentGrid.tsx
similarity index 100%
rename from frontend/src/features/analytics/instagram/InstagramRecentGrid.jsx
rename to frontend/src/features/analytics/instagram/InstagramRecentGrid.tsx
diff --git a/frontend/src/features/analytics/instagram/InstagramTopPostsTable.jsx b/frontend/src/features/analytics/instagram/InstagramTopPostsTable.tsx
similarity index 100%
rename from frontend/src/features/analytics/instagram/InstagramTopPostsTable.jsx
rename to frontend/src/features/analytics/instagram/InstagramTopPostsTable.tsx
diff --git a/frontend/src/features/analytics/instagram/InstagramTypeSummaryTable.jsx b/frontend/src/features/analytics/instagram/InstagramTypeSummaryTable.tsx
similarity index 96%
rename from frontend/src/features/analytics/instagram/InstagramTypeSummaryTable.jsx
rename to frontend/src/features/analytics/instagram/InstagramTypeSummaryTable.tsx
index ea9d0a7..d048034 100644
--- a/frontend/src/features/analytics/instagram/InstagramTypeSummaryTable.jsx
+++ b/frontend/src/features/analytics/instagram/InstagramTypeSummaryTable.tsx
@@ -1,7 +1,7 @@
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table';
import SurfaceBox from '@/components/SurfaceBox';
import { fmtNum } from '../../../utils/formatters';
-import { reportedViews } from './instagramAnalyticsData.js';
+import { reportedViews } from './instagramAnalyticsData.ts';
import TypeBadge from './TypeBadge';
export default function InstagramTypeSummaryTable({ rows }) {
diff --git a/frontend/src/features/analytics/instagram/TypeBadge.jsx b/frontend/src/features/analytics/instagram/TypeBadge.tsx
similarity index 100%
rename from frontend/src/features/analytics/instagram/TypeBadge.jsx
rename to frontend/src/features/analytics/instagram/TypeBadge.tsx
diff --git a/frontend/src/features/analytics/instagram/instagramAnalyticsData.js b/frontend/src/features/analytics/instagram/instagramAnalyticsData.ts
similarity index 95%
rename from frontend/src/features/analytics/instagram/instagramAnalyticsData.js
rename to frontend/src/features/analytics/instagram/instagramAnalyticsData.ts
index 78a1ac6..790d771 100644
--- a/frontend/src/features/analytics/instagram/instagramAnalyticsData.js
+++ b/frontend/src/features/analytics/instagram/instagramAnalyticsData.ts
@@ -1,5 +1,5 @@
-import { fmtNum } from '../../../utils/formatters.js';
-import { IG_CONTENT_TYPES, IG_CONTENT_TYPE_META } from '../../../utils/instagramContent.js';
+import { fmtNum } from '../../../utils/formatters.ts';
+import { IG_CONTENT_TYPES, IG_CONTENT_TYPE_META } from '../../../utils/instagramContent.ts';
export function typeRowsOf(typeStats) {
return IG_CONTENT_TYPES
diff --git a/frontend/src/features/analytics/overview/AccountCell.jsx b/frontend/src/features/analytics/overview/AccountCell.tsx
similarity index 100%
rename from frontend/src/features/analytics/overview/AccountCell.jsx
rename to frontend/src/features/analytics/overview/AccountCell.tsx
diff --git a/frontend/src/features/analytics/overview/AccountRankRow.jsx b/frontend/src/features/analytics/overview/AccountRankRow.tsx
similarity index 100%
rename from frontend/src/features/analytics/overview/AccountRankRow.jsx
rename to frontend/src/features/analytics/overview/AccountRankRow.tsx
diff --git a/frontend/src/features/analytics/overview/AccountsTab.jsx b/frontend/src/features/analytics/overview/AccountsTab.tsx
similarity index 99%
rename from frontend/src/features/analytics/overview/AccountsTab.jsx
rename to frontend/src/features/analytics/overview/AccountsTab.tsx
index 0e43a16..9350573 100644
--- a/frontend/src/features/analytics/overview/AccountsTab.jsx
+++ b/frontend/src/features/analytics/overview/AccountsTab.tsx
@@ -4,7 +4,7 @@ import { RankNumber } from '@/components/ListRow';
import { PlatformBadge } from '@/components/platform';
import { accountName, platformOf } from '@/lib/accounts';
import { timeAgo } from '../../../utils/formatters';
-import { accountAudienceLabel, accountContentLabel } from './overviewLabels.js';
+import { accountAudienceLabel, accountContentLabel } from './overviewLabels.ts';
import AccountCell from './AccountCell';
import OpenAnalytics from './OpenAnalytics';
diff --git a/frontend/src/features/analytics/overview/AudienceChart.jsx b/frontend/src/features/analytics/overview/AudienceChart.tsx
similarity index 97%
rename from frontend/src/features/analytics/overview/AudienceChart.jsx
rename to frontend/src/features/analytics/overview/AudienceChart.tsx
index 19d9b0b..4083f6d 100644
--- a/frontend/src/features/analytics/overview/AudienceChart.jsx
+++ b/frontend/src/features/analytics/overview/AudienceChart.tsx
@@ -3,7 +3,7 @@ import {
} from 'recharts';
import { axisProps, gridProps, tooltipStyle } from '@/lib/chart';
import { fmtNum, fmtNumFull } from '../../../utils/formatters';
-import { audienceDotColor } from './overviewCharts.js';
+import { audienceDotColor } from './overviewCharts.ts';
function formatAudienceTooltip(value, name, props) {
return [fmtNumFull(value), props.payload.type === 'category' ? 'Karma' : 'Audience'];
diff --git a/frontend/src/features/analytics/overview/AudienceTab.jsx b/frontend/src/features/analytics/overview/AudienceTab.tsx
similarity index 100%
rename from frontend/src/features/analytics/overview/AudienceTab.jsx
rename to frontend/src/features/analytics/overview/AudienceTab.tsx
diff --git a/frontend/src/features/analytics/overview/CategoryRow.jsx b/frontend/src/features/analytics/overview/CategoryRow.tsx
similarity index 92%
rename from frontend/src/features/analytics/overview/CategoryRow.jsx
rename to frontend/src/features/analytics/overview/CategoryRow.tsx
index 6fdffa7..3fa09b7 100644
--- a/frontend/src/features/analytics/overview/CategoryRow.jsx
+++ b/frontend/src/features/analytics/overview/CategoryRow.tsx
@@ -1,7 +1,7 @@
import { useNavigate } from 'react-router-dom';
import { Tag } from 'lucide-react';
import ListRow from '@/components/ListRow';
-import { categoryMeta } from './overviewLabels.js';
+import { categoryMeta } from './overviewLabels.ts';
export default function CategoryRow({ stat, trailing }) {
const navigate = useNavigate();
diff --git a/frontend/src/features/analytics/overview/CommentsTab.jsx b/frontend/src/features/analytics/overview/CommentsTab.tsx
similarity index 98%
rename from frontend/src/features/analytics/overview/CommentsTab.jsx
rename to frontend/src/features/analytics/overview/CommentsTab.tsx
index 42f26c3..a9b9e6c 100644
--- a/frontend/src/features/analytics/overview/CommentsTab.jsx
+++ b/frontend/src/features/analytics/overview/CommentsTab.tsx
@@ -7,7 +7,7 @@ import MetricAreaChart from '@/components/MetricAreaChart';
import { EmptyState } from '@/components/StateViews';
import { SERIES } from '@/lib/chart';
import { fmtNum, fmtPercent } from '../../../utils/formatters';
-import { pluralWord } from './overviewLabels.js';
+import { pluralWord } from './overviewLabels.ts';
export default function CommentsTab({ stats }) {
const { summary, charts } = stats;
diff --git a/frontend/src/features/analytics/overview/ContentTab.jsx b/frontend/src/features/analytics/overview/ContentTab.tsx
similarity index 99%
rename from frontend/src/features/analytics/overview/ContentTab.jsx
rename to frontend/src/features/analytics/overview/ContentTab.tsx
index 2d570e8..7f00ccb 100644
--- a/frontend/src/features/analytics/overview/ContentTab.jsx
+++ b/frontend/src/features/analytics/overview/ContentTab.tsx
@@ -6,7 +6,7 @@ import MetricBox from '@/components/MetricBox';
import { EmptyState } from '@/components/StateViews';
import { fmtNum } from '../../../utils/formatters';
import { IG_CONTENT_TYPES } from '../../../utils/instagramContent';
-import { countLabel, igTypeSummary, topContentLabel } from './overviewLabels.js';
+import { countLabel, igTypeSummary, topContentLabel } from './overviewLabels.ts';
import AccountRankRow from './AccountRankRow';
import CategoryRow from './CategoryRow';
diff --git a/frontend/src/features/analytics/overview/GettingStarted.jsx b/frontend/src/features/analytics/overview/GettingStarted.tsx
similarity index 100%
rename from frontend/src/features/analytics/overview/GettingStarted.jsx
rename to frontend/src/features/analytics/overview/GettingStarted.tsx
diff --git a/frontend/src/features/analytics/overview/InstagramViewsTable.jsx b/frontend/src/features/analytics/overview/InstagramViewsTable.tsx
similarity index 100%
rename from frontend/src/features/analytics/overview/InstagramViewsTable.jsx
rename to frontend/src/features/analytics/overview/InstagramViewsTable.tsx
diff --git a/frontend/src/features/analytics/overview/LikesTab.jsx b/frontend/src/features/analytics/overview/LikesTab.tsx
similarity index 100%
rename from frontend/src/features/analytics/overview/LikesTab.jsx
rename to frontend/src/features/analytics/overview/LikesTab.tsx
diff --git a/frontend/src/features/analytics/overview/MetricTabsList.jsx b/frontend/src/features/analytics/overview/MetricTabsList.tsx
similarity index 100%
rename from frontend/src/features/analytics/overview/MetricTabsList.jsx
rename to frontend/src/features/analytics/overview/MetricTabsList.tsx
diff --git a/frontend/src/features/analytics/overview/OpenAnalytics.jsx b/frontend/src/features/analytics/overview/OpenAnalytics.tsx
similarity index 100%
rename from frontend/src/features/analytics/overview/OpenAnalytics.jsx
rename to frontend/src/features/analytics/overview/OpenAnalytics.tsx
diff --git a/frontend/src/features/analytics/overview/Overview.jsx b/frontend/src/features/analytics/overview/Overview.tsx
similarity index 98%
rename from frontend/src/features/analytics/overview/Overview.jsx
rename to frontend/src/features/analytics/overview/Overview.tsx
index d9e15e1..ab8636d 100644
--- a/frontend/src/features/analytics/overview/Overview.jsx
+++ b/frontend/src/features/analytics/overview/Overview.tsx
@@ -3,7 +3,7 @@ import { Progress } from '@/components/ui/progress';
import { Tabs, TabsContent } from '@/components/ui/tabs';
import { useAppContext } from '../../../context/AppContext';
import { useAuth } from '../../../context/AuthContext';
-import { metricTabsOf } from './overviewLabels.js';
+import { metricTabsOf } from './overviewLabels.ts';
import { useOverviewData } from './useOverviewData';
import { useOverviewStats } from './useOverviewStats';
import OverviewHeader from './OverviewHeader';
diff --git a/frontend/src/features/analytics/overview/OverviewHeader.jsx b/frontend/src/features/analytics/overview/OverviewHeader.tsx
similarity index 90%
rename from frontend/src/features/analytics/overview/OverviewHeader.jsx
rename to frontend/src/features/analytics/overview/OverviewHeader.tsx
index 562be89..4b3a167 100644
--- a/frontend/src/features/analytics/overview/OverviewHeader.jsx
+++ b/frontend/src/features/analytics/overview/OverviewHeader.tsx
@@ -2,8 +2,8 @@ import { RefreshCw } from 'lucide-react';
import { Button } from '@/components/ui/button';
import PageHeader from '@/components/PageHeader';
import { cn } from '@/lib/utils';
-import { greetingTitle } from './greeting.js';
-import { overviewDescription } from './overviewLabels.js';
+import { greetingTitle } from './greeting.ts';
+import { overviewDescription } from './overviewLabels.ts';
export default function OverviewHeader({ accounts, email, isSyncing, loading, onRefresh }) {
return (
diff --git a/frontend/src/features/analytics/overview/QuickActions.jsx b/frontend/src/features/analytics/overview/QuickActions.tsx
similarity index 100%
rename from frontend/src/features/analytics/overview/QuickActions.jsx
rename to frontend/src/features/analytics/overview/QuickActions.tsx
diff --git a/frontend/src/features/analytics/overview/ViewsTab.jsx b/frontend/src/features/analytics/overview/ViewsTab.tsx
similarity index 97%
rename from frontend/src/features/analytics/overview/ViewsTab.jsx
rename to frontend/src/features/analytics/overview/ViewsTab.tsx
index 483c4f2..60533fb 100644
--- a/frontend/src/features/analytics/overview/ViewsTab.jsx
+++ b/frontend/src/features/analytics/overview/ViewsTab.tsx
@@ -4,7 +4,7 @@ import MetricBox from '@/components/MetricBox';
import MetricAreaChart from '@/components/MetricAreaChart';
import { SERIES } from '@/lib/chart';
import { fmtNum } from '../../../utils/formatters';
-import { countLabel, igTypeSummary } from './overviewLabels.js';
+import { countLabel, igTypeSummary } from './overviewLabels.ts';
import InstagramViewsTable from './InstagramViewsTable';
import YouTubeViewsTable from './YouTubeViewsTable';
diff --git a/frontend/src/features/analytics/overview/YouTubeViewsTable.jsx b/frontend/src/features/analytics/overview/YouTubeViewsTable.tsx
similarity index 100%
rename from frontend/src/features/analytics/overview/YouTubeViewsTable.jsx
rename to frontend/src/features/analytics/overview/YouTubeViewsTable.tsx
diff --git a/frontend/src/features/analytics/overview/greeting.js b/frontend/src/features/analytics/overview/greeting.ts
similarity index 100%
rename from frontend/src/features/analytics/overview/greeting.js
rename to frontend/src/features/analytics/overview/greeting.ts
diff --git a/frontend/src/features/analytics/overview/overviewCharts.js b/frontend/src/features/analytics/overview/overviewCharts.ts
similarity index 96%
rename from frontend/src/features/analytics/overview/overviewCharts.js
rename to frontend/src/features/analytics/overview/overviewCharts.ts
index 36dfea5..ba5ff54 100644
--- a/frontend/src/features/analytics/overview/overviewCharts.js
+++ b/frontend/src/features/analytics/overview/overviewCharts.ts
@@ -1,5 +1,5 @@
-import { PLATFORM_META } from '../../../lib/accounts.js';
-import { SERIES } from '../../../lib/chart.js';
+import { PLATFORM_META } from '../../../lib/accounts.ts';
+import { SERIES } from '../../../lib/chart.ts';
export const CATEGORY_SERIES = SERIES.neutral;
diff --git a/frontend/src/features/analytics/overview/overviewLabels.js b/frontend/src/features/analytics/overview/overviewLabels.ts
similarity index 97%
rename from frontend/src/features/analytics/overview/overviewLabels.js
rename to frontend/src/features/analytics/overview/overviewLabels.ts
index 493f3cd..a47fbd8 100644
--- a/frontend/src/features/analytics/overview/overviewLabels.js
+++ b/frontend/src/features/analytics/overview/overviewLabels.ts
@@ -1,6 +1,6 @@
-import { platformOf, platformSummary } from '../../../lib/accounts.js';
-import { fmtNum } from '../../../utils/formatters.js';
-import { IG_CONTENT_TYPES, IG_CONTENT_TYPE_META } from '../../../utils/instagramContent.js';
+import { platformOf, platformSummary } from '../../../lib/accounts.ts';
+import { fmtNum } from '../../../utils/formatters.ts';
+import { IG_CONTENT_TYPES, IG_CONTENT_TYPE_META } from '../../../utils/instagramContent.ts';
export function pluralWord(count, word) {
if (count !== 1) return `${word}s`;
diff --git a/frontend/src/features/analytics/overview/overviewStats.js b/frontend/src/features/analytics/overview/overviewStats.ts
similarity index 98%
rename from frontend/src/features/analytics/overview/overviewStats.js
rename to frontend/src/features/analytics/overview/overviewStats.ts
index d16c655..e621ac1 100644
--- a/frontend/src/features/analytics/overview/overviewStats.js
+++ b/frontend/src/features/analytics/overview/overviewStats.ts
@@ -1,5 +1,5 @@
-import { audienceOf } from '../../../lib/accounts.js';
-import { IG_CONTENT_TYPES } from '../../../utils/instagramContent.js';
+import { audienceOf } from '../../../lib/accounts.ts';
+import { IG_CONTENT_TYPES } from '../../../utils/instagramContent.ts';
function addAccountTotals(totals, account) {
if (account.platform === 'instagram') {
diff --git a/frontend/src/features/analytics/overview/overviewTrackedStats.js b/frontend/src/features/analytics/overview/overviewTrackedStats.ts
similarity index 96%
rename from frontend/src/features/analytics/overview/overviewTrackedStats.js
rename to frontend/src/features/analytics/overview/overviewTrackedStats.ts
index cbd0c89..747ae5d 100644
--- a/frontend/src/features/analytics/overview/overviewTrackedStats.js
+++ b/frontend/src/features/analytics/overview/overviewTrackedStats.ts
@@ -1,4 +1,4 @@
-import { trackedViews } from '../../../utils/trackedContent.js';
+import { trackedViews } from '../../../utils/trackedContent.ts';
function sumOf(items, valueOf) {
return items.reduce((sum, item) => sum + valueOf(item), 0);
diff --git a/frontend/src/features/analytics/overview/useOverviewData.js b/frontend/src/features/analytics/overview/useOverviewData.ts
similarity index 100%
rename from frontend/src/features/analytics/overview/useOverviewData.js
rename to frontend/src/features/analytics/overview/useOverviewData.ts
diff --git a/frontend/src/features/analytics/overview/useOverviewStats.js b/frontend/src/features/analytics/overview/useOverviewStats.ts
similarity index 97%
rename from frontend/src/features/analytics/overview/useOverviewStats.js
rename to frontend/src/features/analytics/overview/useOverviewStats.ts
index 4cb641b..60a1424 100644
--- a/frontend/src/features/analytics/overview/useOverviewStats.js
+++ b/frontend/src/features/analytics/overview/useOverviewStats.ts
@@ -2,12 +2,12 @@ import { useMemo } from 'react';
import { groupByPlatform } from '@/lib/accounts';
import {
accountTotalsOf, cacheTotalsOf, igAccountRowsOf, sortedByAudience, sortedByChannelViews, sortedByContent, summaryOf,
-} from './overviewStats.js';
-import { categoryStatsOf, trackedStatsOf } from './overviewTrackedStats.js';
+} from './overviewStats.ts';
+import { categoryStatsOf, trackedStatsOf } from './overviewTrackedStats.ts';
import {
audienceChartDataOf, audienceLegendOf, categoryViewDataOf, commentByCategoryOf, commentByContentOf,
engagementByContentOf, karmaByAccountOf,
-} from './overviewCharts.js';
+} from './overviewCharts.ts';
function useOverviewCharts(groups, trackedContent, categoryStats) {
const audience = useMemo(() => audienceChartDataOf(groups, categoryStats), [groups, categoryStats]);
diff --git a/frontend/src/features/analytics/reddit/RedditAnalytics.jsx b/frontend/src/features/analytics/reddit/RedditAnalytics.tsx
similarity index 98%
rename from frontend/src/features/analytics/reddit/RedditAnalytics.jsx
rename to frontend/src/features/analytics/reddit/RedditAnalytics.tsx
index ab64e71..8d992d1 100644
--- a/frontend/src/features/analytics/reddit/RedditAnalytics.jsx
+++ b/frontend/src/features/analytics/reddit/RedditAnalytics.tsx
@@ -10,7 +10,7 @@ import { useAccountAnalytics } from '../../../hooks/use-account-analytics';
import { api } from '../../../services/api';
import { fmtNum } from '../../../utils/formatters';
import { MEDIA_TYPE_LABELS } from './redditPostUtils';
-import { mediaTypeDataOf } from './redditAnalyticsData.js';
+import { mediaTypeDataOf } from './redditAnalyticsData.ts';
import RedditHeader from './RedditHeader';
import RedditKarmaSummary from './RedditKarmaSummary';
import RedditKarmaCharts from './RedditKarmaCharts';
diff --git a/frontend/src/features/analytics/reddit/RedditHeader.jsx b/frontend/src/features/analytics/reddit/RedditHeader.tsx
similarity index 100%
rename from frontend/src/features/analytics/reddit/RedditHeader.jsx
rename to frontend/src/features/analytics/reddit/RedditHeader.tsx
diff --git a/frontend/src/features/analytics/reddit/RedditKarmaCharts.jsx b/frontend/src/features/analytics/reddit/RedditKarmaCharts.tsx
similarity index 100%
rename from frontend/src/features/analytics/reddit/RedditKarmaCharts.jsx
rename to frontend/src/features/analytics/reddit/RedditKarmaCharts.tsx
diff --git a/frontend/src/features/analytics/reddit/RedditKarmaSummary.jsx b/frontend/src/features/analytics/reddit/RedditKarmaSummary.tsx
similarity index 93%
rename from frontend/src/features/analytics/reddit/RedditKarmaSummary.jsx
rename to frontend/src/features/analytics/reddit/RedditKarmaSummary.tsx
index b8b6995..3c74d3f 100644
--- a/frontend/src/features/analytics/reddit/RedditKarmaSummary.jsx
+++ b/frontend/src/features/analytics/reddit/RedditKarmaSummary.tsx
@@ -1,6 +1,6 @@
import SurfaceBox from '@/components/SurfaceBox';
import { cn } from '@/lib/utils';
-import { karmaSummaryOf } from './redditAnalyticsData.js';
+import { karmaSummaryOf } from './redditAnalyticsData.ts';
export default function RedditKarmaSummary({ profile }) {
return (
diff --git a/frontend/src/features/analytics/reddit/RedditPostFilters.jsx b/frontend/src/features/analytics/reddit/RedditPostFilters.tsx
similarity index 100%
rename from frontend/src/features/analytics/reddit/RedditPostFilters.jsx
rename to frontend/src/features/analytics/reddit/RedditPostFilters.tsx
diff --git a/frontend/src/features/analytics/reddit/RedditPostTable.jsx b/frontend/src/features/analytics/reddit/RedditPostTable.tsx
similarity index 100%
rename from frontend/src/features/analytics/reddit/RedditPostTable.jsx
rename to frontend/src/features/analytics/reddit/RedditPostTable.tsx
diff --git a/frontend/src/features/analytics/reddit/RedditPosts.jsx b/frontend/src/features/analytics/reddit/RedditPosts.tsx
similarity index 100%
rename from frontend/src/features/analytics/reddit/RedditPosts.jsx
rename to frontend/src/features/analytics/reddit/RedditPosts.tsx
diff --git a/frontend/src/features/analytics/reddit/RedditPostsAll.jsx b/frontend/src/features/analytics/reddit/RedditPostsAll.tsx
similarity index 100%
rename from frontend/src/features/analytics/reddit/RedditPostsAll.jsx
rename to frontend/src/features/analytics/reddit/RedditPostsAll.tsx
diff --git a/frontend/src/features/analytics/reddit/RedditStatPanels.jsx b/frontend/src/features/analytics/reddit/RedditStatPanels.tsx
similarity index 97%
rename from frontend/src/features/analytics/reddit/RedditStatPanels.jsx
rename to frontend/src/features/analytics/reddit/RedditStatPanels.tsx
index cccdeda..a9cb435 100644
--- a/frontend/src/features/analytics/reddit/RedditStatPanels.jsx
+++ b/frontend/src/features/analytics/reddit/RedditStatPanels.tsx
@@ -1,6 +1,6 @@
import { Progress } from '@/components/ui/progress';
import SurfaceBox from '@/components/SurfaceBox';
-import { karmaBreakdownRows, performanceIndicators, postingFrequencyRows } from './redditAnalyticsData.js';
+import { karmaBreakdownRows, performanceIndicators, postingFrequencyRows } from './redditAnalyticsData.ts';
function StatList({ rows }) {
return (
diff --git a/frontend/src/features/analytics/reddit/RedditSubredditTable.jsx b/frontend/src/features/analytics/reddit/RedditSubredditTable.tsx
similarity index 100%
rename from frontend/src/features/analytics/reddit/RedditSubredditTable.jsx
rename to frontend/src/features/analytics/reddit/RedditSubredditTable.tsx
diff --git a/frontend/src/features/analytics/reddit/RedditTimingCharts.jsx b/frontend/src/features/analytics/reddit/RedditTimingCharts.tsx
similarity index 100%
rename from frontend/src/features/analytics/reddit/RedditTimingCharts.jsx
rename to frontend/src/features/analytics/reddit/RedditTimingCharts.tsx
diff --git a/frontend/src/features/analytics/reddit/RedditTopPostsTable.jsx b/frontend/src/features/analytics/reddit/RedditTopPostsTable.tsx
similarity index 100%
rename from frontend/src/features/analytics/reddit/RedditTopPostsTable.jsx
rename to frontend/src/features/analytics/reddit/RedditTopPostsTable.tsx
diff --git a/frontend/src/features/analytics/reddit/redditAnalyticsData.js b/frontend/src/features/analytics/reddit/redditAnalyticsData.ts
similarity index 95%
rename from frontend/src/features/analytics/reddit/redditAnalyticsData.js
rename to frontend/src/features/analytics/reddit/redditAnalyticsData.ts
index 7976385..138c66d 100644
--- a/frontend/src/features/analytics/reddit/redditAnalyticsData.js
+++ b/frontend/src/features/analytics/reddit/redditAnalyticsData.ts
@@ -1,5 +1,5 @@
-import { seriesAt } from '../../../lib/chart.js';
-import { fmtNum, fmtNumFull } from '../../../utils/formatters.js';
+import { seriesAt } from '../../../lib/chart.ts';
+import { fmtNum, fmtNumFull } from '../../../utils/formatters.ts';
const MEDIA_TYPE_ORDER = ['text', 'image', 'video', 'link'];
diff --git a/frontend/src/features/analytics/reddit/redditPostUtils.js b/frontend/src/features/analytics/reddit/redditPostUtils.ts
similarity index 100%
rename from frontend/src/features/analytics/reddit/redditPostUtils.js
rename to frontend/src/features/analytics/reddit/redditPostUtils.ts
diff --git a/frontend/src/features/analytics/reels/ReelsExplorer.jsx b/frontend/src/features/analytics/reels/ReelsExplorer.tsx
similarity index 99%
rename from frontend/src/features/analytics/reels/ReelsExplorer.jsx
rename to frontend/src/features/analytics/reels/ReelsExplorer.tsx
index ed046b3..323f899 100644
--- a/frontend/src/features/analytics/reels/ReelsExplorer.jsx
+++ b/frontend/src/features/analytics/reels/ReelsExplorer.tsx
@@ -11,7 +11,7 @@ import { InstagramIcon } from '@/components/brand/platform-icons';
import { pageSlice } from '@/lib/library';
import { cn } from '@/lib/utils';
import { useInstagramMedia } from './useInstagramMedia';
-import { filterAndSortMedia, reelsDescription, typeTotalsOf } from './reelsLibrary.js';
+import { filterAndSortMedia, reelsDescription, typeTotalsOf } from './reelsLibrary.ts';
import ReelsMetrics from './ReelsMetrics';
import ReelsFilters from './ReelsFilters';
import ReelsGrid from './ReelsGrid';
diff --git a/frontend/src/features/analytics/reels/ReelsFilters.jsx b/frontend/src/features/analytics/reels/ReelsFilters.tsx
similarity index 100%
rename from frontend/src/features/analytics/reels/ReelsFilters.jsx
rename to frontend/src/features/analytics/reels/ReelsFilters.tsx
diff --git a/frontend/src/features/analytics/reels/ReelsGrid.jsx b/frontend/src/features/analytics/reels/ReelsGrid.tsx
similarity index 100%
rename from frontend/src/features/analytics/reels/ReelsGrid.jsx
rename to frontend/src/features/analytics/reels/ReelsGrid.tsx
diff --git a/frontend/src/features/analytics/reels/ReelsMetrics.jsx b/frontend/src/features/analytics/reels/ReelsMetrics.tsx
similarity index 99%
rename from frontend/src/features/analytics/reels/ReelsMetrics.jsx
rename to frontend/src/features/analytics/reels/ReelsMetrics.tsx
index bc691fc..b3aa98d 100644
--- a/frontend/src/features/analytics/reels/ReelsMetrics.jsx
+++ b/frontend/src/features/analytics/reels/ReelsMetrics.tsx
@@ -2,7 +2,7 @@ import { Clapperboard, Eye, Film, Image } from 'lucide-react';
import MetricBox from '@/components/MetricBox';
import { fmtNum } from '../../../utils/formatters';
import { IG_CONTENT_TYPES, IG_CONTENT_TYPE_META } from '../../../utils/instagramContent';
-import { typeViewsSubtitle, viewTotalsOf } from './reelsLibrary.js';
+import { typeViewsSubtitle, viewTotalsOf } from './reelsLibrary.ts';
const CONTENT_TYPE_ICONS = { reel: Clapperboard, post: Image, video: Film };
diff --git a/frontend/src/features/analytics/reels/reelsLibrary.js b/frontend/src/features/analytics/reels/reelsLibrary.ts
similarity index 96%
rename from frontend/src/features/analytics/reels/reelsLibrary.js
rename to frontend/src/features/analytics/reels/reelsLibrary.ts
index a8ecf96..5503ada 100644
--- a/frontend/src/features/analytics/reels/reelsLibrary.js
+++ b/frontend/src/features/analytics/reels/reelsLibrary.ts
@@ -1,6 +1,6 @@
-import { LIKE_TIERS, filterByTier, matchesText } from '../../../lib/library.js';
-import { fmtNum } from '../../../utils/formatters.js';
-import { IG_CONTENT_TYPES } from '../../../utils/instagramContent.js';
+import { LIKE_TIERS, filterByTier, matchesText } from '../../../lib/library.ts';
+import { fmtNum } from '../../../utils/formatters.ts';
+import { IG_CONTENT_TYPES } from '../../../utils/instagramContent.ts';
function engagementRateOf(item) {
if (item.viewCount > 0) return ((item.likeCount || 0) + (item.commentsCount || 0)) / item.viewCount * 100;
diff --git a/frontend/src/features/analytics/reels/useInstagramMedia.js b/frontend/src/features/analytics/reels/useInstagramMedia.ts
similarity index 95%
rename from frontend/src/features/analytics/reels/useInstagramMedia.js
rename to frontend/src/features/analytics/reels/useInstagramMedia.ts
index 135026b..cdbbc28 100644
--- a/frontend/src/features/analytics/reels/useInstagramMedia.js
+++ b/frontend/src/features/analytics/reels/useInstagramMedia.ts
@@ -1,7 +1,7 @@
import { useCallback, useEffect, useMemo, useState } from 'react';
import { useAppContext } from '../../../context/AppContext';
import { api } from '../../../services/api';
-import { mergeAccountMedia } from './reelsLibrary.js';
+import { mergeAccountMedia } from './reelsLibrary.ts';
// one failed Instagram account does not hide media from the rest
export function useInstagramMedia() {
diff --git a/frontend/src/features/analytics/shorts/ShortsExplorer.jsx b/frontend/src/features/analytics/shorts/ShortsExplorer.tsx
similarity index 99%
rename from frontend/src/features/analytics/shorts/ShortsExplorer.jsx
rename to frontend/src/features/analytics/shorts/ShortsExplorer.tsx
index a5d0272..40f09c8 100644
--- a/frontend/src/features/analytics/shorts/ShortsExplorer.jsx
+++ b/frontend/src/features/analytics/shorts/ShortsExplorer.tsx
@@ -12,7 +12,7 @@ import { useChannelVideos } from '../videos/useChannelVideos';
import { cn } from '@/lib/utils';
import ShortsFilters from './ShortsFilters';
import ShortsGrid from './ShortsGrid';
-import { shortsOf, filterAndSortShorts, shortsDescription } from './shortsLibrary.js';
+import { shortsOf, filterAndSortShorts, shortsDescription } from './shortsLibrary.ts';
const ITEMS_PER_PAGE = 24;
diff --git a/frontend/src/features/analytics/shorts/ShortsFilters.jsx b/frontend/src/features/analytics/shorts/ShortsFilters.tsx
similarity index 100%
rename from frontend/src/features/analytics/shorts/ShortsFilters.jsx
rename to frontend/src/features/analytics/shorts/ShortsFilters.tsx
diff --git a/frontend/src/features/analytics/shorts/ShortsGrid.jsx b/frontend/src/features/analytics/shorts/ShortsGrid.tsx
similarity index 100%
rename from frontend/src/features/analytics/shorts/ShortsGrid.jsx
rename to frontend/src/features/analytics/shorts/ShortsGrid.tsx
diff --git a/frontend/src/features/analytics/shorts/shortsLibrary.js b/frontend/src/features/analytics/shorts/shortsLibrary.ts
similarity index 93%
rename from frontend/src/features/analytics/shorts/shortsLibrary.js
rename to frontend/src/features/analytics/shorts/shortsLibrary.ts
index 65c9278..131981c 100644
--- a/frontend/src/features/analytics/shorts/shortsLibrary.js
+++ b/frontend/src/features/analytics/shorts/shortsLibrary.ts
@@ -1,5 +1,5 @@
-import { VIEW_TIERS, filterByTier, matchesText } from '../../../lib/library.js';
-import { fmtNum } from '../../../utils/formatters.js';
+import { VIEW_TIERS, filterByTier, matchesText } from '../../../lib/library.ts';
+import { fmtNum } from '../../../utils/formatters.ts';
const SHORT_MAX_SECONDS = 60;
diff --git a/frontend/src/features/analytics/tracked/AddTrackedDialog.jsx b/frontend/src/features/analytics/tracked/AddTrackedDialog.tsx
similarity index 100%
rename from frontend/src/features/analytics/tracked/AddTrackedDialog.jsx
rename to frontend/src/features/analytics/tracked/AddTrackedDialog.tsx
diff --git a/frontend/src/features/analytics/tracked/BulkCategoryBar.jsx b/frontend/src/features/analytics/tracked/BulkCategoryBar.tsx
similarity index 100%
rename from frontend/src/features/analytics/tracked/BulkCategoryBar.jsx
rename to frontend/src/features/analytics/tracked/BulkCategoryBar.tsx
diff --git a/frontend/src/features/analytics/tracked/CategoryPicker.jsx b/frontend/src/features/analytics/tracked/CategoryPicker.tsx
similarity index 100%
rename from frontend/src/features/analytics/tracked/CategoryPicker.jsx
rename to frontend/src/features/analytics/tracked/CategoryPicker.tsx
diff --git a/frontend/src/features/analytics/tracked/CategoryRedditSection.jsx b/frontend/src/features/analytics/tracked/CategoryRedditSection.tsx
similarity index 99%
rename from frontend/src/features/analytics/tracked/CategoryRedditSection.jsx
rename to frontend/src/features/analytics/tracked/CategoryRedditSection.tsx
index 7894b5a..1965f90 100644
--- a/frontend/src/features/analytics/tracked/CategoryRedditSection.jsx
+++ b/frontend/src/features/analytics/tracked/CategoryRedditSection.tsx
@@ -14,7 +14,7 @@ import { fmtDate, fmtNum } from '../../../utils/formatters';
import { hasTrackedViews, trackedViews } from '../../../utils/trackedContent';
import NumberCell from './NumberCell';
import OpenLink from './OpenLink';
-import { chartDataOf, redditViewsMetric, sortedByKarma, upvoteRatioLabel } from './trackedCategoryStats.js';
+import { chartDataOf, redditViewsMetric, sortedByKarma, upvoteRatioLabel } from './trackedCategoryStats.ts';
function PostRow({ item, rank }) {
return (
diff --git a/frontend/src/features/analytics/tracked/CategoryYouTubeSection.jsx b/frontend/src/features/analytics/tracked/CategoryYouTubeSection.tsx
similarity index 99%
rename from frontend/src/features/analytics/tracked/CategoryYouTubeSection.jsx
rename to frontend/src/features/analytics/tracked/CategoryYouTubeSection.tsx
index 6acbe1b..ed977ca 100644
--- a/frontend/src/features/analytics/tracked/CategoryYouTubeSection.jsx
+++ b/frontend/src/features/analytics/tracked/CategoryYouTubeSection.tsx
@@ -12,7 +12,7 @@ import { PLATFORM_META } from '@/lib/accounts';
import { fmtDate, fmtNum } from '../../../utils/formatters';
import NumberCell from './NumberCell';
import OpenLink from './OpenLink';
-import { chartDataOf, sortedByViews } from './trackedCategoryStats.js';
+import { chartDataOf, sortedByViews } from './trackedCategoryStats.ts';
function VideoRow({ item, rank }) {
return (
diff --git a/frontend/src/features/analytics/tracked/EditTrackedDialog.jsx b/frontend/src/features/analytics/tracked/EditTrackedDialog.tsx
similarity index 100%
rename from frontend/src/features/analytics/tracked/EditTrackedDialog.jsx
rename to frontend/src/features/analytics/tracked/EditTrackedDialog.tsx
diff --git a/frontend/src/features/analytics/tracked/NumberCell.jsx b/frontend/src/features/analytics/tracked/NumberCell.tsx
similarity index 100%
rename from frontend/src/features/analytics/tracked/NumberCell.jsx
rename to frontend/src/features/analytics/tracked/NumberCell.tsx
diff --git a/frontend/src/features/analytics/tracked/OpenLink.jsx b/frontend/src/features/analytics/tracked/OpenLink.tsx
similarity index 100%
rename from frontend/src/features/analytics/tracked/OpenLink.jsx
rename to frontend/src/features/analytics/tracked/OpenLink.tsx
diff --git a/frontend/src/features/analytics/tracked/RowAction.jsx b/frontend/src/features/analytics/tracked/RowAction.tsx
similarity index 100%
rename from frontend/src/features/analytics/tracked/RowAction.jsx
rename to frontend/src/features/analytics/tracked/RowAction.tsx
diff --git a/frontend/src/features/analytics/tracked/TrackedCategory.jsx b/frontend/src/features/analytics/tracked/TrackedCategory.tsx
similarity index 99%
rename from frontend/src/features/analytics/tracked/TrackedCategory.jsx
rename to frontend/src/features/analytics/tracked/TrackedCategory.tsx
index 3a840dc..f99cc1f 100644
--- a/frontend/src/features/analytics/tracked/TrackedCategory.jsx
+++ b/frontend/src/features/analytics/tracked/TrackedCategory.tsx
@@ -14,7 +14,7 @@ import CategoryRedditSection from './CategoryRedditSection';
import CategoryYouTubeSection from './CategoryYouTubeSection';
import {
categoryDescription, commentsSubtitle, itemsSubtitle, karmaMetric, redditStatsOf, viewsMetric, youtubeStatsOf,
-} from './trackedCategoryStats.js';
+} from './trackedCategoryStats.ts';
const BACK_LINK = { to: '/tracked-content', label: 'Tracked content' };
diff --git a/frontend/src/features/analytics/tracked/TrackedContent.jsx b/frontend/src/features/analytics/tracked/TrackedContent.tsx
similarity index 100%
rename from frontend/src/features/analytics/tracked/TrackedContent.jsx
rename to frontend/src/features/analytics/tracked/TrackedContent.tsx
diff --git a/frontend/src/features/analytics/tracked/TrackedFilters.jsx b/frontend/src/features/analytics/tracked/TrackedFilters.tsx
similarity index 96%
rename from frontend/src/features/analytics/tracked/TrackedFilters.jsx
rename to frontend/src/features/analytics/tracked/TrackedFilters.tsx
index 8302e5d..88360b4 100644
--- a/frontend/src/features/analytics/tracked/TrackedFilters.jsx
+++ b/frontend/src/features/analytics/tracked/TrackedFilters.tsx
@@ -1,7 +1,7 @@
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
import SearchField from '@/components/SearchField';
import FilterChips from '@/components/FilterChips';
-import { SORT_OPTIONS, typeChipsOf } from './trackedList.js';
+import { SORT_OPTIONS, typeChipsOf } from './trackedList.ts';
export default function TrackedFilters({ filters }) {
const { categories } = filters;
diff --git a/frontend/src/features/analytics/tracked/TrackedImageField.jsx b/frontend/src/features/analytics/tracked/TrackedImageField.tsx
similarity index 100%
rename from frontend/src/features/analytics/tracked/TrackedImageField.jsx
rename to frontend/src/features/analytics/tracked/TrackedImageField.tsx
diff --git a/frontend/src/features/analytics/tracked/TrackedMetrics.jsx b/frontend/src/features/analytics/tracked/TrackedMetrics.tsx
similarity index 95%
rename from frontend/src/features/analytics/tracked/TrackedMetrics.jsx
rename to frontend/src/features/analytics/tracked/TrackedMetrics.tsx
index dd82c83..46323db 100644
--- a/frontend/src/features/analytics/tracked/TrackedMetrics.jsx
+++ b/frontend/src/features/analytics/tracked/TrackedMetrics.tsx
@@ -1,6 +1,6 @@
import { BookmarkCheck, CirclePlay, MessagesSquare, Tag } from 'lucide-react';
import MetricBox from '@/components/MetricBox';
-import { countLabel, pluralize } from './trackedList.js';
+import { countLabel, pluralize } from './trackedList.ts';
function categoriesSubtitle(count) {
if (count === 0) return 'None assigned yet';
diff --git a/frontend/src/features/analytics/tracked/TrackedRow.jsx b/frontend/src/features/analytics/tracked/TrackedRow.tsx
similarity index 100%
rename from frontend/src/features/analytics/tracked/TrackedRow.jsx
rename to frontend/src/features/analytics/tracked/TrackedRow.tsx
diff --git a/frontend/src/features/analytics/tracked/TrackedTable.jsx b/frontend/src/features/analytics/tracked/TrackedTable.tsx
similarity index 100%
rename from frontend/src/features/analytics/tracked/TrackedTable.jsx
rename to frontend/src/features/analytics/tracked/TrackedTable.tsx
diff --git a/frontend/src/features/analytics/tracked/TrackedThumbnail.jsx b/frontend/src/features/analytics/tracked/TrackedThumbnail.tsx
similarity index 100%
rename from frontend/src/features/analytics/tracked/TrackedThumbnail.jsx
rename to frontend/src/features/analytics/tracked/TrackedThumbnail.tsx
diff --git a/frontend/src/features/analytics/tracked/trackedCategoryStats.js b/frontend/src/features/analytics/tracked/trackedCategoryStats.ts
similarity index 96%
rename from frontend/src/features/analytics/tracked/trackedCategoryStats.js
rename to frontend/src/features/analytics/tracked/trackedCategoryStats.ts
index bff0e18..0f22811 100644
--- a/frontend/src/features/analytics/tracked/trackedCategoryStats.js
+++ b/frontend/src/features/analytics/tracked/trackedCategoryStats.ts
@@ -1,6 +1,6 @@
-import { fmtNum } from '../../../utils/formatters.js';
-import { hasTrackedViews, trackedViews } from '../../../utils/trackedContent.js';
-import { countLabel } from './trackedList.js';
+import { fmtNum } from '../../../utils/formatters.ts';
+import { hasTrackedViews, trackedViews } from '../../../utils/trackedContent.ts';
+import { countLabel } from './trackedList.ts';
const CHART_ITEMS = 12;
const CHART_LABEL_CHARS = 16;
diff --git a/frontend/src/features/analytics/tracked/trackedList.js b/frontend/src/features/analytics/tracked/trackedList.ts
similarity index 96%
rename from frontend/src/features/analytics/tracked/trackedList.js
rename to frontend/src/features/analytics/tracked/trackedList.ts
index 2ceaf4d..2ed9451 100644
--- a/frontend/src/features/analytics/tracked/trackedList.js
+++ b/frontend/src/features/analytics/tracked/trackedList.ts
@@ -1,5 +1,5 @@
-import { matchesText } from '../../../lib/library.js';
-import { isRedditItem, trackedComments, trackedEngagement, trackedViews } from '../../../utils/trackedContent.js';
+import { matchesText } from '../../../lib/library.ts';
+import { isRedditItem, trackedComments, trackedEngagement, trackedViews } from '../../../utils/trackedContent.ts';
export const MAX_IMAGE_BYTES = 10 * 1024 * 1024;
diff --git a/frontend/src/features/analytics/tracked/useAddTracked.js b/frontend/src/features/analytics/tracked/useAddTracked.ts
similarity index 100%
rename from frontend/src/features/analytics/tracked/useAddTracked.js
rename to frontend/src/features/analytics/tracked/useAddTracked.ts
diff --git a/frontend/src/features/analytics/tracked/useBulkCategory.js b/frontend/src/features/analytics/tracked/useBulkCategory.ts
similarity index 94%
rename from frontend/src/features/analytics/tracked/useBulkCategory.js
rename to frontend/src/features/analytics/tracked/useBulkCategory.ts
index f4247de..62e9fa9 100644
--- a/frontend/src/features/analytics/tracked/useBulkCategory.js
+++ b/frontend/src/features/analytics/tracked/useBulkCategory.ts
@@ -1,6 +1,6 @@
import { useState } from 'react';
import { api } from '../../../services/api';
-import { bulkCategoryMessage } from './trackedList.js';
+import { bulkCategoryMessage } from './trackedList.ts';
export function useBulkCategory({ selection, setItems, showToast }) {
const [bulkCategory, setBulkCategory] = useState('');
diff --git a/frontend/src/features/analytics/tracked/useTrackedDelete.js b/frontend/src/features/analytics/tracked/useTrackedDelete.ts
similarity index 100%
rename from frontend/src/features/analytics/tracked/useTrackedDelete.js
rename to frontend/src/features/analytics/tracked/useTrackedDelete.ts
diff --git a/frontend/src/features/analytics/tracked/useTrackedEditor.js b/frontend/src/features/analytics/tracked/useTrackedEditor.ts
similarity index 99%
rename from frontend/src/features/analytics/tracked/useTrackedEditor.js
rename to frontend/src/features/analytics/tracked/useTrackedEditor.ts
index 7f0a499..260441c 100644
--- a/frontend/src/features/analytics/tracked/useTrackedEditor.js
+++ b/frontend/src/features/analytics/tracked/useTrackedEditor.ts
@@ -1,7 +1,7 @@
import { useRef, useState } from 'react';
import { api } from '../../../services/api';
import { isRedditItem } from '../../../utils/trackedContent';
-import { imageFileError, parseManualViews } from './trackedList.js';
+import { imageFileError, parseManualViews } from './trackedList.ts';
function clearInput(inputRef) {
if (inputRef.current) inputRef.current.value = '';
diff --git a/frontend/src/features/analytics/tracked/useTrackedFilters.js b/frontend/src/features/analytics/tracked/useTrackedFilters.ts
similarity index 97%
rename from frontend/src/features/analytics/tracked/useTrackedFilters.js
rename to frontend/src/features/analytics/tracked/useTrackedFilters.ts
index a068823..93b2e23 100644
--- a/frontend/src/features/analytics/tracked/useTrackedFilters.js
+++ b/frontend/src/features/analytics/tracked/useTrackedFilters.ts
@@ -1,5 +1,5 @@
import { useMemo, useState } from 'react';
-import { categoriesOf, filterAndSortTracked, trackedStatsOf } from './trackedList.js';
+import { categoriesOf, filterAndSortTracked, trackedStatsOf } from './trackedList.ts';
export function useTrackedFilters(items) {
const [query, setQuery] = useState('');
diff --git a/frontend/src/features/analytics/tracked/useTrackedItems.js b/frontend/src/features/analytics/tracked/useTrackedItems.ts
similarity index 100%
rename from frontend/src/features/analytics/tracked/useTrackedItems.js
rename to frontend/src/features/analytics/tracked/useTrackedItems.ts
diff --git a/frontend/src/features/analytics/tracked/useTrackedSelection.js b/frontend/src/features/analytics/tracked/useTrackedSelection.ts
similarity index 100%
rename from frontend/src/features/analytics/tracked/useTrackedSelection.js
rename to frontend/src/features/analytics/tracked/useTrackedSelection.ts
diff --git a/frontend/src/features/analytics/videos/LayoutToggle.jsx b/frontend/src/features/analytics/videos/LayoutToggle.tsx
similarity index 100%
rename from frontend/src/features/analytics/videos/LayoutToggle.jsx
rename to frontend/src/features/analytics/videos/LayoutToggle.tsx
diff --git a/frontend/src/features/analytics/videos/VideoExplorer.jsx b/frontend/src/features/analytics/videos/VideoExplorer.tsx
similarity index 99%
rename from frontend/src/features/analytics/videos/VideoExplorer.jsx
rename to frontend/src/features/analytics/videos/VideoExplorer.tsx
index 9226cf6..1e68570 100644
--- a/frontend/src/features/analytics/videos/VideoExplorer.jsx
+++ b/frontend/src/features/analytics/videos/VideoExplorer.tsx
@@ -12,7 +12,7 @@ import { pageSlice } from '@/lib/library';
import { cn } from '@/lib/utils';
import { fmtNum } from '../../../utils/formatters';
import { useChannelVideos } from './useChannelVideos';
-import { filterAndSortVideos, nextSort, videoStatsOf, videosDescription } from './videoLibrary.js';
+import { filterAndSortVideos, nextSort, videoStatsOf, videosDescription } from './videoLibrary.ts';
import VideoFilters from './VideoFilters';
import VideoListTable from './VideoListTable';
import VideoGrid from './VideoGrid';
diff --git a/frontend/src/features/analytics/videos/VideoFilters.jsx b/frontend/src/features/analytics/videos/VideoFilters.tsx
similarity index 100%
rename from frontend/src/features/analytics/videos/VideoFilters.jsx
rename to frontend/src/features/analytics/videos/VideoFilters.tsx
diff --git a/frontend/src/features/analytics/videos/VideoGrid.jsx b/frontend/src/features/analytics/videos/VideoGrid.tsx
similarity index 96%
rename from frontend/src/features/analytics/videos/VideoGrid.jsx
rename to frontend/src/features/analytics/videos/VideoGrid.tsx
index 94e82e9..aa1c8ff 100644
--- a/frontend/src/features/analytics/videos/VideoGrid.jsx
+++ b/frontend/src/features/analytics/videos/VideoGrid.tsx
@@ -1,7 +1,7 @@
import { Eye, MessageSquare, ThumbsUp } from 'lucide-react';
import MediaCard, { MediaChip } from '@/components/MediaCard';
import { fmtCount, fmtDuration, fmtNum, timeAgo } from '../../../utils/formatters';
-import { watchUrl } from './videoLibrary.js';
+import { watchUrl } from './videoLibrary.ts';
export default function VideoGrid({ items, showChannel }) {
return (
diff --git a/frontend/src/features/analytics/videos/VideoListTable.jsx b/frontend/src/features/analytics/videos/VideoListTable.tsx
similarity index 98%
rename from frontend/src/features/analytics/videos/VideoListTable.jsx
rename to frontend/src/features/analytics/videos/VideoListTable.tsx
index c3c4883..7f92c91 100644
--- a/frontend/src/features/analytics/videos/VideoListTable.jsx
+++ b/frontend/src/features/analytics/videos/VideoListTable.tsx
@@ -5,7 +5,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table';
import SurfaceBox from '@/components/SurfaceBox';
import { fmtCount, fmtDate, fmtDuration, fmtNum, fmtPercent } from '../../../utils/formatters';
-import { watchUrl } from './videoLibrary.js';
+import { watchUrl } from './videoLibrary.ts';
import VideoSortHeader from './VideoSortHeader';
function VideoRow({ video, rank, showChannel }) {
diff --git a/frontend/src/features/analytics/videos/VideoSortHeader.jsx b/frontend/src/features/analytics/videos/VideoSortHeader.tsx
similarity index 93%
rename from frontend/src/features/analytics/videos/VideoSortHeader.jsx
rename to frontend/src/features/analytics/videos/VideoSortHeader.tsx
index 39fe10f..dbe3e75 100644
--- a/frontend/src/features/analytics/videos/VideoSortHeader.jsx
+++ b/frontend/src/features/analytics/videos/VideoSortHeader.tsx
@@ -1,6 +1,6 @@
import { ArrowDown, ArrowUp } from 'lucide-react';
import { cn } from '@/lib/utils';
-import { ariaSortOf } from './videoLibrary.js';
+import { ariaSortOf } from './videoLibrary.ts';
export default function VideoSortHeader({ field, label, sort, onSort, align = 'left' }) {
const active = sort.field === field;
diff --git a/frontend/src/features/analytics/videos/useChannelVideos.js b/frontend/src/features/analytics/videos/useChannelVideos.ts
similarity index 100%
rename from frontend/src/features/analytics/videos/useChannelVideos.js
rename to frontend/src/features/analytics/videos/useChannelVideos.ts
diff --git a/frontend/src/features/analytics/videos/videoLibrary.js b/frontend/src/features/analytics/videos/videoLibrary.ts
similarity index 96%
rename from frontend/src/features/analytics/videos/videoLibrary.js
rename to frontend/src/features/analytics/videos/videoLibrary.ts
index 036ab90..3af3c1a 100644
--- a/frontend/src/features/analytics/videos/videoLibrary.js
+++ b/frontend/src/features/analytics/videos/videoLibrary.ts
@@ -1,5 +1,5 @@
-import { VIEW_TIERS, filterByTier, matchesText, engagementPercent, parseIsoDuration } from '../../../lib/library.js';
-import { fmtNum } from '../../../utils/formatters.js';
+import { VIEW_TIERS, filterByTier, matchesText, engagementPercent, parseIsoDuration } from '../../../lib/library.ts';
+import { fmtNum } from '../../../utils/formatters.ts';
// failed channels are left out; each video gains its channel and derived fields
export function mergeChannelVideos(channelAccounts, results) {
diff --git a/frontend/src/features/publishing/AccountSelect.jsx b/frontend/src/features/publishing/AccountSelect.tsx
similarity index 100%
rename from frontend/src/features/publishing/AccountSelect.jsx
rename to frontend/src/features/publishing/AccountSelect.tsx
diff --git a/frontend/src/features/publishing/BulkFileItem.jsx b/frontend/src/features/publishing/BulkFileItem.tsx
similarity index 97%
rename from frontend/src/features/publishing/BulkFileItem.jsx
rename to frontend/src/features/publishing/BulkFileItem.tsx
index 12e2d45..7fe0463 100644
--- a/frontend/src/features/publishing/BulkFileItem.jsx
+++ b/frontend/src/features/publishing/BulkFileItem.tsx
@@ -6,7 +6,7 @@ import { Textarea } from '@/components/ui/textarea';
import { cn } from '@/lib/utils';
import StatusBadge from './StatusBadge';
import { ACTIVE_BULK, BULK_STATUS } from './publishConstants';
-import { fileSizeMb, isVideoFile } from './queueHelpers.js';
+import { fileSizeMb, isVideoFile } from './queueHelpers.ts';
export default function BulkFileItem({ item, position, processing, onCaptionChange, onRemove }) {
const isActive = ACTIVE_BULK.includes(item.status);
diff --git a/frontend/src/features/publishing/BulkFileList.jsx b/frontend/src/features/publishing/BulkFileList.tsx
similarity index 97%
rename from frontend/src/features/publishing/BulkFileList.jsx
rename to frontend/src/features/publishing/BulkFileList.tsx
index b94f75f..18f8b57 100644
--- a/frontend/src/features/publishing/BulkFileList.jsx
+++ b/frontend/src/features/publishing/BulkFileList.tsx
@@ -2,7 +2,7 @@ import { FolderUp, Plus, Trash2 } from 'lucide-react';
import { Button } from '@/components/ui/button';
import SurfaceBox from '@/components/SurfaceBox';
import BulkFileItem from './BulkFileItem';
-import { bulkFilesTitle } from './queueHelpers.js';
+import { bulkFilesTitle } from './queueHelpers.ts';
export default function BulkFileList({ queue, bulkType }) {
const { files, processing, fileInputRef } = queue;
diff --git a/frontend/src/features/publishing/BulkResults.jsx b/frontend/src/features/publishing/BulkResults.tsx
similarity index 100%
rename from frontend/src/features/publishing/BulkResults.jsx
rename to frontend/src/features/publishing/BulkResults.tsx
diff --git a/frontend/src/features/publishing/BulkScheduleFields.jsx b/frontend/src/features/publishing/BulkScheduleFields.tsx
similarity index 94%
rename from frontend/src/features/publishing/BulkScheduleFields.jsx
rename to frontend/src/features/publishing/BulkScheduleFields.tsx
index b85e85f..edb4552 100644
--- a/frontend/src/features/publishing/BulkScheduleFields.jsx
+++ b/frontend/src/features/publishing/BulkScheduleFields.tsx
@@ -6,9 +6,9 @@ import { FieldRow } from '@/components/DetailPanel';
import ScheduleHint from './ScheduleHint';
import ScheduleToggle from './ScheduleToggle';
import { BULK_INTERVAL_OPTIONS } from './publishConstants';
-import { bulkScheduledTime } from './publishHelpers.js';
-import { intervalLabel } from './queueHelpers.js';
-import { utcDateInput } from './scheduleHelpers.js';
+import { bulkScheduledTime } from './publishHelpers.ts';
+import { intervalLabel } from './queueHelpers.ts';
+import { utcDateInput } from './scheduleHelpers.ts';
const INTERVAL_ITEMS = BULK_INTERVAL_OPTIONS.map(option => ({ value: String(option.value), label: option.label }));
diff --git a/frontend/src/features/publishing/BulkSettings.jsx b/frontend/src/features/publishing/BulkSettings.tsx
similarity index 98%
rename from frontend/src/features/publishing/BulkSettings.jsx
rename to frontend/src/features/publishing/BulkSettings.tsx
index 2d4b7e2..81eccd9 100644
--- a/frontend/src/features/publishing/BulkSettings.jsx
+++ b/frontend/src/features/publishing/BulkSettings.tsx
@@ -8,7 +8,7 @@ import AccountSelect from './AccountSelect';
import BulkScheduleFields from './BulkScheduleFields';
import IconInput from './IconInput';
import TypePicker from './TypePicker';
-import { bulkActionLabel } from './queueHelpers.js';
+import { bulkActionLabel } from './queueHelpers.ts';
function BulkFooter({ settings, pending, processing, onStart, onStop }) {
if (processing) {
diff --git a/frontend/src/features/publishing/BulkUploadTab.jsx b/frontend/src/features/publishing/BulkUploadTab.tsx
similarity index 95%
rename from frontend/src/features/publishing/BulkUploadTab.jsx
rename to frontend/src/features/publishing/BulkUploadTab.tsx
index 7942a0d..5707afa 100644
--- a/frontend/src/features/publishing/BulkUploadTab.jsx
+++ b/frontend/src/features/publishing/BulkUploadTab.tsx
@@ -2,7 +2,7 @@ import BulkFileList from './BulkFileList';
import BulkResults from './BulkResults';
import BulkSettings from './BulkSettings';
import { contentTypeOf } from './publishConstants';
-import { bulkStatsOf } from './queueHelpers.js';
+import { bulkStatsOf } from './queueHelpers.ts';
export default function BulkUploadTab({ bulk, queue, bulkPublish, igAccounts }) {
const stats = bulkStatsOf(queue.files);
diff --git a/frontend/src/features/publishing/CaptionBox.jsx b/frontend/src/features/publishing/CaptionBox.tsx
similarity index 100%
rename from frontend/src/features/publishing/CaptionBox.jsx
rename to frontend/src/features/publishing/CaptionBox.tsx
diff --git a/frontend/src/features/publishing/IconInput.jsx b/frontend/src/features/publishing/IconInput.tsx
similarity index 100%
rename from frontend/src/features/publishing/IconInput.jsx
rename to frontend/src/features/publishing/IconInput.tsx
diff --git a/frontend/src/features/publishing/MediaPicker.jsx b/frontend/src/features/publishing/MediaPicker.tsx
similarity index 98%
rename from frontend/src/features/publishing/MediaPicker.jsx
rename to frontend/src/features/publishing/MediaPicker.tsx
index e970e0c..4692887 100644
--- a/frontend/src/features/publishing/MediaPicker.jsx
+++ b/frontend/src/features/publishing/MediaPicker.tsx
@@ -3,7 +3,7 @@ import { Badge } from '@/components/ui/badge';
import SurfaceBox from '@/components/SurfaceBox';
import { cn } from '@/lib/utils';
import TypePicker from './TypePicker';
-import { fileSizeMb, isVideoFile } from './queueHelpers.js';
+import { fileSizeMb, isVideoFile } from './queueHelpers.ts';
function MediaPreview({ file, filePreview, selectedType, onClear }) {
return (
diff --git a/frontend/src/features/publishing/NoInstagramAccount.jsx b/frontend/src/features/publishing/NoInstagramAccount.tsx
similarity index 100%
rename from frontend/src/features/publishing/NoInstagramAccount.jsx
rename to frontend/src/features/publishing/NoInstagramAccount.tsx
diff --git a/frontend/src/features/publishing/OverdueAlert.jsx b/frontend/src/features/publishing/OverdueAlert.tsx
similarity index 94%
rename from frontend/src/features/publishing/OverdueAlert.jsx
rename to frontend/src/features/publishing/OverdueAlert.tsx
index b8c47e2..ad28840 100644
--- a/frontend/src/features/publishing/OverdueAlert.jsx
+++ b/frontend/src/features/publishing/OverdueAlert.tsx
@@ -2,7 +2,7 @@ import { Link } from 'react-router-dom';
import { AlertCircle } from 'lucide-react';
import { Alert, AlertDescription } from '@/components/ui/alert';
import { ADMIN_EMAIL, adminMailto } from '@/lib/contact';
-import { overdueLead } from './scheduleHelpers.js';
+import { overdueLead } from './scheduleHelpers.ts';
export default function OverdueAlert({ count }) {
return (
diff --git a/frontend/src/features/publishing/PostSummary.jsx b/frontend/src/features/publishing/PostSummary.tsx
similarity index 89%
rename from frontend/src/features/publishing/PostSummary.jsx
rename to frontend/src/features/publishing/PostSummary.tsx
index 91a8749..ed27879 100644
--- a/frontend/src/features/publishing/PostSummary.jsx
+++ b/frontend/src/features/publishing/PostSummary.tsx
@@ -1,5 +1,5 @@
-import { fileSizeMb } from './queueHelpers.js';
-import { goesLiveLabel } from './scheduleHelpers.js';
+import { fileSizeMb } from './queueHelpers.ts';
+import { goesLiveLabel } from './scheduleHelpers.ts';
function SummaryRow({ label, children }) {
return (
diff --git a/frontend/src/features/publishing/PublishProgress.jsx b/frontend/src/features/publishing/PublishProgress.tsx
similarity index 96%
rename from frontend/src/features/publishing/PublishProgress.jsx
rename to frontend/src/features/publishing/PublishProgress.tsx
index 733c398..3fbb8ad 100644
--- a/frontend/src/features/publishing/PublishProgress.jsx
+++ b/frontend/src/features/publishing/PublishProgress.tsx
@@ -3,7 +3,7 @@ import { Progress } from '@/components/ui/progress';
import { Spinner } from '@/components/ui/spinner';
import SurfaceBox from '@/components/SurfaceBox';
import PublishResult from './PublishResult';
-import { progressHeading } from './queueHelpers.js';
+import { progressHeading } from './queueHelpers.ts';
const WORKING_STATUSES = ['creating-container', 'publishing', 'scheduling', 'processing'];
diff --git a/frontend/src/features/publishing/PublishResult.jsx b/frontend/src/features/publishing/PublishResult.tsx
similarity index 100%
rename from frontend/src/features/publishing/PublishResult.jsx
rename to frontend/src/features/publishing/PublishResult.tsx
diff --git a/frontend/src/features/publishing/ReelOptions.jsx b/frontend/src/features/publishing/ReelOptions.tsx
similarity index 100%
rename from frontend/src/features/publishing/ReelOptions.jsx
rename to frontend/src/features/publishing/ReelOptions.tsx
diff --git a/frontend/src/features/publishing/ScheduleFields.jsx b/frontend/src/features/publishing/ScheduleFields.tsx
similarity index 94%
rename from frontend/src/features/publishing/ScheduleFields.jsx
rename to frontend/src/features/publishing/ScheduleFields.tsx
index 3e477a2..6d5f19e 100644
--- a/frontend/src/features/publishing/ScheduleFields.jsx
+++ b/frontend/src/features/publishing/ScheduleFields.tsx
@@ -2,7 +2,7 @@ import { Input } from '@/components/ui/input';
import { FieldRow } from '@/components/DetailPanel';
import ScheduleHint from './ScheduleHint';
import ScheduleToggle from './ScheduleToggle';
-import { utcDateInput } from './scheduleHelpers.js';
+import { utcDateInput } from './scheduleHelpers.ts';
export default function ScheduleFields({ fields, setField }) {
return (
diff --git a/frontend/src/features/publishing/ScheduleHint.jsx b/frontend/src/features/publishing/ScheduleHint.tsx
similarity index 100%
rename from frontend/src/features/publishing/ScheduleHint.jsx
rename to frontend/src/features/publishing/ScheduleHint.tsx
diff --git a/frontend/src/features/publishing/ScheduleToggle.jsx b/frontend/src/features/publishing/ScheduleToggle.tsx
similarity index 100%
rename from frontend/src/features/publishing/ScheduleToggle.jsx
rename to frontend/src/features/publishing/ScheduleToggle.tsx
diff --git a/frontend/src/features/publishing/ScheduledPostDialogs.jsx b/frontend/src/features/publishing/ScheduledPostDialogs.tsx
similarity index 100%
rename from frontend/src/features/publishing/ScheduledPostDialogs.jsx
rename to frontend/src/features/publishing/ScheduledPostDialogs.tsx
diff --git a/frontend/src/features/publishing/ScheduledPostEditRow.jsx b/frontend/src/features/publishing/ScheduledPostEditRow.tsx
similarity index 97%
rename from frontend/src/features/publishing/ScheduledPostEditRow.jsx
rename to frontend/src/features/publishing/ScheduledPostEditRow.tsx
index 36e7b81..46e082f 100644
--- a/frontend/src/features/publishing/ScheduledPostEditRow.jsx
+++ b/frontend/src/features/publishing/ScheduledPostEditRow.tsx
@@ -5,7 +5,7 @@ import { Spinner } from '@/components/ui/spinner';
import { TableCell, TableRow } from '@/components/ui/table';
import { Textarea } from '@/components/ui/textarea';
import { CAPTION_LIMIT } from './publishConstants';
-import { utcDateInput } from './scheduleHelpers.js';
+import { utcDateInput } from './scheduleHelpers.ts';
export default function ScheduledPostEditRow({ editor }) {
const { draft, setDraftField, savingEdit } = editor;
diff --git a/frontend/src/features/publishing/ScheduledPostRow.jsx b/frontend/src/features/publishing/ScheduledPostRow.tsx
similarity index 99%
rename from frontend/src/features/publishing/ScheduledPostRow.jsx
rename to frontend/src/features/publishing/ScheduledPostRow.tsx
index d3a7bb5..7a46df8 100644
--- a/frontend/src/features/publishing/ScheduledPostRow.jsx
+++ b/frontend/src/features/publishing/ScheduledPostRow.tsx
@@ -7,7 +7,7 @@ import { cn } from '@/lib/utils';
import ScheduledPostEditRow from './ScheduledPostEditRow';
import StatusBadge from './StatusBadge';
import { POST_STATUS, contentTypeOf } from './publishConstants';
-import { formatScheduleDate, isPastDue } from './scheduleHelpers.js';
+import { formatScheduleDate, isPastDue } from './scheduleHelpers.ts';
function PostActions({ post, isEditing, editor, onDelete }) {
// mirrors the backend edit check, which also accepts a 'scheduled' status
diff --git a/frontend/src/features/publishing/ScheduledPostsSection.jsx b/frontend/src/features/publishing/ScheduledPostsSection.tsx
similarity index 98%
rename from frontend/src/features/publishing/ScheduledPostsSection.jsx
rename to frontend/src/features/publishing/ScheduledPostsSection.tsx
index 089352a..b80ac6a 100644
--- a/frontend/src/features/publishing/ScheduledPostsSection.jsx
+++ b/frontend/src/features/publishing/ScheduledPostsSection.tsx
@@ -6,7 +6,7 @@ import FilterChips from '@/components/FilterChips';
import { EmptyState } from '@/components/StateViews';
import OverdueAlert from './OverdueAlert';
import ScheduledPostRow from './ScheduledPostRow';
-import { filterScheduledPosts, overduePostsOf, scheduledStatusChips } from './scheduleHelpers.js';
+import { filterScheduledPosts, overduePostsOf, scheduledStatusChips } from './scheduleHelpers.ts';
function ScheduledPostsHeader() {
return (
diff --git a/frontend/src/features/publishing/SinglePostSettings.jsx b/frontend/src/features/publishing/SinglePostSettings.tsx
similarity index 100%
rename from frontend/src/features/publishing/SinglePostSettings.jsx
rename to frontend/src/features/publishing/SinglePostSettings.tsx
diff --git a/frontend/src/features/publishing/SinglePostTab.jsx b/frontend/src/features/publishing/SinglePostTab.tsx
similarity index 100%
rename from frontend/src/features/publishing/SinglePostTab.jsx
rename to frontend/src/features/publishing/SinglePostTab.tsx
diff --git a/frontend/src/features/publishing/StatusBadge.jsx b/frontend/src/features/publishing/StatusBadge.tsx
similarity index 100%
rename from frontend/src/features/publishing/StatusBadge.jsx
rename to frontend/src/features/publishing/StatusBadge.tsx
diff --git a/frontend/src/features/publishing/TypePicker.jsx b/frontend/src/features/publishing/TypePicker.tsx
similarity index 100%
rename from frontend/src/features/publishing/TypePicker.jsx
rename to frontend/src/features/publishing/TypePicker.tsx
diff --git a/frontend/src/features/publishing/UploadContent.jsx b/frontend/src/features/publishing/UploadContent.tsx
similarity index 100%
rename from frontend/src/features/publishing/UploadContent.jsx
rename to frontend/src/features/publishing/UploadContent.tsx
diff --git a/frontend/src/features/publishing/containerPolling.js b/frontend/src/features/publishing/containerPolling.ts
similarity index 100%
rename from frontend/src/features/publishing/containerPolling.js
rename to frontend/src/features/publishing/containerPolling.ts
diff --git a/frontend/src/features/publishing/publishConstants.js b/frontend/src/features/publishing/publishConstants.ts
similarity index 100%
rename from frontend/src/features/publishing/publishConstants.js
rename to frontend/src/features/publishing/publishConstants.ts
diff --git a/frontend/src/features/publishing/publishHelpers.js b/frontend/src/features/publishing/publishHelpers.ts
similarity index 100%
rename from frontend/src/features/publishing/publishHelpers.js
rename to frontend/src/features/publishing/publishHelpers.ts
diff --git a/frontend/src/features/publishing/queueHelpers.js b/frontend/src/features/publishing/queueHelpers.ts
similarity index 100%
rename from frontend/src/features/publishing/queueHelpers.js
rename to frontend/src/features/publishing/queueHelpers.ts
diff --git a/frontend/src/features/publishing/scheduleHelpers.js b/frontend/src/features/publishing/scheduleHelpers.ts
similarity index 100%
rename from frontend/src/features/publishing/scheduleHelpers.js
rename to frontend/src/features/publishing/scheduleHelpers.ts
diff --git a/frontend/src/features/publishing/singlePostFlow.js b/frontend/src/features/publishing/singlePostFlow.ts
similarity index 96%
rename from frontend/src/features/publishing/singlePostFlow.js
rename to frontend/src/features/publishing/singlePostFlow.ts
index c6f2944..6c4e64f 100644
--- a/frontend/src/features/publishing/singlePostFlow.js
+++ b/frontend/src/features/publishing/singlePostFlow.ts
@@ -1,6 +1,6 @@
import { api } from '../../services/api';
-import { buildContainerPayload, buildScheduledPostPayload, singleUploadMessage } from './publishHelpers.js';
-import { waitUntilReady } from './containerPolling.js';
+import { buildContainerPayload, buildScheduledPostPayload, singleUploadMessage } from './publishHelpers.ts';
+import { waitUntilReady } from './containerPolling.ts';
export async function uploadSingleMedia(file, cloudConfig, onProgress) {
if (!cloudConfig) throw new Error('Cloudinary is not set up on the server. Check Settings.');
diff --git a/frontend/src/features/publishing/useBulkPublish.js b/frontend/src/features/publishing/useBulkPublish.ts
similarity index 97%
rename from frontend/src/features/publishing/useBulkPublish.js
rename to frontend/src/features/publishing/useBulkPublish.ts
index 571afdd..a817549 100644
--- a/frontend/src/features/publishing/useBulkPublish.js
+++ b/frontend/src/features/publishing/useBulkPublish.ts
@@ -1,8 +1,8 @@
import { api } from '../../services/api';
-import { waitUntilReady, wait } from './containerPolling.js';
+import { waitUntilReady, wait } from './containerPolling.ts';
import {
buildContainerPayload, buildScheduledPostPayload, bulkBaseTime, bulkPostDetails, bulkScheduledTime, bulkStartError,
-} from './publishHelpers.js';
+} from './publishHelpers.ts';
const CANCELLED = 'cancelled';
const DONE = 'done';
diff --git a/frontend/src/features/publishing/useBulkQueue.js b/frontend/src/features/publishing/useBulkQueue.ts
similarity index 98%
rename from frontend/src/features/publishing/useBulkQueue.js
rename to frontend/src/features/publishing/useBulkQueue.ts
index 4f8b7dc..fbcc90d 100644
--- a/frontend/src/features/publishing/useBulkQueue.js
+++ b/frontend/src/features/publishing/useBulkQueue.ts
@@ -1,7 +1,7 @@
import { useRef, useState } from 'react';
import {
applyCaptionToPending, newQueueItem, patchQueueItem, removeQueueItem, revokePreview,
-} from './queueHelpers.js';
+} from './queueHelpers.ts';
export function useBulkQueue({ sharedCaption, onFirstFiles }) {
const [files, setFiles] = useState([]);
diff --git a/frontend/src/features/publishing/useBulkSettings.js b/frontend/src/features/publishing/useBulkSettings.ts
similarity index 92%
rename from frontend/src/features/publishing/useBulkSettings.js
rename to frontend/src/features/publishing/useBulkSettings.ts
index 3d6ec1e..cfd8bd8 100644
--- a/frontend/src/features/publishing/useBulkSettings.js
+++ b/frontend/src/features/publishing/useBulkSettings.ts
@@ -1,5 +1,5 @@
import { useState } from 'react';
-import { defaultBulkStartDate } from './scheduleHelpers.js';
+import { defaultBulkStartDate } from './scheduleHelpers.ts';
const INITIAL_SETTINGS = {
account: '',
diff --git a/frontend/src/features/publishing/usePublishProgress.js b/frontend/src/features/publishing/usePublishProgress.ts
similarity index 100%
rename from frontend/src/features/publishing/usePublishProgress.js
rename to frontend/src/features/publishing/usePublishProgress.ts
diff --git a/frontend/src/features/publishing/useScheduledPostDelete.js b/frontend/src/features/publishing/useScheduledPostDelete.ts
similarity index 95%
rename from frontend/src/features/publishing/useScheduledPostDelete.js
rename to frontend/src/features/publishing/useScheduledPostDelete.ts
index 980780b..e195649 100644
--- a/frontend/src/features/publishing/useScheduledPostDelete.js
+++ b/frontend/src/features/publishing/useScheduledPostDelete.ts
@@ -1,6 +1,6 @@
import { useState } from 'react';
import { api } from '../../services/api';
-import { deleteAllMessage } from './scheduleHelpers.js';
+import { deleteAllMessage } from './scheduleHelpers.ts';
export function useScheduledPostDelete({ showToast, loadScheduledPosts }) {
const [pendingDelete, setPendingDelete] = useState(null);
diff --git a/frontend/src/features/publishing/useScheduledPostEdit.js b/frontend/src/features/publishing/useScheduledPostEdit.ts
similarity index 96%
rename from frontend/src/features/publishing/useScheduledPostEdit.js
rename to frontend/src/features/publishing/useScheduledPostEdit.ts
index 364e72b..c7f0d11 100644
--- a/frontend/src/features/publishing/useScheduledPostEdit.js
+++ b/frontend/src/features/publishing/useScheduledPostEdit.ts
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { api } from '../../services/api';
-import { editPostError } from './publishHelpers.js';
-import { toLocalDateInput, toLocalTimeInput } from './scheduleHelpers.js';
+import { editPostError } from './publishHelpers.ts';
+import { toLocalDateInput, toLocalTimeInput } from './scheduleHelpers.ts';
const EMPTY_DRAFT = { postId: null, caption: '', date: '', time: '' };
diff --git a/frontend/src/features/publishing/useScheduledPosts.js b/frontend/src/features/publishing/useScheduledPosts.ts
similarity index 100%
rename from frontend/src/features/publishing/useScheduledPosts.js
rename to frontend/src/features/publishing/useScheduledPosts.ts
diff --git a/frontend/src/features/publishing/useSinglePostForm.js b/frontend/src/features/publishing/useSinglePostForm.ts
similarity index 100%
rename from frontend/src/features/publishing/useSinglePostForm.js
rename to frontend/src/features/publishing/useSinglePostForm.ts
diff --git a/frontend/src/features/publishing/useSinglePostMedia.js b/frontend/src/features/publishing/useSinglePostMedia.ts
similarity index 100%
rename from frontend/src/features/publishing/useSinglePostMedia.js
rename to frontend/src/features/publishing/useSinglePostMedia.ts
diff --git a/frontend/src/features/publishing/useSinglePublish.js b/frontend/src/features/publishing/useSinglePublish.ts
similarity index 97%
rename from frontend/src/features/publishing/useSinglePublish.js
rename to frontend/src/features/publishing/useSinglePublish.ts
index 7585c2d..4a26b56 100644
--- a/frontend/src/features/publishing/useSinglePublish.js
+++ b/frontend/src/features/publishing/useSinglePublish.ts
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { usePublishProgress } from './usePublishProgress';
-import { publishSinglePost, scheduleSinglePost } from './singlePostFlow.js';
-import { singlePostError } from './publishHelpers.js';
+import { publishSinglePost, scheduleSinglePost } from './singlePostFlow.ts';
+import { singlePostError } from './publishHelpers.ts';
function beginRun(run) {
run.setUploading(true);
diff --git a/frontend/src/features/settings/AppearanceSection.jsx b/frontend/src/features/settings/AppearanceSection.tsx
similarity index 100%
rename from frontend/src/features/settings/AppearanceSection.jsx
rename to frontend/src/features/settings/AppearanceSection.tsx
diff --git a/frontend/src/features/settings/CopyChip.jsx b/frontend/src/features/settings/CopyChip.tsx
similarity index 100%
rename from frontend/src/features/settings/CopyChip.jsx
rename to frontend/src/features/settings/CopyChip.tsx
diff --git a/frontend/src/features/settings/GithubRepoForm.jsx b/frontend/src/features/settings/GithubRepoForm.tsx
similarity index 100%
rename from frontend/src/features/settings/GithubRepoForm.jsx
rename to frontend/src/features/settings/GithubRepoForm.tsx
diff --git a/frontend/src/features/settings/GuideLinkButton.jsx b/frontend/src/features/settings/GuideLinkButton.tsx
similarity index 100%
rename from frontend/src/features/settings/GuideLinkButton.jsx
rename to frontend/src/features/settings/GuideLinkButton.tsx
diff --git a/frontend/src/features/settings/PlatformRequirementsSection.jsx b/frontend/src/features/settings/PlatformRequirementsSection.tsx
similarity index 100%
rename from frontend/src/features/settings/PlatformRequirementsSection.jsx
rename to frontend/src/features/settings/PlatformRequirementsSection.tsx
diff --git a/frontend/src/features/settings/RepoLinkButton.jsx b/frontend/src/features/settings/RepoLinkButton.tsx
similarity index 100%
rename from frontend/src/features/settings/RepoLinkButton.jsx
rename to frontend/src/features/settings/RepoLinkButton.tsx
diff --git a/frontend/src/features/settings/SchedulingSection.jsx b/frontend/src/features/settings/SchedulingSection.tsx
similarity index 100%
rename from frontend/src/features/settings/SchedulingSection.jsx
rename to frontend/src/features/settings/SchedulingSection.tsx
diff --git a/frontend/src/features/settings/SchedulingSetupGuide.jsx b/frontend/src/features/settings/SchedulingSetupGuide.tsx
similarity index 100%
rename from frontend/src/features/settings/SchedulingSetupGuide.jsx
rename to frontend/src/features/settings/SchedulingSetupGuide.tsx
diff --git a/frontend/src/features/settings/SchedulingSetupSteps.jsx b/frontend/src/features/settings/SchedulingSetupSteps.tsx
similarity index 100%
rename from frontend/src/features/settings/SchedulingSetupSteps.jsx
rename to frontend/src/features/settings/SchedulingSetupSteps.tsx
diff --git a/frontend/src/features/settings/ServerKeysSection.jsx b/frontend/src/features/settings/ServerKeysSection.tsx
similarity index 100%
rename from frontend/src/features/settings/ServerKeysSection.jsx
rename to frontend/src/features/settings/ServerKeysSection.tsx
diff --git a/frontend/src/features/settings/Settings.jsx b/frontend/src/features/settings/Settings.tsx
similarity index 100%
rename from frontend/src/features/settings/Settings.jsx
rename to frontend/src/features/settings/Settings.tsx
diff --git a/frontend/src/features/settings/SettingsSection.jsx b/frontend/src/features/settings/SettingsSection.tsx
similarity index 100%
rename from frontend/src/features/settings/SettingsSection.jsx
rename to frontend/src/features/settings/SettingsSection.tsx
diff --git a/frontend/src/features/settings/SetupStep.jsx b/frontend/src/features/settings/SetupStep.tsx
similarity index 100%
rename from frontend/src/features/settings/SetupStep.jsx
rename to frontend/src/features/settings/SetupStep.tsx
diff --git a/frontend/src/features/settings/UsefulLinksSection.jsx b/frontend/src/features/settings/UsefulLinksSection.tsx
similarity index 100%
rename from frontend/src/features/settings/UsefulLinksSection.jsx
rename to frontend/src/features/settings/UsefulLinksSection.tsx
diff --git a/frontend/src/features/settings/schedulingProgress.js b/frontend/src/features/settings/schedulingProgress.ts
similarity index 100%
rename from frontend/src/features/settings/schedulingProgress.js
rename to frontend/src/features/settings/schedulingProgress.ts
diff --git a/frontend/src/features/settings/settingsData.js b/frontend/src/features/settings/settingsData.ts
similarity index 100%
rename from frontend/src/features/settings/settingsData.js
rename to frontend/src/features/settings/settingsData.ts
diff --git a/frontend/src/features/settings/useApiHealthCheck.js b/frontend/src/features/settings/useApiHealthCheck.ts
similarity index 100%
rename from frontend/src/features/settings/useApiHealthCheck.js
rename to frontend/src/features/settings/useApiHealthCheck.ts
diff --git a/frontend/src/features/settings/useServerSettings.js b/frontend/src/features/settings/useServerSettings.ts
similarity index 100%
rename from frontend/src/features/settings/useServerSettings.js
rename to frontend/src/features/settings/useServerSettings.ts
diff --git a/frontend/src/hooks/use-account-analytics.js b/frontend/src/hooks/use-account-analytics.ts
similarity index 100%
rename from frontend/src/hooks/use-account-analytics.js
rename to frontend/src/hooks/use-account-analytics.ts
diff --git a/frontend/src/hooks/use-cloudinary-config.js b/frontend/src/hooks/use-cloudinary-config.ts
similarity index 100%
rename from frontend/src/hooks/use-cloudinary-config.js
rename to frontend/src/hooks/use-cloudinary-config.ts
diff --git a/frontend/src/hooks/use-command-palette-shortcut.js b/frontend/src/hooks/use-command-palette-shortcut.ts
similarity index 100%
rename from frontend/src/hooks/use-command-palette-shortcut.js
rename to frontend/src/hooks/use-command-palette-shortcut.ts
diff --git a/frontend/src/hooks/use-mobile.js b/frontend/src/hooks/use-mobile.ts
similarity index 100%
rename from frontend/src/hooks/use-mobile.js
rename to frontend/src/hooks/use-mobile.ts
diff --git a/frontend/src/hooks/use-smooth-theme.js b/frontend/src/hooks/use-smooth-theme.ts
similarity index 100%
rename from frontend/src/hooks/use-smooth-theme.js
rename to frontend/src/hooks/use-smooth-theme.ts
diff --git a/frontend/src/layout/Header.jsx b/frontend/src/layout/Header.tsx
similarity index 100%
rename from frontend/src/layout/Header.jsx
rename to frontend/src/layout/Header.tsx
diff --git a/frontend/src/layout/Sidebar.jsx b/frontend/src/layout/Sidebar.tsx
similarity index 100%
rename from frontend/src/layout/Sidebar.jsx
rename to frontend/src/layout/Sidebar.tsx
diff --git a/frontend/src/layout/index.jsx b/frontend/src/layout/index.tsx
similarity index 100%
rename from frontend/src/layout/index.jsx
rename to frontend/src/layout/index.tsx
diff --git a/frontend/src/layout/navigation.js b/frontend/src/layout/navigation.ts
similarity index 100%
rename from frontend/src/layout/navigation.js
rename to frontend/src/layout/navigation.ts
diff --git a/frontend/src/lib/accounts.js b/frontend/src/lib/accounts.ts
similarity index 100%
rename from frontend/src/lib/accounts.js
rename to frontend/src/lib/accounts.ts
diff --git a/frontend/src/lib/chart.js b/frontend/src/lib/chart.ts
similarity index 100%
rename from frontend/src/lib/chart.js
rename to frontend/src/lib/chart.ts
diff --git a/frontend/src/lib/commandSearch.js b/frontend/src/lib/commandSearch.ts
similarity index 100%
rename from frontend/src/lib/commandSearch.js
rename to frontend/src/lib/commandSearch.ts
diff --git a/frontend/src/lib/contact.js b/frontend/src/lib/contact.ts
similarity index 100%
rename from frontend/src/lib/contact.js
rename to frontend/src/lib/contact.ts
diff --git a/frontend/src/lib/googleIdentity.js b/frontend/src/lib/googleIdentity.ts
similarity index 100%
rename from frontend/src/lib/googleIdentity.js
rename to frontend/src/lib/googleIdentity.ts
diff --git a/frontend/src/lib/holdProgress.js b/frontend/src/lib/holdProgress.ts
similarity index 100%
rename from frontend/src/lib/holdProgress.js
rename to frontend/src/lib/holdProgress.ts
diff --git a/frontend/src/lib/library.js b/frontend/src/lib/library.ts
similarity index 100%
rename from frontend/src/lib/library.js
rename to frontend/src/lib/library.ts
diff --git a/frontend/src/lib/supabase.js b/frontend/src/lib/supabase.ts
similarity index 100%
rename from frontend/src/lib/supabase.js
rename to frontend/src/lib/supabase.ts
diff --git a/frontend/src/lib/utils.js b/frontend/src/lib/utils.ts
similarity index 100%
rename from frontend/src/lib/utils.js
rename to frontend/src/lib/utils.ts
diff --git a/frontend/src/main.jsx b/frontend/src/main.tsx
similarity index 100%
rename from frontend/src/main.jsx
rename to frontend/src/main.tsx
diff --git a/frontend/src/pages/Login.jsx b/frontend/src/pages/Login.tsx
similarity index 100%
rename from frontend/src/pages/Login.jsx
rename to frontend/src/pages/Login.tsx
diff --git a/frontend/src/pages/LoginBrandPanel.jsx b/frontend/src/pages/LoginBrandPanel.tsx
similarity index 100%
rename from frontend/src/pages/LoginBrandPanel.jsx
rename to frontend/src/pages/LoginBrandPanel.tsx
diff --git a/frontend/src/pages/LoginForm.jsx b/frontend/src/pages/LoginForm.tsx
similarity index 100%
rename from frontend/src/pages/LoginForm.jsx
rename to frontend/src/pages/LoginForm.tsx
diff --git a/frontend/src/pages/loginCopy.js b/frontend/src/pages/loginCopy.ts
similarity index 100%
rename from frontend/src/pages/loginCopy.js
rename to frontend/src/pages/loginCopy.ts
diff --git a/frontend/src/services/api.js b/frontend/src/services/api.ts
similarity index 100%
rename from frontend/src/services/api.js
rename to frontend/src/services/api.ts
diff --git a/frontend/src/utils/formatters.js b/frontend/src/utils/formatters.ts
similarity index 100%
rename from frontend/src/utils/formatters.js
rename to frontend/src/utils/formatters.ts
diff --git a/frontend/src/utils/instagramContent.js b/frontend/src/utils/instagramContent.ts
similarity index 95%
rename from frontend/src/utils/instagramContent.js
rename to frontend/src/utils/instagramContent.ts
index f2371d7..4e33807 100644
--- a/frontend/src/utils/instagramContent.js
+++ b/frontend/src/utils/instagramContent.ts
@@ -1,4 +1,4 @@
-import { fmtNum } from './formatters.js';
+import { fmtNum } from './formatters.ts';
export const IG_CONTENT_TYPES = ['reel', 'post', 'video'];
diff --git a/frontend/src/utils/trackedContent.js b/frontend/src/utils/trackedContent.ts
similarity index 100%
rename from frontend/src/utils/trackedContent.js
rename to frontend/src/utils/trackedContent.ts
diff --git a/frontend/tests/docs/nav.test.js b/frontend/tests/docs/nav.test.ts
similarity index 89%
rename from frontend/tests/docs/nav.test.js
rename to frontend/tests/docs/nav.test.ts
index a5c06bb..390051c 100644
--- a/frontend/tests/docs/nav.test.js
+++ b/frontend/tests/docs/nav.test.ts
@@ -1,8 +1,8 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { ALL_DOC_PAGES, neighbours, tabForPath } from '../../src/docs/nav.js';
-import { DOC_ROUTE_SLUGS } from '../../src/docs/routes.js';
-import { slugify } from '../../src/docs/slug.js';
+import { ALL_DOC_PAGES, neighbours, tabForPath } from '../../src/docs/nav.ts';
+import { DOC_ROUTE_SLUGS } from '../../src/docs/routes.ts';
+import { slugify } from '../../src/docs/slug.ts';
test('every page in the navigation has a route, and every route is in the navigation', () => {
const navSlugs = ALL_DOC_PAGES.map(p => p.slug).sort();
diff --git a/frontend/tests/docs/pages/selfHost/selfHostSql.test.js b/frontend/tests/docs/pages/selfHost/selfHostSql.test.ts
similarity index 95%
rename from frontend/tests/docs/pages/selfHost/selfHostSql.test.js
rename to frontend/tests/docs/pages/selfHost/selfHostSql.test.ts
index d2a7bfa..3cd68f6 100644
--- a/frontend/tests/docs/pages/selfHost/selfHostSql.test.js
+++ b/frontend/tests/docs/pages/selfHost/selfHostSql.test.ts
@@ -1,6 +1,6 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { SCHEMA_SQL, RLS_SQL, UPGRADE_SQL } from '../../../../src/docs/pages/selfHost/selfHostSql.js';
+import { SCHEMA_SQL, RLS_SQL, UPGRADE_SQL } from '../../../../src/docs/pages/selfHost/selfHostSql.ts';
const tablesIn = sql => [...sql.matchAll(/create table (\w+)/g)].map(match => match[1]);
const secured = sql => [...sql.matchAll(/alter table (\w+) enable row level security;/g)].map(match => match[1]);
diff --git a/frontend/tests/features/accounts/accountManagerData.test.js b/frontend/tests/features/accounts/accountManagerData.test.ts
similarity index 97%
rename from frontend/tests/features/accounts/accountManagerData.test.js
rename to frontend/tests/features/accounts/accountManagerData.test.ts
index ddf66ce..a6e42b2 100644
--- a/frontend/tests/features/accounts/accountManagerData.test.js
+++ b/frontend/tests/features/accounts/accountManagerData.test.ts
@@ -2,7 +2,7 @@ import { test } from 'node:test';
import assert from 'node:assert/strict';
import {
TESTER_HINT, instagramErrorMessage, readOAuthReturn, accountMetrics, accountCardHandle, visibleSections,
-} from '../../../src/features/accounts/accountManagerData.js';
+} from '../../../src/features/accounts/accountManagerData.ts';
const params = query => new URLSearchParams(query);
diff --git a/frontend/tests/features/analytics/channel/channelChartData.test.js b/frontend/tests/features/analytics/channel/channelChartData.test.ts
similarity index 99%
rename from frontend/tests/features/analytics/channel/channelChartData.test.js
rename to frontend/tests/features/analytics/channel/channelChartData.test.ts
index 801e86a..1d07710 100644
--- a/frontend/tests/features/analytics/channel/channelChartData.test.js
+++ b/frontend/tests/features/analytics/channel/channelChartData.test.ts
@@ -4,7 +4,7 @@ import {
watchUrl, channelMeta, dayDataOf, hourDataOf, durationDataOf, categoryDataOf, splitDataOf, shortsComparisonOf,
topVideosChartOf, topVideoRowsOf, viewRangeDataOf, uploadsByMonthOf, rateOf, likesPerComment, peakHourLabel,
bestVideosOf, likesLabel,
-} from '../../../../src/features/analytics/channel/channelChartData.js';
+} from '../../../../src/features/analytics/channel/channelChartData.ts';
test('watch links point at YouTube', () => {
assert.equal(watchUrl('abc'), 'https://www.youtube.com/watch?v=abc');
diff --git a/frontend/tests/features/analytics/instagram/instagramAnalyticsData.test.js b/frontend/tests/features/analytics/instagram/instagramAnalyticsData.test.ts
similarity index 99%
rename from frontend/tests/features/analytics/instagram/instagramAnalyticsData.test.js
rename to frontend/tests/features/analytics/instagram/instagramAnalyticsData.test.ts
index e01272c..5be4de2 100644
--- a/frontend/tests/features/analytics/instagram/instagramAnalyticsData.test.js
+++ b/frontend/tests/features/analytics/instagram/instagramAnalyticsData.test.ts
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
import {
typeRowsOf, contentMixOf, topPostsChartOf, dayOfWeekDataOf, timelineDataOf, instagramChartsOf, followerRatio,
typeViewsSubtitle, reportedViews,
-} from '../../../../src/features/analytics/instagram/instagramAnalyticsData.js';
+} from '../../../../src/features/analytics/instagram/instagramAnalyticsData.ts';
const typeStats = {
reel: { count: 3, avgLikes: 10, viewsReported: 3, totalViews: 4500, avgViews: 1500 },
diff --git a/frontend/tests/features/analytics/overview/greeting.test.js b/frontend/tests/features/analytics/overview/greeting.test.ts
similarity index 95%
rename from frontend/tests/features/analytics/overview/greeting.test.js
rename to frontend/tests/features/analytics/overview/greeting.test.ts
index 2a3e028..d438a12 100644
--- a/frontend/tests/features/analytics/overview/greeting.test.js
+++ b/frontend/tests/features/analytics/overview/greeting.test.ts
@@ -1,6 +1,6 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { greeting, greetingName, greetingTitle } from '../../../../src/features/analytics/overview/greeting.js';
+import { greeting, greetingName, greetingTitle } from '../../../../src/features/analytics/overview/greeting.ts';
const atHour = hour => new Date(2026, 0, 1, hour, 30);
diff --git a/frontend/tests/features/analytics/overview/overviewCharts.test.js b/frontend/tests/features/analytics/overview/overviewCharts.test.ts
similarity index 99%
rename from frontend/tests/features/analytics/overview/overviewCharts.test.js
rename to frontend/tests/features/analytics/overview/overviewCharts.test.ts
index 9317596..02b4dc6 100644
--- a/frontend/tests/features/analytics/overview/overviewCharts.test.js
+++ b/frontend/tests/features/analytics/overview/overviewCharts.test.ts
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
import {
CATEGORY_SERIES, audienceChartDataOf, audienceLegendOf, audienceDotColor, commentByContentOf, engagementByContentOf,
categoryViewDataOf, commentByCategoryOf, karmaByAccountOf,
-} from '../../../../src/features/analytics/overview/overviewCharts.js';
+} from '../../../../src/features/analytics/overview/overviewCharts.ts';
const groups = {
youtube: [{ title: 'A channel with a long name', subscriberCount: 10 }],
diff --git a/frontend/tests/features/analytics/overview/overviewLabels.test.js b/frontend/tests/features/analytics/overview/overviewLabels.test.ts
similarity index 99%
rename from frontend/tests/features/analytics/overview/overviewLabels.test.js
rename to frontend/tests/features/analytics/overview/overviewLabels.test.ts
index af37521..94cbeb2 100644
--- a/frontend/tests/features/analytics/overview/overviewLabels.test.js
+++ b/frontend/tests/features/analytics/overview/overviewLabels.test.ts
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
import {
countLabel, overviewDescription, syncDetail, metricTabsOf, igTypeSummary, categoryMeta, topContentLabel,
accountAudienceLabel, accountContentLabel,
-} from '../../../../src/features/analytics/overview/overviewLabels.js';
+} from '../../../../src/features/analytics/overview/overviewLabels.ts';
const channel = { id: 'y1', viewCount: 5000, videoCount: 10, subscriberCount: 100 };
const igAccount = { id: 'i1', platform: 'instagram', mediaCount: 20, followersCount: 300 };
diff --git a/frontend/tests/features/analytics/overview/overviewStats.test.js b/frontend/tests/features/analytics/overview/overviewStats.test.ts
similarity index 98%
rename from frontend/tests/features/analytics/overview/overviewStats.test.js
rename to frontend/tests/features/analytics/overview/overviewStats.test.ts
index f48a4cb..caac5c0 100644
--- a/frontend/tests/features/analytics/overview/overviewStats.test.js
+++ b/frontend/tests/features/analytics/overview/overviewStats.test.ts
@@ -2,8 +2,8 @@ import { test } from 'node:test';
import assert from 'node:assert/strict';
import {
accountTotalsOf, cacheTotalsOf, summaryOf, sortedByAudience, sortedByContent, sortedByChannelViews, igAccountRowsOf,
-} from '../../../../src/features/analytics/overview/overviewStats.js';
-import { trackedStatsOf } from '../../../../src/features/analytics/overview/overviewTrackedStats.js';
+} from '../../../../src/features/analytics/overview/overviewStats.ts';
+import { trackedStatsOf } from '../../../../src/features/analytics/overview/overviewTrackedStats.ts';
const channel = { id: 'y1', platform: 'youtube', title: 'Studio', subscriberCount: 100, viewCount: 5000, videoCount: 10 };
const legacyYt = { id: 'y2', title: 'Legacy', subscriberCount: 50, viewCount: 9000, videoCount: 4 };
diff --git a/frontend/tests/features/analytics/overview/overviewTrackedStats.test.js b/frontend/tests/features/analytics/overview/overviewTrackedStats.test.ts
similarity index 95%
rename from frontend/tests/features/analytics/overview/overviewTrackedStats.test.js
rename to frontend/tests/features/analytics/overview/overviewTrackedStats.test.ts
index 7ed6cf8..98e1e4b 100644
--- a/frontend/tests/features/analytics/overview/overviewTrackedStats.test.js
+++ b/frontend/tests/features/analytics/overview/overviewTrackedStats.test.ts
@@ -1,6 +1,6 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { trackedStatsOf, categoryStatsOf } from '../../../../src/features/analytics/overview/overviewTrackedStats.js';
+import { trackedStatsOf, categoryStatsOf } from '../../../../src/features/analytics/overview/overviewTrackedStats.ts';
const tracked = [
{ contentType: 'youtube', viewCount: 1000, likeCount: 10, commentCount: 4, category: 'Tech' },
diff --git a/frontend/tests/features/analytics/reddit/redditAnalyticsData.test.js b/frontend/tests/features/analytics/reddit/redditAnalyticsData.test.ts
similarity index 99%
rename from frontend/tests/features/analytics/reddit/redditAnalyticsData.test.js
rename to frontend/tests/features/analytics/reddit/redditAnalyticsData.test.ts
index fa38288..05a39ca 100644
--- a/frontend/tests/features/analytics/reddit/redditAnalyticsData.test.js
+++ b/frontend/tests/features/analytics/reddit/redditAnalyticsData.test.ts
@@ -2,7 +2,7 @@ import { test } from 'node:test';
import assert from 'node:assert/strict';
import {
mediaTypeDataOf, karmaSummaryOf, postingFrequencyRows, karmaBreakdownRows, performanceIndicators,
-} from '../../../../src/features/analytics/reddit/redditAnalyticsData.js';
+} from '../../../../src/features/analytics/reddit/redditAnalyticsData.ts';
const labels = { text: 'Text', image: 'Image', video: 'Video', link: 'Link' };
diff --git a/frontend/tests/features/analytics/reels/reelsLibrary.test.js b/frontend/tests/features/analytics/reels/reelsLibrary.test.ts
similarity index 97%
rename from frontend/tests/features/analytics/reels/reelsLibrary.test.js
rename to frontend/tests/features/analytics/reels/reelsLibrary.test.ts
index 894675b..3aa5397 100644
--- a/frontend/tests/features/analytics/reels/reelsLibrary.test.js
+++ b/frontend/tests/features/analytics/reels/reelsLibrary.test.ts
@@ -2,7 +2,7 @@ import { test } from 'node:test';
import assert from 'node:assert/strict';
import {
mergeAccountMedia, typeTotalsOf, viewTotalsOf, filterAndSortMedia, typeViewsSubtitle, reelsDescription,
-} from '../../../../src/features/analytics/reels/reelsLibrary.js';
+} from '../../../../src/features/analytics/reels/reelsLibrary.ts';
const accounts = [{ id: 'i1', title: 'Paper Fold' }, { id: 'i2', username: 'second' }, { id: 'i3' }];
diff --git a/frontend/tests/features/analytics/shorts/shortsLibrary.test.js b/frontend/tests/features/analytics/shorts/shortsLibrary.test.ts
similarity index 97%
rename from frontend/tests/features/analytics/shorts/shortsLibrary.test.js
rename to frontend/tests/features/analytics/shorts/shortsLibrary.test.ts
index 4232255..b2ac9ed 100644
--- a/frontend/tests/features/analytics/shorts/shortsLibrary.test.js
+++ b/frontend/tests/features/analytics/shorts/shortsLibrary.test.ts
@@ -1,6 +1,6 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { shortsOf, filterAndSortShorts, shortsDescription } from '../../../../src/features/analytics/shorts/shortsLibrary.js';
+import { shortsOf, filterAndSortShorts, shortsDescription } from '../../../../src/features/analytics/shorts/shortsLibrary.ts';
const videos = [
{ videoId: 's1', channelId: 'c1', title: 'Quick pasta', durationSeconds: 45, viewCount: 900, likeCount: 5, publishedAt: '2026-02-01T00:00:00Z' },
diff --git a/frontend/tests/features/analytics/tracked/trackedCategoryStats.test.js b/frontend/tests/features/analytics/tracked/trackedCategoryStats.test.ts
similarity index 99%
rename from frontend/tests/features/analytics/tracked/trackedCategoryStats.test.js
rename to frontend/tests/features/analytics/tracked/trackedCategoryStats.test.ts
index 3f577f5..6c1076c 100644
--- a/frontend/tests/features/analytics/tracked/trackedCategoryStats.test.js
+++ b/frontend/tests/features/analytics/tracked/trackedCategoryStats.test.ts
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
import {
youtubeStatsOf, redditStatsOf, sortedByViews, sortedByKarma, chartDataOf, platformSplit, categoryDescription,
itemsSubtitle, viewsMetric, karmaMetric, commentsSubtitle, redditViewsMetric, upvoteRatioLabel,
-} from '../../../../src/features/analytics/tracked/trackedCategoryStats.js';
+} from '../../../../src/features/analytics/tracked/trackedCategoryStats.ts';
const videos = [
{ id: 'y1', contentType: 'youtube', title: 'A very long video title here', viewCount: 2000, likeCount: 100, commentCount: 7 },
diff --git a/frontend/tests/features/analytics/tracked/trackedList.test.js b/frontend/tests/features/analytics/tracked/trackedList.test.ts
similarity index 98%
rename from frontend/tests/features/analytics/tracked/trackedList.test.js
rename to frontend/tests/features/analytics/tracked/trackedList.test.ts
index 9b712cc..0f97ae6 100644
--- a/frontend/tests/features/analytics/tracked/trackedList.test.js
+++ b/frontend/tests/features/analytics/tracked/trackedList.test.ts
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
import {
SORT_OPTIONS, filterAndSortTracked, categoriesOf, trackedStatsOf, typeChipsOf, pluralize, countLabel,
bulkCategoryMessage, parseManualViews, imageFileError, MAX_IMAGE_BYTES,
-} from '../../../../src/features/analytics/tracked/trackedList.js';
+} from '../../../../src/features/analytics/tracked/trackedList.ts';
const items = [
{ id: 'r1', title: 'Cat post', subreddit: 'cats', score: 50, numComments: 4, manualViews: 900, category: 'Pets', createdAt: '2030-01-02' },
diff --git a/frontend/tests/features/analytics/videos/videoLibrary.test.js b/frontend/tests/features/analytics/videos/videoLibrary.test.ts
similarity index 98%
rename from frontend/tests/features/analytics/videos/videoLibrary.test.js
rename to frontend/tests/features/analytics/videos/videoLibrary.test.ts
index ffc9b8c..ccd5eef 100644
--- a/frontend/tests/features/analytics/videos/videoLibrary.test.js
+++ b/frontend/tests/features/analytics/videos/videoLibrary.test.ts
@@ -1,6 +1,6 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { watchUrl, filterAndSortVideos, videoStatsOf, nextSort, ariaSortOf, videosDescription, mergeChannelVideos } from '../../../../src/features/analytics/videos/videoLibrary.js';
+import { watchUrl, filterAndSortVideos, videoStatsOf, nextSort, ariaSortOf, videosDescription, mergeChannelVideos } from '../../../../src/features/analytics/videos/videoLibrary.ts';
const videos = [
{ videoId: 'a', title: 'Banana bread', channelId: 'c1', viewCount: 500, likeCount: 10, commentCount: 1, tags: ['baking'] },
diff --git a/frontend/tests/features/publishing/publishHelpers.test.js b/frontend/tests/features/publishing/publishHelpers.test.ts
similarity index 99%
rename from frontend/tests/features/publishing/publishHelpers.test.js
rename to frontend/tests/features/publishing/publishHelpers.test.ts
index 250a2cb..8431064 100644
--- a/frontend/tests/features/publishing/publishHelpers.test.js
+++ b/frontend/tests/features/publishing/publishHelpers.test.ts
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
import {
parseUserTags, parseCollaborators, buildScheduledPostPayload, buildContainerPayload, bulkPostDetails,
singleUploadMessage, singlePostError, bulkStartError, bulkBaseTime, editPostError, bulkScheduledTime,
-} from '../../../src/features/publishing/publishHelpers.js';
+} from '../../../src/features/publishing/publishHelpers.ts';
const scheduledAt = new Date('2030-05-01T08:00:00Z');
const fullPost = {
diff --git a/frontend/tests/features/publishing/queueHelpers.test.js b/frontend/tests/features/publishing/queueHelpers.test.ts
similarity index 97%
rename from frontend/tests/features/publishing/queueHelpers.test.js
rename to frontend/tests/features/publishing/queueHelpers.test.ts
index ea139a9..3c38f6d 100644
--- a/frontend/tests/features/publishing/queueHelpers.test.js
+++ b/frontend/tests/features/publishing/queueHelpers.test.ts
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
import {
intervalLabel, bulkStatsOf, bulkFilesTitle, bulkActionLabel, progressHeading, fileSizeMb, isVideoFile,
patchQueueItem, applyCaptionToPending, removeQueueItem,
-} from '../../../src/features/publishing/queueHelpers.js';
+} from '../../../src/features/publishing/queueHelpers.ts';
test('intervals read in days from a day upward and in hours below', () => {
assert.equal(intervalLabel(720), '12 hours');
diff --git a/frontend/tests/features/publishing/scheduleHelpers.test.js b/frontend/tests/features/publishing/scheduleHelpers.test.ts
similarity index 98%
rename from frontend/tests/features/publishing/scheduleHelpers.test.js
rename to frontend/tests/features/publishing/scheduleHelpers.test.ts
index 7130cd2..6567e24 100644
--- a/frontend/tests/features/publishing/scheduleHelpers.test.js
+++ b/frontend/tests/features/publishing/scheduleHelpers.test.ts
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
import {
OVERDUE_MS, scheduledStatusChips, filterScheduledPosts, overduePostsOf, isPastDue, overdueLead, deleteAllMessage,
formatScheduleDate, toLocalDateInput, toLocalTimeInput, utcDateInput, defaultBulkStartDate, goesLiveLabel,
-} from '../../../src/features/publishing/scheduleHelpers.js';
+} from '../../../src/features/publishing/scheduleHelpers.ts';
const posts = [
{ id: 1, status: 'pending', scheduledAt: '2030-05-01T08:00:00Z' },
diff --git a/frontend/tests/features/settings/schedulingProgress.test.js b/frontend/tests/features/settings/schedulingProgress.test.ts
similarity index 99%
rename from frontend/tests/features/settings/schedulingProgress.test.js
rename to frontend/tests/features/settings/schedulingProgress.test.ts
index 495b99c..0ec4818 100644
--- a/frontend/tests/features/settings/schedulingProgress.test.js
+++ b/frontend/tests/features/settings/schedulingProgress.test.ts
@@ -1,6 +1,6 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { PROGRESS_KEY, readProgress, saveProgress, completedSteps, repoBaseUrl } from '../../../src/features/settings/schedulingProgress.js';
+import { PROGRESS_KEY, readProgress, saveProgress, completedSteps, repoBaseUrl } from '../../../src/features/settings/schedulingProgress.ts';
function fakeStorage(initial = {}) {
const items = { ...initial };
diff --git a/frontend/tests/features/settings/settingsData.test.js b/frontend/tests/features/settings/settingsData.test.ts
similarity index 98%
rename from frontend/tests/features/settings/settingsData.test.js
rename to frontend/tests/features/settings/settingsData.test.ts
index 1bec7d1..62a7125 100644
--- a/frontend/tests/features/settings/settingsData.test.js
+++ b/frontend/tests/features/settings/settingsData.test.ts
@@ -2,7 +2,7 @@ import { test } from 'node:test';
import assert from 'node:assert/strict';
import {
loadServerSettings, githubSettingsPayload, healthCheckResult, healthCheckFailure,
-} from '../../../src/features/settings/settingsData.js';
+} from '../../../src/features/settings/settingsData.ts';
function fakeApi({ keys = [], github }) {
const calls = [];
diff --git a/frontend/tests/lib/accounts.test.js b/frontend/tests/lib/accounts.test.ts
similarity index 99%
rename from frontend/tests/lib/accounts.test.js
rename to frontend/tests/lib/accounts.test.ts
index 45bcc2c..17a0199 100644
--- a/frontend/tests/lib/accounts.test.js
+++ b/frontend/tests/lib/accounts.test.ts
@@ -1,6 +1,6 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { platformOf, accountPath, accountName, accountHandle, accountInitials, audienceOf, platformSummary } from '../../src/lib/accounts.js';
+import { platformOf, accountPath, accountName, accountHandle, accountInitials, audienceOf, platformSummary } from '../../src/lib/accounts.ts';
const youtubeAccount = { id: 'y1', title: 'Studio Dusk', customUrl: '@studiodusk', subscriberCount: 1200 };
const instagramAccount = { id: 'i1', platform: 'instagram', title: 'Paper Fold', username: 'paperfold', followersCount: 800 };
diff --git a/frontend/tests/lib/commandSearch.test.js b/frontend/tests/lib/commandSearch.test.ts
similarity index 98%
rename from frontend/tests/lib/commandSearch.test.js
rename to frontend/tests/lib/commandSearch.test.ts
index b16c1ad..c1c9f7a 100644
--- a/frontend/tests/lib/commandSearch.test.js
+++ b/frontend/tests/lib/commandSearch.test.ts
@@ -1,6 +1,6 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { scoreCommand, filterCommands, groupCommands } from '../../src/lib/commandSearch.js';
+import { scoreCommand, filterCommands, groupCommands } from '../../src/lib/commandSearch.ts';
const commands = [
{ id: 'overview', group: 'Pages', label: 'Overview', keywords: ['Analytics'] },
diff --git a/frontend/tests/lib/googleIdentity.test.js b/frontend/tests/lib/googleIdentity.test.ts
similarity index 98%
rename from frontend/tests/lib/googleIdentity.test.js
rename to frontend/tests/lib/googleIdentity.test.ts
index bc0a704..70de8c3 100644
--- a/frontend/tests/lib/googleIdentity.test.js
+++ b/frontend/tests/lib/googleIdentity.test.ts
@@ -1,6 +1,6 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { createNonce, sha256Hex } from '../../src/lib/googleIdentity.js';
+import { createNonce, sha256Hex } from '../../src/lib/googleIdentity.ts';
test('sha256Hex matches the known digest', async () => {
assert.equal(await sha256Hex('abc'), 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad');
diff --git a/frontend/tests/lib/holdProgress.test.js b/frontend/tests/lib/holdProgress.test.ts
similarity index 99%
rename from frontend/tests/lib/holdProgress.test.js
rename to frontend/tests/lib/holdProgress.test.ts
index a1c7412..e1cd1a7 100644
--- a/frontend/tests/lib/holdProgress.test.js
+++ b/frontend/tests/lib/holdProgress.test.ts
@@ -1,6 +1,6 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { createHoldController } from '../../src/lib/holdProgress.js';
+import { createHoldController } from '../../src/lib/holdProgress.ts';
// A manual clock and frame queue so timing can be stepped deterministically
function harness(duration = 1000) {
diff --git a/frontend/tests/lib/icons.test.js b/frontend/tests/lib/icons.test.ts
similarity index 98%
rename from frontend/tests/lib/icons.test.js
rename to frontend/tests/lib/icons.test.ts
index 4fc0bc7..c169ffb 100644
--- a/frontend/tests/lib/icons.test.js
+++ b/frontend/tests/lib/icons.test.ts
@@ -11,7 +11,7 @@ function sourceFiles(dir) {
return readdirSync(dir).flatMap(name => {
const path = join(dir, name);
if (statSync(path).isDirectory()) return sourceFiles(path);
- return /\.(jsx?|tsx?)$/.test(name) && !name.endsWith('.test.js') ? [path] : [];
+ return /\.(jsx?|tsx?)$/.test(name) && !name.endsWith('.test.ts') ? [path] : [];
});
}
diff --git a/frontend/tests/lib/library.test.js b/frontend/tests/lib/library.test.ts
similarity index 99%
rename from frontend/tests/lib/library.test.js
rename to frontend/tests/lib/library.test.ts
index ccfd990..8b15aee 100644
--- a/frontend/tests/lib/library.test.js
+++ b/frontend/tests/lib/library.test.ts
@@ -1,6 +1,6 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { parseIsoDuration, engagementPercent, filterByTier, VIEW_TIERS, LIKE_TIERS, pageSlice, matchesText } from '../../src/lib/library.js';
+import { parseIsoDuration, engagementPercent, filterByTier, VIEW_TIERS, LIKE_TIERS, pageSlice, matchesText } from '../../src/lib/library.ts';
test('ISO 8601 durations convert to seconds', () => {
assert.equal(parseIsoDuration('PT1H2M3S'), 3723);
diff --git a/frontend/tests/utils/instagramContent.test.js b/frontend/tests/utils/instagramContent.test.ts
similarity index 90%
rename from frontend/tests/utils/instagramContent.test.js
rename to frontend/tests/utils/instagramContent.test.ts
index 817e4b7..f3adcf6 100644
--- a/frontend/tests/utils/instagramContent.test.js
+++ b/frontend/tests/utils/instagramContent.test.ts
@@ -1,6 +1,6 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
-import { igThumbnail } from '../../src/utils/instagramContent.js';
+import { igThumbnail } from '../../src/utils/instagramContent.ts';
test('image posts fall back to the media url', () => {
assert.equal(igThumbnail({ contentType: 'post', mediaUrl: 'image.jpg' }), 'image.jpg');
diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json
new file mode 100644
index 0000000..6dfadb5
--- /dev/null
+++ b/frontend/tsconfig.json
@@ -0,0 +1,12 @@
+{
+ "extends": "../tsconfig.base.json",
+ "compilerOptions": {
+ "lib": ["ES2024", "DOM", "DOM.Iterable"],
+ "jsx": "react-jsx",
+ "types": ["vite/client"],
+ "paths": {
+ "@/*": ["./src/*"]
+ }
+ },
+ "include": ["src"]
+}
diff --git a/frontend/tsconfig.node.json b/frontend/tsconfig.node.json
new file mode 100644
index 0000000..b18d619
--- /dev/null
+++ b/frontend/tsconfig.node.json
@@ -0,0 +1,8 @@
+{
+ "extends": "../tsconfig.base.json",
+ "compilerOptions": {
+ "lib": ["ES2024", "DOM", "DOM.Iterable"],
+ "types": ["node"]
+ },
+ "include": ["vite.config.ts", "tests"]
+}
diff --git a/frontend/vite.config.js b/frontend/vite.config.ts
similarity index 100%
rename from frontend/vite.config.js
rename to frontend/vite.config.ts
diff --git a/package-lock.json b/package-lock.json
index 7f62f21..2d86f35 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,12 +13,15 @@
],
"devDependencies": {
"@eslint/js": "^9.39.1",
+ "@types/node": "^22.20.5",
"concurrently": "^10.0.5",
"eslint": "^9.39.1",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.24",
"globals": "^16.5.0",
- "prettier": "^3.9.9"
+ "prettier": "^3.9.9",
+ "typescript": "~6.0.3",
+ "typescript-eslint": "^8.71.2"
}
},
"backend": {
@@ -30,9 +33,17 @@
"hono": "^4.6.0"
},
"devDependencies": {
+ "@cloudflare/workers-types": "^5.20261013.1",
"wrangler": "^3.0.0"
}
},
+ "backend/node_modules/@cloudflare/workers-types": {
+ "version": "5.20261013.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-5.20261013.1.tgz",
+ "integrity": "sha512-0SfkM/MA+oSIAzFFmjr0wZLH54oeCtugaOn8GpJDBnerQiML+rOPq2W6j6bBGE51o+N4DOd0tvMruLmkAQzlpw==",
+ "dev": true,
+ "license": "MIT OR Apache-2.0"
+ },
"frontend": {
"version": "0.0.0",
"dependencies": {
@@ -3475,6 +3486,17 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@types/node": {
+ "version": "22.20.5",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.5.tgz",
+ "integrity": "sha512-U2+DNr+wSjpsTS/wZGYHq7GcwfuSmKiKvoPvK22zwTlRhU91yOniN4qRR5KhIjvif7ysw/dz/hKmfDH0Ris4aA==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "undici-types": "~6.21.0"
+ }
+ },
"node_modules/@types/react": {
"version": "19.2.14",
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz",
@@ -3509,6 +3531,302 @@
"integrity": "sha512-lrpDziQipxCEeK5kWxvljWYhUvOiB2A9izZd9B2AFarYAkqZshb4lPbRs7zKEic6eGtH8V/2qJW+dPp9OtF6bw==",
"license": "MIT"
},
+ "node_modules/@typescript-eslint/eslint-plugin": {
+ "version": "8.71.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.71.2.tgz",
+ "integrity": "sha512-K72/pvT7qpm8q3k8G5u93NCSN1RcLxX5h7Gw0bQpbMXviBHeY6Nx1WEwmk9wP+eKTSQ8ecxvcgt/ZX/rB938xQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/regexpp": "^4.12.2",
+ "@typescript-eslint/scope-manager": "8.71.2",
+ "@typescript-eslint/type-utils": "8.71.2",
+ "@typescript-eslint/utils": "8.71.2",
+ "@typescript-eslint/visitor-keys": "8.71.2",
+ "ignore": "^7.0.5",
+ "natural-compare": "^1.4.0",
+ "ts-api-utils": "^2.5.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "@typescript-eslint/parser": "^8.71.2",
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
+ "version": "7.0.12",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.12.tgz",
+ "integrity": "sha512-/8UvqAPU9DGTI9k4mxtf49U37Isfwr8Uts96+SBHIkFxPJnHS0Ew4f00sM4Scd8V8EjM0jUNtVDdv1kPdt35lg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/@typescript-eslint/parser": {
+ "version": "8.71.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.71.2.tgz",
+ "integrity": "sha512-aTtmZjp/x3gsGHkDs04/1I8kNogBJkpQaeGaN0PfiG43NzDEmW2n+OP5im9wfsvyX0yP1UZWBrAGtDBfH9jEVw==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@typescript-eslint/scope-manager": "8.71.2",
+ "@typescript-eslint/types": "8.71.2",
+ "@typescript-eslint/typescript-estree": "8.71.2",
+ "@typescript-eslint/visitor-keys": "8.71.2",
+ "debug": "^4.4.3"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/project-service": {
+ "version": "8.71.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.71.2.tgz",
+ "integrity": "sha512-Pd68GsLVh5ZXlcEccFPdhSOvtHZ/2WU0XsA8zmXOS3F158lVlcTLhfQ6qvtL1RzbMie0Kp8xtbVwAg4nejKPHw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/tsconfig-utils": "^8.71.2",
+ "@typescript-eslint/types": "^8.71.2",
+ "debug": "^4.4.3"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/scope-manager": {
+ "version": "8.71.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.71.2.tgz",
+ "integrity": "sha512-YF4wgg5iUX5Obywoac27B56FhozMNFhdJSbh11H5GBAwmBtfyRhmgTQqW9tRNNmHDvsZ2CX6UGzoz+YfYn2Leg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.71.2",
+ "@typescript-eslint/visitor-keys": "8.71.2"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/tsconfig-utils": {
+ "version": "8.71.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.71.2.tgz",
+ "integrity": "sha512-jz49TAWokm/7yWD9/o837nYax9DyALxIPOImdImvVzo6canBCZYzin8zJyqNR5k1j9K1DE0bVvr0XYB+99uAdg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/type-utils": {
+ "version": "8.71.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.71.2.tgz",
+ "integrity": "sha512-cC8UaalCViJkb3rH/xLIvidEwoFRtMZMUqDjjJMGEKaTFwYRHYBcoczlEGHuvkHEO8svRDrgZ0yQgOArFmwang==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.71.2",
+ "@typescript-eslint/typescript-estree": "8.71.2",
+ "@typescript-eslint/utils": "8.71.2",
+ "debug": "^4.4.3",
+ "ts-api-utils": "^2.5.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/types": {
+ "version": "8.71.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.71.2.tgz",
+ "integrity": "sha512-y5Ukl3oVp7e/VGxqIoEXoeb/Roj71PAJ4WG/N/RGj+eeDvKRLM15kGr9MijLbN0i03S52zxu31Z98E5gWChJKw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree": {
+ "version": "8.71.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.71.2.tgz",
+ "integrity": "sha512-DgNOEsl4pdYzwSL+N/Cl33tX1Hlw3FvId73LnKXfq7jnrF2viOEn7X+P7RBkkSWCVm92gnWd28GIC5vJuLREeA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/project-service": "8.71.2",
+ "@typescript-eslint/tsconfig-utils": "8.71.2",
+ "@typescript-eslint/types": "8.71.2",
+ "@typescript-eslint/visitor-keys": "8.71.2",
+ "debug": "^4.4.3",
+ "minimatch": "^10.2.2",
+ "semver": "^7.7.3",
+ "tinyglobby": "^0.2.15",
+ "ts-api-utils": "^2.5.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "18 || 20 || >=22"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
+ "version": "5.0.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz",
+ "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^4.0.2"
+ },
+ "engines": {
+ "node": "20 || >=22"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
+ "version": "10.2.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz",
+ "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "brace-expansion": "^5.0.8"
+ },
+ "engines": {
+ "node": "18 || 20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
+ "version": "7.8.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
+ "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@typescript-eslint/utils": {
+ "version": "8.71.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.71.2.tgz",
+ "integrity": "sha512-RyKa1G1M9rKHDhrk+HJtiF1MvLD5Ux2JW3TSkzw+02pRALdpJb+QzG1Y5em+LvCgzGwgg8H7mBRFKljNz7ImPw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.9.1",
+ "@typescript-eslint/scope-manager": "8.71.2",
+ "@typescript-eslint/types": "8.71.2",
+ "@typescript-eslint/typescript-estree": "8.71.2"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys": {
+ "version": "8.71.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.71.2.tgz",
+ "integrity": "sha512-zozlN0UA32bSG2zkKAgQyRYSbEISVoyU6vvkKYo2aSny74D8Jh4e+POkJ6Lk0dlezZi5x7TtD+88Xb06IB8nhg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.71.2",
+ "eslint-visitor-keys": "^5.0.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
+ "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
"node_modules/@upstash/redis": {
"version": "1.38.0",
"resolved": "https://registry.npmjs.org/@upstash/redis/-/redis-1.38.0.tgz",
@@ -8658,6 +8976,19 @@
"tree-kill": "cli.js"
}
},
+ "node_modules/ts-api-utils": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz",
+ "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.12"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4"
+ }
+ },
"node_modules/ts-morph": {
"version": "26.0.0",
"resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-26.0.0.tgz",
@@ -8745,6 +9076,45 @@
"url": "https://opencollective.com/express"
}
},
+ "node_modules/typescript": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
+ "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
+ "devOptional": true,
+ "license": "Apache-2.0",
+ "peer": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/typescript-eslint": {
+ "version": "8.71.2",
+ "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.71.2.tgz",
+ "integrity": "sha512-Rz4effbMy2g9wnvOJZG6SbVavX313Lap1vNEbk1RUochzickvzP8P4HB+bkNg5e50eVz1hQGjh9K1omI1xB4Bw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/eslint-plugin": "8.71.2",
+ "@typescript-eslint/parser": "8.71.2",
+ "@typescript-eslint/typescript-estree": "8.71.2",
+ "@typescript-eslint/utils": "8.71.2"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
"node_modules/ufo": {
"version": "1.6.4",
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.4.tgz",
@@ -8767,6 +9137,13 @@
"node": ">=20.18.1"
}
},
+ "node_modules/undici-types": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/unenv": {
"version": "2.0.0-rc.14",
"resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.14.tgz",
diff --git a/package.json b/package.json
index 2ad5e3f..a3f18eb 100644
--- a/package.json
+++ b/package.json
@@ -14,15 +14,22 @@
"build": "npm run build --workspace frontend",
"test": "npm test --workspace backend && npm test --workspace frontend",
"lint": "eslint .",
- "format": "prettier --write ."
+ "format": "prettier --write .",
+ "typecheck": "npm run typecheck --workspace backend && npm run typecheck --workspace frontend && tsc -p scripts/tsconfig.json"
},
"devDependencies": {
"@eslint/js": "^9.39.1",
+ "@types/node": "^22.20.5",
"concurrently": "^10.0.5",
"eslint": "^9.39.1",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.24",
"globals": "^16.5.0",
- "prettier": "^3.9.9"
+ "prettier": "^3.9.9",
+ "typescript": "~6.0.3",
+ "typescript-eslint": "^8.71.2"
+ },
+ "engines": {
+ "node": ">=22.18.0"
}
}
diff --git a/scripts/publish-scheduled.js b/scripts/publish-scheduled.ts
similarity index 100%
rename from scripts/publish-scheduled.js
rename to scripts/publish-scheduled.ts
diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json
new file mode 100644
index 0000000..7965990
--- /dev/null
+++ b/scripts/tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../tsconfig.base.json",
+ "compilerOptions": {
+ "types": ["node"]
+ },
+ "include": ["*.ts"]
+}
diff --git a/tsconfig.base.json b/tsconfig.base.json
new file mode 100644
index 0000000..4ff43dd
--- /dev/null
+++ b/tsconfig.base.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "target": "ES2024",
+ "lib": ["ES2024"],
+ "module": "ESNext",
+ "moduleResolution": "bundler",
+ "strict": true,
+ "noEmit": true,
+ "allowImportingTsExtensions": true,
+ "verbatimModuleSyntax": true,
+ "erasableSyntaxOnly": true,
+ "isolatedModules": true,
+ "resolveJsonModule": true,
+ "skipLibCheck": true,
+ "forceConsistentCasingInFileNames": true,
+ "noFallthroughCasesInSwitch": true,
+ "noImplicitOverride": true
+ }
+}