freespace-freemind / README.md
SmartySmile's picture
Upload 45 files
0e0fe0a verified
|
Raw History Blame Contribute Delete
8.82 kB

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:

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:

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

{
  "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:

npm run electron-dev

Building the Application

To create a standalone executable:

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