Hey HN, I’m Pierce. Today I’m open sourcing a beta of Mountaineer, an integrated framework for building webapps in React and Python.<p>I’ve written a good 25+ webapps over the last few years in almost every major framework under the sun. Python and React remain my favorite. They let you get started quickly and grow to scale. But the developer experience of linking these two worlds remains less than optimal:<p>— Sharing typehints and schemas across frontend and backend code<p>— Scattered fetch() calls to template data and modify server objects<p>— Server side rendering / gateway support<p>— Error handling on frontend fetches<p>Mountaineer is an attempt to solve those problems. I didn’t want to re-invent the wheel of what Python and React are good at, so it’s relatively light on syntax. It provides one frontend hook for React apps and introduces a MVC convention on the backend for managing views. Support files are generated progressively through a local watcher, so IDE type-hints and function calls work out of the box.<p>It’s more intuitive to explain with some code, so pop over to the Github if you’re interested in this stack and taking a look:<p>Github: <a href="https://github.com/piercefreeman/mountaineer">https://github.com/piercefreeman/mountaineer</a><p>More context: <a href="https://freeman.vc/notes/mountaineer-v01-webapps-in-python-and-react" rel="nofollow">https://freeman.vc/notes/mountaineer-v01-webapps-in-python-a...</a><p>Would love to hear your thoughts!
Kudos for how much polish and documentation work you've done here. It's rare to see a v0.1 release that's this accessible to newcomers, even rarer to see it all from one person. You clearly care about developer experience and that makes the project much more inviting.
Before I try a web framework, I want to know if there's an easy way to do authentication, authorization and multitenancy. Multitenancy may have multiple approaches but am talking about something as simple as row-based multitenancy to get things started. But I also understand this may be a lot for version 0.1. Either way, this is still fantastic work and thanks for sharing.
This is cool! It's weird that I, very recently, created a project based on FastAPI and had a strong desire for a React frontend as well, so I created a solution for it. My solution actually supports React SSR as well and this project has motivated me to publish my library. Thanks!
This looks interesting, but there's a lot of moving pieces (rust, python, typescript, react, v8).<p>Maybe remove the .DS_Store files from repo and update your gitignore globally to avoid this issue. Also, Pydantic has SecretStr that might be useful to use.
Very interesting work! Thanks for sharing. How hard do you think it'd be to swap React for Svelte ? Not that I feel strong for one or the other but I'm the process of learning svelte and having a good backend strategy for svelte views would be cool.
This would be fun to wire up into django middleware for some quick VM binding for react frontends. Appreciate the approach, as other's have said kudos and keep up the good work! Any work in this space to help alleviate the boilerplate is great
This looks interesting! I need to try this on the weekend :)<p>By the way, I have been able to integrate JavaScript and any backend language with a hybrid approach, which works really well for large-scale commercial projects.<p>In a hybrid application, we'll have all of the following types of pages:<p>-- Server-first Django/Laravel/Ruby pages with little-to-no JavaScript.<p>-- Client-first JavaScript pages with little-to-no Django/Laravel/Ruby.<p>More Details Here ... <a href="https://twitter.com/dvcoolarun/status/1753310384843337907" rel="nofollow">https://twitter.com/dvcoolarun/status/1753310384843337907</a>
I'm very happy to see that this package makes use of pydantic. I have been a heavy user of Dash and there is a ton of room there for an improved dev experience via typed models/components/callbacks built on pydantic primitives.<p>Personally, I probably won't venture to use this as I don't really need the extra client-side flexibility that this provides, but it's an impressive project for an early stage release.<p>There have been several other web app packages highlighted here over the last week. It's great to see new work being done on open source hobby projects on the web app front for Python/react/rust.
I have a less elegant, but perhaps less "magic" setup here: <a href="https://github.com/nitro-bio/micro-app">https://github.com/nitro-bio/micro-app</a>
Looove that approach! Other than the TODO example, is there a full project I can look at that's based on Mountaineer? If I choose to be an early adopter, what are the current gaps / shortcomings I need to look out for?
Seems interesting as current Python-based solutions don't have good support for Javascript. I see the support for the binding is from Python to JS but do you have any plans to support two-way binding work?
This is awesome, thank you for building this. I've been looking for something like this for a long time. Does it have any built-in authentication features?
i like the idea of tight integration between frontend and backend by abstracting out the api/data fetching/transformation which is a lot of busy work
Hi I am trying to learn react for integration with Django.<p>I keep starting to build tic tac to application and then just leave it there.<p>Any tips and or documents on how to properly learn react ?