From 1b1d527226ce6aa302f7de3e4dc1d264c238c760 Mon Sep 17 00:00:00 2001
From: Jason Staack
Date: Thu, 19 Mar 2026 11:25:34 -0500
Subject: [PATCH] chore: unify version to 9.7.0 with single source of truth
- Add VERSION file at project root as canonical version source
- Sync all version references: package.json, pyproject.toml, config.py,
Chart.yaml, docs/CONFIGURATION.md (all were out of sync: 9.0.1, v9.6, 0.1.0)
- Replace hardcoded v9.6 in SettingsPage and About page with dynamic
APP_VERSION import from @/lib/version.ts
- Add Vite define for __APP_VERSION__ reading from package.json at build time
- Add TypeScript global declaration for __APP_VERSION__
Co-Authored-By: Claude Opus 4.6 (1M context)
---
VERSION | 1 +
backend/app/config.py | 2 +-
backend/pyproject.toml | 2 +-
docs/CONFIGURATION.md | 2 +-
frontend/package.json | 2 +-
frontend/src/components/settings/SettingsPage.tsx | 3 ++-
frontend/src/globals.d.ts | 2 ++
frontend/src/lib/version.ts | 5 +++++
frontend/src/routes/_authenticated/about.tsx | 3 ++-
frontend/vite.config.ts | 6 ++++++
infrastructure/helm/Chart.yaml | 2 +-
11 files changed, 23 insertions(+), 7 deletions(-)
create mode 100644 VERSION
create mode 100644 frontend/src/globals.d.ts
create mode 100644 frontend/src/lib/version.ts
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..a458a24
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+9.7.0
diff --git a/backend/app/config.py b/backend/app/config.py
index 0baa30f..00744e5 100644
--- a/backend/app/config.py
+++ b/backend/app/config.py
@@ -136,7 +136,7 @@ class Settings(BaseSettings):
# App settings
APP_NAME: str = "TOD - The Other Dude"
- APP_VERSION: str = "0.1.0"
+ APP_VERSION: str = "9.7.0"
DEBUG: bool = False
@field_validator("CREDENTIAL_ENCRYPTION_KEY")
diff --git a/backend/pyproject.toml b/backend/pyproject.toml
index 41524fc..b3c9a55 100644
--- a/backend/pyproject.toml
+++ b/backend/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "the-other-dude-backend"
-version = "9.0.1"
+version = "9.7.0"
description = "MikroTik Fleet Management Portal - Backend API"
requires-python = ">=3.12"
dependencies = [
diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md
index b55576f..2d7bd55 100644
--- a/docs/CONFIGURATION.md
+++ b/docs/CONFIGURATION.md
@@ -9,7 +9,7 @@ TOD uses Pydantic Settings for configuration. All values can be set via environm
| Variable | Default | Description |
|----------|---------|-------------|
| `APP_NAME` | `TOD - The Other Dude` | Application display name |
-| `APP_VERSION` | `0.1.0` | Semantic version string |
+| `APP_VERSION` | `9.7.0` | Semantic version string (see VERSION file at project root) |
| `ENVIRONMENT` | `dev` | Runtime environment: `dev`, `staging`, or `production` |
| `DEBUG` | `false` | Enable debug mode |
| `CORS_ORIGINS` | `http://localhost:3000,http://localhost:5173,http://localhost:8080` | Comma-separated list of allowed CORS origins |
diff --git a/frontend/package.json b/frontend/package.json
index c95a277..a44d25a 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "frontend",
"private": true,
- "version": "9.0.1",
+ "version": "9.7.0",
"type": "module",
"scripts": {
"dev": "vite",
diff --git a/frontend/src/components/settings/SettingsPage.tsx b/frontend/src/components/settings/SettingsPage.tsx
index bc55a4a..7b95628 100644
--- a/frontend/src/components/settings/SettingsPage.tsx
+++ b/frontend/src/components/settings/SettingsPage.tsx
@@ -12,6 +12,7 @@ import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { ChangePasswordForm } from './ChangePasswordForm'
import { toast } from 'sonner'
+import { APP_VERSION } from '@/lib/version'
function SectionHeader({ icon: Icon, title }: { icon: React.FC<{ className?: string }>; title: string }) {
return (
@@ -129,7 +130,7 @@ export function SettingsPage() {
/api/docs (OpenAPI)
} />
-
+
{/* Quick links */}
diff --git a/frontend/src/globals.d.ts b/frontend/src/globals.d.ts
new file mode 100644
index 0000000..957f268
--- /dev/null
+++ b/frontend/src/globals.d.ts
@@ -0,0 +1,2 @@
+/** Injected by vite.config.ts define — reads version from package.json at build time. */
+declare const __APP_VERSION__: string
diff --git a/frontend/src/lib/version.ts b/frontend/src/lib/version.ts
new file mode 100644
index 0000000..42ab2ab
--- /dev/null
+++ b/frontend/src/lib/version.ts
@@ -0,0 +1,5 @@
+/**
+ * App version — derived from package.json at build time.
+ * Never hardcode version strings in components.
+ */
+export const APP_VERSION = `v${__APP_VERSION__}`
diff --git a/frontend/src/routes/_authenticated/about.tsx b/frontend/src/routes/_authenticated/about.tsx
index 4bf8e2e..9c24de2 100644
--- a/frontend/src/routes/_authenticated/about.tsx
+++ b/frontend/src/routes/_authenticated/about.tsx
@@ -1,6 +1,7 @@
import { createFileRoute } from '@tanstack/react-router'
import { useEffect, useRef, useState } from 'react'
import { RugLogo } from '@/components/brand/RugLogo'
+import { APP_VERSION } from '@/lib/version'
export const Route = createFileRoute('/_authenticated/about')({
component: AboutPage,
@@ -509,7 +510,7 @@ function AboutPage() {
MSP fleet management platform for RouterOS devices
- v9.6
+ {APP_VERSION}
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts
index 0caded4..28cc4ba 100644
--- a/frontend/vite.config.ts
+++ b/frontend/vite.config.ts
@@ -5,8 +5,14 @@ import { sri } from 'vite-plugin-sri3'
import path from 'path'
import fs from 'fs'
+// Read version from package.json for global define
+const pkg = JSON.parse(fs.readFileSync(path.resolve(__dirname, 'package.json'), 'utf-8'))
+
// https://vite.dev/config/
export default defineConfig({
+ define: {
+ __APP_VERSION__: JSON.stringify(pkg.version),
+ },
plugins: [
TanStackRouterVite({ target: 'react', autoCodeSplitting: true }),
react(),
diff --git a/infrastructure/helm/Chart.yaml b/infrastructure/helm/Chart.yaml
index a1cd2b6..f0b4b31 100644
--- a/infrastructure/helm/Chart.yaml
+++ b/infrastructure/helm/Chart.yaml
@@ -3,7 +3,7 @@ name: tod
description: The Other Dude — MikroTik fleet management platform
type: application
version: 1.0.0
-appVersion: "9.0.1"
+appVersion: "9.7.0"
kubeVersion: ">=1.28.0-0"
keywords:
- mikrotik