{"id":28464941,"url":"https://github.com/wildcodeschool/simple-mvc","last_synced_at":"2026-03-08T14:32:40.082Z","repository":{"id":202608378,"uuid":"616814935","full_name":"WildCodeSchool/simple-mvc","owner":"WildCodeSchool","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-26T13:32:38.000Z","size":869,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-30T19:50:37.627Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/WildCodeSchool.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-21T06:15:31.000Z","updated_at":"2024-07-27T14:04:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"327bd469-9365-40ad-8b4a-30bcd08215f9","html_url":"https://github.com/WildCodeSchool/simple-mvc","commit_stats":null,"previous_names":["wildcodeschool/simple-mvc"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/WildCodeSchool/simple-mvc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildCodeSchool%2Fsimple-mvc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildCodeSchool%2Fsimple-mvc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildCodeSchool%2Fsimple-mvc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildCodeSchool%2Fsimple-mvc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WildCodeSchool","download_url":"https://codeload.github.com/WildCodeSchool/simple-mvc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildCodeSchool%2Fsimple-mvc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30261843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T08:59:44.879Z","status":"ssl_error","status_checked_at":"2026-03-08T08:58:02.867Z","response_time":56,"last_error":"SSL_read: 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":[],"created_at":"2025-06-07T05:10:41.416Z","updated_at":"2026-03-08T14:32:40.034Z","avatar_url":"https://github.com/WildCodeSchool.png","language":"PHP","readme":"# Simple MVC\n\n## For Windows Users\n\n:heavy_exclamation_mark: To do BEFORE CLONING REPOSITORY :heavy_exclamation_mark: :\n\nIf you develop on Windows, edit your git configuration to change your end of line rules with this command :\n\n`git config --global core.autocrlf true`\n\nThen clone this Repository safely :white_check_mark:\n\n## Description\n\nThis repository is a simple PHP MVC structure from scratch.\n\nIt uses some cool vendors/libraries such as Twig and Grumphp.\nFor this one, just a simple example where users can choose one of their databases and see tables in it.\n\n## Steps\n\n1. Clone the repo from Github.\n2. Run `composer install`.\n3. Create _config/db.php_ from _config/db.php.dist_ file and add your DB parameters. Don't delete the _.dist_ file, it must be kept.\n\n```php\ndefine('APP_DB_HOST', 'your_db_host');\ndefine('APP_DB_NAME', 'your_db_name');\ndefine('APP_DB_USER', 'your_db_user_wich_is_not_root');\ndefine('APP_DB_PASSWORD', 'your_db_password');\n```\n\n4. Import _database.sql_ in your SQL server, you can do it manually or use the _migration.php_ script which will import a _database.sql_ file.\n5. Run the internal PHP webserver with `php -S localhost:8000 -t public/`. The option `-t` with `public` as parameter means your localhost will target the `/public` folder.\n6. Go to `localhost:8000` with your favorite browser.\n7. From this starter kit, create your own web application.\n\n## Example\n\nAn example (a basic list of items) is provided (you can load the _simple-mvc.sql_ file in a test database). The accessible URLs are :\n\n-   Home page at [localhost:8000/](localhost:8000/)\n-   Items list at [localhost:8000/items](localhost:8000/items)\n-   Item details [localhost:8000/items/show?id=:id](localhost:8000/item/show?id=2)\n-   Item edit [localhost:8000/items/edit?id=:id](localhost:8000/items/edit?id=2)\n-   Item add [localhost:8000/items/add](localhost:8000/items/add)\n-   Item deletion [localhost:8000/items/delete?id=:id](localhost:8000/items/delete?id=2)\n\nYou can find all these routes declared in the file `src/routes.php`. This is the very same file where you'll add your own new routes to the application.\n\n## How does URL routing work ?\n\n![simple_MVC.png](.tours/simple_MVC.png)\n\n## Ask for a tour !\n\n\u003cimg src=\"./.tours/photo-1632178151697-fd971baa906f.jpg\" alt=\"Guided tour\" width=\"150\"/\u003e\n\nWe prepare a little guided tour to start with the simple-MVC.\n\nTo take it, you need to install the `Code Tour` extension for Visual Studio Code : [Code Tour](https://marketplace.visualstudio.com/items?itemName=vsls-contrib.codetour)\n\nIt will give access to a new menu on your IDE where you'll find the different tours about the simple-MVC. Click on play to start one :\n\n![menu](.tours/code_tour_menu.png)\n\n## Run it on docker\n\nIf you don't know what is docker, skip this chapter. ;)\n\nOtherwise, you probably see, this project is ready to use with docker.\n\nTo build the image, go into the project directory and in your CLI type:\n\n```\ndocker build -t simple-mvc-container .\n```\n\nthen, run it to open it on your localhot :\n\n```\ndocker run -i -t --name simple-mvc  -p 80:80 simple-mvc-container\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwildcodeschool%2Fsimple-mvc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwildcodeschool%2Fsimple-mvc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwildcodeschool%2Fsimple-mvc/lists"}