Wizard's Toolkit

code that writes code

Under 10 Employees
Founders Code
Solo Founder
Analytics
B2B
Programming
Utilities

I've been enhancing this code library since 2009. Now refining it to take it commercial so other programmers can benefit from this library. This is the ultimate library for building hybrid apps and responsive websites.

March 11, 2024 WTK on Public GIT repository

Wizard's Toolkit now has a GIT repository on BitBucket. This low-code development library has been the foundational code for several companies since 2009. The companies ranged from startups to $17M annually.

Now with both a Docker offering and GIT repository, anyone can get started with this low-code library in minutes. WTK has a much lower learning curve than Laravel.

Includes

  • Database tables to track users, errors, update logs, user history, emails sent, etc.
  • Report generator for SQL developers
  • Registration process
  • Forgot Password feature
  • Code builder - code that writes code
  • CSS Maker - to customize your UI
  • Initial framework for navigation

Access on GIT
https://bitbucket.org/AlecSherman/wizards-toolkit/

Access on Docker
https://hub.docker.com/r/proglabs/wizards-toolkit/

March 10, 2024 Docker How-To Video

I created a video for the Docker pull and setup for Wizard's Toolkit. I timed it and it only takes 2 minutes to download and have everything running in Docker. I used a "container within an image" trick.

Everything is detailed in this video at:
https://youtu.be/3myhUcsz9w8

Docker container includes:

  • Nginx:1.22.0-alpine
  • MySQL 8.3
  • PHP 8.1-FPM
  • phpMyAdmin
  • Wizard's Toolkit low-code development library
March 6, 2024 Docker and Wizard's Toolkit

Wizard's Toolkit is now available on Docker. One of our clients have found using Docker with Wizard's Toolkit is the ideal combination for development and then deployment on AWS. These Docker containers auto-scale quickly and easily for their three separate data-driven websites with a MySQL serverless database managing a multinational business generating over $5 million annually.

Wizard's Toolkit has created a Docker setup so now any developer can run a few scripts in Terminal and have a Docker container running Nginx, MySQL 8.3, php 8.1 with phpMyAdmin. This includes a relational database with preloaded lookup data so you have a fully working user management website ready for modification for your client's needs.

This allows you to test out Wizard's Toolkit running on your local development environment. See how easy and intuitive it is. Deploying to a production web server does require a small subscription fee.

Report Wizard, Widgets, responsive design, multiple security levels, and data-driven menus are all included. Change the SQL to whatever version of MySQL or PostgreSQL works best for you. PDO is used for data connectivity.

Check it out at:
https://hub.docker.com/r/proglabs/wizards-toolkit

February 26, 2024 Free CSS Maker Utility

Here is a free utility so you can quickly modify existing color themes and easily create brand new color themes using CSS.

I recently paid a CSS guru to upgrade the Wizard's Toolkit CSS library to make it look even better and more modern. Then I integrated those changes into both the core Wizard's Toolkit library and this CSS Maker. All the new files are available for download.

Originally built for Wizards Toolkit and MaterializeCSS, this can easily be modified for any HTML/CSS library. If you are using MaterializeCSS this is the ideal way to test and perfect your CSS files to make sure they will look good for all aspects of your pages. If you are using Bootstrap or some other HTML framework, it would only take you a couple hours to modify this to work specifically for your environment.

With the use of JScolor and some fancy JavaScript you can see your color choices change the page in real-time. The HTML page is built to show all the major elements we use of MaterializeCSS.

https://youtu.be/6HikuWO6ZuE

The basic concept is your library will have a core CSS file. For us that’s materialize.css. Using variables with Cascading Style Sheets is extremely powerful. We want to override their default colors in a way that affects all the many HTML elements.

So we created a wtkGlobal.css file with the global overrides. We wanted both a Light theme and a Dark theme option so we also created a wtkLight.css and wtkDark.css.

Next we wanted to overlay different color themes. So we created wtk{SomeColorName}.css files which are nothing but a set of CSS variables. By listing them in this order in your HTML it properly sets up everything.

  • materialize.min.css (or whatever CSS framework you are using)
  • wtk{YourColor}.css
  • wtkLight.css or wtkDark.css
  • wtkGlobal.css

