billyrigdon / TheWord

Flutter Bible Reader with a Generative AI assistant and social features
GNU General Public License v3.0
1 stars 1 forks source link

Split up backend code #25

Open billyrigdon opened 1 month ago

billyrigdon commented 1 month ago

main.go is just one big file with little to no organization and needs to be split up so it can be maintainable as we add to it. Directory structure should be something like:

Controllers/ Models/ Auth/ main.go

I'm leaving the routes inside main.go since it's a small amount of code. They should be organized better though

Amitkumarkoli commented 1 month ago

hey! can u explain more on this what u exactly want . can I change ur structure like this - project/ ├── backend/ │ ├── Auth/ │ │ └── auth.go │ ├── Controllers/ │ │ ├── user_controller.go │ │ └── other_controller.go │ ├── Models/ │ │ ├── user.go │ │ └── other_model.go │ ├── go.mod │ ├── go.sum │ ├── docker-compose.yml │ ├── Dockerfile │ ├── .dockerignore │ └── main.go └── frontend/ ├── lib/ │ ├── main.dart │ ├── models/ │ ├── providers/ │ ├── screens/ │ ├── services/ │ └── shared/widgets/ └── ...

please tell me I want to submit pr on this.

billyrigdon commented 1 month ago

That backend structure is exactly what I'm looking for. I'm going to be doing some more organizing of the frontend so leave that directory to me, but that's perfect for the backend.