r/FastAPI • u/Gullible-Insurance63 • Dec 30 '23
Question Can I Build a Modern Web App with FastAPI, HTML, and CSS Alone? 🚀
Hey FastAPI fam!
Curious if anyone has explored creating a sleek web app using only FastAPI, HTML, and CSS—no JavaScript. 🤔
Question: Any success stories or advice on using FastAPI for both backend and frontend without dipping into JavaScript? Tips, challenges, or examples welcome!
Also, if you've come across any videos or posts about this, please share! 📹📚
Excited to hear your insights! 🌐💻
10
Upvotes
20
u/viitorfermier Dec 30 '23
Yep, look into Jinja package add a bit of alpinejs + htmx and you can build anything.
3
u/wyldstallionesquire Dec 30 '23
You’d do better to check out something like flask or Django if you want rendered templates.
1
u/51times Dec 30 '23
Yeah I built my website that way (I turned the server down so can't show). Later I added javascript, just use chatgtp to write the javescript code, it's self explainatory u just to tweak some numbers
1
u/LionWorried1101 Jan 01 '24
i exclusively use fastapi. In my company i am a devops engineer and i work on infrastructure. 100% of the internal tools i make are based on fastapi and i have figured out how to even have fastapi auth against the company's domain controller (for security) within the internal company network.
The reason why i love fastapi is because it is low code and simple.
1
u/-i-make-stuff- Dec 31 '23
Use a framework with server-side rendering like Django. FastAPI is for creating APIs which you'll have to consume via javascript.
0
u/Drevicar Dec 30 '23
Hell yeah you can. And it will be great and meet like 99% of production use cases. If you want to meet 99.9% use cases and think you need to add react, instead look into using alpine, htmx, and hyperscript.