I'd like to have suggestions about the structure of my web application.
What the app does:
My app receives files from about 800 scanners around my country and the users see the scanned pages into this web application, then they can organize the pages in groups, choose which one keep and which one discard, and insert some additional information to each group.
After this, another kind of user check what the first type of user has did and approve or discard each group of pages.
After that, a procedure on another server transforms each group in PDF and TIFF multi page.
After this little background to have an idea of what my web app does, this is how the files tree looks:
ajax |- ajaxaction1.php |- ajaxactionx.php cache |- xxx_xxxxxxxxxxxx.gif css |- style.min.css |- font-awesome.min.css fonts | here there are the fonts needed by font-awesome.min.css js |-functions.min.js |-main.min.js |-jquery.x.x.x.min.js |-jquery.x.x.x.min.map |-jquery.lib1.min.js |-jquery.libx.min.js views |-features.php |-features.tpl config.ini // DB configuration file index.php // the page that is used by the application init.php // read description below web.config // used to restrict access to only the right files
Folder where there are PHP scripts that are called by Ajax to perform INSERT and UPDATE queries to database.
Folder where there are temporary .gif files extracted from the scanned pages sent from the scanners to my server.
These images stay here just the time needed to process them, then them are deleted.
Here are stored the only two css files needed by my web app.
in this folder are stored all the JS files.
main.min.js is where the functions are called
Here I store the PHP and TPL files that are loaded by AJAX to show the requested pages.
The PHP files perform queries to DB and prepare a matrix, then the TPL files get the matrix and print the markup.
In this file I perform the connection to the database and initialize the $pdo session.
I also check that the user is correctly logged in (I use a single sign on provided by an external software to login users).
Here I also set some common PHP function used in the other PHP scripts.
This script is included in each PHP page.
I'd like to have reviews about how I've organized the files and folders of my application.