A full-stack web application that converts VisualCron XML configurations to Azure Logic App workflow definitions.
visualcron-converter/
βββ backend/ # NestJS Backend
β βββ src/
β β βββ main.ts
β β βββ app.module.ts
β β βββ conversion.controller.ts
β β βββ conversion.service.ts
β βββ uploads/ # Uploaded files (auto-created)
β βββ outputs/ # Generated JSON files (auto-created)
β βββ package.json
β βββ tsconfig.json
βββ frontend/ # Frontend Application
β βββ index.html
βββ README.md
- Create the backend directory and navigate to it:
mkdir -p visualcron-converter/backend/src
cd visualcron-converter/backend- Initialize the NestJS project:
npm init -y
npm install @nestjs/common @nestjs/core @nestjs/platform-express @nestjs/serve-static multer uuid xml2js reflect-metadata rxjs
npm install -D @nestjs/cli @nestjs/schematics @nestjs/testing @types/express @types/multer @types/node @types/uuid @types/xml2js typescript- Create the TypeScript configuration:
// tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "ES2020",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
"skipLibCheck": true,
"strictNullChecks": false,
"noImplicitAny": false,
"strictBindCallApply": false,
"forceConsistentCasingInFileNames": false,
"noFallthroughCasesInSwitch": false
}
}-
Copy the backend TypeScript files from the artifacts above into the
src/directory -
Start the backend server:
npm run start:devThe backend will run on http://localhost:3000
- Create the frontend directory:
mkdir -p visualcron-converter/frontend
cd visualcron-converter/frontend-
Copy the HTML file from the artifact above and save it as
index.html -
Serve the frontend (using any static server):
Option A: Using Python (if installed):
python -m http.server 3001Option B: Using Node.js serve:
npm install -g serve
serve -p 3001Option C: Using VS Code Live Server extension
The frontend will run on http://localhost:3001
-
Start both servers:
- Backend:
http://localhost:3000 - Frontend:
http://localhost:3001
- Backend:
-
Upload your VisualCron XML file:
- Drag and drop the XML file onto the upload area, or
- Click "Select File" to browse for your XML file
-
View the conversion results:
- See summary statistics (triggers, actions, parameters)
- Preview the generated Logic App JSON
- Copy the code to clipboard
- Download the JSON file
- File Upload: Secure XML file upload with validation
- XML Parsing: Robust XML to JavaScript object conversion
- Logic App Generation: Converts VisualCron tasks to Logic App actions
- Download Service: Generates downloadable JSON files
- Error Handling: Comprehensive error handling and validation
- Modern UI: Beautiful Tailwind CSS interface with animations
- Drag & Drop: Intuitive file upload experience
- Real-time Preview: Live JSON code preview with syntax highlighting
- Summary Dashboard: Visual statistics of conversion results
- Download & Copy: Easy export options for the generated code
- Responsive Design: Works on desktop and mobile devices
The converter handles these VisualCron task types:
- Execute Tasks β HTTP Actions / Azure VM Commands
- Email Tasks β Office 365 Connectors
- File Tasks β File System Connectors
- FTP Tasks β FTP Connectors
- SQL Tasks β SQL Connectors
- PowerShell Tasks β Azure Functions
- Generic Tasks β Compose Actions (with original config preserved)
- Time Triggers β Recurrence Triggers
- File Triggers β File System Triggers
- Process Triggers β Manual HTTP Triggers (fallback)
To add support for additional VisualCron task types:
- Update the backend service (
conversion.service.ts):
private convertSingleTask(task: any, index: number): any {
switch (task.TaskType || task.Type) {
case 'YourNewTaskType':
return this.convertYourNewTask(task, index);
// ... existing cases
}
}
private convertYourNewTask(task: any, index: number): any {
return {
type: "YourLogicAppActionType",
inputs: {
// Your conversion logic here
},
runAfter: index > 0 ? { [`action_${index - 1}`]: ["Succeeded"] } : {}
};
}For production deployment, consider adding environment variables:
# Backend (.env)
PORT=3000
CORS_ORIGIN=https://your-frontend-domain.com
UPLOAD_MAX_SIZE=10485760
CLEANUP_INTERVAL=3600000
# Frontend
BACKEND_URL=https://your-backend-domain.com- Build the application:
npm run build - Set environment variables
- Deploy the
dist/folder
- Update the backend URL in the frontend JavaScript
- Deploy the
frontend/folder
- Description: Upload and convert VisualCron XML file
- Content-Type:
multipart/form-data - Body: XML file in
filefield - Response: Conversion result with download ID
- Description: Download converted Logic App JSON
- Parameters:
id- Download ID from upload response - Response: JSON file download
- CORS Errors: Ensure backend CORS is configured for frontend URL
- File Upload Fails: Check file size limits and XML validation
- Conversion Errors: Verify VisualCron XML structure matches expected format
- Download Issues: Ensure download ID is valid and file exists
Enable debug logging in the backend:
npm run start:debug- Fork the repository
- Create a feature branch
- Add your improvements
- Submit a pull request
MIT License - feel free to use and modify as needed.