A modernized, responsive web questionnaire based on the Keirsey Temperament Sorter®-II (KTS®-II) personality assessment instrument.
The Keirsey Temperament Sorter®-II (KTS®-II) is the most widely used personality instrument in the world. It is a powerful 70-question personality assessment that helps individuals discover their temperament and personality type. The KTS-II is based on Keirsey Temperament Theory™, published in the bestselling books, Please Understand Me® and Please Understand Me II, by Dr. David Keirsey.
- Modern User Interface: Completely redesigned with clean typography, generous grid layouts, glassmorphism headers, and smooth micro-animations.
- Dynamic Real-Time Themes: Custom-built CSS properties allowing instantaneous color theme switching (supporting 12 different colors) via minimalist circular pills.
- Vanilla JS: Light weight, zero runtime dependencies. (Completely removed jQuery & Zepto.js).
- No CSS Frameworks: Handcrafted custom CSS layout removing all external w3.css styling.
- Secure Credentials: Integrated native PHP environment loader supporting
.envconfigurations. - Native Unit Testing: Custom zero-dependency PHP unit testing harness verifying environment loading and KTS scoring logic.
-
Clone the Repository:
git clone https://github.com/cahyadsn/kts-2-questionnarie.git cd kts-2-questionnarie -
Setup Credentials:
- Copy the template file
.env.exampleto.env:cp .env.example .env
- Update database host, username, password, and schema variables in
.envto match your local setup.
- Copy the template file
-
Database Configuration:
- Create a new MySQL/MariaDB database named
psycho. - Import the schema and dummy data located in
db/db.kts.dummy.sql:mysql -u root -p psycho < db/db.kts.dummy.sql
- Create a new MySQL/MariaDB database named
-
Run Locally:
- Start the native PHP development server:
php -S localhost:8000
- Open your browser and navigate to
http://localhost:8000.
- Start the native PHP development server:
-
Run Unit Tests:
- Execute the test suite using standard PHP:
php run_tests.php
- Execute the test suite using standard PHP:
- PHP: Server-side logic (Procedural/Native)
- MySQL/MariaDB: Database storage
- CSS3: Vanilla custom CSS variables for color styling
- JavaScript: Modern ES6+ Vanilla Javascript
- Testing Infrastructure:
- Implemented a custom zero-dependency PHP unit testing runner (
tests/TestRunner.php) with CLI coloring and structured assertion error reporting. - Created unit tests (
tests/KtsTest.php) to verify environment configuration loading and isolated Keirsey Temperament Sorter scoring logic (inc/kts_calc.php).
- Implemented a custom zero-dependency PHP unit testing runner (
- Framework & Libraries Cleanup:
- Removed Zepto.js and migrated all codebase functionality to modern Vanilla JS (using query selectors, fetch, and event delegation).
- Deprecated w3.css library and w3-themes, implementing a handcrafted custom CSS design system (
style.css).
- UI & Theme Engine Improvements:
- Replaced hover navigation dropdowns with inline minimalist circular theme selectors.
- Refactored themes to dynamically set a custom HTML tag attribute
data-themeand handle color styling using CSS variables.
- Security & Config Modernization:
- Introduced native PHP
.envloader (inc/env.php) and added.envcredentials file to.gitignore.
- Introduced native PHP
- Header Info Maintenance:
- Standardized program file headers containing creator, updated date, version, and license data across all custom CSS, JS, and PHP files.
- Migrated JavaScript libraries from jQuery to ZeptoJS.
- Initial release.
If you find this project useful, you can support the developer via:
- Bank Transfer:
- Bank Jago (542) 5003 5796 1022
- Bank BCA Digital (Blu): (501) 000 576 776 186
- Bank Sinarmas: (153) 005 462 4719
- Bank Syariah Indonesia (BSI): 821-342-5550
- PayPal: https://paypal.me/cahyadwiana
- QRIS: CAHYADSN
- facebook : https://m.facebook.com/cahya.dsn
- Email: cahyadsn@gmail.com
- Demo Site: https://psycho.cahyadsn.com/kts
