DioxusLabs / DioxusLabs/dioxus
Multisite Routing for Fullstack
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
## Specific Demand
Many sites these days consist of the following:
- Landing site
- Dashboard
- Docs
At least this is the case where SaaS, E-commerce and Corporate sites are concerned, often components are shared across these sites to provide users with a consistent experience. Another scenario is providing a slightly different experience based on regions, the use cases are endless and really dependent on the business problem at hand.
Instead of using a monorepo to have multiple Dioxus projects which results in repetitions of configuration (multiple `Dioxus.toml`, `tailwind.config.ts` etc.) it would be great if it was possible to extend the router to allow for multiple domains and split routing based on the requested domain.
Related:
- #922
## Implement Suggestion
Where file based routing is concerned, not sure if there is an on going specification yet but it would be great if we had the following:
Folder structure for file based routing (if necessary)
``` MD
/
pages/
[*]/ // all sites
landing/ // landing site
docs/ // docs
```
`Dioxus.toml`
```toml
[web.app]
[[sites]]
name = 'landing'
path = 'example.com'
dir = 'landing'
[[sites]]
name = 'docs'
path = 'docs.example.com'
dir = 'docs'
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.