{"id":14384332,"url":"https://github.com/eureka2/G6K","last_synced_at":"2025-08-23T17:31:43.414Z","repository":{"id":26585303,"uuid":"30039850","full_name":"eureka2/G6K","owner":"eureka2","description":"Generator of calculation simulator (calculator)","archived":false,"fork":false,"pushed_at":"2024-02-20T08:46:04.000Z","size":38450,"stargazers_count":20,"open_issues_count":30,"forks_count":19,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-29T17:07:53.409Z","etag":null,"topics":["calculator","engine","generators","javascript","php","simulation","simulator","symfony"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eureka2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-29T20:33:02.000Z","updated_at":"2024-07-25T00:11:36.477Z","dependencies_parsed_at":"2024-07-25T00:25:20.458Z","dependency_job_id":null,"html_url":"https://github.com/eureka2/G6K","commit_stats":{"total_commits":688,"total_committers":6,"mean_commits":"114.66666666666667","dds":0.03924418604651159,"last_synced_commit":"3fe4dc0488aa12475061f7f74194b2ce00f5ad6a"},"previous_names":[],"tags_count":80,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eureka2%2FG6K","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eureka2%2FG6K/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eureka2%2FG6K/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eureka2%2FG6K/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eureka2","download_url":"https://codeload.github.com/eureka2/G6K/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230716466,"owners_count":18269764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calculator","engine","generators","javascript","php","simulation","simulator","symfony"],"created_at":"2024-08-28T18:01:18.798Z","updated_at":"2024-12-21T12:30:28.083Z","avatar_url":"https://github.com/eureka2.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# G6K\n\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)\n[![SymfonyInsight](https://insight.symfony.com/projects/c84bb3b7-3ba8-4513-821b-bbcd35364fdb/mini.svg)](https://insight.symfony.com/projects/c84bb3b7-3ba8-4513-821b-bbcd35364fdb)\n[![Total Downloads](https://img.shields.io/packagist/dt/eureka2/g6k.svg?style=flat-square)](https://packagist.org/packages/eureka2/g6k)\n\nG6K is a tool that enables the creation and online publishing of calculation simulators without coding. It has a simulation engine and an administration module.\n\nA calculation simulator is an online service made available to a user to enable them to calculate the results (taxes, social benefits, etc.) corresponding to their particular situation. The results are calculated on the basis of data supplied by the user, reference data (eg amount of a tax) and business rules reflecting the current legislation in the field of simulation.\n\n[Learn more](http://eureka2.github.io/g6k/documentation/en/learn-more.html)\n\n## Table of contents\n1. [Prerequisites for Symfony](#prerequisites-for-symfony)\n1. [Prerequisites for G6K](#prerequisites-for-g6k)\n1. [Installation](#installation)\n1. [Web server configuration](#web-server-configuration)\n1. [Migration](#migration)\n1. [Documentation](#documentation)\n1. [Code quality](#code-quality)\n1. [Innovation Award](#innovation-award)\n1. [Copyright and license](#copyright-and-license)\n\n## Prerequisites for Symfony\n* PHP Version 7.1.3+\n* JSON enabled\n* ctype\n* date.timezone in php.ini\n* auto_detect_line_endings = On in php.ini\n* PHP-XML module \n* 2.6.21+ version of libxml\n* PHP tokenizer \n* Modules mbstring, iconv, POSIX (only on * nix), Intl with ICU 4+, and APCU 3.0.17+ APC (highly recommended) must be installed\n* recommended php.ini settings:\n  * short_open_tag = Off\n  * magic_quotes_gpc = Off\n  * register_globals = Off\n  * session.auto_start = Off\n\n## Prerequisites for G6K\n* PDO enabled\n* pdo_pgsql and/or pdo_sqlite and/or pdo_mysql activated\n* pgsql and/or sqlite3 activated\n* SimpleXML enabled\n* serialize_precision = -1 in php.ini\n* intl installed and activated\n\n## Installation\n1. If you plan to use MySQL or PostgreSQL, create a user with \"CREATE DATABASE\" and \"CREATE TABLE\" privileges using the administration tool of your RDBMS.\n2. Be placed in the \u003cDOCUMENT_ROOT\u003e Web Server\n3. Download composer.phar (https://getcomposer.org/download/) in \u003cDOCUMENT_ROOT\u003e. composer 1.7.2+ is required.\n4. Under a shell or DOS, execute: ``php -d memory_limit=-1 composer.phar create-project eureka2/g6k simulator/ 4.*`` \n5. Enter the parameter values required by the installer, including:\n  * application environment [dev or prod] (prod) :\n  * debug mode [0 or 1] (0) :\n  * locale [en-GB, en-US, fr-FR, ...] (en-US) :\n  * upload directory (%kernel.project_dir%/var/uploads) :\n  * mailer URL (null://localhost) : \n  * database engine [sqlite, mysql or pgsql] (sqlite) :\n  * database name (g6k) :\n\nfor sqlite database only:\n  * database version (3.15) : \n  * database path (%kernel.project_dir%/var/data/databases/g6k.db) :\n\nfor mysql or pgsql database:\n  * database host [localhost, ...] :\n  * database port :\n  * database user :\n  * database password :\n  * database character set [UTF8, LATIN1, ...] (UTF8) :\n\n## Web server configuration\n\n### Adding Rewrite Rules\nG6K comes with a `.htaccess` file in the `calcul/` directory that contains the rewrite rules.\n\n`/admin/...` is rewritten in `/admin.php/...` and all other queries in `/index.php/...`.\n\nThus, the `admin.php` and` index.php` front-end controllers can be omitted from the request urls.\n\n### Apache\nYou must add the `AllowOverride All` directive in the `VirtualHost` block of the server configuration. \n\nAssuming G6K is installed in the directory `/var/www/html/simulator` :\n\n```\n\u003cVirtualHost *:80\u003e\n    ServerName domain.tld\n    ServerAlias www.domain.tld\n\n    DocumentRoot /var/www/html/simulator\n    \u003cDirectory /var/www/html/simulator\u003e\n        AllowOverride All\n        Order Allow,Deny\n        Allow from All\n    \u003c/Directory\u003e\n\n    # other directives\n\n\u003c/VirtualHost\u003e\n```\n\nFor best performance, rewrite rules can be moved from the `.htaccess` file to the `VirtualHost` block of the server configuration.\n\nIn this case, change `AllowOverride All` to `AllowOverride None` and delete the `.htaccess` file.\n\n```\n\u003cVirtualHost *:80\u003e\n    ServerName domain.tld\n    ServerAlias www.domain.tld\n\n    DocumentRoot /var/www/html/simulator\n    \u003cDirectory /var/www/html/simulator\u003e\n        AllowOverride None\n        Order Allow,Deny\n        Allow from All\n    \u003c/Directory\u003e\n    \u003cDirectory /var/www/html/simulator/calcul\u003e\n        # rewrite rules from .htaccess\n    \u003c/Directory\u003e\n\n    # other directives\n\n\u003c/VirtualHost\u003e\n```\n\nFor security reasons, the \u003cDOCUMENT_ROOT\u003e can be set to the `calcul/` directory : `DocumentRoot /var/www/html/simulator/calcul`\n\nIn this case, `calcul/` should be omitted from the path of the request URL.\n\n```\n\u003cVirtualHost *:80\u003e\n    ServerName domain.tld\n    ServerAlias simulators.domain.tld\n\n    DocumentRoot /var/www/html/simulator/calcul\n    \u003cDirectory /var/www/html/simulator/calcul\u003e\n        # rewrite rules from .htaccess\n        AllowOverride None\n        Order Allow,Deny\n        Allow from All\n    \u003c/Directory\u003e\n\n    # other directives\n\n\u003c/VirtualHost\u003e\n```\n\n### NGinx\nBecause NGinx does not have `.htaccess` files, all of the setup has to be managed within the server config file.\n\nThe following is fully working. There are probably a number of improvements which can be made, but this should be a good starting-point.\n\nThe most important point is that the `/admin` path has to be routed separately to the other app.\n\n```\nserver {\n\n  rewrite ^/index\\.php/?(.*)$ /$1 permanent;\n\n  ## Admin ##\n  ## Required for the admin area (this is in .htaccess inside /calcul) ##\n  location /admin {\n    rewrite ^(.*)$ /admin.php/$1 last;\n  }\n  ## Main ##\n  location @rewriteapp {\n    rewrite ^(.*)$ /index.php/$1 last;\n  }\n\n  ## Symfony ##\n  ## PRODUCTION ENV ##\n  location ~ ^/(index|admin)\\.php(/|$) {\n    fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; #-\u003e this needs to be your php-fpm location\n    fastcgi_split_path_info ^(.+\\.php)(/.*)$;\n    include fastcgi_params;\n    internal;\n  }\n\n  # other directives\n\n}\n```\n\n## Migration\nIf you want to transfer simulators, their data sources and style sheets from a previous installation, \ndo not copy them manually, use the following console command:\n\n``php bin/console g6k:simulator:copy -w abDatepicker -w abListbox -w AutoMoneyFormat all /var/www/html/simulator-old``\n\nassuming `/var/www/html/simulator-old` is the installation directory of the previous version.\n\nThis command performs all the necessary conversions to enable their use with this new version.\n\nNote that in this command, the -w option sets widgets. \n`abDatepicker`, `abListbox` and `AutoMoneyFormat` are widgets that will automatically apply to 'date', choice (select), and money fields, respectively. \nYou can omit those you do not want to use.\n\nAt the end of the copy, go to the administration interface to clear the development and production caches.\n\n## Documentation\n\n### Administrator's Guide\n\n[ [en](http://eureka2.github.io/g6k/documentation/en/index.html) ] \n[ [fr](http://eureka2.github.io/g6k/documentation/fr/index.html) ] \n\n### Classes\n\n[Documentation of G6K classes](http://eureka2.github.io/g6k/documentation/classes/4.x)\n\n## Code quality\n\n[![SymfonyInsight](https://insight.symfony.com/projects/c84bb3b7-3ba8-4513-821b-bbcd35364fdb/big.svg)](https://insight.symfony.com/projects/c84bb3b7-3ba8-4513-821b-bbcd35364fdb)\n\n## Innovation Award\n\n\u003ctable class=\"framed light\" border\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://www.phpclasses.org/\" title=\"PHP Classes\" alt=\"PHP Classes\"\u003e\n        \u003cimg src=\"https://files.phpclasses.org/graphics/phpclasses/logo-small-phpclasses.svg\" width=\"75\" height=\"24\" alt=\"PHP Classes\" style=\"vertical-align: top\"\u003e\n      \u003c/a\u003e\n     \u003c/td\u003e\n    \u003ctd\u003e\n     \u003cb\u003e\u003ca href=\"https://www.phpclasses.org/package/10556-PHP-Generate-simulator-tools-to-perform-calculations.html\"\u003eG6K\u003c/a\u003e\n       By \u003ca href=\"https://www.phpclasses.org/browse/author/549500.html\"\u003eeureka2\u003c/a\u003e\u003c/b\u003e\n     \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://www.phpclasses.org/award/innovation/\"\u003e\u003cimg src=\"https://www.phpclasses.org/award/innovation/nominee.gif\" width=\"89\" height=\"89\" alt=\"PHP Programming Innovation award nominee\" title=\"PHP Programming Innovation award nominee\" border=\"0\"\u003e\u003c/a\u003e\u003cbr\u003e\u003cb\u003e\u003cspan style=\"font-size: large\"\u003eApril 2018 Number 6\u003c/span\u003e\u003c/b\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"3\"\u003e\n      There are many sites that are useful because they provide means to let the users perform calculations of some kind from simple values entered in Web forms.\n      \u003cbr\u003e\n      This package provides a Web interface to implement a generic system for designing and providing access to pages that provide several types of calculator tools.\n      \u003cbr\u003e\n      Manuel Lemos\n\t\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Copyright and license\n\n\u0026copy; 2015-2019 Eureka2 - Jacques Archimède. Code released under the [MIT license](https://github.com/eureka2/G6K/blob/master/LICENSE).\n\n**[\u0026uparrow; back to table of contents](#table-of-contents)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feureka2%2FG6K","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feureka2%2FG6K","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feureka2%2FG6K/lists"}