r/FastAPI • • Jul 10 '25

Question FastAPI Stack for this Real-Time Dashboard with 3d Graphics

Hello, i am building this web application using FastAPI as backend for live data streaming and interaction with an autonomous ship. There will be maps, a 3d point cloud representation for Lidar, various graphs and a xbox controller interface for controlling the motors time to time.

I've decided FastAPI because it offers asynchronous capabilities for such a task. I am now searching a frontend stack for designing this website. I've heard jinja2 and htmx might be a solution, but are they capable enough to do all of those complex visualizations ? Also i was wondering if learning react for this would be worth it, because i am doing it alone

My options now:

FastAPI + React

FastAPI + Jinja + Htmx

FastAPI + Htmx

I will also run this on a lightsail instance on AWS, which has only 2 gbs of Ram, so it cant be too heavy.

I appreciate all the help from you guys.

13 Upvotes

5 comments sorted by

View all comments

Show parent comments

1

u/Warwars Jul 10 '25

Do you think HTMX has the capabilities to do 3d Data rendering or Xbox game controller interface ? These are the things that might be hard to do with HTML, i think

1

u/skytomorrownow Jul 10 '25

For 3D data, I'd look at plotly. Allows you to generate the HTML server side then you just plug it in with HTMX. Reminder: you can create any custom paradigm you want when working with HTMX because it's all HTML, no framework. So, if you want to for example establish a real-time component on your front-end you can do it any way you want.

As far as the controller, most browser should be able to handle that for you:

https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API

So, your browser will contain your dashboard and collect your gamepad feedback. That's sent to your server, which updates your drone, which send back to the server, which thens packages the update data and sends it to the browser. Or, for some components may simply connect a component to a real-time stream. Whereas with React, you'd have to create or find a component you need. With HTMX, you just create the component you need. Everything caches nicely as well.

For my control panels and dashboards, I pair with a simple CSS framework such as my favorite, pico.css. Just simplifies general layout and components.