This utility allows you to pick any of the CSS files in the folder and see how the page will look. This requires the CSS file to start with 'wtk' and excludes our wtkLight, wtkDark and wtkGlobal files. You can then modify each of the main color types and see immediately what the effect is in both Light and Dark mode. Once you have designed a color theme you like you can save it.

I also created a page on the web where you can build color themes and have the CSS shown in a browser tab for you to "Save As". The below link provides you access to this page plus all the source code and all our WTK CSS files.

For full usage this utility requires PHP (but to use the online website does not). With that you’ll be able to easily modify it for other HTML/CSS libraries like Bootstrap or whatever you’re using. Of course any good coder can easily modify this code to work with other languages and still benefit from the JScolor and JavaScript coding for testing and making new CSS color templates.

Download the free utility at:
https://wizardstoolkit.com/css-maker/

That page will also send you a link where you can generate CSS color themes without needing PHP.

MaterializeCSS
https://materializecss.com

JScolor
https://jscolor.com

February 12, 2024 DevOps Tools

Over the last year I've been working with two clients building DevOps tools using the Wizard's Toolkit. I've included them now as part of the Dev Utils.

Config-DB
This helps get the configuration of database connection correct. This was needed because one of my clients was using GCP (Google Cloud Platform) and the other was using AWS. Both require non-standard SQL connections.

Email Configuration and testing.
This works with AWS emailing, PostmarkApp, and other email methods.

SMS configuration and testing with Twilio. Once configuration is finished sending SMS is a one-line call.

Mass File Transfers
AWS S3 is significantly more expensive than Cloudflare's R2. This utility provides an easy method of migrating files from AWS to Cloudflare.

Stress Test
A page that let's you set how many SQL calls and web page openings you want per second. For the SQL it allows testing INSERTs, UPDATEs, DELETEs and SELECTs. We used this to make sure the website could handle mass traffic and our AWS Kubernetes would properly spawn additional servers as-needed.

Now all of these DevOps tools are available free as part of the Wizard's Toolkit development library.

May 20, 2023 File Uploads

File Storage

Almost all websites need to allow uploading files and tracking them. Sometimes you want to associate an image with a specific data row like a user image associated with user. Other times you may want to allow uploading multiple documents and/or images associated with a parent row of data.

Public versus Secure/Private

Some images uploaded need to be public so they can be used in lists. For example avatars or images associated with users will most likely need to be public so when showing users a list of all users they can see the images associated with everyone.

Other images or files need to be private or secure. For example if your website requires people to upload their driver's license you would not want that to be available to the public.

File Uploads

The Wizard's Toolkit library has a PHP function that works in conjunction with our JS function to make uploading a file easy. The /demo folder has several example files showing exactly how this is done. The PHP code requires pulling the data from the SQL table.

SQL Data

Storing images and documents as blobs in a SQL database is a horrible idea! This makes backups take considerably longer, stresses the SQL DB by pulling the images out every time needed, plus several other reasons. For example a DB backup I managed took 12 hours nightly due to images and documents stored in the DB as blobs. Once it was changed to the Wizard's Toolkit method of storing the location of the file on the server, the nightly backups took less than an hour.

In the data table the FilePath is stored in a separate data column than the NewFileName. The reason it is called NewFileName is because WTK renames the file during the upload process. That way the length of the 'FileName' column only needs to be varchar(12). The name is generated by inserting a row into the wtkGUID data table and taking the auto-incremented GUID value. Then a 'w' is prepended and the original file extension is added. If the file extension is jpeg it will be changed to jpg.

For example an uploaded file may end up with a name like "w1087.png".

Public Files

Files which are not sensitive and should be viewable by anyone on the website should be stored in a web folder that is available to the website. For example a sub-folder named /imgs/ and then you can subcategorize by internal subfolders. Like /imgs/users/ and /imgs/pets/ .

Wizard's Toolkit makes uploading files and tracking them easy with a combination of SQL data, JS and PHP functions. Plus there is PHP integration with both AWS S3 and Cloudflare R2 (which use the same AWS S3 SDK). PHP pages are provided for managing uploading of files, storing their locations, managing their location of onsite or external hosting, and viewing of the files regardless of their hosting location.

