Skip to content

Commit 030347a

Browse files
authored
Merge pull request #1 from devfile/1765
Initial implementation of the Devfile GUI Wizard
2 parents 4db396f + 8ed46d9 commit 030347a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+6890
-3
lines changed

.dockerignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
node_modules
2+
npm-debug.log
3+
dist
4+
.git
5+
.gitignore
6+
README.md
7+
.env
8+
.env.local
9+
.env.*.local
10+
.vscode
11+
.idea
12+
*.log
13+
.DS_Store
14+
coverage
15+
.nyc_output
16+
Claude.md
17+
.mcp.json
18+
.claude

.github/workflows/deploy.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1515

16-
- name: Make target export directory
17-
run: mkdir -p public/
16+
- name: Setup Node.js
17+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
18+
with:
19+
node-version: '20'
20+
cache: 'npm'
21+
22+
- name: Install dependencies
23+
run: npm ci
1824

19-
## TODO: Add site build and export steps here, target public/ for export directory
25+
- name: Build site
26+
run: npm run build
2027

2128
- name: Copy CNAME
2229
run: cp CNAME public

.gitignore

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
# Dependencies
11+
node_modules
12+
.pnp
13+
.pnp.js
14+
15+
# Build outputs
16+
dist
17+
dist-ssr
18+
build
19+
*.local
20+
21+
# Environment variables
22+
.env
23+
.env.local
24+
.env.development.local
25+
.env.test.local
26+
.env.production.local
27+
28+
# Testing
29+
coverage
30+
.nyc_output
31+
*.lcov
32+
33+
# Editor directories and files
34+
.vscode/*
35+
!.vscode/extensions.json
36+
!.vscode/settings.json
37+
!.vscode/tasks.json
38+
!.vscode/launch.json
39+
.idea
40+
*.swp
41+
*.swo
42+
*~
43+
.DS_Store
44+
*.suo
45+
*.ntvs*
46+
*.njsproj
47+
*.sln
48+
*.sw?
49+
50+
# OS files
51+
Thumbs.db
52+
.DS_Store
53+
.DS_Store?
54+
._*
55+
.Spotlight-V100
56+
.Trashes
57+
ehthumbs.db
58+
Desktop.ini
59+
60+
# Temporary files
61+
*.tmp
62+
*.temp
63+
.cache
64+
.parcel-cache
65+
66+
# Optional npm cache directory
67+
.npm
68+
69+
# Optional eslint cache
70+
.eslintcache
71+
72+
# Optional stylelint cache
73+
.stylelintcache
74+
75+
# Microbundle cache
76+
.rpt2_cache/
77+
.rts2_cache_cjs/
78+
.rts2_cache_es/
79+
.rts2_cache_umd/
80+
81+
# Optional REPL history
82+
.node_repl_history
83+
84+
# Output of 'npm pack'
85+
*.tgz
86+
87+
# Yarn Integrity file
88+
.yarn-integrity
89+
90+
# dotenv environment variable files
91+
.env*.local
92+
93+
# Vite
94+
.vite
95+
96+
# TypeScript
97+
*.tsbuildinfo
98+
99+
# Optional npm cache directory
100+
.npm
101+
102+
# Optional eslint cache
103+
.eslintcache
104+
105+
# Storybook build outputs
106+
storybook-static
107+
108+
# Temporary folders
109+
tmp/
110+
temp/

.mcp.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"mcpServers": {
3+
"context7": {
4+
"command": "npx",
5+
"args": ["-y", "@upstash/context7-mcp"]
6+
},
7+
"playwright": {
8+
"type": "stdio",
9+
"command": "npx",
10+
"args": [
11+
"@playwright/mcp@latest"
12+
],
13+
"env": {}
14+
}
15+
}
16+
}

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"Anthropic.claude-code",
6+
"github.vscode-pull-request-github",
7+
"RooVeterinaryInc.roo-cline"
8+
]
9+
}

Claude.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Overview
6+
7+
This repository contains a single-page React application for creating devfiles through a user-friendly GUI wizard. The application uses React and Tailwind CSS to provide a step-by-step interface for generating devfile 2.3.0 compliant YAML files.
8+
9+
**Key Resources:**
10+
- Devfile specification: https://devfile.io/docs/
11+
- Feature request: https://github.com/devfile/api/issues/1765
12+
- Devfile 2.3.0 spec should be the target version
13+
14+
## Project Architecture
15+
16+
**Application Type:** Single-page application (SPA) with no backend or persistent state
17+
**UI Framework:** React
18+
**Styling:** Tailwind CSS
19+
**Output:** Generated devfile.yaml files available for download
20+
21+
The application is stateless - all devfile generation happens client-side with no data persistence.
22+
23+
## Development Commands
24+
25+
This section will be populated once the project structure is initialized. Expected commands include:
26+
- `npm install` - Install dependencies
27+
- `npm run dev` - Start development server
28+
- `npm run build` - Build for production
29+
- `npm run lint` - Run linter
30+
- `npm run test` - Run tests (if applicable)
31+
32+
## MCP Servers
33+
34+
This project uses the following MCP servers (configured in `.mcp.json`):
35+
36+
- **context7**: Provides up-to-date React and Tailwind CSS documentation
37+
- **playwright**: For browser automation and testing
38+
39+
## Key Implementation Requirements
40+
41+
1. **Step-by-step wizard interface** - Guide users through devfile creation with clear, sequential steps
42+
2. **Devfile 2.3.0 compliance** - Generated YAML must conform to the devfile 2.3.0 specification
43+
3. **Download capability** - Users must be able to download the generated devfile.yaml
44+
4. **Single page design** - All functionality contained in one web page with no routing
45+
5. **No state persistence** - Application does not save or persist user data between sessions
46+
47+
## Devfile Concepts to Understand
48+
49+
When working with this codebase, familiarize yourself with these devfile concepts:
50+
- Components (containers, volumes, kubernetes resources)
51+
- Commands (exec, apply, composite)
52+
- Events (preStart, postStart, preStop, postStop)
53+
- Projects (git repositories)
54+
- StarterProjects (templates)
55+
- Metadata (name, version, description, attributes)
56+
57+
Refer to https://devfile.io/docs/ for detailed schema and examples.

Dockerfile

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Multi-stage build for production
2+
3+
# Stage 1: Build the application
4+
FROM node:18-alpine AS builder
5+
6+
WORKDIR /app
7+
8+
# Copy package files
9+
COPY package*.json ./
10+
11+
# Install dependencies
12+
RUN npm ci
13+
14+
# Copy source code
15+
COPY . .
16+
17+
# Build the application
18+
RUN npm run build
19+
20+
# Stage 2: Serve with nginx
21+
FROM nginx:alpine
22+
23+
# Copy built assets from builder stage
24+
COPY --from=builder /app/dist /usr/share/nginx/html
25+
26+
# Copy nginx configuration
27+
COPY nginx.conf /etc/nginx/conf.d/default.conf
28+
29+
# Create nginx cache directories with world-writable permissions for OpenShift
30+
# OpenShift will assign a random UID, so we make directories writable by any user
31+
RUN mkdir -p /var/cache/nginx/client_temp \
32+
&& mkdir -p /var/cache/nginx/proxy_temp \
33+
&& mkdir -p /var/cache/nginx/fastcgi_temp \
34+
&& mkdir -p /var/cache/nginx/uwsgi_temp \
35+
&& mkdir -p /var/cache/nginx/scgi_temp \
36+
&& chmod -R 777 /var/cache/nginx \
37+
&& chmod -R 777 /var/log/nginx \
38+
&& chmod -R 755 /etc/nginx/conf.d \
39+
&& chmod -R 755 /usr/share/nginx/html \
40+
&& touch /var/run/nginx.pid \
41+
&& chmod 777 /var/run/nginx.pid
42+
43+
# Don't set USER - let OpenShift assign the UID
44+
# OpenShift will enforce runAsNonRoot via security context
45+
46+
# Expose port 8080 (non-root)
47+
EXPOSE 8080
48+
49+
# Start nginx
50+
CMD ["nginx", "-g", "daemon off;"]

Dockerfile.dev

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Development Dockerfile
2+
FROM node:18-alpine
3+
4+
WORKDIR /app
5+
6+
# Copy package files
7+
COPY package*.json ./
8+
9+
# Install dependencies
10+
RUN npm ci
11+
12+
# Copy source code
13+
COPY . .
14+
15+
# Expose Vite dev server port
16+
EXPOSE 5173
17+
18+
# Start development server
19+
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]

0 commit comments

Comments
 (0)