{"id":37015033,"url":"https://github.com/andreimosman/mvczitto","last_synced_at":"2026-01-14T01:30:24.767Z","repository":{"id":62550837,"uuid":"502199071","full_name":"andreimosman/mvczitto","owner":"andreimosman","description":"Very small MVC frameworking using filesystem routing.","archived":false,"fork":false,"pushed_at":"2022-06-20T21:29:26.000Z","size":724,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T10:59:24.578Z","etag":null,"topics":["framework","mvc","php","simple"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreimosman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-10T22:46:39.000Z","updated_at":"2022-06-20T21:29:14.000Z","dependencies_parsed_at":"2022-11-03T02:00:44.113Z","dependency_job_id":null,"html_url":"https://github.com/andreimosman/mvczitto","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/andreimosman/mvczitto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreimosman%2Fmvczitto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreimosman%2Fmvczitto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreimosman%2Fmvczitto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreimosman%2Fmvczitto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreimosman","download_url":"https://codeload.github.com/andreimosman/mvczitto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreimosman%2Fmvczitto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T00:40:43.272Z","status":"ssl_error","status_checked_at":"2026-01-14T00:40:42.636Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["framework","mvc","php","simple"],"created_at":"2026-01-14T01:30:20.964Z","updated_at":"2026-01-14T01:30:24.687Z","avatar_url":"https://github.com/andreimosman.png","language":"PHP","readme":"# MVCzitto\n[![Latest Stable Version](https://img.shields.io/packagist/v/andreimosman/mvczitto.svg?style=flat-square)](https://packagist.org/packages/andreimosman/mvczitto)\n[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.4-8892BF.svg?style=flat-square)](https://php.net/)\n\nMVCzitto is a framework for PHP that allows you to build web applications in a simple and easy way.\n\nInstead of traditional OO Based MVC, we decided to implement MVC using File System Routing. \n\nThe idea behing this is to write code using PHP as pure as possible, but providing some patterns and organization.\n\nTwo things motivated me to do it:\n - The nextjs routing\n - Rasmus Lerdorf said \"PHP Frameworks all suck\". I'm trying to create this fremework as less frameworky as possible.\n\n## HOWTO\n\n\n### Add via composer\n\n```\ncomposer create-project andreimosman/mvczitto foldername\n```\n\nPlease refer to the [Composer](https://getcomposer.org/) website for instructions on how to install it on your platform if you don't have it.\nAlternatively, you may also download Frameworkitto from the [releases page](https://github.com/andreimosman/mvczitto/releases) and export it to your project's main folder.\n\n### Docker development environment\n\nAt the folder `docker-dev-environment` you can call `firstrun.sh` to create the development environment using docker compose.\n\nPlease refer to the [Docker](https://www.docker.com/get-started) website for instructions on how to install it on your platform if you don't have it.\n\n## Getting Started with MVCzitto\n\n### The app folder contain more instructions and also few samples\n\n```\napp\n├── index.php (entry point - where de dependency injection is done)\n├── config.php (configuration file)\n├── assets\n│   ├── css\n│   │   └── style.css\n│   └── images\n│       └── logo-mvczitto.png\n├── controllers\n│   ├── authenticated (controllers that require authentication)\n│   │   ├── dashboard\n│   │   │   └── index.php\n│   │   ├── index.php\n│   │   └── user\n│   │       ├── @(post)new.php\n│   │       ├── edit\n│   │       │   ├── @(put,patch)[id].php\n│   │       │   └── [id].php\n│   │       ├── logout.php\n│   │       ├── new.php\n│   │       └── profile.php\n│   └── open (controllers that don't require authentication)\n│       ├── gettingstarted\n│       │   └── index.php\n│       ├── index.php\n│       └── user\n│           ├── @(post)forgotpassword.php\n│           ├── @(post)login.php\n│           ├── @(post)signup.php\n│           ├── forgotpassword.php\n│           ├── index.php\n│           ├── login.php\n│           └── signup.php\n├── models (filesystem base models)\n│   └── users\n│       ├── create.php\n│       ├── delete.php\n│       ├── read.php\n│       └── update.php\n└── views (follows the same pattern as controllers)\n    ├── authenticated\n    │   ├── footer.php\n    │   ├── header.php\n    │   └── user\n    │       └── edit\n    │           └── [id].php\n    └── open\n        ├── footer.php\n        ├── gettingstarted\n        │   └── index.php\n        ├── header.php\n        └── user\n            ├── forgotpassword.php\n            ├── login.php\n            └── signup.php\n```\n\n### Routing verbs\n\nThe verb set by default is ``GET`` but you can specify the verb at the begining of the filename inside ``@()``, such as ``@(post)new.php``\n\n\n### Authentication\n\nThe folders ``authenticated`` and ``open`` means that the route is valid on user is authenticated or not respectively.\n\nThe super simple authentication schema is:\n\n```\n$auth = \\MVCzitto\\Application\\Authentication::getInstance()\n\n$somethingNotNull = \"WHAT EVER YOU WANT. OBJECTS, ARRAYS, STRINGS\";\n$auth-\u003esetAuthenticationData($somethingNotNull);\n```\n\nBy doing this ```$auth-\u003eisAuthenticated()``` will return true;\n\nYou can logout by calling ```$auth-\u003eunsetAuthenticationData()```\n\nCheck `app/controllers/open/user/@(post)login.php` and `app/controllers/authenticated/user/logout.php`\n\n### File system models\n\n```\n├── models\n    └── users\n        ├── create.php\n        ├── delete.php\n        ├── read.php\n        └── update.php\n```\nTo access then on controllers you can just call `$models-\u003enameOfTheController`. Check `app/controllers/open/user/@(post)login.php`:\n\n```\n$usersModel = $models-\u003eusers; // Load the model\n$user = $usersModel-\u003eread(['email' =\u003e $email]); // Find the user\n```\n\nIt executes the snippet located at `app/models/users/read.php`.\n\n### The main index.php\n\n`app/index.php` contains the entry point of the application and the dependency injector.\n\n### File System CLI Scripts\n\nIn the same way `controllers` and `models` works, you can create CLI commands, accessible through `./app/cli`.\n\nA few dummy examples where added to app:\n\n```\napp/console\n└── backup\n    ├── database.help\n    ├── database.php\n    └── uploaded-files.php\n```\n\n#### Usage:\n\n```\n$ ./cli\n\nNo command specified.\n\nUsage:\n\n    ./cli \u003ccommand\u003e [\u003cparameters\u003e]\n\n\nAvailable commands:\n\n    backup/database\n    backup/uploaded-files\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreimosman%2Fmvczitto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreimosman%2Fmvczitto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreimosman%2Fmvczitto/lists"}