The information about the uploaded files should be stored in the wtkFiles data table. To make them private simply set the TempDownload column to 'Y'. This works regardless of whether file is stored locally or externally (AWS S3 or Cloudflare R2).

Many websites require having file uploads associated with different purposes or parent tables. The wtkFiles has columnsTableRelation and ParentUID to track that exact need. This way if you need file uploads tracked for your wtkUsers and your pets data tables, they can both use wtkFiles and just set the TableRelation to 'wtkUsers' or 'pets' respectively.

The FilePath stores the location the file is in. When on your server this will be a relative path. When on an external storage like S3 or R2 the default code instead uses the 'YY/Mon' of the upload date for the file. That's so you do not exceed any folder maximums and it also makes it much easier to find in S3 or R2. For example if the file was uploaded 2022-02-14 then the external path would be /22/Feb/{NewFileName}.

Private File Locations

When files should not be publicly accessible they should be stored in a secure location. This can be external storage like AWS S3 or Cloudflare R2. Or it could simply be in a folder on your server that is not accessible from the website.

When a file is marked as wtkFiles.TempDownload = 'Y', that tells Wizard's Toolkit viewFile.php file to copy them from their secure location into the /exports folder. During this process it renames them and encodes the names.

Private File Cleanup

The CRON job (wtk/cron.php) which should run once every minute will delete any files in the /exports folder which are more than 15 minutes old. You can change that of course to wait longer before deleting or to delete them faster. The /exports folder is used for this and for exporting reports to CSV or XML.

AWS S3 and Cloudflare R2

Generally speaking, the external storage solution by Cloudflare R2 costs dramatically less than Amazon's S3 service. Cloudflare R2 uses the exact same Amazon S3 SDK so if you have S3 working migrating to Cloudflare is extremely easy code-wise. If you have external files in S3 and want to migrate them to Cloudflare R2, the Wizard's Toolkit contains pages to manage that for you. All you need to do is modify the pathing logic based on your current S3 path rules.

Cloudflare R2 advantages over AWS S3

  • less cost than AWS
  • no download costs!
  • no glacier storage so all files download fast, even very old ones
  • huge company - very reliable
  • fast uploads due to CDN

If you would like help with a project like this... just message me.

April 28, 2023 User Notifications

Many websites want to have user notifications so I have built that into the Wizard's Toolkit.

Each notification can have an icon, color for icon, header, body of text, and most importantly can link to a page within your website.

When a notification is created it can be assigned to an individual or a whole department. If it is assigned to a department, then all users in that department can see it. When a user clicks on a notification they go to the page which marks the notification as opened and seen by them. A notification is not "closed" until a user marks it so. When that happens it marks the time and date as well as who closed it based on who is logged in at the time.

While logged in a JavaScript function checks the server once every 3 minutes to see if there are any new notifications. If there are then it updates the number counter on the bell for easy visibility. Of course you can change that to check more or less often.

I'm not sure if I want to call this the "Notifications" feature or "User Alerts" feature. Let me know what you think in the comments.

Now that the displaying and handling of notifications is so easy in Wizard's Toolkit, adding a little code to insert the SQL data upon certain triggers or actions is easy and can be done within PHP or SQL.

One of my future tasks will be creating analytic reports which show how long notifications took to close based on different criteria. For example, based on staff person, based on header and based on icon-color. For some clients they may want to have the icon colors be red for urgent, orange for semi-urgent, green for income, etc.

January 25, 2023 Widget Management

Almost all data-driven websites want a dashboard where staff can see critical analytics at a glance. Often different departments will need different dashboards. Plus not all staff will want or need to see the same information.

This is an ideal opportunity for a data-driven widget manager. Wizard's Toolkit now allows creating SQL-driven widgets in the back office. These can show lists or charts. The charts can be pie, bar, line or area charts. Each widget is assigned a security level and whether clicking on it should direct to a page within the website or not. Plus you can choose whether that goes to a new page or just opens a modal window and displays a page there.

On the main website staff can modify their widget dashboard. They can add or remove widgets and they can re-organize their widgets to show the most important at the top.

In the back office common sets of widgets can be grouped together. That way your dashboard can have links to different Widget Groups. For example a "Finances" widget set, a "Customer Onboarding" widget set, etc.

