Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

31.7 KB
Raw Blame
// Guided UI outcomes. Recipes automate server work; walkthroughs guide the
// operator through product controls where intent or a human-held secret is
// required. Stable ids are persisted, so never rename one without a migration.
export const WALKTHROUGHS = Object.freeze([
    {
        id: 'create-service',
        icon: 'service',
        tone: 'cyan',
        titleKey: 'app.walkthroughs.createServiceTitle',
        title: 'Create your first service',
        descriptionKey: 'app.walkthroughs.createServiceDescription',
        description: 'Choose a source, review the detected runtime, and launch a service.',
        durationKey: 'app.walkthroughs.fiveMinutes',
        duration: 'About 5 minutes',
        permission: { feature: 'applications', level: 'write' },
        steps: [
            {
                id: 'open-wizard',
                titleKey: 'app.walkthroughs.openServiceWizard',
                title: 'Open the service wizard',
                descriptionKey: 'app.walkthroughs.openServiceWizardDescription',
                description: "Start from ServerKit's dedicated three-step service flow.",
                path: '/services/new',
                route: '/services/new',
                target: '[data-walkthrough="new-service"]',
                actionKey: 'app.walkthroughs.openWizard',
                action: 'Open wizard',
            },
            {
                id: 'choose-source',
                titleKey: 'app.walkthroughs.chooseServiceSource',
                title: 'Choose where the code lives',
                descriptionKey: 'app.walkthroughs.chooseServiceSourceDescription',
                description: 'Pick GitHub, another Git remote, a local path, or a ZIP upload.',
                path: '/services/new',
                signal: 'service-source-selected',
                target: '[data-walkthrough="service-sources"]',
                actionKey: 'app.walkthroughs.chooseSource',
                action: 'Choose a source',
            },
            {
                id: 'review-service',
                titleKey: 'app.walkthroughs.reviewService',
                title: 'Review the detected setup',
                descriptionKey: 'app.walkthroughs.reviewServiceDescription',
                description: 'Confirm the name, runtime, build method, project, and environment.',
                path: '/services/new',
                signal: 'service-review-ready',
                target: '[data-walkthrough="service-review"]',
                actionKey: 'app.walkthroughs.continueSetup',
                action: 'Continue setup',
            },
            {
                id: 'create-service',
                titleKey: 'app.walkthroughs.launchService',
                title: 'Create and launch the service',
                descriptionKey: 'app.walkthroughs.launchServiceDescription',
                description: 'Submit the reviewed configuration. The guide completes only after creation succeeds.',
                path: '/services/new',
                signal: 'service-created',
                target: '[data-walkthrough="service-submit"]',
                actionKey: 'app.walkthroughs.finishService',
                action: 'Finish in the wizard',
            },
        ],
    },
    {
        id: 'enable-two-factor',
        icon: 'security',
        tone: 'amber',
        titleKey: 'app.walkthroughs.enableTwoFactorTitle',
        title: 'Enable two-step authentication',
        descriptionKey: 'app.walkthroughs.enableTwoFactorDescription',
        description: 'Pair an authenticator, verify a code, and store your recovery codes.',
        durationKey: 'app.walkthroughs.threeMinutes',
        duration: 'About 3 minutes',
        steps: [
            {
                id: 'open-security',
                titleKey: 'app.walkthroughs.openSecuritySettings',
                title: 'Open account security',
                descriptionKey: 'app.walkthroughs.openSecuritySettingsDescription',
                description: 'Go directly to your personal two-factor authentication card.',
                path: '/settings/security?focus=setting:security-2fa',
                route: '/settings/security',
                target: '[data-walkthrough="two-factor-card"]',
                actionKey: 'app.walkthroughs.openSecurity',
                action: 'Open security',
            },
            {
                id: 'pair-authenticator',
                titleKey: 'app.walkthroughs.pairAuthenticator',
                title: 'Pair your authenticator',
                descriptionKey: 'app.walkthroughs.pairAuthenticatorDescription',
                description: 'Scan the QR code, then enter the six-digit code from your app.',
                path: '/settings/security?focus=setting:security-2fa',
                signal: 'two-factor-setup-started',
                target: '[data-walkthrough="two-factor-card"]',
                actionKey: 'app.walkthroughs.startEnrollment',
                action: 'Start enrollment',
            },
            {
                id: 'verify-two-factor',
                titleKey: 'app.walkthroughs.verifyAndSaveCodes',
                title: 'Verify and save recovery codes',
                descriptionKey: 'app.walkthroughs.verifyAndSaveCodesDescription',
                description: 'The guide verifies the live account status. It never stores your code or secret.',
                path: '/settings/security?focus=setting:security-2fa',
                signal: 'two-factor-enabled',
                check: 'two-factor-enabled',
                target: '[data-walkthrough="two-factor-verify"]',
                actionKey: 'app.walkthroughs.checkStatus',
                action: 'Check status',
            },
        ],
    },
    {
        id: 'publish-service',
        icon: 'domain',
        tone: 'green',
        secondary: true,
        titleKey: 'app.walkthroughs.publishServiceTitle',
        title: 'Publish a service securely',
        descriptionKey: 'app.walkthroughs.publishServiceDescription',
        description: 'Attach a public domain, confirm DNS, and enable HTTPS.',
        durationKey: 'app.walkthroughs.sixMinutes',
        duration: 'About 6 minutes',
        permissions: [
            { feature: 'applications', level: 'write' },
            { feature: 'domains', level: 'write' },
        ],
        steps: [
            {
                id: 'open-domain-settings',
                titleKey: 'app.walkthroughs.openDomainSettings',
                title: "Open a service's domain settings",
                descriptionKey: 'app.walkthroughs.openDomainSettingsDescription',
                description: 'Choose the service you want to publish, then open Settings → Domain and SSL.',
                path: '/services',
                signal: 'service-domain-settings-opened',
                target: '[data-walkthrough="service-domain-panel"]',
                actionKey: 'app.walkthroughs.chooseService',
                action: 'Choose a service',
            },
            {
                id: 'attach-domain',
                titleKey: 'app.walkthroughs.attachPublicDomain',
                title: 'Attach a public domain',
                descriptionKey: 'app.walkthroughs.attachPublicDomainDescription',
                description: 'Enter a domain you control and attach it to the service.',
                signal: 'service-domain-attached',
                target: '[data-walkthrough="service-domain-attach"]',
                actionKey: 'app.walkthroughs.attachDomain',
                action: 'Attach domain',
            },
            {
                id: 'confirm-dns',
                titleKey: 'app.walkthroughs.confirmDns',
                title: 'Confirm the DNS record',
                descriptionKey: 'app.walkthroughs.confirmDnsDescription',
                description: 'Point the domain at this server and wait until public DNS resolves to the correct address.',
                target: '[data-walkthrough="service-domain-panel"]',
                actionKey: 'app.walkthroughs.reviewDns',
                action: 'Review DNS',
            },
            {
                id: 'enable-https',
                titleKey: 'app.walkthroughs.enableHttps',
                title: 'Enable HTTPS',
                descriptionKey: 'app.walkthroughs.enableHttpsDescription',
                description: "Request a Let's Encrypt certificate. The guide completes after ServerKit verifies it.",
                signal: 'service-ssl-enabled',
                target: '[data-walkthrough="service-enable-ssl"]',
                actionKey: 'app.walkthroughs.enableHttpsAction',
                action: 'Enable HTTPS',
            },
        ],
    },
    {
        id: 'monitor-service',
        icon: 'monitor',
        tone: 'cyan',
        secondary: true,
        titleKey: 'app.walkthroughs.monitorServiceTitle',
        title: 'Monitor your first service',
        descriptionKey: 'app.walkthroughs.monitorServiceDescription',
        description: 'Create an uptime check and run its first probe.',
        durationKey: 'app.walkthroughs.fourMinutes',
        duration: 'About 4 minutes',
        permission: { feature: 'monitoring', level: 'write' },
        steps: [
            {
                id: 'open-monitor-form',
                titleKey: 'app.walkthroughs.openMonitorForm',
                title: 'Open the monitor form',
                descriptionKey: 'app.walkthroughs.openMonitorFormDescription',
                description: 'Start a new uptime monitor from the Monitoring area.',
                path: '/monitoring/monitors?focus=create:monitor',
                route: '/monitoring/monitors',
                target: '[data-walkthrough="monitor-form"]',
                actionKey: 'app.walkthroughs.addMonitor',
                action: 'New monitor',
            },
            {
                id: 'configure-monitor',
                titleKey: 'app.walkthroughs.configureMonitor',
                title: 'Choose what success means',
                descriptionKey: 'app.walkthroughs.configureMonitorDescription',
                description: 'Set the URL, check type, interval, timeout, and expected response.',
                target: '[data-walkthrough="monitor-form"]',
                actionKey: 'app.walkthroughs.configureCheck',
                action: 'Configure check',
            },
            {
                id: 'create-monitor',
                titleKey: 'app.walkthroughs.createMonitor',
                title: 'Create the monitor',
                descriptionKey: 'app.walkthroughs.createMonitorDescription',
                description: 'Save the check. ServerKit will begin probing it on the selected interval.',
                signal: 'monitor-created',
                target: '[data-walkthrough="monitor-submit"]',
                actionKey: 'app.walkthroughs.saveMonitor',
                action: 'Save monitor',
            },
            {
                id: 'run-first-check',
                titleKey: 'app.walkthroughs.runFirstCheck',
                title: 'Run the first check',
                descriptionKey: 'app.walkthroughs.runFirstCheckDescription',
                description: 'Use Check now on the new row and review the response status and timing.',
                path: '/monitoring/monitors',
                signal: 'monitor-check-completed',
                target: '[data-walkthrough="monitor-check-now"]',
                actionKey: 'app.walkthroughs.reviewMonitor',
                action: 'Review monitor',
            },
        ],
    },
    {
        id: 'protect-with-backups',
        icon: 'backup',
        tone: 'amber',
        secondary: true,
        titleKey: 'app.walkthroughs.backupTitle',
        title: 'Protect data with backups',
        descriptionKey: 'app.walkthroughs.backupDescription',
        description: 'Schedule recurring protection and create the first backup.',
        durationKey: 'app.walkthroughs.fiveMinutes',
        duration: 'About 5 minutes',
        permission: { feature: 'backups', level: 'write' },
        steps: [
            {
                id: 'open-schedule-form',
                titleKey: 'app.walkthroughs.openScheduleForm',
                title: 'Open a backup schedule',
                descriptionKey: 'app.walkthroughs.openScheduleFormDescription',
                description: 'Start a recurring schedule so protection does not depend on memory.',
                path: '/backups/schedules?focus=create:schedule',
                route: '/backups/schedules',
                target: '[data-walkthrough="backup-schedule-form"]',
                actionKey: 'app.walkthroughs.newSchedule',
                action: 'New schedule',
            },
            {
                id: 'configure-schedule',
                titleKey: 'app.walkthroughs.configureSchedule',
                title: 'Choose the target and cadence',
                descriptionKey: 'app.walkthroughs.configureScheduleDescription',
                description: 'Select what to protect, when it runs, and whether a remote copy is required.',
                target: '[data-walkthrough="backup-schedule-form"]',
                actionKey: 'app.walkthroughs.configureScheduleAction',
                action: 'Configure schedule',
            },
            {
                id: 'save-schedule',
                titleKey: 'app.walkthroughs.saveSchedule',
                title: 'Save the schedule',
                descriptionKey: 'app.walkthroughs.saveScheduleDescription',
                description: 'Create the schedule and confirm its next run appears in the list.',
                signal: 'backup-schedule-created',
                target: '[data-walkthrough="backup-schedule-submit"]',
                actionKey: 'app.walkthroughs.saveScheduleAction',
                action: 'Save schedule',
            },
            {
                id: 'create-first-backup',
                titleKey: 'app.walkthroughs.createFirstBackup',
                title: 'Create the first backup',
                descriptionKey: 'app.walkthroughs.createFirstBackupDescription',
                description: 'Run one backup now so you can verify the target before relying on the schedule.',
                path: '/backups/snapshots?focus=create:backup',
                signal: 'backup-created',
                target: '[data-walkthrough="backup-create-form"]',
                actionKey: 'app.walkthroughs.backUpNow',
                action: 'Back up now',
            },
        ],
    },
    {
        id: 'connect-server',
        icon: 'server',
        tone: 'cyan',
        secondary: true,
        titleKey: 'app.walkthroughs.connectServerTitle',
        title: 'Connect another server',
        descriptionKey: 'app.walkthroughs.connectServerDescription',
        description: 'Generate a one-time connection, install the agent, and confirm it reports online.',
        durationKey: 'app.walkthroughs.sixMinutes',
        duration: 'About 6 minutes',
        permission: { feature: 'servers', level: 'write' },
        steps: [
            {
                id: 'open-server-drawer',
                titleKey: 'app.walkthroughs.openServerDrawer',
                title: 'Open the server connection flow',
                descriptionKey: 'app.walkthroughs.openServerDrawerDescription',
                description: 'Start from Servers and choose a connection method for the target server.',
                path: '/servers?focus=create:server',
                route: '/servers',
                target: '[data-walkthrough="server-setup"]',
                actionKey: 'app.walkthroughs.addServer',
                action: 'Add server',
            },
            {
                id: 'generate-connection',
                titleKey: 'app.walkthroughs.generateConnection',
                title: 'Generate a one-time connection',
                descriptionKey: 'app.walkthroughs.generateConnectionDescription',
                description: 'Choose an optional group and a short token lifetime, then generate the connection string.',
                signal: 'server-connection-string-generated',
                target: '[data-walkthrough="server-generate-connection"]',
                actionKey: 'app.walkthroughs.generateConnectionAction',
                action: 'Generate connection',
            },
            {
                id: 'install-agent',
                titleKey: 'app.walkthroughs.installAgent',
                title: 'Install and connect the agent',
                descriptionKey: 'app.walkthroughs.installAgentDescription',
                description: 'Copy the connection string or installer command to the target server and run it there.',
                signal: 'server-connection-string-copied',
                target: '[data-walkthrough="server-connection-string"]',
                actionKey: 'app.walkthroughs.connectAgent',
                action: 'Connect agent',
            },
            {
                id: 'confirm-server-online',
                titleKey: 'app.walkthroughs.confirmServerOnline',
                title: 'Confirm the server is online',
                descriptionKey: 'app.walkthroughs.confirmServerOnlineDescription',
                description: 'Return to the server list and confirm the new row changes from pending to online.',
                path: '/servers',
                signal: 'server-paired',
                target: '[data-walkthrough="server-list"]',
                actionKey: 'app.walkthroughs.reviewServers',
                action: 'Review servers',
            },
        ],
    },
    {
        id: 'invite-teammate',
        icon: 'team',
        tone: 'amber',
        secondary: true,
        titleKey: 'app.walkthroughs.inviteTeammateTitle',
        title: 'Invite a teammate safely',
        descriptionKey: 'app.walkthroughs.inviteTeammateDescription',
        description: 'Choose a role, create a time-limited invitation, and share it.',
        durationKey: 'app.walkthroughs.threeMinutes',
        duration: 'About 3 minutes',
        permission: { feature: 'users', level: 'write' },
        steps: [
            {
                id: 'open-invite-form',
                titleKey: 'app.walkthroughs.openInviteForm',
                title: 'Open the invitation form',
                descriptionKey: 'app.walkthroughs.openInviteFormDescription',
                description: 'Go to Settings → Users and start a new invitation.',
                path: '/settings/users?focus=create:invitation',
                route: '/settings/users',
                target: '[data-walkthrough="invite-form"]',
                actionKey: 'app.walkthroughs.inviteUser',
                action: 'Invite user',
            },
            {
                id: 'choose-invite-access',
                titleKey: 'app.walkthroughs.chooseInviteAccess',
                title: 'Choose the least access needed',
                descriptionKey: 'app.walkthroughs.chooseInviteAccessDescription',
                description: 'Select a role and expiry. Customize permissions when a broad role grants too much.',
                target: '[data-walkthrough="invite-form"]',
                actionKey: 'app.walkthroughs.reviewAccess',
                action: 'Review access',
            },
            {
                id: 'create-invitation',
                titleKey: 'app.walkthroughs.createInvitation',
                title: 'Create the invitation',
                descriptionKey: 'app.walkthroughs.createInvitationDescription',
                description: 'Generate the invitation only after its role and expiry match the intended person.',
                signal: 'invitation-created',
                target: '[data-walkthrough="invite-submit"]',
                actionKey: 'app.walkthroughs.createInvitationAction',
                action: 'Create invitation',
            },
            {
                id: 'share-invitation',
                titleKey: 'app.walkthroughs.shareInvitation',
                title: 'Share the invitation',
                descriptionKey: 'app.walkthroughs.shareInvitationDescription',
                description: 'Copy the private invitation link and send it through a trusted channel.',
                signal: 'invitation-link-copied',
                target: '[data-walkthrough="invite-result"]',
                actionKey: 'app.walkthroughs.copyInviteLink',
                action: 'Copy invite link',
            },
        ],
    },
]);

