{"id":25809209,"url":"https://github.com/srafiqdotcom/lumen-boilerplate-api","last_synced_at":"2026-05-06T09:40:10.366Z","repository":{"id":261316484,"uuid":"878150814","full_name":"srafiqdotcom/lumen-boilerplate-api","owner":"srafiqdotcom","description":"A high-performance, scalable API boilerplate built with Lumen, optimized for microservices and lightweight applications. This boilerplate follows clean architecture principles, implements the repository design pattern, and includes built-in support for API versioning and query logging. Designed for developers who need a fast, efficient. cheers","archived":false,"fork":false,"pushed_at":"2024-11-05T21:43:52.000Z","size":7998,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-05T22:28:06.322Z","etag":null,"topics":["boilerplate","laravel","lumen","php","repository","repository-pattern","rest-api","restful-api","versioned-api","versioning"],"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/srafiqdotcom.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":"2024-10-24T21:13:55.000Z","updated_at":"2024-11-05T21:43:55.000Z","dependencies_parsed_at":"2024-11-05T22:30:45.367Z","dependency_job_id":"8e49b0fb-60dd-4c79-b0b6-9bfb0d5d356e","html_url":"https://github.com/srafiqdotcom/lumen-boilerplate-api","commit_stats":null,"previous_names":["srafiqdotcom/lumen-boilerplate-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srafiqdotcom%2Flumen-boilerplate-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srafiqdotcom%2Flumen-boilerplate-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srafiqdotcom%2Flumen-boilerplate-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srafiqdotcom%2Flumen-boilerplate-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srafiqdotcom","download_url":"https://codeload.github.com/srafiqdotcom/lumen-boilerplate-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241070745,"owners_count":19904438,"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":["boilerplate","laravel","lumen","php","repository","repository-pattern","rest-api","restful-api","versioned-api","versioning"],"created_at":"2025-02-27T22:52:43.290Z","updated_at":"2026-05-06T09:40:05.337Z","avatar_url":"https://github.com/srafiqdotcom.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lumen PHP Framework\n\n[![Build Status](https://travis-ci.org/laravel/lumen-framework.svg)](https://travis-ci.org/laravel/lumen-framework)\n[![Total Downloads](https://img.shields.io/packagist/dt/laravel/lumen-framework)](https://packagist.org/packages/laravel/lumen-framework)\n[![Latest Stable Version](https://img.shields.io/packagist/v/laravel/lumen-framework)](https://packagist.org/packages/laravel/lumen-framework)\n[![License](https://img.shields.io/packagist/l/laravel/lumen)](https://packagist.org/packages/laravel/lumen-framework)\n\n\n\n\n\n\nLaravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Lumen attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as routing, database abstraction, queueing, and caching.\n\n\u003e **Note:** In the years since releasing Lumen, PHP has made a variety of wonderful performance improvements. For this reason, along with the availability of [Laravel Octane](https://laravel.com/docs/octane), we no longer recommend that you begin new projects with Lumen. Instead, we recommend always beginning new projects with [Laravel](https://laravel.com).\n\n\n# Lumen API Project\n\nWelcome to the Lumen API boilerplate! This project is designed to help you quickly set up a Lumen-based API with minimal configuration.\n\n## Requirements\n\n- **PHP** \u003e= 7.3\n- **Composer** (dependency manager)\n- **Database**: MySQL (or another supported database of your choice)\n\n## Getting Started\n\nFollow these steps to set up and run the project:\n\n### 1. Clone the Repository\n\nClone the repository and navigate into the project directory:\n\n\ngit clone \u003crepository-url\u003e\ncd \u003cproject-directory\u003e\n\n### 2. Install Dependencies\n\ncomposer install\n\n### 3. Set Up Environment Variables\n\nLumen uses an .env file to store environment variables. If there is no .env file, create one by copying the example file:\n\ncp .env.example .env\nor \ntouch .env\n\n### 4. Generate the Application Key\nIf your application needs encryption or hashed tokens, you’ll need to generate an APP_KEY. Run the following command to generate a base64-encoded 32-character key:\n\nphp -r \"echo 'base64:'.base64_encode(random_bytes(32)), PHP_EOL;\"\n\nTake the output from the command and add it to your .env file as follows:\n\n\nAPP_KEY=base64:your_generated_key\n\n### 5. Configure Database\n   Edit the .env file to add your database configuration. Update the following fields with your database details:\n\n### 6. Run Migrations (if applicable)\nIf your application includes database migrations, run the following command to create the necessary tables:\n\nphp artisan migrate\n\n### 7. Start the Development Server\nTo start the server on localhost:8000, use the following command:\n\nphp -S localhost:8000 -t public\n### 8. Query Logging\n\nThis Lumen API boilerplate includes an optional query logging feature in the authentication middleware, which allows you to log all database queries executed during a request. This can be useful for debugging and performance monitoring.\n\nWhen LOG_QUERIES is set to true, the middleware will log all executed queries for each authenticated request. This data is appended to the API response as a queries field, allowing you to inspect SQL statements and their bindings.\n\n### Enabling Query Logging\n\nTo enable query logging, set the `LOG_QUERIES` environment variable to `true` in your `.env` file:\n\n\nLOG_QUERIES=true\nTo start the server on localhost:8000, use the following command:\n\n## Additional Configuration\n\nScheduled Tasks: If your application uses scheduled tasks, configure a cron job on your server to run the scheduler every minute. Here’s an example cron configuration:\n\n* * * * * php /path-to-your-project/artisan schedule:run \u003e\u003e /dev/null 2\u003e\u00261\n\n# Troubleshooting\nError with Missing RouteServiceProvider: Lumen does not use RouteServiceProvider by default. Ensure that routes are defined directly in routes/web.php or routes/api.php.\n\nCustom Middleware: If you need middleware like ThrottleRequests or ValidateSignature, refer to the Lumen documentation on adding custom middleware as they are not included by default.\n\n\n## Official Documentation\n\nDocumentation for the framework can be found on the [Lumen website](https://lumen.laravel.com/docs).\n\n## Contributing\n\nThank you for considering contributing to Lumen! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).\n\n## Security Vulnerabilities\n\nIf you discover a security vulnerability within Lumen, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed.\n\n## License\n\nThe Lumen framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrafiqdotcom%2Flumen-boilerplate-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrafiqdotcom%2Flumen-boilerplate-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrafiqdotcom%2Flumen-boilerplate-api/lists"}