Formica is a comprehensive web-based form management system that allows users to create, manage, and analyze custom forms and surveys. Built with PHP, this application provides an intuitive interface for designing forms, collecting responses, and visualizing submission data.
- User Authentication: Secure registration and login system
- Form Builder: Intuitive drag-and-drop interface to create custom forms
- Form Management: Create, edit, publish, and delete forms
- Submission Collection: Collect and manage form responses
- Data Visualization: View submission statistics through charts and graphs
- Access Control: Set password protection and authentication requirements for forms
- Response Management: View, analyze, and download form submissions
formix/
├── app/ # Application logic (in MVC pattern)
├── data/ # Database files
├── logic/ # Core business logic
│ ├── auth.php # Authentication functions
│ ├── forms.php # Form management functions
│ └── charts.php # Chart generation functions
├── public/ # Publicly accessible files
│ ├── assets/ # CSS, JavaScript, and media files
│ └── *.php # Public-facing PHP endpoints
├── templates/ # Reusable template files
│ ├── header.php # Common header
│ └── footer.php # Common footer
-
Clone the repository:
git clone https://github.com/Kristian2109/formix.git cd formix -
Database Configuration:
- The application is configured to use a MySQL database.
- Copy the database connection settings from
logic/config.phpand adjust them to your environment.
return [ 'DB_CONNECTION' => 'mysql', 'DB_HOST' => '127.0.0.1', 'DB_PORT' => '3306', 'DB_DATABASE' => 'formix', 'DB_USERNAME' => 'root', 'DB_PASSWORD' => '' ];
Note for XAMPP users: The default username is
rootand the password is typically empty. -
Make sure you have PHP 7.4+ installed on your system with the
pdo_mysqlandzipextensions enabled. -
Start a local web server (like Apache in XAMPP) and point it to the
public/directory, or use the built-in PHP server:php -S localhost:8000 -t public
-
Open your browser and navigate to:
http://localhost:8000
- Register a new account or log in with existing credentials
- Create a new form using the form builder
- Design your form by adding and configuring fields
- Publish your form and share the link with respondents
- View and analyze submissions through the dashboard
- Export responses for further analysis
- PHP: Server-side scripting language
- MySQL: Database management
- HTML/CSS/JavaScript: Front-end technologies
- Chart.js: Data visualization library
This project is licensed under the MIT License - see the LICENSE file for details.
This project includes a complete DevOps pipeline with Docker, Kubernetes, and CI/CD.
-
Start the application and database:
docker-compose up -d
-
Access the app at http://localhost:8080.
Run End-to-End tests with Playwright:
npm install
docker compose down
docker compose up -d --force-recreate
npx playwright testUpdate linux screenshots
npm install
docker compose down
docker compose up -d --force-recreate
docker compose -f docker-compose.yml -f docker-compose.playwright.yml run --rm playwright
npx playwright testRun PHP Linting (PHPCS):
composer install
composer lintThe GitHub Actions workflow .github/workflows/ci-cd.yml handles:
- Linting (PHPCS)
- SonarQube analysis
- Building Docker Image
- Deployment to Kubernetes
Separately, on PR ready for review, the .github/workflows/playwright.yml
handles
- Playwright