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

Simplify Top Level directory structure #3

Open
thomasfr opened this issue May 6, 2024 · 2 comments
Open

Simplify Top Level directory structure #3

thomasfr opened this issue May 6, 2024 · 2 comments

Comments

@thomasfr
Copy link
Contributor

thomasfr commented May 6, 2024

To my personal taste, there are too many different top-level directories. I suggest to simplify it:

app/.server --> I know that this is a remix/vite feature, but i dont like it. On *nix systems, files, folders starting with a dot means hidden since forever and its until now and are hidden by default. I dont think server logic should be in a hidden folder. Instead i would rather promote the usage of `filename.server.ts` and leave it to the stack user to use this folder or not. 

rdt-plugins --> other/rdt-plugins
remix/config.ts --> remix-routes.ts
resources/locales --> app/localization/locales
scripts/cleanup.ts --> move logic to cli
scripts/icon.ts --> already moved to separate package
scripts/{loader.js|setup.ts} --> not sure about them tbh. I dont like that this requires many nested calls and explicitly uses `node` and `npm`. Maybe we can find a less intrusive or opinionated way which allows the stack user to also use other package manager and/or javascript runtimes. Maybe move the logic to its own package and use it as a Shebang instead?
resources/icons --> ?? maybe app/resources/icons?? I would like to have every asset needed for the application contained in `app`

Also for me the terms lib, library, utils, resources are almost interchangeable and too generic to help in organizing files, even more so when they are used at the same time on the same directory level. So i suggest to either make the naming more clear and/or reduce the amount of folders and merge them.

This issue is just a discussion starter!

@AlemTuzlak
Copy link
Contributor

I removed rdt-plugins
I would do config/remix-routes.ts instead of a root level file tbh, we can move resources inside of the app I guess. I wonder if that would help Vite properly reload them. icons script I removed but I'm not sure about cleanup though, it shouldn't require you to have our cli for users to cleanup the crap they don't need
loader and setup are required in order to run esm scripts with alias imports and some advanced features. I don't think this can be easily done otherwise, maybe if it was extracted into a separate package it could work but not sure.
library = component library
resources = icons, fonts, translations etc.
utils = generic functions

@AlemTuzlak
Copy link
Contributor

Removed .server folder nad remix one as well and the loader stuff

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

No branches or pull requests

2 participants