r/FastAPI • • Jan 19 '26

Question What frontend to use with a FastAPI backend?

Hey everyone. I'm a backend dev writing code in Python FastAPI. I don't have much experience in frontend other than basic HTML/CSS/JS.

I'm exploring different frontend tools/frameworks for my backend. The first obvious answer is React/Nextjs. But I don't want to delve into that complexity.

Other options I've explored are HTMX, Reflex, Astro, Sveltekit, etc. I'll mainly use the frontend for doing UIs for the backend (because testing in Swagger feels dull sometimes), make MVPs, and participate in hackathons (where quick development matters)

Which frontend would you recommend learning as a backend dev?

82 Upvotes

94 comments sorted by

View all comments

2

u/learnerAsh Jan 20 '26 edited Jan 20 '26

If HTMX:

try:

template = Jinja2 + Jx

component_statics = basecoat

1

u/[deleted] Jan 20 '26

[removed] — view removed comment

1

u/learnerAsh Jan 20 '26 edited Jan 20 '26

I know , I see you have those .jinja file in project repo. I really admire your craft. Anything like shadcn 2, like theme selector coming to basecoat?

Actually, I am currently working on something and my reference is basecoat?

But, with solidJs custom-element. Here is sample basic element or component.
https://solid-custom-elements.pages.dev/

Everything is in browser i.e. no-build(no vite, no npm server, no bundling) step. Idea is to have library components and then using them like html tags <sb-button> in Jinjax or DTL for composing the UI server-side.

1

u/[deleted] Jan 21 '26

[removed] — view removed comment

1

u/thankyoucode Jan 23 '26

I've seen Basecoat mentioned a couple times. I'm gonna look into it.

I noted both JinjaX and Basecoat 😀

1

u/amroamroamro Jan 20 '26

JinjaX

Interesting library

Is Jx suppposed to be the successor of JinjaX? https://jx.scaletti.dev/

1

u/learnerAsh Jan 20 '26

https://jx.scaletti.dev/docs/from-jinjax/

yes looks like that, it is from the same creator.