{"id":18407669,"url":"https://github.com/frostybee/slim-template","last_synced_at":"2025-10-22T02:54:33.863Z","repository":{"id":194205306,"uuid":"690329298","full_name":"frostybee/slim-template","owner":"frostybee","description":"A Slim-based application skeleton for implementing REST-based Web services.","archived":false,"fork":false,"pushed_at":"2025-03-08T17:36:20.000Z","size":2284,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T08:36:39.362Z","etag":null,"topics":["rest-api","rest-template","slim-4","slim-framework","slim-template"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/frostybee.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":"2023-09-12T01:43:42.000Z","updated_at":"2025-03-08T17:36:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f2e3bea-fa21-4847-ab0c-4d70b25e29d0","html_url":"https://github.com/frostybee/slim-template","commit_stats":null,"previous_names":["frostybee/slim-template"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/frostybee/slim-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostybee%2Fslim-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostybee%2Fslim-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostybee%2Fslim-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostybee%2Fslim-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frostybee","download_url":"https://codeload.github.com/frostybee/slim-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostybee%2Fslim-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266007464,"owners_count":23863530,"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":["rest-api","rest-template","slim-4","slim-framework","slim-template"],"created_at":"2024-11-06T03:14:54.418Z","updated_at":"2025-10-22T02:54:33.854Z","avatar_url":"https://github.com/frostybee.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"- [Starter Template](#starter-template)\n  - [How Do I Use/Deploy this Template?](#how-do-i-usedeploy-this-template)\n  - [How Do I Configure My Database Connection?](#how-do-i-configure-my-database-connection)\n  - [On Using Environment Variables](#on-using-environment-variables)\n  - [Useful VS Code Keybindings](#useful-vs-code-keybindings)\n  - [Adding Fira Code Font to VS Code Portable](#adding-fira-code-font-to-vs-code-portable)\n  \n\n# Starter Template\n\nThis repository contains an application skeleton for creating REST-based Web services using the latest version of the [**Slim micro framework**](https://www.slimframework.com/).\n\n## How Do I Use/Deploy this Template?\n\nFollow the instructions below in the specified order:\n\n1. Download this repository as a `.zip` file.\n2. Extract the downloaded `slim-template-main.zip` file locally.\n3. Copy the `slim-template-main` folder into your web server's **document root** (i.e., `htdocs`).\n4. Rename the `slim-template-main` folder to `[project_name]-api` (for example, `worldcup-api`).\n5. Open your `[project_name]-api` folder in VS Code.\n6. If you are using Wampoon, open a terminal window in VS Code (press `Ctrl+`\\`) and select the `Command Prompt`from the dropdown menu in the upper-right corner. Then run`\"../../composer.bat\" update` (**NOTE**: double quotes are required) to install or update the required dependencies.\n\n   * If you are not using Wampoon, just run Composer from the command line.\n7. In the `config` folder, make a copy of `env.example.php` and rename it to `env.php`.\n8. Adjust your database credentials (**see below**).\n\n**```NOTE:```** You can always clone this repository. However, if you do, you need to remove the ```.git``` ***hidden*** directory before you copy this template over to ```htdocs```\n\n## How Do I Configure My Database Connection?\n\nFollow the outlined instructions in [config/env.example.php](config/env.example.php)\n\n* Change the value of the `database` variable to reflect the name of the database to be used by your slim app.\n* You may also want to change the connection credentials in that file.\n\n## On Using Environment Variables\n\nSensitive information used in app such as your database credentials, API key, etc. MUST not be pushed into your Git repo.\n\nDo not use `.env` files for storing environment specific application settings/configurations. Dotenv [is not meant to be used in production](https://github.com/vlucas/phpdotenv/issues/76#issuecomment-87252126)\n\nJust Google: \"DB_PASSWORD\" filetype:env\nAlternatively, you can visit the following link: [Google env search](https://www.google.ch/search?q=%22DB_PASSWORD%22+filetype:env)\n\nInstead, follow the instructions that are detailed in [config/env.example.php](config/env.example.php)\n\n\n## Useful VS Code Keybindings\n\nBelow are keybindings that speeds up the insertion of special characters and keywords while editing a `.php` file. These bindings need to be added to your VS Code's keybindings.json\n\n```json\n  {\n    \"key\": \"alt+shift+p\",\n    \"command\": \"type\",\n    \"args\": {\n      \"text\": \"=\u003e\"\n    },\n    \"when\": \"textInputFocus \u0026\u0026 editorLangId == php\"\n  },\n  {\n    \"key\": \"ctrl+shift+j\",\n    \"command\": \"type\",\n    \"args\": {\n      \"text\": \"$this-\u003e\"\n    },\n    \"when\": \"textInputFocus \u0026\u0026 editorLangId == php\"\n  },\n  {\n    \"key\": \"ctrl+shift+k\",\n    \"command\": \"type\",\n    \"args\": {\n      \"text\": \"-\u003e\"\n    },\n    \"when\": \"textInputFocus \u0026\u0026 editorLangId == php\"\n  },\n  {\n    \"key\": \"ctrl+shift+l\",\n    \"command\": \"type\",\n    \"args\": {\n      \"text\": \"\u003c?php\"\n    },\n    \"when\": \"textInputFocus \u0026\u0026 editorLangId == php\"\n  },\n  {\n    \"key\": \"shift+enter\",\n    \"command\": \"type\",\n    \"args\": {\n      \"text\": \"$\"\n    },\n    \"when\": \"textInputFocus \u0026\u0026 editorLangId == php\"\n  },\n  {\n    \"key\": \"shift+space\",\n    \"command\": \"type\",\n    \"args\": {\n      \"text\": \"_\"\n    },\n    \"when\": \"textInputFocus \u0026\u0026 editorLangId == php\"\n  }\n  ```\n\n## Adding Fira Code Font to VS Code Portable\n\n1. Open your VS Code installation folder,\n2. Navigate to:\n    ```batch \n    resources \u003e app \u003e out \u003e vs \u003ecode \u003e electron-sandbox \u003e workbench\n    ```\n\n3. Open `workbench.js` in a text editor,\n4. Add the following to the end of `workbench.js` then save it,\n\n    ```javascript\n    var styleNode = document.createElement('style'); \n    styleNode.type = \"text/css\"; \n    var styleText = document.createTextNode(`\n        @font-face{\n            font-family: 'Fira Code';\n            src: url('https://raw.githubusercontent.com/tonsky/FiraCode/master/distr/eot/FiraCode-Regular.eot') format('embedded-opentype'),\n                url('https://raw.githubusercontent.com/tonsky/FiraCode/master/distr/woff2/FiraCode-Regular.woff2') format('woff2'),\n                url('https://raw.githubusercontent.com/tonsky/FiraCode/master/distr/woff/FiraCode-Regular.woff') format('woff'),\n                url('https://raw.githubusercontent.com/tonsky/FiraCode/master/distr/ttf/FiraCode-Regular.ttf') format('truetype');\n            font-weight: normal;\n            font-style: normal;\n        }`); \n    styleNode.appendChild(styleText); \n    document.getElementsByTagName('head')[0].appendChild(styleNode);\n    ```\n5. Open VS Code\n6. Open `settings.json` then add the following:\n    ```json\n    \"editor.fontFamily\": \"Fira Code\",\n    \"editor.fontLigatures\": true,\n    \"editor.fontWeight\": \"400\" // normal\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrostybee%2Fslim-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrostybee%2Fslim-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrostybee%2Fslim-template/lists"}