Convert to template with dynamic configuration

Add comprehensive environment-based configuration system:
- Created config.js module to centralize all environment variables
- Updated server.js to use config module for all settings
- Added /api/config endpoint to expose company info to frontend
- Created init.js to dynamically inject config into HTML pages
- Updated .env.example with comprehensive configuration options
- Added data attributes to index.html for dynamic content
- Updated Dockerfile to include config.js

This allows users to customize:
- Company name, tagline, and description
- Branding colors (primary, accent, dark)
- Contact information (email, phone, address, hours)
- Social media links
- About page content
- Services offered

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Mikael Westöö
2026-01-23 23:26:57 +01:00
parent d6523bc4b1
commit ac21e428a5
6 changed files with 370 additions and 33 deletions

View File

@@ -1,16 +1,110 @@
# ===================================
# AI Recruitment Site - Configuration
# ===================================
# Copy this file to .env and customize for your company
# ===================================
# Company Information
# ===================================
COMPANY_NAME=Your Recruitment Firm
COMPANY_TAGLINE=Finding the Perfect Match for Your Career
COMPANY_DESCRIPTION=We specialize in connecting talented professionals with exceptional opportunities across various industries.
# ===================================
# Company Branding (Colors)
# ===================================
# Primary brand color (e.g., #2563EB for blue)
PRIMARY_COLOR=#2563EB
# Accent/success color (e.g., #059669 for green)
ACCENT_COLOR=#059669
# Dark/secondary color (e.g., #1E293B)
DARK_COLOR=#1E293B
# ===================================
# Contact Information
# ===================================
CONTACT_EMAIL=info@yourcompany.com
CONTACT_PHONE=+1 (555) 123-4567
CONTACT_ADDRESS=123 Business St, Suite 100, City, State 12345
# Social Media Links (leave empty to hide)
SOCIAL_LINKEDIN=https://linkedin.com/company/yourcompany
SOCIAL_TWITTER=https://twitter.com/yourcompany
SOCIAL_FACEBOOK=
# ===================================
# Deployment Configuration
# ===================================
# Your custom subdomain (e.g., 'yourname' becomes yourname.recruitai.startanaicompany.com)
SUBDOMAIN=yourname
# Your Gitea username and repository name
GITEA_USERNAME=your-gitea-username
GITEA_REPO_NAME=ai-recruit-site-template
# ===================================
# Application Settings
# ===================================
NODE_ENV=production
PORT=3000
# Session secret (will be auto-generated if empty)
SESSION_SECRET=
# ===================================
# Database Configuration
# ===================================
# PostgreSQL connection details
DB_HOST=postgres
DB_PORT=5432
DB_NAME=recruitment
DB_USER=postgres
DB_PASSWORD=changeme123
# Database password (will be auto-generated if empty)
DB_PASSWORD=
# Application Configuration
PORT=3000
NODE_ENV=production
# ===================================
# API Tokens (for deployment script)
# ===================================
# These should be set as environment variables, NOT in this file
# COOLIFY_API_TOKEN=your-coolify-api-token
# GITEA_API_TOKEN=your-gitea-api-token
# Session Secret (CHANGE THIS IN PRODUCTION!)
SESSION_SECRET=your-very-secret-session-key-change-this-in-production
# ===================================
# Feature Configuration
# ===================================
# Maximum CV file size in MB
MAX_CV_SIZE_MB=5
# Optional: Application URL
APP_URL=http://localhost:3000
# Allowed CV file types (comma-separated)
ALLOWED_CV_TYPES=application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document
# ===================================
# About Page Content
# ===================================
ABOUT_MISSION=Our mission is to bridge the gap between exceptional talent and outstanding opportunities.
ABOUT_VISION=We envision a world where every professional finds their perfect career match.
ABOUT_VALUES=Integrity, Excellence, Innovation, Partnership
# ===================================
# Services Offered (comma-separated)
# ===================================
SERVICES_LIST=Executive Search,Contract Staffing,Permanent Placement,Career Consulting,Talent Assessment,Industry Expertise
# ===================================
# Contact Page Settings
# ===================================
# Email address where contact form submissions are sent
CONTACT_FORM_RECIPIENT=info@yourcompany.com
# Business hours
BUSINESS_HOURS=Monday - Friday: 9:00 AM - 6:00 PM
# ===================================
# Email Configuration (Optional)
# ===================================
# If you want to send email notifications
SMTP_HOST=
SMTP_PORT=587
SMTP_USER=
SMTP_PASSWORD=
SMTP_FROM=noreply@yourcompany.com