HEMS Simulation Portal
This repository contains a self‑contained web application for the
Loading actions...
Skill content
Main instructions and any bundled files for this skill.
HEMS Simulation Portal
This repository contains a self‑contained web application for the
HEMS Simulation portal. It is inspired by the existing site at
helicoptersim.org but redesigned to be
fully editable by administrators and to expose working plugin
endpoints for both Microsoft Flight Simulator (MSFS) and X‑Plane.
Features
- Landing page – Presents a hero section, pricing plans and a grid of core features. All text on the public site can be edited from the admin panel without touching any code.
- Admin interface – Password‑protected pages allow an
administrator to update site settings (hero title, call‑to‑action
text, plan names/prices), modify the list of core features, and
browse incoming telemetry from simulator plugins. The default
password is
admin123(you should change this immediately). - Plugin API – Flight simulator plugins can POST JSON telemetry
data to
/api/plugins/msfsor/api/plugins/xplane. Incoming altitude, speed, fuel and engine status values are stored in a SQLite database and displayed both on the landing page and in the admin panel. - Sample plugins – Two example scripts (
plugins/msfs_plugin.pyandplugins/xplane_plugin.py) simulate sending random telemetry data to the server. These serve as a starting point for real simulator integrations.
Getting started
This project has no external dependencies beyond the Python packages
already available in this environment. It uses FastAPI and Jinja2
for the web layer and the built‑in sqlite3 module for persistence.
Running the server
-
Open a terminal and change into the project directory:
cd hems_app -
Start the development server using uvicorn:
uvicorn main:app --reload --port 8000The
--reloadflag enables automatic reloading when you edit templates or Python code. -
Visit
http://localhost:8000/in your browser to see the landing page. Click the Admin link in the top right and log in with the default passwordadmin123to access the admin dashboard. From there you can edit the content and change the password.
Changing the admin password
- Log in to the admin dashboard at
/admin/loginusing the current password. - Navigate to Edit Site Settings.
- Enter a new password in the New Password field and click Save Changes. Leaving the field blank will keep the existing password.
Sending telemetry from simulator plugins
Two sample plugins are included under the plugins/ directory. They
generate random flight data and send it to the server every five
seconds. You can run them as follows (replace localhost:8000 with
your server’s address if different):
python plugins/msfs_plugin.py http://localhost:8000
python plugins/xplane_plugin.py http://localhost:8000
Each script will output a message whenever data is sent. On the landing page you will see the most recent telemetry in the Recent Simulator Data section, and the full history is available from the admin panel under View Plugin Data.
Customisation
- Styling: All of the CSS for the site lives in
static/style.css. Modify this file to change colours, layout spacing, or any other visual aspect. - Navigation: The navigation bar at the top of every page is
defined in
templates/base.html. You can adjust the menu items there or link them to real pages when you implement additional functionality.
Deploying
This application is intended as a starting point. For production
deployments you should run behind a proper ASGI server such as
uvicorn or hypercorn and configure HTTPS termination. The
database (db.sqlite3) will be created automatically; if you wish
to start over with a clean database you may delete this file before
launching the server.
License
This project is provided as‑is without any warranty. You are free to modify and distribute it for your own use.
Related Skills
Frontend Typescript Linting.mdc
TypeScript and ESLint rules that MUST be followed when creating, modifying, or reviewing any file under apps/frontend/, including .ts, .tsx, .js, and .jsx files. Also apply when discussing frontend li...
2. Apply Deepthink Protocol (reason about dependencies
risks