dxps / fullstack-rust-axum-dioxus-rwa

A RealWorld app implementation as a fullstack Rust project using Axum (back-end) and Dioxus (front-end).
MIT License
78 stars 6 forks source link

Swagger documentation #25

Open JonasKs opened 3 months ago

JonasKs commented 3 months ago

Hi, great example project - thanks!

I'm not sure if the specc requires swagger/OpenAPI docs, but I think it would be a great addition in order to match what someone would expect from a production app.

dxps commented 3 months ago

Hi Jonas,

Sure. I through about it and I took a look on the options some time ago, but I couldn't fine something stable / popular. I should look again, this time most probably we have a solid choice.

JonasKs commented 3 months ago

Awesome 😊 I really enjoyed reading through this code yesterday.

This might be a dumb question, but what is the real benefit of domain+repos split? Testability? Preference/readability? Do you have any resources on this?

dxps commented 3 months ago

Thanks! Glad that it helps. :blush:

There is no dumb question. I generally apply various architectural design principles (even if this might sound that is more of a detailed design choice), and in this case I'm influenced and enjoy using Domain Driven Design (DDD) and Clean Architecture principles.

The main idea is to try to have the domain model and business rules designed as clean (and technology/frameworks agnostic) as possible, without technical noise/elements of layers such as REST/HTTP API or persistence in it.

For DDD there are many resources on the wild, I can't recommend a particular one at the moment. Regarding Clean Architecure, a nice, short and to the point material is this book.


Besides all this, I am planning to review and improve this project, and write a book and/or video course on how to think, design, and implement from scratch such project. Enough procrastination, I'm telling to myself ... :yum:

JonasKs commented 3 months ago

Thank you! I really liked it, it all made a lot of sense to read. I'll implement the same splits in my hobby project this weekend, and check out that book!

write a book and/or video course

I'd love to read/watch. Let me know when you found the time!
A quick google for a book about these concepts in rust yielded no results, only people asking for them😉

dxps commented 3 months ago

Thanks, Jonas! :relaxed:

I just started playing with Dioxus v0.5 and the first impressions are pretty positive, the overall developer experience has increased. Therefore, I am starting the planning for writing the book.

JonasKs commented 3 months ago

Cool! Was just about to give Dioxus and attempt after reading about the release on HN.

Good luck with the writing, let me know when it's available or if you'd like a beta-tester. ☺️

dxps commented 3 months ago

Thanks! Sure, I'll let you know and you could be the one and only beta-tester! :muscle: :blush: