The Obvious Company Website

September 18, 2025 ยท View on GitHub

Strategic Intelligence Amplification website with hybrid static/dynamic architecture.

๐Ÿš€ Quick Deploy

Deploy on Railway

๐Ÿš€ Quick Start

Local Development

# Install dependencies
npm run setup

# Start development server
npm run dev

# Test email configuration
npm run test:email

Railway Deployment

# Install Railway CLI
npm install -g @railway/cli

# Login and deploy
railway login
railway init
railway up

See RAILWAY_DEPLOYMENT.md for detailed deployment instructions.

๐Ÿ“ Project Structure

โ”œโ”€โ”€ website/                 # Static website files
โ”‚   โ”œโ”€โ”€ css/                # Stylesheets
โ”‚   โ”œโ”€โ”€ js/                 # Client-side JavaScript
โ”‚   โ”œโ”€โ”€ images/             # Static images
โ”‚   โ”œโ”€โ”€ server/             # Node.js backend
โ”‚   โ””โ”€โ”€ *.html              # HTML pages
โ”œโ”€โ”€ tests/                  # Test files
โ”œโ”€โ”€ .vscode/                # VS Code configuration
โ””โ”€โ”€ config files            # Linting, formatting, etc.

๐Ÿ› ๏ธ Development

Available Scripts

# Development
npm run dev              # Start dev server with watch
npm run dev:verbose      # Start with detailed logging

# Building
npm run build           # Build for production
npm run build:css       # Build CSS only

# Testing
npm test               # Run all tests
npm run test:email     # Test email configuration
npm run test:e2e       # Run E2E tests

# Code Quality
npm run lint           # Lint all files
npm run format         # Format all files
npm run validate       # Lint + test

# Deployment
./deploy.sh            # Deploy to Railway
npm run deploy:production  # Production deployment

๐Ÿš€ Deployment Options

Deploy with Vercel

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

Netlify

# Install Netlify CLI
npm i -g netlify-cli

# Deploy
netlify deploy --prod

Docker

# Build and run
docker-compose up -d

Environment Variables

Set these in your deployment platform:

  • SMTP_USER - Gmail email address
  • SMTP_PASS - Gmail app password
  • CONTACT_EMAIL - Contact form recipient
  • WEBSITE_URL - Your app URL

See DEPLOYMENT_OPTIONS.md for complete guide.

Development Workflow

  1. Start Development: npm run dev
  2. Make Changes: Edit files in website/
  3. Test Changes: Visit http://localhost:3000
  4. Run Tests: npm test
  5. Commit: Git hooks will run linting automatically

๐Ÿ“ง Email Configuration

  1. Set up Gmail App Password:

    • Enable 2FA on Gmail
    • Generate App Password
    • Update .env file
  2. Test Configuration:

    npm run test:email
    
  3. See: EMAIL_SETUP.md for detailed instructions

๐Ÿงช Testing

Unit Tests (Jest)

npm run test:frontend    # Frontend JavaScript tests
npm run test:server      # Backend Node.js tests

E2E Tests (Playwright)

npm run test:e2e         # Full browser testing

Manual Testing

  • Contact form: http://localhost:3000/contact.html
  • Newsletter: http://localhost:3000/#newsletter
  • Assessment: http://localhost:3000/assessment/

๐ŸŽจ Code Quality

Automatic Formatting

  • Prettier: Code formatting
  • ESLint: JavaScript linting
  • Stylelint: CSS linting
  • HTMLHint: HTML validation

Git Hooks

  • Pre-commit: Runs linting and formatting
  • Commit-msg: Validates commit message format

VS Code Integration

  • Install recommended extensions
  • Automatic formatting on save
  • Integrated linting

๐Ÿ—๏ธ Architecture

Hybrid Approach

  • Static Files: HTML, CSS, JS served directly
  • Dynamic API: Node.js backend for forms, email
  • Progressive Enhancement: Works without JavaScript

Key Features

  • ๐Ÿ“ฑ Responsive design
  • โšก Performance optimized
  • ๐Ÿ”’ Security headers
  • ๐Ÿ“ง Email integration
  • ๐Ÿ“Š Analytics ready
  • โ™ฟ Accessibility compliant

๐Ÿš€ Deployment

Staging

npm run deploy:staging

Production

npm run deploy:production

๐Ÿ“ Environment Variables

Copy .env.example to .env and configure:

# Server
PORT=3000
NODE_ENV=development
WEBSITE_URL=http://localhost:3000

# Email
SMTP_HOST=smtp.gmail.com
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password
CONTACT_EMAIL=contact@theobviouscompany.com

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Code Style

  • Use Prettier for formatting
  • Follow ESLint rules
  • Write meaningful commit messages
  • Add tests for new features

๐Ÿ“š Documentation

  • EMAIL_SETUP.md - Email configuration guide
  • IMAGE_INTEGRATION.md - Image usage documentation
  • website/server/README.md - Backend documentation

๐Ÿ†˜ Troubleshooting

Common Issues

Email not working?

npm run test:email

Linting errors?

npm run lint
npm run format

Server won't start?

npm run health

Tests failing?

npm run test:verbose

๐Ÿ“ž Support

  • Check existing issues
  • Run diagnostic commands
  • Review documentation
  • Create detailed bug reports

๐Ÿ“„ License

Private - The Obvious Company