waps / framework
A framework for developing WebApps based on PHP and Apache
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 1
Open Issues: 10
Type:framework
Requires
- ext-dom: *
- ext-json: *
- ext-mysqli: *
- ext-readline: *
- ext-simplexml: *
- dev-master
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.8
- 1.5.7
- 1.5.6
- 1.5.5
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.0
- dev-FEATURE/tooling
- dev-snyk-fix-93f6c2dc0aca5b38d7585c894fa6ce0b
- dev-snyk-fix-f7c9b44ec89161726d382fae4c0f5a58
- dev-snyk-fix-97b356be68b6747218297bf1cb00a5c9
- dev-dev/v2.0.0/base
- dev-dev/main/unstable
This package is auto-updated.
Last update: 2025-05-05 23:26:05 UTC
README
A PHP web app framework.
It's designed to make small future projects faster and easier. This entire framework has emerged as a learning project and is being continuously developed.
Setup
Dependencies
Server
Web Server
This framework was developed on the basis of the Apache web server. Nevertheless, it is possible with slight modifications, It also operate on a NGINX web server. But in contrast to the supplied htaccess file, changes to the NGINX config necessary. Everything necessary for this is explained below.
Apache
As long as only one Apache web server is used, the project can be used without adjustments.
NGINX
For the operation of the framework under NGINX the following changes have to be made to the nginx config!
autoindex off;
error_page 500 /Error_500;
error_page 404 /Error_404;
error_page 403 /Error_403;
location ~ /?\.htaccess$ {
return 403;
}
location ~ ^/?config/config\.json$ {
return 403;
}
location ~ ^/?config/plugin\.config\.json$ {
return 403;
}
location / {
rewrite ^(.*)$ https://$http_host/$1 redirect;
if (!-e $request_filename){
rewrite ^/([\w]+)? /index.php?pagename=$1;
}
}
It replaces the corresponding part that would otherwise be set by the htaccess.
Database Server
A MySql server was used to develop the framework, but it is no problem to use MariaDB as an alternative. For other database systems, slight changes have to be made to the framework.
Packet management
NPM
To manage the CSS, JS and TS scripts, the framework uses the NODE Package Manager. To work with the framework, the instalation of the same is necessary.
After installation, first execute the command npm install
in the project folder.
That should install all needed packages.
Set up a project
To set up a project, all servers named above must be available, a web server and a database server.
At the start of the project, the corresponding access data of the database must be entered in the Config. This can be found in the path ./config/config.json
Likewise, all other important data must be entered in the config. This can also be expanded flexibly. All new entries automatically become uppercase constants.
In addition, it is possible to install extensions in the area of plugins. These can be developed separately from projects and then integrated. The path in which plugins must be inserted is ./custom/plugin/
Creating new Pages/Classes
Page
To create a new page, simply create a new file after the schema fileName_page_php in folder ./page/open/
The File Head of the new page must look like this:
1 <?php
2
3 /*
4 PageInfo:
5 Title: true;
6 */
The title tag can be used to specify whether a header should be generated automatically.
At the same time, menu entries are automatically generated from the pages in the "open" folder.
Class
To create a new class, it must be created in the ./class
folder. Classes are loaded automatically, it is not necessary to do anymore. The namespace of the classes is webapp_php_sample_class
.
Wiki
You can find more details about the framework in the -> Wiki