For one client I have made it so at the top of their dashboard they have 3 different widget sets they can call up, plus each staff person has their own personal widget-dashboard. They are not allowed to alter the preset widget sets but are allowed to do anything with their own. Of course they can only see the widgets within their security level or lower. This way low-level staff do not get to see upper management widgets.

I need to make a video showing this in action but currently swamped with work. One of my clients has been granted the Google Startup package and we're meeting today to discuss moving our hosting and database to their cloud hosting services. I'm thrilled because the client has told me multiple times that it was Wizard's Toolkit which allowed his company to develop so quickly and attract the attention of investors and Google.

November 5, 2022 YouTube Channel Growth

On October 27th I hit 1,000 hours of watch time on my YouTube channel (https://www.youtube.com/BusinessOfProgramming) which kind of surprised me since I have not uploaded any videos since June 6th. I've only uploaded 5 videos in 2022 and none of them had over 375 views, but my older videos from 2021 have continued to get views and subscribers.

Although it is not much, I'm averaging 1 new subscriber every other day. Currently I have 371 subscribers. More importantly, a few of my videos mention links to free downloads from my landing page service I built with Wizard's Toolkit (https://extragood.info which I discuss here in IH at https://www.indiehackers.com/product/landing-page-saas). Half the people that go to the Code Standards landing page give me their email address to download the free PDF. So I'm building a good emailing list as well which I will soon use to market Wizard's Toolkit.

So although I'm currently swamped with client work, the YouTube channel is growing, my emailing list is growing, and the Wizard's Toolkit is improving.

Over the last month I've been working on WTK integrating with checkout.com. Plus I'm working on a Docker WTK environment which I will later publish to the public.

Another enhancement I'm working on for my client which will be rolled into the core WTK is PostgreSQL as a database option. Currently WTK works with MySQL and has been tested with older versions and the newest version.

I've had a new video planned for YouTube for a couple months now... I really need to make that a priority since the channel is doing well and I don't want it to lose momentum.

July 26, 2022 Development and new Client

In May I was hired by a company in UK that is moving their corporate structure to Dubai. Because of this they reduced staff from 60 to about 30 and lost 90% of their IT staff.

I was hired as a "Senior Developer" with them hoping I would take over the primary role of maintaining their 18-year old database and website. They had recently upgraded to PHP 5.7 but were still using ZendFramework and an old version of MySQL.

Their biggest complaint was the prior large tech crew would take literally weeks to do the smallest changes. That was because of ZendFramework, bad original DB design and some custom code libraries they implemented.

After a month of reviewing their code and DB, I recommended they let me rewrite everything from scratch. Redesign the DB from the ground up. Create a brand new website using PHP 8.1, MySQL 8 and Wizard's Toolkit. After a demo they agreed. After a month of coding they were amazed at how much progress I had made and changed my title to "Chief Technology Officer". My pay is scheduled to increase in mid-August.

What does this mean for Wizard's Toolkit? Well, I'm very busy so do not have as much time to make videos and documentations. The good news is this is allowing me to stress-test WTK using PHP 8.1 and MySQL 8.0.29. Plus I am adding some enhancements to core WTK library because of needs by this client. For example, the old WTK worked using Twilio SDK from years ago but that older SDK was not compatible with PHP8. So today I've updated the Twilio SDK for WTK and I've added some SMS texting functionality as core Wizard's Toolkit features.

Another recent enhancement is regarding the Chart.js library. I've added to Bar, Line and Area charts the percentage-of-total as a default feature. So in addition to showing values on bars when hovering over it the tooltip also shows what percentage that "bar" is of the total. This is all data-driven and now part of the JS in the WTK library so requires no additional coding by developers using Wizard's Toolkit.

Bottom line - Wizard's Toolkit is continuing improve on a weekly basis. I might not have time to market it but I'm making great money and project to have finished building their new enterprise website by January 15th, 2023. I expect the company I am working with will double their revenue in 2023 because of the websites I will build them using Wizard's Toolkit. The low-code development life is a good life!

About

I've been enhancing this code library since 2009. Now refining it to take it commercial so other programmers can benefit from this library. This is the ultimate library for building hybrid apps and responsive websites.