Understanding the Scriptcase folder structure

Editor Mestre Scriptcase
Scriptcase Master
Published in
7 min readJul 30, 2020

As a Scriptcase user, you must be well aware of the barriers that torments your daily life. Unexplained bugs, lack of documentation, inefficient support and countless other setbacks insist on making things more difficult. However, throughout our journey, we found a way to “protect” ourselves in this scenario and transform chaos into absolute success.

The Story

One day, in 2012, our team of Masters in Scriptcase was involved in the production of a software that would control the delivery of exam results in a clinic. We were in the last week to finalize that system and the deadline was approaching. Then we faced a problem that would make the system unviable: not all of our grid applications were exporting PDF files.

We searched through the Scriptcase knowledge base and documentation with no results. We tried the support. We got only generic responses, which did not help us at that moment. We asked in forums and groups with other customers, but no one had faced that issue before.

The Turning Point

We realized that we were alone in this situation. It was the moment that, after spending the night trying to find out, almost intuitively, we found the directory where a SC library ran the command to generate PDF files. With that, we were able to find out what was missing. We fixed the issue and delivered the system without any major problems. Phew!

So, from that moment we decided to map the entire Scriptcase. And that was what we did. After two weeks and three days of studying each directory and its purpose, we developed a doc that would become our guide throughout the development process with Scriptcase.

In this article we will give you a complete guide to understand the folder structure of Scriptcase. We hope you enjoy it, just as we did.

The Guide

After a clean installation of Scriptcase, you should have a directory with this structure:

app/

It stores everything generated by the project, from the source code of the applications to libraries, themes, langs and other assets. This directory is only for a preview of what is being developed, it’s not for backups or for production purposes.

This folder’s structure is defined as:

<project name>: Source code of applications.
<project name>/_lib/buttons: buttons theme
<project name>/_lib/chart: Themes of the chart
<project name>/_lib/css: Themes of the applications
<project name>/_lib/font: Fonts of Report PDF and Captcha.
<project name>/_lib/friendly_url: applications’ friendly URLs
<project name>/_lib/googlefonts: Google Fonts for themes.
<project name>/_lib/img: Applications’ images.

Within the <project name>/_lib/img directory we have the following file structure:

img/grp__NM__bg__NM__*: Project background images
img/grp__NM__btn__NM__*: Projects’ buttons images.
img/grp__NM__ico__NM__*: Project icons.
img/grp__NM__img__NM__*: Project General images.
img/grp__NM__menu_img__NM__*: Project’s menu Images.
img/grp__NM__helpcase__NM__*: Project Helpcase images.
img/scriptcase__NM__bg__NM__*: Scriptcase’s Background images.
img/scriptcase__NM__btn__NM__*: Scriptcase’s Button images.
img/scriptcase__NM__ico__NM__*: Scriptcase Icons.
img/scriptcase__NM__img__NM__*: Scriptcase General images
img/scriptcase__NM__menu_img__NM__*: Scriptcase’s menu Images.
img/sys__NM__bg__NM__*: Public Background images.
img/sys__NM__btn__NM__*: Public Button images.
img/sys__NM__ico__NM__*: Public Icons.
img/sys__NM__img__NM__*: Public General images.
img/sys__menu_img__NM__*: Public menu images.
img/usr__NM__bg__NM__*: User background images.
img/usr__NM__btn__NM__*: User button images.
img/usr__NM__ico__NM__*: User icons.
img/usr__NM__img__NM__*: User General images.
img/usr__NM__menu_img__NM__*: User menu images.

Back to <project name>/_libdirectory we have this structure:

js: Javascript messages for notifications.
lang: Application messages.
lib: Scriptcase Assets.
libraries: External project libraries.

In <project name>/_lib/libraries we will see the following:

grp: Project level.
scriptcase: Scriptcase level.
sys: Public level.
usr: User level.

Going back to <project name>/_lib, this is the structure:

menuicons: Menu icons.
oauth: Google Calendar key.
profile_api.conf.php: Project APIs.

backup/

Stores all exports that have been imported into Scriptcase, from projects to general backup. In this directory we find backup/scriptcase that is used to create copies of the Scriptcase database. This procedure is only applied for standard installations made on SQLite.

devel/

Stores all files used by Scriptcase for the development of projects. It also consists of storing all assets saved at the level of Scriptcase, project, user and public.

The structure of this folder is defined as:

[SCRIPTCASE]

devel/conf/scriptcase/nm_scriptcase.db: Scriptcase’s SQLite database when installed by default.

devel/conf/scriptcase/scriptcase.config.php: Scriptcase administrative settings.

devel/conf/scriptcase/fix.php: Fixes executed by Scriptcase.

Note: Fixes are Scriptcase scripts executed after certain updates, in order to update old applications with new features.

devel/conf/scriptcase/api: Scriptcase API profiles.
devel/conf/scriptcase/chart: Theme profiles for Scriptcase graphics.
devel/conf/scriptcase/css: Scriptcase’s CSS and Fonts.
devel/conf/scriptcase/googlefonts: Scriptcase’s Google Fonts.
devel/conf/scriptcase/hotkeys: Scriptcase hotkey profiles.
devel/conf/scriptcase/img: Images from Scriptcase.
img/bg: Scriptcase background images.
img/btn: Scriptcase buttons CSS.
img/ico: Scriptcase icons.
img/img: General images of Scriptcase.
devel/conf/scriptcase/lib: Scriptcase internal libraries.
devel/conf/scriptcase/libraries: External Scriptcase libraries.
devel/conf/scriptcase/lookup_def: Scriptcase manual lookup profiles.
devel/conf/scriptcase/menu: Scriptcase menu themes.
devel/conf/scriptcase/precodes: Inserts Code of Scriptcase events.
devel/conf/scriptcase/schema: Themes of Scriptcase projects.
devel/conf/scriptcase/schemas: Old graphics, HTML editors and Scriptcase menu icons.
schemas/charts: Old Scriptcase chart themes.
schemas/editor_html: Scriptcase HTML editor profiles.
schemas/menu: Scriptcase menu icon themes. devel/conf/scriptcase/snippets: Scriptcase snippet profiles.
devel/conf/scriptcase/tpl: Scriptcase HTML templates.
tpl/header: Scriptcase HTML header templates.
tpl/footer: Scriptcase HTML footer templates.
tpl/free: Scriptcase free format HTML templates.
tpl/helpcase: HTML templates of Scriptcase Helpcase headers.
devel/conf/scriptcase/securitymodule: Scriptcase security module profiles.

[PROJECT]

devel/conf/grp/<nome do projeto>/api: API profiles for the project.
devel/conf/grp/<nome do projeto>/chart: Theme profiles for project graphics.
devel/conf/grp/<nome do projeto>/googlefonts: Google Fonts for the project.
devel/conf/grp/<nome do projeto>/hotkeys: Project hotkey profiles.
devel/conf/grp/<nome do projeto>/img: Project images.
img/bg: Background images of the project.
img/btn: CSS for project buttons.
img/ico: Project icons.
img/img: General images of the project.
devel/conf/grp/<project name>/lib: Internal project libraries.
devel/conf/grp/<project name>/libraries: External project libraries.
devel/conf/grp/<project name>/lookup_def: Manual lookup profiles for the project.
devel/conf/grp/<project name>/menu: Project menu themes.
devel/conf/grp/<project name>/schema: Themes of the project projects.
devel/conf/grp/<project name>/schemas: Old graphics, HTML editors and project menu icons.
schemas/charts: Themes of old project charts.
schemas/editor_html: HTML editor profiles for the project.
schemas/menu: Project menu icon themes.
devel/conf/grp/<project name>/snippets: Snippet profiles for the project.
devel/conf/grp/<project name>/tpl: HTML templates of the project.
tpl/header: HTML templates for the project header.
tpl/footer: HTML footer templates for the project.
tpl/free: HTML templates of the project’s free formats.
tpl/helpcase: HTML templates of project Helpcase headers.
devel/conf/grp/<project name>/securitymodule: Project security module profiles.

[PUBLIC]

