Skip to content
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

Server feature for server crate #64

Open
wants to merge 2 commits into
base: v0.6
Choose a base branch
from

Conversation

yawn
Copy link

@yawn yawn commented Feb 5, 2025

As discussed in Discord @ealmloff.

This shows how to include server-side specific functionality when using fullstack.

I believe it might be useful to change the name of the crate from server to something else though. It's getting even more confusing when also adding a feature with the same name.

@yawn
Copy link
Author

yawn commented Feb 5, 2025

Feel free to drop or squash the linebreaks commit. I found (the lack of) them confusing.

@yawn
Copy link
Author

yawn commented Feb 5, 2025

(deleted my previous comment)

My current thinking about a naming convention for mobile + web and fullstack that feels a bit more intuitive for me is the following:

  • api crate: just the server_fn functions
  • frontend crate
    • main entrypoint for web / mobile (e.g. for calling dioxus::fullstack::prelude::server_fn::client::set_server_url)
    • shared UI
  • backend crate
    • main entrypoint and configuration for the fullstack server-side
    • axum customizations
  • web / mobile crate
    • calls frontend or backend main, server-feature gated
    • builds the actual app out of frontend elements and customisations

All work in progress. WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant