remove: obsolete HTML template processing system

- Remove index.html.template (template processing never implemented)
- Fix empty title in index.html by adding proper default title
- Update documentation to remove references to non-existent:
  - scripts/process-html.sh
  - predev/prebuild npm scripts
  - HTML template processing workflow
- Simplifies build process and fixes broken page title
This commit is contained in:
William Valentin
2025-09-08 22:21:14 -07:00
parent 10e0d6d14b
commit b5b475f21b
4 changed files with 13 additions and 70 deletions

View File

@@ -8,8 +8,7 @@ rxminder/
├── 📦 package.json # Dependencies and scripts ├── 📦 package.json # Dependencies and scripts
├── ⚙️ vite.config.ts # Build configuration ├── ⚙️ vite.config.ts # Build configuration
├── 📝 tsconfig.json # TypeScript configuration ├── 📝 tsconfig.json # TypeScript configuration
├── 🎨 index.html # Generated entry point ├── 🎨 index.html # Application entry point
├── 🎨 index.html.template # Template for HTML generation
├── 🔒 .env.example # Environment template ├── 🔒 .env.example # Environment template
├── 📊 metadata.json # Project metadata ├── 📊 metadata.json # Project metadata
├── 🖼️ banner.jpeg # Project banner image ├── 🖼️ banner.jpeg # Project banner image
@@ -99,7 +98,6 @@ rxminder/
├── 📁 scripts/ # Development and build scripts ├── 📁 scripts/ # Development and build scripts
│ ├── 🔧 setup.sh # Development setup │ ├── 🔧 setup.sh # Development setup
│ ├── 🎨 process-html.sh # HTML template processing
│ ├── 🧹 setup-pre-commit.sh # Git hooks setup │ ├── 🧹 setup-pre-commit.sh # Git hooks setup
│ └── 🌱 seed-production.js # Database seeding │ └── 🌱 seed-production.js # Database seeding
@@ -207,9 +205,9 @@ Centralized configuration with environment-based templates:
config/ config/
└── unified.config.ts # Single source of truth └── unified.config.ts # Single source of truth
# Template approach # Configuration approach
index.html.template → index.html # Processed with environment variables
.env.example → .env # User customization .env.example → .env # User customization
config/unified.config.ts # Centralized configuration
``` ```
**Benefits:** **Benefits:**
@@ -274,7 +272,6 @@ docs/
2. **Template Processing** 2. **Template Processing**
```bash ```bash
bun run predev # Process HTML templates
bun run dev # Start development server bun run dev # Start development server
``` ```

View File

@@ -159,23 +159,20 @@ APP_NAME=MedicationTracker
## Troubleshooting ## Troubleshooting
### Common Issues 1. **App name not displaying**: Check `config/unified.config.ts` for correct `APP_NAME` value
2. **Docker build fails**: Check that environment variables are properly set
1. **HTML title not updating**: Ensure `index.html.template` exists and `process-html.sh` runs ## Testing
2. **Docker build fails**: Check that `APP_NAME` doesn't contain invalid characters for Docker tags
3. **Kubernetes deployment fails**: Verify `APP_NAME` follows Kubernetes naming conventions
### Validation
```bash ```bash
# Test HTML processing # Test configuration
APP_NAME=TestApp ./scripts/process-html.sh bun run config
# Test Docker build # Test build
APP_NAME=TestApp make deploy bun run build
# Check generated files # Check configuration values
grep -r "TestApp" dist/ bun run config:env
``` ```
## Best Practices ## Best Practices

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title> <title>Medication Reminder</title>
<script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />

View File

@@ -1,51 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>$APP_NAME</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
rel="stylesheet"
/>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
fontFamily: {
sans: ['Inter', 'sans-serif'],
},
keyframes: {
float: {
'0%, 100%': { transform: 'translateY(0px)' },
'50%': { transform: 'translateY(-10px)' },
},
},
animation: {
float: 'float 3s ease-in-out infinite',
},
},
},
};
</script>
<script type="importmap">
{
"imports": {
"react": "https://aistudiocdn.com/react@^19.1.1",
"react/": "https://aistudiocdn.com/react@^19.1.1/",
"react-dom/": "https://aistudiocdn.com/react-dom@^19.1.1/"
}
}
</script>
<link rel="stylesheet" href="/index.css" />
</head>
<body class="bg-slate-50 dark:bg-slate-900 antialiased">
<div id="root"></div>
<script type="module" src="/index.tsx"></script>
</body>
</html>