devel/conf/sys/api: Profiles of public APIs.
devel/conf/sys/chart: Theme profiles for public charts.
devel/conf/sys/googlefonts: Public Google Fonts.
devel/conf/sys/hotkeys: Public hotkey profiles.
devel/conf/sys/img: Public images.
img/bg: Public background images.
img/btn: CSS for public buttons.
img/ico: Public icons.
img/img: General public images.
devel/conf/sys/lib: Public internal libraries.
devel/conf/sys/libraries: Public external libraries.
devel/conf/sys/lookup_def: Public manual lookup profiles.
devel/conf/sys/menu: Public menu themes.
devel/conf/sys/schema: Themes of public projects.
devel/conf/sys/schemas: old graphics, HTML editors and public menu icons.
schemas/charts: Old public graphics themes.
schemas/editor_html: Profiles of public HTML editors.
schemas/menu: Public menu icon themes.
devel/conf/sys/snippets: Public snippet profiles.
devel/conf/sys/tpl: Public HTML templates.
tpl/header: Public HTML header templates.
tpl/footer: Public HTML footer templates.
tpl/free: HTML templates of public free formats.
devel/conf/sys/securitymodule: Public security module profiles.

[USER]

devel/conf/usr/<project name>/api: User API profiles.
devel/conf/usr/<project name>/chart: Theme profiles for user graphics.
devel/conf/usr/<project name>/googlefonts: Google Fonts for the user.
devel/conf/usr/<project name>/hotkeys: User hotkey profiles.
devel/conf/usr/<project name>/img: User images.
img/bg: User background images.
img/btn: CSS for user buttons.
img/ico: User icons.
img/img: General images of the user.
devel/conf/usr/<user name>/lib: Internal user libraries.
devel/conf/usr/<user name>/libraries: External user libraries.
devel/conf/usr/<user name>/lookup_def: User manual lookup profiles.
devel/conf/usr/<user name>/menu: User menu themes.
devel/conf/usr/<user name>/schema: Themes of user projects.
devel/conf/usr/<user name>/schemas: Old graphics, HTML Editors and User menu icons.
schemas/charts: Old user graphics themes.
schemas/editor_html: User HTML editor profiles.
schemas/menu: User menu icon themes.
devel/conf/usr/<user name>/snippets: User snippet profiles.
devel/conf/usr/<user name>/tpl: HTML templates of the user.
tpl/header: HTML user header templates.
tpl/footer: HTML user footer templates.
tpl/free: HTML templates of free user formats.
devel/conf/usr/<user name>/securitymodule: User security module profiles.

doc/

Stores Scriptcase documentation.

examples/

Stores all Scriptcase sample projects together with its CREATEs TABLE for SQLite and MySQL.

file/

Stores files imported by the Document (File Name) and Image (File Name) fields. This directory is for development tests only. For advanced deploy, it is recommended that the paths defined for production be applied during deploying. For typical deploy, the paths are in _lib/file.

log/

Stores the logs generated by Scriptcase. For exceptions in the folders below, the log is generated in scriptcase/tmp.

The structure of this folder is defined as:

log/iface: User actions in Scriptcase.
log/upd: Automatic updates
log/fix.log: Fixes executed after updating.

prod/

Stores production environment. Used to connect for what is generated in scriptcase/app and generate a production environment during project deploying.

The structure of this folder is defined as:

prod/cep: Files for searching CEP type fields.

Note: Only available in pt_br installation.

prod/third: Third party libraries used by the generated applications.

tmp/

Stores temporary files created during the use. The files can be anything from errors in the interface to data exported in the generated applications.

config_.php: Scriptcase database access settings. For standard installations the database is SQLite and is located in scriptcase/devel/conf/scriptcase/nm_scriptcase.db

Note: For security reasons, you need to rename this file to config.php to access it through the browser.

diagnosis.php: Diagnosis of the Scriptcase environment containing general server information, from PHP parameters to databases available for connection.

info.php: General PHP information used by the diagnosis.

If you found this article useful, go to the 👏 button and click how many times you enjoyed reading this post. This will certainly go a long way. Feel free to leave a comment/suggestion. You can also find us on Facebook, Instagram and Youtube. Together for a better Scriptcase!

--

--