Sample is a template project for fast, simple, easy creating a web-site-app based on MVC Design Pattern & RESTful API
Under the MIT license
- Server / Client
- RESTful API (Protected by JWT Authentication - Bearer Schema)
- JSON Web Token - (User-defined RSA private/public key file)
- MVC Design Pattern
- PHP, HTML, JS, CSS, MySQL
- Flight micro-framework, jQuery, Bootstrap, Font Awesome, Swagger UI, Bootstrap Validator
- Based on one template page that meaning only design page content
- Signing Up/In/Out via social network (GitHub, Google, Facebook -
required HTTPS
)
- Sign In / Sign Out to access protected APIs
- Protected User APIs - Create/Get/Update/Delete
- Test User APIs via Swagger UI
PHP 5.6 or greater
- Make sure
Apache
&MySQL
service is running on your machine - Clone the project to
localhost
directory as a root-level/
- Import the database file at
/database.sql
to yourMySQL
- Disable/Enable or define social network integration information at
/socials/defines.php
(opt - disabled as default) - Okay. Take a look the home page at localhost, the demo page at localhost/demo, the basic account for testing is
test:123
or you can using your social network account
Note:
To change the base path
/
to another such as a sub-level eg./example
we have to make the following changes:
- Open the
commons/defines.php
file and update the variable$SUB_PATH
to/example
- Open the
demo.swagger.yaml
file and update the variablebasePath
to/example
- Open the
frontend\Sample.bsdesign
project and go toExport > Export Settings
then updateExport Destination
andExport Script
to the correspond path
The demo files are started with the prefix
demo.*
and these are deletable eg.demo.content.php, demo.swagger.js, etc