export const WALKTHROUGH_BY_ID = Object.freeze(Object.fromEntries(
    WALKTHROUGHS.map((walkthrough) => [walkthrough.id, walkthrough]),
));

// Keep every translation key literal for the i18n extraction gate while the
// execution registry above stays stable and locale-neutral.
export function localizeWalkthroughs(t) {
    const copy = {
        'create-service': {
            title: t('app.walkthroughs.createServiceTitle', 'Create your first service'),
            description: t('app.walkthroughs.createServiceDescription', 'Choose a source, review the detected runtime, and launch a service.'),
            duration: t('app.walkthroughs.fiveMinutes', 'About 5 minutes'),
            steps: [
                {
                    title: t('app.walkthroughs.openServiceWizard', 'Open the service wizard'),
                    description: t('app.walkthroughs.openServiceWizardDescription', "Start from ServerKit's dedicated three-step service flow."),
                    action: t('app.walkthroughs.openWizard', 'Open wizard'),
                },
                {
                    title: t('app.walkthroughs.chooseServiceSource', 'Choose where the code lives'),
                    description: t('app.walkthroughs.chooseServiceSourceDescription', 'Pick GitHub, another Git remote, a local path, or a ZIP upload.'),
                    action: t('app.walkthroughs.chooseSource', 'Choose a source'),
                },
                {
                    title: t('app.walkthroughs.reviewService', 'Review the detected setup'),
                    description: t('app.walkthroughs.reviewServiceDescription', 'Confirm the name, runtime, build method, project, and environment.'),
                    action: t('app.walkthroughs.continueSetup', 'Continue setup'),
                },
                {
                    title: t('app.walkthroughs.launchService', 'Create and launch the service'),
                    description: t('app.walkthroughs.launchServiceDescription', 'Submit the reviewed configuration. The guide completes only after creation succeeds.'),
                    action: t('app.walkthroughs.finishService', 'Finish in the wizard'),
                },
            ],
        },
        'enable-two-factor': {
            title: t('app.walkthroughs.enableTwoFactorTitle', 'Enable two-step authentication'),
            description: t('app.walkthroughs.enableTwoFactorDescription', 'Pair an authenticator, verify a code, and store your recovery codes.'),
            duration: t('app.walkthroughs.threeMinutes', 'About 3 minutes'),
            steps: [
                {
                    title: t('app.walkthroughs.openSecuritySettings', 'Open account security'),
                    description: t('app.walkthroughs.openSecuritySettingsDescription', 'Go directly to your personal two-factor authentication card.'),
                    action: t('app.walkthroughs.openSecurity', 'Open security'),
                },
                {
                    title: t('app.walkthroughs.pairAuthenticator', 'Pair your authenticator'),
                    description: t('app.walkthroughs.pairAuthenticatorDescription', 'Scan the QR code, then enter the six-digit code from your app.'),
                    action: t('app.walkthroughs.startEnrollment', 'Start enrollment'),
                },
                {
                    title: t('app.walkthroughs.verifyAndSaveCodes', 'Verify and save recovery codes'),
                    description: t('app.walkthroughs.verifyAndSaveCodesDescription', 'The guide verifies the live account status. It never stores your code or secret.'),
                    action: t('app.walkthroughs.checkStatus', 'Check status'),
                },
            ],
        },
        'publish-service': {
            title: t('app.walkthroughs.publishServiceTitle', 'Publish a service securely'),
            description: t('app.walkthroughs.publishServiceDescription', 'Attach a public domain, confirm DNS, and enable HTTPS.'),
            duration: t('app.walkthroughs.sixMinutes', 'About 6 minutes'),
            steps: [
                { title: t('app.walkthroughs.openDomainSettings', "Open a service's domain settings"), description: t('app.walkthroughs.openDomainSettingsDescription', 'Choose the service you want to publish, then open Settings → Domain and SSL.'), action: t('app.walkthroughs.chooseService', 'Choose a service') },
                { title: t('app.walkthroughs.attachPublicDomain', 'Attach a public domain'), description: t('app.walkthroughs.attachPublicDomainDescription', 'Enter a domain you control and attach it to the service.'), action: t('app.walkthroughs.attachDomain', 'Attach domain') },
                { title: t('app.walkthroughs.confirmDns', 'Confirm the DNS record'), description: t('app.walkthroughs.confirmDnsDescription', 'Point the domain at this server and wait until public DNS resolves to the correct address.'), action: t('app.walkthroughs.reviewDns', 'Review DNS') },
                { title: t('app.walkthroughs.enableHttps', 'Enable HTTPS'), description: t('app.walkthroughs.enableHttpsDescription', "Request a Let's Encrypt certificate. The guide completes after ServerKit verifies it."), action: t('app.walkthroughs.enableHttpsAction', 'Enable HTTPS') },
            ],
        },
        'monitor-service': {
            title: t('app.walkthroughs.monitorServiceTitle', 'Monitor your first service'),
            description: t('app.walkthroughs.monitorServiceDescription', 'Create an uptime check and run its first probe.'),
            duration: t('app.walkthroughs.fourMinutes', 'About 4 minutes'),
            steps: [
                { title: t('app.walkthroughs.openMonitorForm', 'Open the monitor form'), description: t('app.walkthroughs.openMonitorFormDescription', 'Start a new uptime monitor from the Monitoring area.'), action: t('app.walkthroughs.addMonitor', 'New monitor') },
                { title: t('app.walkthroughs.configureMonitor', 'Choose what success means'), description: t('app.walkthroughs.configureMonitorDescription', 'Set the URL, check type, interval, timeout, and expected response.'), action: t('app.walkthroughs.configureCheck', 'Configure check') },
                { title: t('app.walkthroughs.createMonitor', 'Create the monitor'), description: t('app.walkthroughs.createMonitorDescription', 'Save the check. ServerKit will begin probing it on the selected interval.'), action: t('app.walkthroughs.saveMonitor', 'Save monitor') },
                { title: t('app.walkthroughs.runFirstCheck', 'Run the first check'), description: t('app.walkthroughs.runFirstCheckDescription', 'Use Check now on the new row and review the response status and timing.'), action: t('app.walkthroughs.reviewMonitor', 'Review monitor') },
            ],
        },
        'protect-with-backups': {
            title: t('app.walkthroughs.backupTitle', 'Protect data with backups'),
            description: t('app.walkthroughs.backupDescription', 'Schedule recurring protection and create the first backup.'),
            duration: t('app.walkthroughs.fiveMinutes', 'About 5 minutes'),
            steps: [
                { title: t('app.walkthroughs.openScheduleForm', 'Open a backup schedule'), description: t('app.walkthroughs.openScheduleFormDescription', 'Start a recurring schedule so protection does not depend on memory.'), action: t('app.walkthroughs.newSchedule', 'New schedule') },
                { title: t('app.walkthroughs.configureSchedule', 'Choose the target and cadence'), description: t('app.walkthroughs.configureScheduleDescription', 'Select what to protect, when it runs, and whether a remote copy is required.'), action: t('app.walkthroughs.configureScheduleAction', 'Configure schedule') },
                { title: t('app.walkthroughs.saveSchedule', 'Save the schedule'), description: t('app.walkthroughs.saveScheduleDescription', 'Create the schedule and confirm its next run appears in the list.'), action: t('app.walkthroughs.saveScheduleAction', 'Save schedule') },
                { title: t('app.walkthroughs.createFirstBackup', 'Create the first backup'), description: t('app.walkthroughs.createFirstBackupDescription', 'Run one backup now so you can verify the target before relying on the schedule.'), action: t('app.walkthroughs.backUpNow', 'Back up now') },
            ],
        },
        'connect-server': {
            title: t('app.walkthroughs.connectServerTitle', 'Connect another server'),
            description: t('app.walkthroughs.connectServerDescription', 'Generate a one-time connection, install the agent, and confirm it reports online.'),
            duration: t('app.walkthroughs.sixMinutes', 'About 6 minutes'),
            steps: [
                { title: t('app.walkthroughs.openServerDrawer', 'Open the server connection flow'), description: t('app.walkthroughs.openServerDrawerDescription', 'Start from Servers and choose a connection method for the target server.'), action: t('app.walkthroughs.addServer', 'Add server') },
                { title: t('app.walkthroughs.generateConnection', 'Generate a one-time connection'), description: t('app.walkthroughs.generateConnectionDescription', 'Choose an optional group and a short token lifetime, then generate the connection string.'), action: t('app.walkthroughs.generateConnectionAction', 'Generate connection') },
                { title: t('app.walkthroughs.installAgent', 'Install and connect the agent'), description: t('app.walkthroughs.installAgentDescription', 'Copy the connection string or installer command to the target server and run it there.'), action: t('app.walkthroughs.connectAgent', 'Connect agent') },
                { title: t('app.walkthroughs.confirmServerOnline', 'Confirm the server is online'), description: t('app.walkthroughs.confirmServerOnlineDescription', 'Return to the server list and confirm the new row changes from pending to online.'), action: t('app.walkthroughs.reviewServers', 'Review servers') },
            ],
        },
        'invite-teammate': {
            title: t('app.walkthroughs.inviteTeammateTitle', 'Invite a teammate safely'),
            description: t('app.walkthroughs.inviteTeammateDescription', 'Choose a role, create a time-limited invitation, and share it.'),
            duration: t('app.walkthroughs.threeMinutes', 'About 3 minutes'),
            steps: [
                { title: t('app.walkthroughs.openInviteForm', 'Open the invitation form'), description: t('app.walkthroughs.openInviteFormDescription', 'Go to Settings → Users and start a new invitation.'), action: t('app.walkthroughs.inviteUser', 'Invite user') },
                { title: t('app.walkthroughs.chooseInviteAccess', 'Choose the least access needed'), description: t('app.walkthroughs.chooseInviteAccessDescription', 'Select a role and expiry. Customize permissions when a broad role grants too much.'), action: t('app.walkthroughs.reviewAccess', 'Review access') },
                { title: t('app.walkthroughs.createInvitation', 'Create the invitation'), description: t('app.walkthroughs.createInvitationDescription', 'Generate the invitation only after its role and expiry match the intended person.'), action: t('app.walkthroughs.createInvitationAction', 'Create invitation') },
                { title: t('app.walkthroughs.shareInvitation', 'Share the invitation'), description: t('app.walkthroughs.shareInvitationDescription', 'Copy the private invitation link and send it through a trusted channel.'), action: t('app.walkthroughs.copyInviteLink', 'Copy invite link') },
            ],
        },
    };

    return WALKTHROUGHS.map((walkthrough) => {
        const localized = copy[walkthrough.id];
        return {
            ...walkthrough,
            ...localized,
            steps: walkthrough.steps.map((step, index) => ({
                ...step,
                ...localized.steps[index],
            })),
        };
    });
}