File size: 8,818 Bytes
0e0fe0a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | # appsONLINE - MVC Application Launcher
A Node.js/Electron windowed application that discovers and manages multiple ASP.NET Core MVC web applications across your workspace.
## Features
✨ **Features:**
- 🪟 Windows application with GUI launcher interface
- 🔍 Automatic discovery of ASP.NET Core MVC applications
- 🚀 One-click launch of any MVC application
- 🌐 Built-in browser integration to open running applications
- ⏹️ Stop/manage running applications from the GUI
- 📊 Real-time status monitoring
- 🔄 Auto-refresh of application status
## Project Structure
```
appsONLINE/
├── main.js # Electron main process
├── preload.js # Electron preload script
├── package.json # Node.js dependencies
└── public/
├── index.html # UI layout
├── app.js # Frontend logic
└── style.css # Styling
```
## Prerequisites
Before running the launcher, ensure you have installed:
1. **Node.js & npm** - Download from https://nodejs.org/
- Required: Node.js 14+ with npm 6+
- Verify: `node --version` and `npm --version`
2. **.NET SDK 8.0** - Download from https://dotnet.microsoft.com/download
- Required for running ASP.NET Core MVC applications
- Verify: `dotnet --version`
3. **Git** - For version control (optional)
## Installation
### Step 1: Install Node Dependencies
Open a terminal/PowerShell in the main workspace folder and run:
```bash
npm install
```
This will install:
- `electron` - Framework for creating the windowed application
- `express` - Backend web server for the launcher
- `child_process` - Process management for launching .NET apps
### Step 2: Verify .NET Applications
The launcher will automatically discover all ASP.NET Core MVC applications in subfolders. Ensure each MVC application has:
- A valid `.csproj` file
- A `Properties/launchSettings.json` file with HTTP/HTTPS profile configuration
For example, the PortWatcher app structure:
```
productionYARD2/
└── sysSec-portWatcher/
└── PortWatcher/
├── PortWatcher.csproj
├── Properties/
│ └── launchSettings.json ← Required!
└── ...
```
## Usage
### Start the Launcher
In the main workspace folder, run:
```bash
npm start
```
This will:
1. Start the Electron window application
2. Launch the web-based UI
3. Automatically discover all MVC applications
4. Display them in an interactive grid
### Using the Launcher UI
**Main Dashboard:**
- View all discovered MVC applications as cards
- Each card shows:
- Application name and description
- Application URL (http://localhost:PORT)
- Current status (Running/Stopped)
- Action buttons
**Application Controls:**
| Button | Action |
|--------|--------|
| **▶ Launch** | Start the MVC application |
| **🌐 Open** | Open the running application in your default browser |
| **⏹ Stop** | Stop a running application |
**Global Controls:**
- **🔄 Refresh Apps** - Manually refresh the list of discovered applications and their status
- **⏹ Stop All Apps** - Stop all running applications at once
### Example: Launch PortWatcher
1. The launcher automatically discovers the PortWatcher application
2. Click the **"▶ Launch"** button on the PortWatcher card
3. Wait for the app to start (status will show "● Running")
4. Click **"🌐 Open"** to open it in your browser at `http://localhost:5293`
5. The app is now fully functional
## Adding New MVC Applications
To add a new MVC application:
1. Create the project in a subfolder within the workspace
2. Ensure it's an ASP.NET Core MVC application (target framework: .NET 8.0 or higher)
3. The project must have a `Properties/launchSettings.json` file with an HTTP profile containing `applicationUrl`
4. Click **"🔄 Refresh Apps"** in the launcher to detect it
5. The new application will appear automatically
### Example launchSettings.json
```json
{
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5293",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
```
## Troubleshooting
### ❌ "No MVC applications found"
**Solution:** Ensure:
- `.csproj` files exist in subfolders
- `Properties/launchSettings.json` files are present
- JSON files are valid (check formatting)
- Click **"🔄 Refresh Apps"** to re-scan
### ❌ Application fails to launch
**Check:**
1. Is .NET SDK 8.0 installed? Run: `dotnet --version`
2. Can you run the app manually? Navigate to the project folder and run: `dotnet run`
3. Check the console output for error messages
4. Verify the project file has no syntax errors
### ❌ Port already in use
**Solution:**
- The application is trying to run on a port that's already in use
- Edit `Properties/launchSettings.json` and change the port number
- Re-scan for apps with **"🔄 Refresh Apps"**
### ❌ "Application is already running"
**Solution:**
- The app is already running from a previous launch
- Click the **"⏹ Stop"** button on the app card
- Or use **"⏹ Stop All Apps"** to stop everything
### ❌ Electron window won't open
**Solution:**
1. Ensure all dependencies are installed: `npm install`
2. Try running in development mode: `npm run electron-dev`
3. Check for error messages in the console
4. Restart by closing all node processes and running `npm start` again
## Development
### Running in Development Mode
For development with auto-reload:
```bash
npm run electron-dev
```
### Building the Application
To create a standalone executable:
```bash
npm run build
```
## File Descriptions
| File | Purpose |
|------|---------|
| `main.js` | Electron main process, app discovery, and process management |
| `preload.js` | Secure bridge between UI and backend |
| `public/index.html` | Application UI structure |
| `public/app.js` | Frontend logic and event handling |
| `public/style.css` | Styling and responsive layout |
| `package.json` | Node.js dependencies and scripts |
## Architecture
```
┌─────────────────────────────────┐
│ Electron Window (appsONLINE) │
│ ┌──────────────────────────┐ │
│ │ UI (index.html, app.js) │ │
│ └────────────┬─────────────┘ │
│ │ │
│ ┌────────────▼─────────────┐ │
│ │ Express Server (3000) │ │
│ │ - /api/apps │ │
│ │ - /api/apps/:id/launch │ │
│ │ - /api/apps/:id/stop │ │
│ └────────────┬─────────────┘ │
│ │ │
│ ┌────────────▼─────────────┐ │
│ │ App Discovery Engine │ │
│ │ - Scan .csproj files │ │
│ │ - Parse launchSettings │ │
│ │ - Spawn dotnet processes│ │
│ └──────────────────────────┘ │
└─────────────────────────────────┘
│
└──> MVC Apps
- PortWatcher
- Future Apps...
```
## Security
- Context isolation enabled in Electron
- No nodeIntegration in renderer process
- IPC communication via preload script
- Processes spawn with restricted permissions
## Performance
- Auto-refresh every 5 seconds for status updates
- Lazy-loading of app information
- Minimal memory footprint
- Efficient process management
## Future Enhancements
- 📝 Application logs viewer
- 🔧 Configuration editor
- 📊 Performance monitoring dashboard
- 🔐 Authentication integration
- 📦 Container/Docker support
- 🌐 Remote application management
## License
© 2026 appsONLINE. All rights reserved.
## Support
For issues or questions:
1. Check the Troubleshooting section above
2. Review the console output for error messages
3. Verify .NET SDK and Node.js are properly installed
---
**Version:** 1.0.0
**Last Updated:** February 1, 2026
**Created for:** Efficient MVC Application Management
|