diff --git a/README.md b/README.md index d205722..5600782 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Laravel Trmnl Server +## TRMNL BYOS (PHP/Laravel) Laravel Trmnl Server is a self-hostable implementation of a TRMNL server, built with Laravel. It enables you to manage TRMNL devices, generate screens dynamically, and can act as a proxy for the TRMNL API (native plugin system). @@ -25,6 +25,8 @@ This project is for developers who are looking for a self-hosted server for devi It serves as a starter kit, giving you the flexibility to build and extend it however you like. ### Support โค๏ธ +This repo is maintained voluntarily by [@bnussbau](https://github.com/bnussbau). + Support the development of this package by purchasing a TRMNL device through our referral link: https://usetrmnl.com/?ref=laravel-trmnl. At checkout, use the code `laravel-trmnl` to receive a $15 discount on your purchase. ### Requirements @@ -88,6 +90,7 @@ volumes: | `TRMNL_PROXY_BASE_URL` | Base URL of the native TRMNL service | https://trmnl.app | | `TRMNL_PROXY_REFRESH_MINUTES` | How often should the server fetch new images from native service | 15 | | `REGISTRATION_ENABLED` | Allow user registration via Webinterface | 1 | +| `FORCE_HTTPS` | If your server handles SSL termination, enforce HTTPS. | 0 | #### Login @@ -209,6 +212,36 @@ Schedule::command('plugin:train:fetch') This will automatically update the screen every 5 minutes between 5:00 AM and 6:00 PM local time. +### ๐Ÿ—๏ธ Roadmap + +Here are some features and improvements that are open for contribution: + +##### ๐Ÿ”Œ Plugin System + +- Enable configurable plugins via the Web Interface. +- Ensure compatibility with the trmnl-laravel package. +- Implement auto-discovery for plugins. + +##### โณ Scheduling + +- Move task scheduling from console.php to a Web Interface. +- Allow users to configure custom schedule intervals. + +##### ๐Ÿ–ฅ๏ธ โ€œNativeโ€ Plugins +- Add built-in plugins such as (as an example): + - โ˜๏ธ Weather + - ๐Ÿ’ฌ Quotes + - ๐Ÿก Home Assistant integration +- Provide Web UI controls to enable/disable plugins. + +##### ๐Ÿ“ฆ Visual Studio Code Devcontainer +* Add a .devcontainer to this repo for easier development with Docker. + +##### Improve Code Coverage + +- Expand Pest tests to cover more functionality. +- Increase code coverage (currently at 86.9%). + ### ๐Ÿค Contribution Contributions are welcome! If youโ€™d like to improve the project, follow these steps: @@ -227,36 +260,6 @@ Contributions are welcome! If youโ€™d like to improve the project, follow these ๐Ÿš€ Thank you for contributing! Every contribution helps improve the project. -### ๐Ÿ—๏ธ Roadmap - -Here are some features and improvements that are open for contribution: - -##### ๐Ÿ”Œ Plugin System - -- Enable configurable plugins via the Web Interface. -- Ensure compatibility with the trmnl-laravel package. -- Implement auto-discovery for plugins. - -##### โณ Scheduling - -- Move task scheduling from console.php to a Web Interface. -- Allow users to configure custom schedule intervals. - -##### ๐Ÿ–ฅ๏ธ โ€œNativeโ€ Plugins -- Add built-in plugins such as (as an example): - - โ˜๏ธ Weather - - ๐Ÿ’ฌ Quotes - - ๐Ÿก Home Assistant integration -- Provide Web UI controls to enable/disable plugins. - -##### ๐Ÿ“ฆ Visual Studio Code Devcontainer -* Add a .devcontainer to this repo for easier development with Docker. - -##### Improve Code Coverage - -- Expand Pest tests to cover more functionality. -- Increase code coverage (currently at 86.9%). - ### License MIT diff --git a/routes/api.php b/routes/api.php index 1e4f048..eabce1b 100644 --- a/routes/api.php +++ b/routes/api.php @@ -68,8 +68,9 @@ Route::get('/setup', function (Request $request) { if (! $mac_address) { return response()->json([ + 'status' => '404', 'message' => 'MAC Address not registered', - ], 400); + ], 404); } $device = Device::where('mac_address', $mac_address)->first(); @@ -90,6 +91,7 @@ Route::get('/setup', function (Request $request) { ]); } else { return response()->json([ + 'status' => '404', 'message' => 'MAC Address not registered or invalid access token', ], 404); } @@ -114,6 +116,7 @@ Route::post('/log', function (Request $request) { if (! $device) { return response()->json([ + 'status' => '404', 'message' => 'Device not found or invalid access token', ], 404); }