# Website Scaffold - Build Guide

## Architecture

**Framework:** Astro.js (SSG + SSR capable)  
**Styling:** Tailwind CSS  
**Deployment:** Server-side preview build  
**Purpose:** Conversion-focused, minimal, fast

---

## Phase 1: Project Bootstrap

### 1.1 Initialize Astro Project
```bash
# Create new Astro project
npm create astro@latest startuplx-website
cd startuplx-website

# Select template
# → Minimal | TypeScript | Tailwind CSS

# Install dependencies  
npm install

# Start development server
npm run dev
```

### 1.2 Project Structure
```
/services/website/
├── public/              # Static assets
│   ├── favicon.svg
│   └── robots.txt
├── src/
│   ├── components/      # Reusable UI components
│   │   ├── Hero.astro
│   │   ├── ServicesGrid.astro
│   │   ├── PricingCard.astro
│   │   └── CTABanner.astro
│   ├── layouts/
│   │   └── BaseLayout.astro
│   ├── pages/
│   │   ├── index.astro   # Homepage
│   │   ├── services/
│   │   ├── pricing/
│   │   └── contact/
│   ├── styles/
│   │   └── global.css
│   └── data/
│       └── services.json
├── astro.config.mjs
├── tailwind.config.js
└── package.json
```

---

## Phase 2: Core Components

### 2.1 Base Layout
```typescript
// src/layouts/BaseLayout.astro
---
import Header from '../components/Header.astro'
import Footer from '../components/Footer.astro'
import '../styles/global.css'
---

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>StartupLX - Build Systems That Run Without You</title>
  </head>
  <body>
    <Header />
    <main>
      <slot />
    </main>
    <Footer />
  </body>
</html>
```

### 2.2 Hero Section
```typescript
// src/components/Hero.astro
---
const headline = "Build Systems That Run Without You"
const subhead = "Web Development • ERP Solutions • Business Automation"
---

<section class="min-h-[85vh] flex items-center justify-center bg-gradient-to-b from-slate-50 to-white">
  <div class="max-w-3xl text-center px-4">
    <h1 class="text-4xl md:text-5xl font-bold text-slate-900 mb-6">
      {headline}
    </h1>
    <p class="text-xl text-slate-600 mb-8">
      {subhead}
    </p>
    <a href="/contact" class="inline-block bg-blue-600 hover:bg-blue-700 text-white px-8 py-4 rounded-lg font-semibold transition-colors">
      Book a Free 15-Min System Audit
    </a>
  </div>
</section>
```

---

## Phase 3: Services Architecture

### 3.1 Services Data Structure
```json
// src/data/services.json
{
  "webDevelopment": {
    "title": "Modern Websites",
    "description": "Landing pages to enterprise sites - built for conversion and performance",
    "packages": [
      {
        "name": "Starter",
        "price": 500,
        "features": ["1 page", "Mobile responsive", "SEO optimized"],
        "delivery": "1 week"
      },
      {
        "name": "Professional", 
        "price": 1500,
        "features": ["5 pages", "CMS integration", "Analytics setup"],
        "delivery": "2 weeks"
      }
    ]
  },
  "erpSystems": {
    "title": "ERP Implementation",
    "description": "School, Hospital, POS systems - deployed and scaled",
    "packages": [
      {
        "name": "Essential",
        "price": 1000,
        "features": ["Core modules", "Data migration", "Training"],
        "delivery": "4 weeks"
      }
    ]
  },
  "automation": {
    "title": "Business Automation", 
    "description": "n8n, Zapier, custom workflows - eliminate repetitive work",
    "packages": [
      {
        "name": "Starter Retainer",
        "price": 500,
        "features": ["Up to 10 workflows", "Email support", "Monthly reviews"],
        "delivery": "Ongoing"
      }
    ]
  }
}
```

### 3.2 Services Grid Component
```typescript
// src/components/ServicesGrid.astro
---
import services from '../data/services.json'
---

<section class="py-20 bg-slate-50">
  <div class="max-w-6xl mx-auto px-4">
    <h2 class="text-3xl font-bold text-center text-slate-900 mb-12">
      Services Designed to Scale
    </h2>
    
    <div class="grid md:grid-cols-3 gap-8">
      {Object.entries(services).map(([key, service])) => (
        <div class="bg-white rounded-xl shadow-sm p-6 hover:shadow-md transition-shadow">
          <h3 class="text-xl font-semibold text-slate-900 mb-3">
            {service.title}
          </h3>
          <p class="text-slate-600 mb-4">
            {service.description}
          </p>
          <a href="/services" class="text-blue-600 hover:underline text-sm">
            View options →
          </a>
        </div>
      )}
    </div>
  </div>
</section>
```

