-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added nuxt-bridge #3426
added nuxt-bridge #3426
Conversation
I think there are breaking changes with some of the dependencies we use when switching to nuxt-bridge. This transition was attempted here. The breaking issues could be due to using nitro in that PR but either way I don't see an advantage to going to nuxt bridge. After reading through peoples experiences using bridge to migrate to nuxt3 it seems like bridge does not simplify the migration to nuxt3. Since nuxt 3 requires a full rewrite of the client I think it's worth exploring other options, like React Remix |
oh yeah i saw that but i gathered that alot of the pushback was more related to the messy git history, i dont think migrating to bridge necessarily facilitates a migration to nuxt3, with nitro you could transition alot of different aspects of the app forwards, i got nitro building, with almost full functionality, but yeah, i think theres many benefits to nuxt-bridge w/o planning on moving to nuxt3 |
i got audiobookshelf to build on nuxt-bridge's nitro with some tweaks to epubjs, its kind of a complicated git commit history, and im curious as to whats the best way to proceed, |
I don't see how migrating to nuxt-bridge would be useful if we are looking at changing frameworks or even if we go to nuxt3. I'm looking at react remix right now which would be a complete re-write. If we go to nuxt3 we would salvage some components but still mostly a re-write. |
i thought i explained pretty thoroughly in my above post
remix is build on top of vite nuxt-bridge has a vite integration to get nuxt-bridge to work with vite, you must first enable nitro,
i havent looked much into remix tbh, but as i previously mentioned, the reason i started contributing is because as a rule, i tend to avoid complete rewrites. i just think using nuxt-bridge and some nitro / vite configuration, a nitro migration is needed for vite, and vite is needed for remix, and thats only speaking from the client perspective, i do think migrating to at least vite is extremely wise. |
ive been looking more into remix, https://remix.run/blog/incremental-path-to-react-19#remix-became-a-wrapper
|
The first thing I want to look at is if the folder structure can be kept the same as it is now with the client inside |
i believe that even thinking about a framework shift / complete rewrite is expensive from a technical debt perspective while i completely agree that it would be extremely nice to clean house, im curious as to what has influenced your decision and pushed you towards the remix route ( pun intended ) i actually dont hate that idea at all, i just dont have much experience in that area, i feel like the spectrum that kind of exists today is, to state it plainly, Next at one end, and Remix on the other and from my perspective, i was actually extremely surprised to have seen that, webpack 4 really hurts, when i started, my goal was to try to get a vite build working, and all my experience in the last month, but to get that to work, you gotta go thru nitro i havent even heard of nitro before this project, the parent organization, unjs, seems hella dedicated to web standards, alot of the headache of getting AudioBookShelf to build using nuxt-bridge, now that ABS builds, i need some feedback as to if there are buggy edge cases, if that makes sense? and while it builds, it is extremely hacky, but i believe it is done, and thats not even mentioning unjs helpful tools, ok cheers, this rambling rant has gone on long enough |
sorry, i just saw your response, i think alot of the benefits of stuff like SSR is that you dont need to maintain both a frontend and a backend, as previously mentioned, i feel like alot of code can be "deduped" reduced removed and i think itll build faster, serve at a higher volume, and use less memory when running and i think bridge really is the first step also have you looked into server migrations? 🙏🙏🙏 |
I definitely want to go with SSR this time around and I understand what you are saying with having 1 package.json for the client and server in the case. My original thought was to have all the requests pass through to the client unless they are API, Auth or some others. So it is still SSR. I don't like how many dependencies that are used for these js frameworks. I like that we can keep the server dependencies clean since every js framework will use thousands of dependencies. |
this video from awesome explaining the MPA -> SPA -> SSR progression kind of inspired this reply i totally understand your wanting to keep the but i believe the true value of SSR right now, the client performs alot of traditional server-side logic right now, ABS's client requires a build step, most, if not all of the routing logic could be statically built, service workers also come with the added benefit of PWA functionality, sidenote: p.p.s. quick little video that has some good visualizations of under the hood processes - nitro vs nuxt |
I am also intested in this discussion. @advplyr can you share somewhere (maybe in a discussion page) what you've learnt about other frameworks and what are the pros and cons? This is a decision for years, and a huge rewrite project. |
Yeah I haven't done more testing on how Remix would/should integrate with Abs but I have some experience with Remix now. Once I got the hang of it I found it to be a much better developer experience than nuxt2. I built one tiny internal website with nuxt3 so don't have as much experience with that. I'd be really interested if you have any initial thoughts @mikiher and if you have experience working with other frameworks. |
Unfortunately I don't have any experience with frontend frameworks besides Nuxt and Vue2, which were self-taught for the purpose of making changes in ABS... Nevertheless I would advise the following general approaches:
|
ive been a full time web developer since 2015, i just got back from a web dev conference in SF last week
vue2 came out in 2016 and was EOL dec 31, 2023. some transition needs to happen. SSR would
but also its not even necessarily SSR, i can imagine a SSG version with all the above benefits, which would remove the need to run a server at all |
I agree that some transition needs to happen.
I think we would still need a separate server, since Audiobookshelf provides an API, which we have to keep maintaining (and which numerous clients use extensively, including the web client). It's true that the server currently also serves the nuxt bundle but I don't think it necessarily has to do that. The API serving part, though, has to remain separate IMO.
I am not sure why that would necessarily be the case (I assume you meant memory on the client). There are hydration overheads for SSR, for example. I think this depends a lot on how dynamic the app is, and ABS is very dynamic.
I might be wrong, but this doesn't seem to be directly related to SSR, but rather on the framework being used.
Again, not sure if this has to do with directly with using SSR or not. @advplyr knows much more about this than me, but there are probably various good reasons why it was hard to upgrade. Probably an important one is that Vue (and Nuxt) changed very significantly from version 2 to 3
So I'm confused - are you advocating for SSR or not? Right now the way we're using nuxt is essentially SSG. |
I agree about continuing to keep the client and server separate even if moving to SSR. In this case the API is being intentionally built to allow other clients to be made including other web clients. The Abs web client would still be served from the server alongside the API. The frontend frameworks come with a lot of dependencies and to me it is just cleaner to keep them separated. There is one issue open that I believe requires SSR to resolve or a hacky workaround. I haven't looked at this in a while so maybe it is a non-issue #1399 Then there is allowing a subfolder path. #385
Yep |
I need to read more deeply into the issues you mentioned, but at a shallow
glance, they seem kind-of tangential to the reasons I often see quoted in
various places for using SSR, e.g. improving rendering speed, or making the
app more SEO friendly.
I guess my question is, what are the main objectives of introducing SSR? If
it is to solve this or that feature request, it is a fine answer, but if
there's a more fundamental objective, I'd be more satisfied (perhaps when I
understand the issues better, I'll also understand what that objective is).
…On Tue, Oct 8, 2024, 00:27 advplyr ***@***.***> wrote:
I agree about continuing to keep the client and server separate even if
moving to SSR. In this case the API is being intentionally built to allow
other clients to be made including other web clients.
The Abs web client would still be served from the server alongside the
API. The frontend frameworks come with a lot of dependencies and to me it
is just cleaner to keep them separated.
There is one issue open that I believe requires SSR to resolve or a hacky
workaround. I haven't looked at this in a while so maybe it is a non-issue
#1399 <#1399>
Then there is allowing a subfolder path. #385
<#385>
So I'm confused - are you advocating for SSR or not? Right now the way
we're using nuxt is essentially SSG.
Yep
—
Reply to this email directly, view it on GitHub
<#3426 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFMDFVS6QBTULZCSYBJ46XDZ2L4CHAVCNFSM6AAAAABOIHKTAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJXHEZDSNZVG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Another related issue that SSR might help with is devices/browsers without good JavaScript support like tablets, but I don't know how all of the dynamic stuff would work. I could see a "consumption focused" web client that only allows for browsing and downloads, but that feels more like a 3rd party client instead of the official web client. |
below are some good explanations on render modes from nuxt3 and astro https://nuxt.com/docs/guide/concepts/rendering i dont see why there cant be a static build installable from github pages https://nuxt.com/docs/getting-started/deployment#static-hosting heres an overview of nuxt3's server structure, notice the api route https://nuxt.com/docs/guide/directory-structure/server i apologize for the confusion, SSR has gone thru a few interations in the past few years currently ABS's express server is used to serve an API, |
|
But doesn't there still needs to be a server for the API and the database with user information, media info, file paths, etc? |
not at all, that's the benefit of SSR, yeah you need network to fetch the updated bundle, audiobookshelf/client/nuxt.config.js Lines 121 to 126 in dd87268
im telling you, all yall are still living in 2018 |
It seems there's some confusion between SSR, SSG, and the need for a backend. SSR (Server-Side Rendering) involves a server that processes requests, handles logic, and accesses databases or APIs to fetch and render data. Even if we migrate to SSR, hosting the project on GitHub Pages wouldn't be possible since we still need a server to handle requests, process logic, and access the backend database or APIs. While service workers can cache files and proxy requests for offline usage, they can't fully replace a serverside API. Also, the sqlite on phones is different from the sqlite database on the backend, sometimes on the phone they have limits. All modern frameworks that support SSR (like Angular, Nuxt 3, or Next.js for example) still require a server. |
@apiweb as per my previous post
so im pretty sure any edge function ( netlify, vercel, cloudflare ) are technically ran on the worker api so yeah i think i think it could also i dont see why i can like, explore my file tree on my phone, like yeah, split off the server if i wanted to run a docker sqlite instance why wouldnt you go with something like turso they even have a docker container, if you wanna run your own and then alot of the ORM logic could be moved into the
|
and im not even saying get rid of the server all im saying is my pull here got nuxtBridge to work and i dont know how far away from nuxt3 that is, script setup and the composition api would help migrate away from vue2, so literally drag and drop composition api would really help breathe some life into these components alot of code could be deduped, |
also if you like the look of remix, i just watched this blue collar coder from earlier this year like some of the best framework authors in the world are using the vite + nitro stack or vinxi I had to patch and vendor a dependency to get it to migrate I have vite fully running for weeks now, what's the hold up |
the answer is join the discord 🤦 youtube -- Mathias Biilman | From Frameworks to Primitives | ViteConf 2024 this really speaks to exactly the architecture i have in mind |
followed the steps here
https://nuxt.com/docs/bridge/overview