Mega Infrastructure website: cinematic scroll redesign
Vite + React + Tailwind site with a scroll-scrubbed drone fly-through, services, projects, company, team and contact sections, plus a Dockerfile + nginx config for Coolify deployment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9
.dockerignore
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
**/node_modules
|
||||
app/dist
|
||||
src-assets
|
||||
video
|
||||
docs
|
||||
.git
|
||||
.remember
|
||||
.claude
|
||||
**/.DS_Store
|
||||
13
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Dependencies & build output
|
||||
node_modules/
|
||||
app/dist/
|
||||
|
||||
# Raw source media: too large for git, keep backed up elsewhere
|
||||
src-assets/
|
||||
video/
|
||||
|
||||
# Local tooling
|
||||
.remember/
|
||||
.claude/
|
||||
.DS_Store
|
||||
*.log
|
||||
14
Dockerfile
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Mega Infrastructure website: build the Vite app, serve the static output with nginx.
|
||||
|
||||
FROM node:22.11.0-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY app/package.json app/package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY app/ ./
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.27.3-alpine
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO- http://127.0.0.1/ >/dev/null || exit 1
|
||||
34
README.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Mega Infrastructure: website redesign
|
||||
|
||||
Cinematic one-page site: a scroll-driven fly-through intro, then Services, Why Mega, Projects, Company, Team and Contact.
|
||||
|
||||
```
|
||||
app/ Vite + React + TypeScript + Tailwind site
|
||||
docs/ VIDEO-PROMPTS.md: drone shot list, AI video prompts, team photo brief, content checklist
|
||||
video/ placeholder-flythrough.mp4 (built from Mega's drone stills)
|
||||
src-assets/ original downloads from megainfrastructure.co.za
|
||||
```
|
||||
|
||||
## Run it
|
||||
|
||||
```bash
|
||||
cd app && npm install && npm run dev
|
||||
```
|
||||
|
||||
## Swap in real footage
|
||||
|
||||
```bash
|
||||
cd app && scripts/make-frames.sh /path/to/flythrough.mp4
|
||||
```
|
||||
|
||||
## Edit text
|
||||
|
||||
All copy lives in `app/src/data/content.ts`.
|
||||
|
||||
## Deploy (Coolify)
|
||||
|
||||
The repo root has a `Dockerfile` that builds the site and serves it with nginx on port 80.
|
||||
In Coolify: New Resource → Public/Private Git repository → this repo, branch `main`,
|
||||
Build Pack **Dockerfile**, port **80**, then add your domain and deploy.
|
||||
|
||||
Raw media (`src-assets/`, `video/`) is git-ignored; keep it backed up separately.
|
||||
24
app/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
54
app/README.md
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# React + TypeScript + Vite
|
||||
|
||||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
||||
|
||||
Currently, two official plugins are available:
|
||||
|
||||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
|
||||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
||||
|
||||
## Expanding the ESLint configuration
|
||||
|
||||
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
||||
|
||||
```js
|
||||
export default tseslint.config({
|
||||
extends: [
|
||||
// Remove ...tseslint.configs.recommended and replace with this
|
||||
...tseslint.configs.recommendedTypeChecked,
|
||||
// Alternatively, use this for stricter rules
|
||||
...tseslint.configs.strictTypeChecked,
|
||||
// Optionally, add this for stylistic rules
|
||||
...tseslint.configs.stylisticTypeChecked,
|
||||
],
|
||||
languageOptions: {
|
||||
// other options...
|
||||
parserOptions: {
|
||||
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
||||
|
||||
```js
|
||||
// eslint.config.js
|
||||
import reactX from 'eslint-plugin-react-x'
|
||||
import reactDom from 'eslint-plugin-react-dom'
|
||||
|
||||
export default tseslint.config({
|
||||
plugins: {
|
||||
// Add the react-x and react-dom plugins
|
||||
'react-x': reactX,
|
||||
'react-dom': reactDom,
|
||||
},
|
||||
rules: {
|
||||
// other rules...
|
||||
// Enable its recommended typescript rules
|
||||
...reactX.configs['recommended-typescript'].rules,
|
||||
...reactDom.configs.recommended.rules,
|
||||
},
|
||||
})
|
||||
```
|
||||
28
app/eslint.config.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import js from '@eslint/js'
|
||||
import globals from 'globals'
|
||||
import reactHooks from 'eslint-plugin-react-hooks'
|
||||
import reactRefresh from 'eslint-plugin-react-refresh'
|
||||
import tseslint from 'typescript-eslint'
|
||||
|
||||
export default tseslint.config(
|
||||
{ ignores: ['dist'] },
|
||||
{
|
||||
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2020,
|
||||
globals: globals.browser,
|
||||
},
|
||||
plugins: {
|
||||
'react-hooks': reactHooks,
|
||||
'react-refresh': reactRefresh,
|
||||
},
|
||||
rules: {
|
||||
...reactHooks.configs.recommended.rules,
|
||||
'react-refresh/only-export-components': [
|
||||
'warn',
|
||||
{ allowConstantExport: true },
|
||||
],
|
||||
},
|
||||
},
|
||||
)
|
||||
20
app/index.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<!doctype html>
|
||||
<html lang="en-ZA">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Mega Infrastructure | Civil Construction, Pretoria</title>
|
||||
<meta name="description" content="Mega Infrastructure is a Pretoria-based civil construction company delivering roads, bulk earthworks, municipal infrastructure, stormwater, design, residential development and electrical reticulation across South Africa." />
|
||||
<meta name="theme-color" content="#0C0C0A" />
|
||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||
<link rel="preload" as="image" href="/frames/desktop/0001.webp" media="(min-aspect-ratio: 1/1)" />
|
||||
<link rel="preload" as="image" href="/frames/mobile/0001.webp" media="(max-aspect-ratio: 1/1)" />
|
||||
<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=Archivo:wdth,wght@62..125,200..800&family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
4221
app/package-lock.json
generated
Normal file
34
app/package.json
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"name": "app",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"lucide-react": "^0.460.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.25.0",
|
||||
"@types/node": "^22.20.5",
|
||||
"@types/react": "^19.1.2",
|
||||
"@types/react-dom": "^19.1.2",
|
||||
"@vitejs/plugin-react": "^4.4.1",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"eslint": "^9.25.0",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.19",
|
||||
"globals": "^16.0.0",
|
||||
"postcss": "^8.4.49",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "~5.8.3",
|
||||
"typescript-eslint": "^8.30.1",
|
||||
"vite": "^6.3.5"
|
||||
}
|
||||
}
|
||||
3
app/postcss.config.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export default {
|
||||
plugins: { tailwindcss: {}, autoprefixer: {} },
|
||||
}
|
||||
BIN
app/public/favicon.png
Normal file
|
After Width: | Height: | Size: 9 KiB |
BIN
app/public/frames/desktop/0001.webp
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
app/public/frames/desktop/0002.webp
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
app/public/frames/desktop/0003.webp
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
app/public/frames/desktop/0004.webp
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
app/public/frames/desktop/0005.webp
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
app/public/frames/desktop/0006.webp
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
app/public/frames/desktop/0007.webp
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
app/public/frames/desktop/0008.webp
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
app/public/frames/desktop/0009.webp
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
app/public/frames/desktop/0010.webp
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
app/public/frames/desktop/0011.webp
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
app/public/frames/desktop/0012.webp
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
app/public/frames/desktop/0013.webp
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
app/public/frames/desktop/0014.webp
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
app/public/frames/desktop/0015.webp
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
app/public/frames/desktop/0016.webp
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
app/public/frames/desktop/0017.webp
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
app/public/frames/desktop/0018.webp
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
app/public/frames/desktop/0019.webp
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
app/public/frames/desktop/0020.webp
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
app/public/frames/desktop/0021.webp
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
app/public/frames/desktop/0022.webp
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
app/public/frames/desktop/0023.webp
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
app/public/frames/desktop/0024.webp
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
app/public/frames/desktop/0025.webp
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
app/public/frames/desktop/0026.webp
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
app/public/frames/desktop/0027.webp
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
app/public/frames/desktop/0028.webp
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
app/public/frames/desktop/0029.webp
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
app/public/frames/desktop/0030.webp
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
app/public/frames/desktop/0031.webp
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
app/public/frames/desktop/0032.webp
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
app/public/frames/desktop/0033.webp
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
app/public/frames/desktop/0034.webp
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
app/public/frames/desktop/0035.webp
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
app/public/frames/desktop/0036.webp
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
app/public/frames/desktop/0037.webp
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
app/public/frames/desktop/0038.webp
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
app/public/frames/desktop/0039.webp
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
app/public/frames/desktop/0040.webp
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
app/public/frames/desktop/0041.webp
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
app/public/frames/desktop/0042.webp
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
app/public/frames/desktop/0043.webp
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
app/public/frames/desktop/0044.webp
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
app/public/frames/desktop/0045.webp
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
app/public/frames/desktop/0046.webp
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
app/public/frames/desktop/0047.webp
Normal file
|
After Width: | Height: | Size: 101 KiB |
BIN
app/public/frames/desktop/0048.webp
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
app/public/frames/desktop/0049.webp
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
app/public/frames/desktop/0050.webp
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
app/public/frames/desktop/0051.webp
Normal file
|
After Width: | Height: | Size: 117 KiB |
BIN
app/public/frames/desktop/0052.webp
Normal file
|
After Width: | Height: | Size: 120 KiB |
BIN
app/public/frames/desktop/0053.webp
Normal file
|
After Width: | Height: | Size: 126 KiB |
BIN
app/public/frames/desktop/0054.webp
Normal file
|
After Width: | Height: | Size: 124 KiB |
BIN
app/public/frames/desktop/0055.webp
Normal file
|
After Width: | Height: | Size: 127 KiB |
BIN
app/public/frames/desktop/0056.webp
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
app/public/frames/desktop/0057.webp
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
app/public/frames/desktop/0058.webp
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
app/public/frames/desktop/0059.webp
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
app/public/frames/desktop/0060.webp
Normal file
|
After Width: | Height: | Size: 137 KiB |
BIN
app/public/frames/desktop/0061.webp
Normal file
|
After Width: | Height: | Size: 137 KiB |
BIN
app/public/frames/desktop/0062.webp
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
app/public/frames/desktop/0063.webp
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
app/public/frames/desktop/0064.webp
Normal file
|
After Width: | Height: | Size: 137 KiB |
BIN
app/public/frames/desktop/0065.webp
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
app/public/frames/desktop/0066.webp
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
app/public/frames/desktop/0067.webp
Normal file
|
After Width: | Height: | Size: 137 KiB |
BIN
app/public/frames/desktop/0068.webp
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
app/public/frames/desktop/0069.webp
Normal file
|
After Width: | Height: | Size: 138 KiB |
BIN
app/public/frames/desktop/0070.webp
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
app/public/frames/desktop/0071.webp
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
app/public/frames/desktop/0072.webp
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
app/public/frames/desktop/0073.webp
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
app/public/frames/desktop/0074.webp
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
app/public/frames/desktop/0075.webp
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
app/public/frames/desktop/0076.webp
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
app/public/frames/desktop/0077.webp
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
app/public/frames/desktop/0078.webp
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
app/public/frames/desktop/0079.webp
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
app/public/frames/desktop/0080.webp
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
app/public/frames/desktop/0081.webp
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
app/public/frames/desktop/0082.webp
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
app/public/frames/desktop/0083.webp
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
app/public/frames/desktop/0084.webp
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
app/public/frames/desktop/0085.webp
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
app/public/frames/desktop/0086.webp
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
app/public/frames/desktop/0087.webp
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
app/public/frames/desktop/0088.webp
Normal file
|
After Width: | Height: | Size: 57 KiB |