---

## Phase 4: Pricing & Conversion

### 4.1 Maintenance Hook Component
```typescript
// src/components/MaintenanceHook.astro
---
const maintenancePrice = "$100/month"
const valuePoints = [
  "24/7 system monitoring",
  "Automatic backups", 
  "Security updates",
  "Performance optimization"
]
---

<section class="bg-blue-50 py-16">
  <div class="max-w-4xl mx-auto px-4 text-center">
    <h2 class="text-3xl font-bold text-slate-900 mb-6">
      Keep Your Systems Running Smoothly
    </h2>
    <p class="text-slate-600 mb-8">
      Most clients start with our maintenance package - it's the gateway to long-term success
    </p>
    
    <div class="bg-white rounded-xl shadow-lg p-8 inline-block">
      <div className="text-4xl font-bold text-blue-600 mb-4">
        {maintenancePrice}
      </div>
      <ul className="text-left mb-6 space-y-2">
        {valuePoints.map(point => (
          <li className="flex items-center">
            <span className="text-green-500 mr-3">✓</span>
            <span class="text-slate-700">{point}</span>
          </li>
        ))}
      </ul>
      <a href="/contact" class="inline-block bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-semibold">
        Get Started
      </a>
    </div>
  </div>
</section>
```

---

## Phase 5: Integration Points

### 5.1 Calendly Embedded Booking
```html
<!-- src/pages/contact.astro -->
<div class="max-w-4xl mx-auto">
  <h1 class="text-3xl font-bold mb-8">Book Your Free 15-Min System Audit</h1>
  
  <div class="relative" data-calendly="https://calendly.com/startuplx/15min">
    <div class="calendly-inline-widget" 
         style="min-width: 320px; height: 600px;"
         data-url="https://calendly.com/startuplx/15min">
    </div>
  </div>
</div>
```

### 5.2 Typeform Lead Capture
```html
<!-- Embed in contact page -->
<div class="max-w-2xl mx-auto">
  <iframe src="https://startuplx.typeform.com/to/your-form-id" 
          width="100%" 
          height="600" 
          frameborder="0" 
          style="border: none;">
  </iframe>
</div>
```

---

## Phase 6: Performance & SEO

### 6.1 Meta Tags
```typescript
// src/components/MetaTags.astro
---
export interface Props {
  title: string
  description: string
  image?: string
}
---

<head>
  <title>{Astro.props.title}</title>
  <meta name="description" content={Astro.props.description} />
  <meta property="og:title" content={Astro.props.title} />
  <meta property="og:description" content={Astro.props.description} />
  {Astro.props.image && (
    <>
      <meta property="og:image" content={Astro.props.image} />
      <meta name="twitter:image" content={Astro.props.image} />
    </>
  )}
</head>
```

### 6.2 Performance Optimizations
```javascript
// astro.config.mjs
import { defineConfig } from 'astro/config'

export default defineConfig({
  site: 'https://startuplx.com',
  image: {
    serviceType: 'loader',
  },
  sitemap: {
    include: ['/*'],
  },
  integrations: [
    require('@astrojs/tailwind'),
    require('@astrojs/sitemap'),
  ],
})
```

---

## Phase 7: Build & Deploy Pipeline

### 7.1 Package.json Scripts
```json
{
  "scripts": {
    "dev": "astro dev",
    "build": "astro build && astro preview",
    "preview": "astro preview",
    "test": "vitest",
    "typecheck": "tsc --noEmit",
    "format": "prettier --write ."
  }
}
```

### 7.2 GitHub Actions CI/CD
```yaml
# .github/workflows/deploy.yml
name: Deploy to VPS

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '20'
          
      - name: Install dependencies
        run: npm ci
        
      - name: Build
        run: npm run build
        
      - name: Deploy via rsync
        uses: appleboy/ssh-action@v1.0.0
        with:
          host: ${{ secrets.HOST }}
          username: ${{ secrets.USERNAME }}
          key: ${{ secrets.KEY }}
          source: "dist/"
          target: "/var/www/startuplx"
```

---

## Phase 8: Success Metrics

**Performance Targets:**
- Lighthouse Score: 90+
- First Contentful Paint: < 1.5s
- Total Blocking Time: < 200ms

**Conversion Targets:**
- Page load time: < 2s
- Booking CTA click rate: 5%+
- Contact form submission: 2%+

**Development Checklist:**
- [ ] Core structure deployed to VPS
- [ ] Tailwind CSS configured
- [ ] Hero section live
- [ ] Services section live  
- [ ] Pricing/maintenance hook added
- [ ] Contact form + booking integrated
- [ ] SEO meta tags added
- [ ] Performance optimized
- [ ] Analytics installed