Skip to content

susilon/BantinganWeb

Repository files navigation

BantinganWeb

Bantingan MVC Framework Web Starter

First Time Setup

Run composer update to download required library

Requirements

This framework need url rewriting to works by route all request into index.php, except for static files.
For Apache web servers we included .htaccess file, please make sure to enable rewrite in web servers.
For another web servers, please create rule to route all incoming request into index.php, and make exception for static files.

PHP Extensions

Required following PHP extension : mcrypt gd intl pdo pdo_mysql opcache zip

Configuration

Open config/web.config.yml, to configure basic application settings.
Open config/route.config.yml, to configure routing and path settings.
Open config/database.config.yml, to configure database connection.
or set value in Environment Variable (see Environment Variabel example below)

Database

For demo purpose, please setup two database.
Just create new empty database for application, then set in default database settings.
For usermanagement demo, create new empty database for usermanagement, then run initial script that we provided in sample_usermanagement_database.sql file to create user table, set this database in usermanagement database settings.

Sessions in Database

For load balancing scenario, you can enable sessions in database by set Session_DB settings to true in web.config.yml.
you can also change the session table name at Session_DB_Tablename settings.

Docker Image

We provided Dockerfile, for Docker image building.
docker build -t image-tag-name .
example :
docker build -t susilon/bantingan3-app .

Sample docker-compose also available.

Environment Variable Example

Example of change config file value with environment variable and JSON string value :
Change only SiteTitle and DefaultController in application_settings :
Environment Variable Key : BANTINGAN3_APPLICATION_SETTINGS
Value : { "SiteTitle":"Bantingan Docker","DefaultController":"Home"}

Example of database_settings :
Environment Variable Key : BANTINGAN3_DATABASE_SETTINGS
Value : {"default":{"server":"db","user":"root","password":"root","database":"maindb"},"usermanagement":
{"type":"mysql","server":"db","user":"root","password":"root","database":"memberdb"}}

Credits

HTML template : https://github.com/flatlogic/sing-app
Routing : https://github.com/symfony/routing
YAML parser : https://github.com/symfony/yaml
Page templating : https://github.com/smarty-php/smarty
ORM : https://github.com/RedBeanPHP
PDF generator : https://github.com/dompdf/dompdf
Spreadsheet : https://github.com/PHPOffice/PhpSpreadsheet
Mailer : https://github.com/PHPMailer/PHPMailer
Captcha : https://github.com/Gregwar/Captcha
Datatables : https://github.com/DataTables/DataTables

TODO :
Documentation.
Sample of Model files.

About

Example Projects Using Bantingan Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published