feature/improve-tag-organization-ux #8
@@ -12,6 +12,7 @@ import authRoutes from './routes/auth.routes';
|
|||||||
import mealPlansRoutes from './routes/meal-plans.routes';
|
import mealPlansRoutes from './routes/meal-plans.routes';
|
||||||
import './config/passport'; // Initialize passport strategies
|
import './config/passport'; // Initialize passport strategies
|
||||||
import { testEmailConfig } from './services/email.service';
|
import { testEmailConfig } from './services/email.service';
|
||||||
|
import { APP_VERSION } from './version';
|
||||||
|
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
@@ -45,13 +46,18 @@ app.get('/health', (req, res) => {
|
|||||||
res.json({ status: 'ok', timestamp: new Date().toISOString() });
|
res.json({ status: 'ok', timestamp: new Date().toISOString() });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Version endpoint
|
||||||
|
app.get('/api/version', (req, res) => {
|
||||||
|
res.json({ version: APP_VERSION });
|
||||||
|
});
|
||||||
|
|
||||||
// Export app for testing
|
// Export app for testing
|
||||||
export default app;
|
export default app;
|
||||||
|
|
||||||
// Start server only if this file is run directly (not imported)
|
// Start server only if this file is run directly (not imported)
|
||||||
if (require.main === module) {
|
if (require.main === module) {
|
||||||
app.listen(PORT, async () => {
|
app.listen(PORT, async () => {
|
||||||
console.log(`🌿 Basil API server running on http://localhost:${PORT}`);
|
console.log(`🌿 Basil API server v${APP_VERSION} running on http://localhost:${PORT}`);
|
||||||
|
|
||||||
// Test email configuration on startup
|
// Test email configuration on startup
|
||||||
await testEmailConfig();
|
await testEmailConfig();
|
||||||
|
|||||||
5
packages/api/src/version.ts
Normal file
5
packages/api/src/version.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/**
|
||||||
|
* Application version following the pattern: YYYY.MM.PATCH
|
||||||
|
* Example: 2026.01.1 (January 2026, patch 1)
|
||||||
|
*/
|
||||||
|
export const APP_VERSION = '2026.01.1';
|
||||||
@@ -74,9 +74,16 @@ body {
|
|||||||
gap: 2rem;
|
gap: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.logo-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.15rem;
|
||||||
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo a {
|
.logo a {
|
||||||
@@ -88,6 +95,22 @@ body {
|
|||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.version {
|
||||||
|
font-size: 0.65rem;
|
||||||
|
color: #90ee90;
|
||||||
|
font-weight: 500;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
cursor: help;
|
||||||
|
align-self: flex-start;
|
||||||
|
margin-left: 0.25rem;
|
||||||
|
opacity: 0.85;
|
||||||
|
transition: opacity 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.version:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import RecipeImport from './pages/RecipeImport';
|
|||||||
import NewRecipe from './pages/NewRecipe';
|
import NewRecipe from './pages/NewRecipe';
|
||||||
import UnifiedEditRecipe from './pages/UnifiedEditRecipe';
|
import UnifiedEditRecipe from './pages/UnifiedEditRecipe';
|
||||||
import CookingMode from './pages/CookingMode';
|
import CookingMode from './pages/CookingMode';
|
||||||
|
import { APP_VERSION } from './version';
|
||||||
import './App.css';
|
import './App.css';
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
@@ -26,7 +27,12 @@ function App() {
|
|||||||
<div className="app">
|
<div className="app">
|
||||||
<header className="header">
|
<header className="header">
|
||||||
<div className="container">
|
<div className="container">
|
||||||
<h1 className="logo"><Link to="/">🌿 Basil</Link></h1>
|
<div className="logo-container">
|
||||||
|
<h1 className="logo">
|
||||||
|
<Link to="/" title={`Basil v${APP_VERSION}`}>🌿 Basil</Link>
|
||||||
|
</h1>
|
||||||
|
<span className="version" title={`Version ${APP_VERSION}`}>v{APP_VERSION}</span>
|
||||||
|
</div>
|
||||||
<nav>
|
<nav>
|
||||||
<Link to="/">Cookbooks</Link>
|
<Link to="/">Cookbooks</Link>
|
||||||
<Link to="/recipes">All Recipes</Link>
|
<Link to="/recipes">All Recipes</Link>
|
||||||
|
|||||||
5
packages/web/src/version.ts
Normal file
5
packages/web/src/version.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/**
|
||||||
|
* Application version following the pattern: YYYY.MM.PATCH
|
||||||
|
* Example: 2026.01.1 (January 2026, patch 1)
|
||||||
|
*/
|
||||||
|
export const APP_VERSION = '2026.01.1';
|
||||||
Reference in New Issue
Block a user