Loading...

Welcome to SwiftDashPHP

SwiftDashPHP is a modern, open-source PHP framework for quickly building powerful applications.

No Magic - Pure PHP behind and pure JS for front parts

Makes it easy to start with built-in features such as:

  • Authentication for local, Google, MS (live and Azure)
  • Support for MySQL/MariaDB/SQlite/Postgres
  • TailwindCSS
  • DataGrid with powerful features
  • Charts (via Chart.js and QuickChart.io)
  • Markdown rendering
  • Forms
  • API
  • Admin Panel
  • HTML Components
  • User Settings
  • Easy containerization with Docker
  • Dark Mode
  • Localisation
  • SendGrid mailsender

Authentication for local, Google, MS (live and Azure)

SwiftDashPHP comes with built-in authentication system that is easy to use and customize. Check it out on our Docs section. We also have some security features such as a Firewall that stops IPs from accessing parts we want to protect. Also parts that we want to keep public.


Support for MySQL/MariaDB/SQlite/Postgres

SwiftDashPHP supports MySQL, MariaDB, SQLite and Postgres. You can easily switch between them by changing the .env file. The database connection is handled by PDO, with very little magic in between and taking advantage of the agnostic nature of PDO. There is no ORM so you write your own queries.


TailwindCSS

SwiftDashPHP uses TailwindCSS for styling. The framework uses a global $theme variable which can be switched easily and is using the tailwind native colors such as sky, cyan, emerald, teal, blue, indigo, violet, purple, fuchsia, green, pink, red, rose, orange, yellow, amber, lime, gray, slate, stone. Also each user has its own styling based on the same colors. There is also a global theming for the light and dark mode which is based on the some constants in the config file. And finally the dark/light switch is based on the dark class mode in TailwindCSS. All comes ready with a swticher, default system theming, chart theming and very little for you to care about.


DataGrid with powerful features

SwiftDashPHP comes with a powerful DataGrid component (based on Datatables) that allows you to display data in a table with features such as sorting, filtering, pagination, and more. Can display PHP Arrays, DB queries, whole DB tables and provides CRUD for those. More on DataGrid


Charts (via Chart.js and QuickChart.io)

Chart.js and Quickchart.io ready to use chart functions for the most popular chart types. Also easily autoload JS charts only with PHP code with the autoloading mechanism. See more the example Charts


Markdown rendering

With the power of Parsedown (which sadly as of now is not up to date for PHP 8.4) and some custom classes we have here, you can render locally stored or remotely stored Markdown files automatically styled with Tailwind. Check out the Docs section. Here let's render some MD below.

This is a Markdown Page

Here is a markdown page example

If you want to add copy to clipboard functionality to your markdown, for example for code blocks, go to vendor/erusev/Parsedown.php and find $class = 'language-'.$language line 446 and replace it with this line php $class = 'language-'.$language . ' c0py';. You can repeat for other tags too.

Available vars

  • $loginInfo - an Array holding the values of $usernameArray, $isAdmin, $loggedIn, $theme in their respective keys. I.e $loginInfo['usernameArray'].


Forms

This is a big one. All (or almost all) of the buttons that do something on the framework are actually Form Components. Forms component takes out the big headache of creating the form and the submission hurdles of it. Easily do modals too. Built-in CSRF protecton too. Check out the Forms section


API

Since it's a PHP, we know doing API endpoints is not hard. The framework helps a bit with some Response classes and some API checks and few other tools like JWT capabilities and API keys.


Admin Panel

We have an Admin panel which is basic but cool and expandable.


HTML Components

We have an Html component which has static html methods providing html elements. DataGrid and Forms components are using it, as well as normal html output, for a standardized output everwhere.


User Settings

Comes with a user settigns page as well, built-in with some features.


Easy containerization with Docker

Tested to run in a container with ready to use Dockerfile that can get the app running on major cloud platforms in few clicks.


Dark Mode

Bult-in Dark/Light mode.


Localisation

Paved the way for localisation. Foundation is there, you just need to expand it. With a working language switcher


SendGrid mailsender

API endpoint for sending mails and a tinymce endpoint for sending manually.


Current Issues

DataGrid

filters not activating in javascript autoload sometimes
in Javascript, filters do not get red border
DataGrid filters not working when special characters are in the cell body

Docs

Docs need to be updated for the new features