Initial commit by AI Generator

This commit is contained in:
AI Generator
2026-02-20 16:40:18 +00:00
parent 94be0bb447
commit 53d2d05b74
7 changed files with 82 additions and 0 deletions

12
Dockerfile Normal file
View File

@@ -0,0 +1,12 @@
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

12
index.html Normal file
View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>React App</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>

10
nginx.conf Normal file
View File

@@ -0,0 +1,10 @@
server {
listen 80;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
gzip on;
gzip_types text/plain text/css application/json application/javascript;
}

15
package.json Normal file
View File

@@ -0,0 +1,15 @@
{
"name": "vite-react-app",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": { "dev": "vite", "build": "vite build" },
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.2.1",
"vite": "^5.0.0"
}
}

21
src/App.jsx Normal file
View File

@@ -0,0 +1,21 @@
import React from 'react'
const App = () => {
const n = "{{ $('Get Pending Requests').first().json.requests[0].app_name }}";
const d = "{{ $('Get Pending Requests').first().json.requests[0].description }}";
const f = "{{ $('Get Pending Requests').first().json.requests[0].features.join(', ') }}";
const s = "{{ $('Get Pending Requests').first().json.requests[0].style }}";
return (
<div style={{ padding: '40px', fontFamily: 'sans-serif', lineHeight: '1.6' }}>
<h1 style={{ borderBottom: '2px solid #33d' }}>{n}</h1>
<p><strong>Description: </strong>{d}</p>
<div style={{ background: '#f9effe', padding: '15px', borderRadius: '5px' }}>
<h3>Features</h3>
<ul>{f.split(',').map((item, i) => <li key={i}>{item.trim()}</li>)}</ul>
</div>
<div style={{ marginTop: '20px', padding: '10px', border: '1px dashed #ccc' }}>
<strong>Style Guide:</strong> {s}
</div>
</div>
)
}
export default App

9
src/main.jsx Normal file
View File

@@ -0,0 +1,9 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.jsx'
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<App />
</React.StrictMode>
)

3
vite.config.js Normal file
View File

@@ -0,0 +1,3 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({ plugins: [react()] })