{"id":16479610,"url":"https://github.com/sonyarianto/doitsu","last_synced_at":"2025-05-01T12:30:57.823Z","repository":{"id":65671370,"uuid":"596997264","full_name":"sonyarianto/doitsu","owner":"sonyarianto","description":"Simple and generic web framework based on PHP, mostly only routing and templating.","archived":false,"fork":false,"pushed_at":"2023-03-25T04:59:38.000Z","size":107,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-12T12:52:16.309Z","etag":null,"topics":["alpinejs","framework","php","tailwindcss","twig","web"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/sonyarianto.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}},"created_at":"2023-02-03T11:54:20.000Z","updated_at":"2023-03-07T02:15:13.000Z","dependencies_parsed_at":"2023-02-18T07:15:46.286Z","dependency_job_id":null,"html_url":"https://github.com/sonyarianto/doitsu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonyarianto%2Fdoitsu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonyarianto%2Fdoitsu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonyarianto%2Fdoitsu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonyarianto%2Fdoitsu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonyarianto","download_url":"https://codeload.github.com/sonyarianto/doitsu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224256197,"owners_count":17281501,"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":["alpinejs","framework","php","tailwindcss","twig","web"],"created_at":"2024-10-11T12:52:21.214Z","updated_at":"2024-11-12T10:28:11.372Z","avatar_url":"https://github.com/sonyarianto.png","language":"CSS","funding_links":["https://paypal.me/sonyarianto"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/sonyarianto/doitsu/blob/main/doitsu-logo.png?raw=true\" width=\"150\" height=\"150\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://paypal.me/sonyarianto\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Sponsor\" src=\"https://img.shields.io/badge/donate-Paypal-fd8200.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/sponsor/sonyarianto\" target=\"_blank\"\u003e\n    \u003cimg alt=\"GitHub Sponsors\" src=\"https://img.shields.io/github/sponsors/sonyarianto\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://discord.com/channels/1083266930896535562/1088651320845672588\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/1083266930896535562\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Doitsu\nSimple and generic web framework based on PHP, mostly only routing and templating.\n\n## Requirements\n\n- Make sure PHP is available on your system. We recommend PHP 8 or above. [[PHP installation manual]](https://www.php.net/manual/en/install.php)\n- Make sure Composer is available on your system. [[Composer installation manual]](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos)\n\n\u003e Still confuse about above things? Just ask on Discussions channel\n\n## How to run\n\n- Clone this repository\n- Go to the project directory (usually using `cd` command)\n- Run `composer -vvv install` (this command is to install the dependencies, will create `vendor` directory)\n- Run `php -S 0.0.0.0:4000 -t public` (this command is to run the built-in PHP web server for development purpose)\n- Open the web on your browser at `http://localhost:4000` (until this point it means we already have `/` route that handle the home page)\n\n## Sample output\n\n![My image](https://github.com/sonyarianto/doitsu/blob/main/doitsu.png?raw=true)\n\n## What next?\n\nIt depends on your imagination. For example in our use case, we use this framework with Alpine.js to handle the reactivity, add date-fns to manipulate date, add Tailwind CSS for nice styling flow and sometimes add Flowbite to take the component advantage of nice visual UI. The limit is your creativity.\n\n## Quick FAQs\n\n- **Want to add new route such as /about or anything?** Just go to `src/_routes.php` and add there. Observe the current code. After you create new route usually you will create a method on `Application` class (located at `src/Application.php`) to execute some code (a.k.a controller) before you render some visual page (a.k.a view).\n- **Can I deploy to shared hosting?** Yes, but you should point the website to the `public` folder, since that folder is the entry point or commonly said as web root directory. There is `index.php` file there and everything starts from that script.\n- **Can I deploy using Docker?** Yes, we will give the docker-compose sample later.\n- **Why another framework? Is Laravel or Symfony not enough?** Hmmmm, you know my motivation create this framework is just for fun and learn. So nothing can stop me to create something haha.\n- **Why the name is Doitsu?** [Rian Cintiyo](https://github.com/riancintiyo) propose the name and I think that's very good name, so we continue with that. It's Japanese word that means Germany.\n- **What do you use for doing routing?** We use Symfony Routing component.\n- **What template engine do you use?** We use Twig template engine.\n\n## Adding Alpine JS\n\n- **There are 2 ways to add Alpine JS** :\n\u003e 1. Adding Alpine JS by including it from a `\u003cscript\u003e` tag\n\u003e 2. Importing it as a module\u003cbr\u003e\n\n#### **1. Adding Alpine JS from `\u003cscript\u003e` tag.**\u003cbr\u003e ####\nYou can add Alpine Js using CDN by adding it on **template/base.html.twig** file and place it before end of `\u003c/head\u003e` markup like image bellow.\n```html\n\u003chtml\u003e\n    \u003chead\u003e\n        ...\n        \u003cscript defer src=\"https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js\"\u003e\u003c/script\u003e\n    \u003c/head\u003e\n    ...\n\u003c/html\u003e \n```\n`defer` inside script tag in here to make the script is downloaded in parallel to parsing the page, and executed after the page has finished parsing. [Read more in here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script).\u003cbr\u003e\n\n#### **2. Adding Alpine JS as a module.**\u003cbr\u003e ####\nYou can also add Alpine JS as a module!, and how to do that is shown on the list bellow:\u003cbr\u003e\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; 1. Run the following command to install it:\u003cbr\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; `npm install alpinejs`\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; 2. Import Alpine into your bundle and initialize it like so:\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;`\nimport Alpine from 'alpinejs'`  \u003cbr\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; `Alpine.start()`\n\nTo read more detail how to install Alpine, [Read here.](https://alpinejs.dev/essentials/installation)\n\n## Credits\n\n- Doitsu logo created by [Rian Cintiyo](https://github.com/riancintiyo).\n\n## License\n\nMIT\n\nCopyright (c) 2023-present, Sony Arianto Kurniawan \u003c\u003csony@sony-ak.com\u003e\u003e and contributors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonyarianto%2Fdoitsu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonyarianto%2Fdoitsu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonyarianto%2Fdoitsu/lists"}