feat: add tenant and user management with migrations, handlers, and tests
- Implemented tenant and user management features including: - Tenant creation and management with associated migrations. - User creation and management with associated migrations. - Tenant membership management with associated migrations. - Platform user roles management with associated migrations. - Quota management with associated migrations. - Article and template management with associated migrations. - Added HTTP handlers for templates and workspaces. - Created tests for protected and public routes. - Introduced a script to check tenant scope in SQL queries. - Documented task plan for backend completion and frontend foundation.
This commit is contained in:
@@ -0,0 +1,363 @@
|
||||
const enUS = {
|
||||
app: {
|
||||
name: "GEO Console",
|
||||
loginIntro: "A workspace for brand assets and GEO content operations.",
|
||||
},
|
||||
locale: {
|
||||
"zh-CN": "Simplified Chinese",
|
||||
"en-US": "English",
|
||||
},
|
||||
common: {
|
||||
cancel: "Cancel",
|
||||
close: "Close",
|
||||
confirm: "Confirm",
|
||||
create: "Create",
|
||||
edit: "Edit",
|
||||
delete: "Delete",
|
||||
reset: "Reset",
|
||||
refresh: "Refresh",
|
||||
search: "Search",
|
||||
save: "Save",
|
||||
next: "Next",
|
||||
previous: "Previous",
|
||||
submit: "Submit",
|
||||
submitGenerate: "Generate",
|
||||
actions: "Actions",
|
||||
title: "Title",
|
||||
description: "Description",
|
||||
website: "Website",
|
||||
wordCount: "Words",
|
||||
createdAt: "Created At",
|
||||
updatedAt: "Updated At",
|
||||
status: "Status",
|
||||
required: "Required",
|
||||
noData: "No data",
|
||||
optional: "Optional",
|
||||
preview: "Preview",
|
||||
details: "Details",
|
||||
versions: "Versions",
|
||||
total: "Total",
|
||||
balance: "Balance",
|
||||
used: "Used",
|
||||
source: "Source",
|
||||
templateType: "Template",
|
||||
generateStatus: "Generation",
|
||||
publishStatus: "Publish",
|
||||
selectPlease: "Please select",
|
||||
inputPlease: "Please input",
|
||||
upgrade: "Upgrade",
|
||||
},
|
||||
nav: {
|
||||
workspace: "Workspace",
|
||||
articleCreation: "Article Creation",
|
||||
templates: "Templates",
|
||||
custom: "Custom Generation",
|
||||
optimize: "Optimization",
|
||||
media: "Media",
|
||||
brandManagement: "Brand Management",
|
||||
brands: "Brand Library",
|
||||
tracking: "Tracking",
|
||||
trackingDetail: "Data Details",
|
||||
contentManagement: "Content Management",
|
||||
knowledge: "Knowledge Base",
|
||||
},
|
||||
auth: {
|
||||
welcomeBack: "Welcome back",
|
||||
tenantAdminLogin: "Tenant Admin Login",
|
||||
loginAndEnter: "Sign in to workspace",
|
||||
email: "Email",
|
||||
password: "Password",
|
||||
defaultTestAccount: "Default account",
|
||||
defaultTestPassword: "Default password",
|
||||
},
|
||||
shell: {
|
||||
localeLabel: "Language",
|
||||
quotaTitle: "Plan & Quota",
|
||||
quotaStatus: "Healthy",
|
||||
remainingQuota: "Article quota",
|
||||
resetAt: "Reset at",
|
||||
userFallback: "Admin",
|
||||
logout: "Logout",
|
||||
planFallback: "Free Plan",
|
||||
},
|
||||
route: {
|
||||
login: {
|
||||
title: "Welcome back",
|
||||
description: "Sign in with a real tenant account.",
|
||||
},
|
||||
workspace: {
|
||||
title: "Workspace",
|
||||
description: "Template shortcuts, overview data, and recent generations in one place.",
|
||||
},
|
||||
templates: {
|
||||
title: "Template Creation",
|
||||
description: "Filter existing articles, choose templates, and trigger new generation tasks.",
|
||||
},
|
||||
custom: {
|
||||
title: "Custom Generation",
|
||||
description: "No matching backend APIs exist in this repository yet.",
|
||||
},
|
||||
optimize: {
|
||||
title: "Article Optimization",
|
||||
description: "No matching backend APIs exist in this repository yet.",
|
||||
},
|
||||
media: {
|
||||
title: "Media Management",
|
||||
description: "No matching backend APIs exist in this repository yet.",
|
||||
},
|
||||
brands: {
|
||||
title: "Brand Library",
|
||||
description: "Manage keywords, question sets, and competitors around each brand.",
|
||||
},
|
||||
tracking: {
|
||||
title: "Data Details",
|
||||
description: "No matching backend APIs exist in this repository yet.",
|
||||
},
|
||||
knowledge: {
|
||||
title: "Knowledge Base",
|
||||
description: "No matching backend APIs exist in this repository yet.",
|
||||
},
|
||||
},
|
||||
workspace: {
|
||||
eyebrow: "Dashboard",
|
||||
metrics: {
|
||||
articles: "Generated",
|
||||
published: "Published",
|
||||
brands: "Brands",
|
||||
platforms: "Platforms",
|
||||
},
|
||||
sections: {
|
||||
templates: "Article Templates",
|
||||
recent: "Recent Generations",
|
||||
overview: "Overview",
|
||||
quota: "Plan & Quota",
|
||||
},
|
||||
actions: {
|
||||
enterTemplates: "Open Templates",
|
||||
},
|
||||
quota: {
|
||||
remaining: "Remaining quota",
|
||||
total: "Total quota",
|
||||
used: "Used quota",
|
||||
},
|
||||
emptyTemplates: "No template cards available yet",
|
||||
noRecentArticles: "No recent generations yet",
|
||||
},
|
||||
templateMeta: {
|
||||
top_x_article: {
|
||||
eyebrow: "Ranked Content",
|
||||
helper: "Good for listicles, comparisons, and recommendation-driven output.",
|
||||
accent: "Top X",
|
||||
action: "Create ranking",
|
||||
},
|
||||
product_review: {
|
||||
eyebrow: "Product Review",
|
||||
helper: "Good for benefits, trade-offs, and suitability analysis.",
|
||||
accent: "Review",
|
||||
action: "Start review",
|
||||
},
|
||||
research_report: {
|
||||
eyebrow: "Research Report",
|
||||
helper: "Good for longer analysis, trends, and market insight.",
|
||||
accent: "Report",
|
||||
action: "Create report",
|
||||
},
|
||||
brand_search_expansion: {
|
||||
eyebrow: "Brand Expansion",
|
||||
helper: "Expand brand plus search intent into a richer GEO article.",
|
||||
accent: "GEO",
|
||||
action: "Expand",
|
||||
},
|
||||
default: {
|
||||
eyebrow: "Content Template",
|
||||
helper: "This template is already usable and can go straight into generation.",
|
||||
accent: "Ready",
|
||||
action: "Open template",
|
||||
},
|
||||
},
|
||||
status: {
|
||||
generate: {
|
||||
draft: "Draft",
|
||||
generating: "Generating",
|
||||
running: "Running",
|
||||
completed: "Completed",
|
||||
failed: "Failed",
|
||||
},
|
||||
publish: {
|
||||
unpublished: "Unpublished",
|
||||
publishing: "Publishing",
|
||||
published: "Published",
|
||||
publish_success: "Published",
|
||||
publish_failed: "Failed",
|
||||
pending_review: "Pending Review",
|
||||
},
|
||||
sourceType: {
|
||||
template: "Template generation",
|
||||
},
|
||||
},
|
||||
templates: {
|
||||
eyebrow: "Article Creation",
|
||||
actions: {
|
||||
batchGenerate: "Batch generate",
|
||||
chooseTemplate: "Choose template",
|
||||
},
|
||||
filters: {
|
||||
template: "Template",
|
||||
publishStatus: "Publish status",
|
||||
generateStatus: "Generation status",
|
||||
keyword: "Search",
|
||||
keywordPlaceholder: "Search by article title",
|
||||
unsupportedDate: "Date range filtering is not available in the current backend yet.",
|
||||
},
|
||||
list: {
|
||||
count: "{count} articles",
|
||||
empty: "No articles have been created yet.",
|
||||
preview: "Preview",
|
||||
versions: "Versions",
|
||||
deleteConfirm: "Delete this article?",
|
||||
deleteSuccess: "Article deleted.",
|
||||
deleteError: "Failed to delete article.",
|
||||
},
|
||||
picker: {
|
||||
title: "Choose the template you want to use",
|
||||
viewExample: "View example",
|
||||
},
|
||||
wizard: {
|
||||
drawerTitle: "Template generation",
|
||||
steps: {
|
||||
basic: "Basic info",
|
||||
basicDesc: "Language, template fields, and brand context",
|
||||
structure: "Structure",
|
||||
structureDesc: "Title, key points, and outline",
|
||||
generate: "Generate",
|
||||
generateDesc: "Review and submit the task",
|
||||
},
|
||||
sections: {
|
||||
templateFields: "Template fields",
|
||||
brandContext: "Brand context",
|
||||
language: "Language",
|
||||
brandInfo: "Brand",
|
||||
keywords: "Keywords",
|
||||
competitors: "Competitors",
|
||||
chooseTitle: "Choose a title",
|
||||
customTitle: "Custom title",
|
||||
structure: "Article structure",
|
||||
keyPoints: "Key points",
|
||||
review: "Review",
|
||||
notes: "Notes",
|
||||
inputParams: "Input params",
|
||||
},
|
||||
hints: {
|
||||
brandContext: "Optional. Selecting a brand pulls in keywords and competitor context.",
|
||||
competitorEmpty: "No competitors are available under this brand yet.",
|
||||
customTitle: "Use this field if you want to override the title manually.",
|
||||
keyPoints: "Add any key messages, angles, or style notes here.",
|
||||
async: "The backend creates the article and task first, then completes content generation asynchronously.",
|
||||
},
|
||||
review: {
|
||||
templateName: "Template",
|
||||
articleTitle: "Article title",
|
||||
brandContext: "Brand context",
|
||||
outline: "Outline",
|
||||
currentTemplate: "Current template",
|
||||
promptVisibility: "Prompt visibility",
|
||||
selectedKeywords: "Selected keywords",
|
||||
selectedCompetitors: "Selected competitors",
|
||||
},
|
||||
localeOptions: {
|
||||
zh: "Simplified Chinese",
|
||||
en: "English",
|
||||
},
|
||||
promptVisible: "Prompt visible",
|
||||
promptSealed: "Prompt sealed",
|
||||
messages: {
|
||||
requiredField: "Please fill in {field} first.",
|
||||
missingTitle: "Please choose or enter an article title.",
|
||||
missingOutline: "Please select at least one outline section.",
|
||||
submitted: "Generation task submitted. Refreshing article data.",
|
||||
},
|
||||
},
|
||||
},
|
||||
article: {
|
||||
drawerTitle: "Article details",
|
||||
preview: "Content preview",
|
||||
versionHistory: "Version history",
|
||||
untitled: "Untitled article",
|
||||
noContent: "This article does not have generated content yet.",
|
||||
meta: {
|
||||
templateType: "Template",
|
||||
currentVersion: "Current version",
|
||||
source: "Source label",
|
||||
wordCount: "Word count",
|
||||
},
|
||||
versionUntitled: "Untitled version",
|
||||
},
|
||||
brands: {
|
||||
eyebrow: "Brand Library",
|
||||
title: "Brand Library",
|
||||
description: "Manage keywords, question sets, and competitor assets around each brand.",
|
||||
railTitle: "Brands",
|
||||
selectBrand: "Pick a brand to continue managing keywords and question sets.",
|
||||
newBrand: "New brand",
|
||||
editBrand: "Edit brand",
|
||||
deleteBrand: "Delete brand",
|
||||
tabs: {
|
||||
keywords: "Keywords",
|
||||
competitors: "Competitors",
|
||||
},
|
||||
sections: {
|
||||
keywords: "Keywords",
|
||||
questions: "Question set",
|
||||
competitors: "Competitor library",
|
||||
versions: "Version history",
|
||||
},
|
||||
actions: {
|
||||
newKeyword: "New keyword",
|
||||
newQuestion: "New question",
|
||||
newCompetitor: "New competitor",
|
||||
viewVersions: "View versions",
|
||||
},
|
||||
empty: {
|
||||
brands: "No brand data yet. Create your first brand to start.",
|
||||
questions: "No questions under this keyword yet.",
|
||||
competitors: "No competitors under this brand yet.",
|
||||
},
|
||||
form: {
|
||||
brandName: "Brand name",
|
||||
brandDescription: "Brand description",
|
||||
keywordName: "Keyword",
|
||||
questionText: "Question text",
|
||||
competitorName: "Competitor name",
|
||||
competitorWebsite: "Competitor website",
|
||||
competitorDescription: "Competitor description",
|
||||
competitorLines: "Product lines",
|
||||
competitorLinesHint: "Separate multiple product lines with commas.",
|
||||
},
|
||||
messages: {
|
||||
createBrand: "Brand created.",
|
||||
updateBrand: "Brand updated.",
|
||||
deleteBrand: "Brand deleted.",
|
||||
createKeyword: "Keyword created.",
|
||||
updateKeyword: "Keyword updated.",
|
||||
deleteKeyword: "Keyword deleted.",
|
||||
createQuestion: "Question created.",
|
||||
updateQuestion: "Question updated.",
|
||||
deleteQuestion: "Question deleted.",
|
||||
createCompetitor: "Competitor created.",
|
||||
updateCompetitor: "Competitor updated.",
|
||||
deleteCompetitor: "Competitor deleted.",
|
||||
chooseBrand: "Please choose a brand first.",
|
||||
chooseKeyword: "Please choose a keyword first.",
|
||||
},
|
||||
},
|
||||
featureStub: {
|
||||
eyebrow: "Feature Placeholder",
|
||||
currentStatus: "Current status",
|
||||
nextPriority: "Next priority",
|
||||
integrationStrategy: "Integration strategy",
|
||||
currentStatusText: "The page shell is ready with navigation and auth guard support.",
|
||||
integrationStrategyText: "Keep the UI aligned with tenant-api envelopes and wire real read flows before write flows.",
|
||||
},
|
||||
} as const;
|
||||
|
||||
export default enUS;
|
||||
Reference in New Issue
Block a user