Reorganisation of files to enable easier update #33

Open
opened 2025-08-11 06:46:46 +00:00 by julienbidoret · 1 comment
julienbidoret commented 2025-08-11 06:46:46 +00:00 (Migrated from gitlab.com)

I’m wondering if there would be any way to organise the directories / package the app so that further improvements would be easier to deploy; allowing easier updates.

A structure like this one would allow for a simple replacement of the stolon sub-directory (in most cases… since both .htaccess and index.php are subject to modifications…)

stolonroot                # Root 
├── .htaccess             # Apache
├── index.php             # Main 
├── config.json           # Config file
├── stems/                # Stem data
├── templates/            # Templates
├── download/             # Downloadable zips
└── stolon/               # PHP backend files
    ├── assets            # Assets
    │   ├── css/          # Stylesheets
    │   ├── js/           # JavaScript 
    │   ├── img/          # Images
    │   └── font/         # Fonts
    ├── logs/             # Logs
    ├── functions.php     # Core functions (mainly auth)
    ├── write.php         # Stem writing
    ├── list.php          # Gallery
    ├── screenshot.php    # Screenshots
    ├── install.php       # Installation
    ├── json_fixer.php    # Batch update stems…
    ├── remove.php        # Stem removal
    └── download.php      # Download handling

Another idea would be:

stolonroot                # Root 
├── .htaccess             # Apache
├── index.php             # Main 
├── config.json           # Config file
├── storage               # User storage
│   ├── stems/            # Stem data
│   ├── templates/        # Templates
│   └── download/         # Downloadable zips
└── stolon/               # PHP backend files
    ├── assets            # Assets
    │   ├── css/          # Stylesheets
    │   ├── js/           # JavaScript 
    │   ├── img/          # Images
    │   └── font/         # Fonts
    ├── logs/             # Logs
    ├── functions.php     # Core functions (mainly auth)
    ├── write.php         # Stem writing
    ├── list.php          # Gallery
    ├── screenshot.php    # Screenshots
    ├── install.php       # Installation
    ├── json_fixer.php    # Batch update stems…
    ├── remove.php        # Stem removal
    └── download.php      # Download handling

This last one requires a bit more .htaccess rewriting, but is doable.

Naming things: stolon for the functional directory (better than app?). But I default to storage, lacking a proper metaphor :)

I’m wondering if there would be any way to organise the directories / package the app so that further improvements would be easier to deploy; allowing easier updates. A structure like this one would allow for a simple replacement of the `stolon` sub-directory (in most cases… since both `.htaccess` and `index.php` are subject to modifications…) ```md stolonroot # Root ├── .htaccess # Apache ├── index.php # Main ├── config.json # Config file ├── stems/ # Stem data ├── templates/ # Templates ├── download/ # Downloadable zips └── stolon/ # PHP backend files ├── assets # Assets │ ├── css/ # Stylesheets │ ├── js/ # JavaScript │ ├── img/ # Images │ └── font/ # Fonts ├── logs/ # Logs ├── functions.php # Core functions (mainly auth) ├── write.php # Stem writing ├── list.php # Gallery ├── screenshot.php # Screenshots ├── install.php # Installation ├── json_fixer.php # Batch update stems… ├── remove.php # Stem removal └── download.php # Download handling ``` Another idea would be: ```md stolonroot # Root ├── .htaccess # Apache ├── index.php # Main ├── config.json # Config file ├── storage # User storage │ ├── stems/ # Stem data │ ├── templates/ # Templates │ └── download/ # Downloadable zips └── stolon/ # PHP backend files ├── assets # Assets │ ├── css/ # Stylesheets │ ├── js/ # JavaScript │ ├── img/ # Images │ └── font/ # Fonts ├── logs/ # Logs ├── functions.php # Core functions (mainly auth) ├── write.php # Stem writing ├── list.php # Gallery ├── screenshot.php # Screenshots ├── install.php # Installation ├── json_fixer.php # Batch update stems… ├── remove.php # Stem removal └── download.php # Download handling ``` This last one requires a bit more `.htaccess` rewriting, but is doable. Naming things: `stolon` for the functional directory (better than `app`?). But I default to `storage`, lacking a proper metaphor :)
raphaelbastide commented 2025-08-11 16:26:14 +00:00 (Migrated from gitlab.com)

I like the second tree structure as it leave the root clean. However, it doesn’t expose stems/ as directly as the first one, and maybe I also like that. I wonder at first sight if config.json can’t also go to this storage/ folder. Regarding metaphors, I don’t think metaphors for everything is needed, I like storage, as it is pretty straight-forwards.

I generally like the idea to reorganize the file structure. It makes sense as the project evolves.
What are your thoughts?

I like the second tree structure as it leave the root clean. However, it doesn’t expose `stems/` as directly as the first one, and maybe I also like that. I wonder at first sight if `config.json` can’t also go to this `storage/` folder. Regarding metaphors, I don’t think metaphors for everything is needed, I like `storage`, as it is pretty straight-forwards. I generally like the idea to reorganize the file structure. It makes sense as the project evolves. What are your thoughts?
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tarball/stolon#33
No description provided.