Laravel Package Directory
Ever found a useful package and wished more people knew about it? Now you can submit it to Indxs.dev, where developers explore and discover great tools.
Right now, we have three indexes:
✅ PHP
✅ Laravel
✅ Filament
If you know a package that deserves a spot, go ahead and add it. Let's make it easier for devs to find the right tools!
https://indxs.dev
https://redd.it/1j77dqn
@r_php
Ever found a useful package and wished more people knew about it? Now you can submit it to Indxs.dev, where developers explore and discover great tools.
Right now, we have three indexes:
✅ PHP
✅ Laravel
✅ Filament
If you know a package that deserves a spot, go ahead and add it. Let's make it easier for devs to find the right tools!
https://indxs.dev
https://redd.it/1j77dqn
@r_php
indxs.dev
Indxs - Explore Open Source Packages
Find the best Laravel and PHP packages.
Weekly /r/Laravel Help Thread
Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:
What steps have you taken so far?
What have you tried from the documentation?
Did you provide any error messages you are getting?
Are you able to provide instructions to replicate the issue?
Did you provide a code example?
Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.
For more immediate support, you can ask in the official Laravel Discord.
Thanks and welcome to the r/Laravel community!
https://redd.it/1j7c1k4
@r_php
Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:
What steps have you taken so far?
What have you tried from the documentation?
Did you provide any error messages you are getting?
Are you able to provide instructions to replicate the issue?
Did you provide a code example?
Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.
For more immediate support, you can ask in the official Laravel Discord.
Thanks and welcome to the r/Laravel community!
https://redd.it/1j7c1k4
@r_php
Laravel
Installation - Laravel 12.x - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
[Update] Laravel AI Translator: Now with Extended Thinking, Crowdin Support, and Beautiful Terminal UI
Hey Laravel folks! Remember that AI translation package I shared a while back? Well, I've been busy cooking up some major improvements, and I'm excited to share what's new.
# The Big One: Context makes your website feel like local website
The biggest game-changer in this update is how we handle translation context. Now, when translating any string, the AI sees EVERYTHING - all previously translated strings and all source strings across ALL your files. This means your translations stay incredibly consistent. No more "Login" being translated five different ways across your app.
Example terminal output showing the context loading:
ℹ Loading reference: ko_KR - 9 files
ℹ Using context: 10 files, 71 items
# Gorgeous Terminal UI
The terminal output got a serious glow-up. It's not just pretty - it's informative as hell. You get:
* Real-time progress for each translation
* Token usage tracking (yes, you can see exactly how much each translation costs)
* Color-coded status indicators
* Detailed file processing information
Here's a snippet of what it looks like now:
File Translation
File: profile.php
Language: ko_KR
Source: lang/en/profile.php
Target: lang/ko_KR/profile.php
⏺ Processing chunk 1/2 (50 strings)
ℹ Using context: 10 files, 71 items
🧠 AI Thinking...
⟳ profile.matches.columns.deaths → 죽음
⟳ profile.matches.columns.knocked → 넉다운
Tokens: Input=2193, Output=3, Total=2196
[Example of extended thinking](https://preview.redd.it/xvzbrtt8mpne1.png?width=2034&format=png&auto=webp&s=879517ffeb75137450df78aa04849ce3ec6e1cb3)
https://preview.redd.it/qho3zfjhmpne1.png?width=2572&format=png&auto=webp&s=fcaeaeddfe76afd93622777ca83b00fd52282bc5
# Claude 3.7 Sonnet with Extended Thinking
We're now leveraging Claude 3.7's Extended Thinking capabilities. This means:
* Massive 200K token context window
* Up to 64K output tokens
* Better reasoning for complex translations
* More natural and contextually aware translations
# Surprise Feature: Crowdin Integration (Beta)
Here's something cool - you can now translate your Crowdin projects directly! And it's not just for Laravel - it works with ANY project on Crowdin. Want to know how? Drop a comment, and I'll share the details.
# Complete Code Overhaul
I basically rewrote the entire thing. The codebase is now:
* More maintainable with dedicated service classes
* Better organized with clear separation of concerns
* More efficient with optimized API calls
* More robust with improved error handling
# Want to Try It Out?
Check out the package: [kargnas/laravel-ai-translator](https://github.com/kargnas/laravel-ai-translator)
Let me know if you have any questions or run into issues. I'm actively maintaining this and would love your feedback!
P.S. If you're using the previous version, you might want to update - the consistency improvements alone are worth it.
P.S. Look at the default config file!
https://redd.it/1j7efct
@r_php
Hey Laravel folks! Remember that AI translation package I shared a while back? Well, I've been busy cooking up some major improvements, and I'm excited to share what's new.
# The Big One: Context makes your website feel like local website
The biggest game-changer in this update is how we handle translation context. Now, when translating any string, the AI sees EVERYTHING - all previously translated strings and all source strings across ALL your files. This means your translations stay incredibly consistent. No more "Login" being translated five different ways across your app.
Example terminal output showing the context loading:
ℹ Loading reference: ko_KR - 9 files
ℹ Using context: 10 files, 71 items
# Gorgeous Terminal UI
The terminal output got a serious glow-up. It's not just pretty - it's informative as hell. You get:
* Real-time progress for each translation
* Token usage tracking (yes, you can see exactly how much each translation costs)
* Color-coded status indicators
* Detailed file processing information
Here's a snippet of what it looks like now:
File Translation
File: profile.php
Language: ko_KR
Source: lang/en/profile.php
Target: lang/ko_KR/profile.php
⏺ Processing chunk 1/2 (50 strings)
ℹ Using context: 10 files, 71 items
🧠 AI Thinking...
⟳ profile.matches.columns.deaths → 죽음
⟳ profile.matches.columns.knocked → 넉다운
Tokens: Input=2193, Output=3, Total=2196
[Example of extended thinking](https://preview.redd.it/xvzbrtt8mpne1.png?width=2034&format=png&auto=webp&s=879517ffeb75137450df78aa04849ce3ec6e1cb3)
https://preview.redd.it/qho3zfjhmpne1.png?width=2572&format=png&auto=webp&s=fcaeaeddfe76afd93622777ca83b00fd52282bc5
# Claude 3.7 Sonnet with Extended Thinking
We're now leveraging Claude 3.7's Extended Thinking capabilities. This means:
* Massive 200K token context window
* Up to 64K output tokens
* Better reasoning for complex translations
* More natural and contextually aware translations
# Surprise Feature: Crowdin Integration (Beta)
Here's something cool - you can now translate your Crowdin projects directly! And it's not just for Laravel - it works with ANY project on Crowdin. Want to know how? Drop a comment, and I'll share the details.
# Complete Code Overhaul
I basically rewrote the entire thing. The codebase is now:
* More maintainable with dedicated service classes
* Better organized with clear separation of concerns
* More efficient with optimized API calls
* More robust with improved error handling
# Want to Try It Out?
Check out the package: [kargnas/laravel-ai-translator](https://github.com/kargnas/laravel-ai-translator)
Let me know if you have any questions or run into issues. I'm actively maintaining this and would love your feedback!
P.S. If you're using the previous version, you might want to update - the consistency improvements alone are worth it.
P.S. Look at the default config file!
https://redd.it/1j7efct
@r_php
Weekly Ask Anything Thread
Feel free to ask any questions you think may not warrant a post. Asking for help here is also fine.
https://redd.it/1j7pbfw
@r_php
Feel free to ask any questions you think may not warrant a post. Asking for help here is also fine.
https://redd.it/1j7pbfw
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Samarium v0.9.4 - Improvements and fixes (PHP code update, DB seeding update, misc)
Hello all,
Made some improvements and fixes during February and March upto now to the ERP I have been developing with Laravel and Livewire. Wanted to share version 0.9.4 with you all. Also, thanks to couple of pull requests from the community.
https://github.com/oitcode/samarium
|Area|Improvements|
|:-|:-|
|PHP code updates|Updated PHP code to more recent standard with return type hinting in methods in Controller and Livewire components.|
|Test Code|Added some more test code. (Thanks to PR).|
|Database seeding|Added more seeder files. Now a minimum working website is setup as soon as you run seeder files at the beginning of installation.|
|Misc updates|Refactored many blade files to make them more easier to understand.|
Dashboard
https://preview.redd.it/j7b0byo11tne1.png?width=1850&format=png&auto=webp&s=9cca52e88ffb6c9005afc26cf1f997924a638870
Website homepage
https://preview.redd.it/ppi3kww41tne1.png?width=1848&format=png&auto=webp&s=d5fc9250be5b2dbb343f4c6aa06a14d5f76f2731
Just wanted to share this update here after working during February and March upto now.
Any feedback, comments and/or contributions are highly appreciated.
Thanks.
https://redd.it/1j7s9k1
@r_php
Hello all,
Made some improvements and fixes during February and March upto now to the ERP I have been developing with Laravel and Livewire. Wanted to share version 0.9.4 with you all. Also, thanks to couple of pull requests from the community.
https://github.com/oitcode/samarium
|Area|Improvements|
|:-|:-|
|PHP code updates|Updated PHP code to more recent standard with return type hinting in methods in Controller and Livewire components.|
|Test Code|Added some more test code. (Thanks to PR).|
|Database seeding|Added more seeder files. Now a minimum working website is setup as soon as you run seeder files at the beginning of installation.|
|Misc updates|Refactored many blade files to make them more easier to understand.|
Dashboard
https://preview.redd.it/j7b0byo11tne1.png?width=1850&format=png&auto=webp&s=9cca52e88ffb6c9005afc26cf1f997924a638870
Website homepage
https://preview.redd.it/ppi3kww41tne1.png?width=1848&format=png&auto=webp&s=d5fc9250be5b2dbb343f4c6aa06a14d5f76f2731
Just wanted to share this update here after working during February and March upto now.
Any feedback, comments and/or contributions are highly appreciated.
Thanks.
https://redd.it/1j7s9k1
@r_php
GitHub
GitHub - shyamsitaula/samarium: Open-source business management system with ERP, POS, invoicing, and CMS features. Laravel-based…
Open-source business management system with ERP, POS, invoicing, and CMS features. Laravel-based, Docker-ready. Still in active development. - shyamsitaula/samarium
Weekly help thread
Hey there!
This subreddit isn't meant for help threads, though there's one exception to the rule: in this thread you can ask anything you want PHP related, someone will probably be able to help you out!
https://redd.it/1j7stwo
@r_php
Hey there!
This subreddit isn't meant for help threads, though there's one exception to the rule: in this thread you can ask anything you want PHP related, someone will probably be able to help you out!
https://redd.it/1j7stwo
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Laravel updated its home page again, for the better.
Kudos to the team for listening to the community's feedback regarding the latest design changes. 👍
Posting this because I was among those who criticized the "scroll jacking" and bezels on the code blocks.
https://preview.redd.it/rrdwk9qvmtne1.jpg?width=1080&format=pjpg&auto=webp&s=af5a895f40f48f700e707f628f3db74be3ceae03
https://redd.it/1j7tsy2
@r_php
Kudos to the team for listening to the community's feedback regarding the latest design changes. 👍
Posting this because I was among those who criticized the "scroll jacking" and bezels on the code blocks.
https://preview.redd.it/rrdwk9qvmtne1.jpg?width=1080&format=pjpg&auto=webp&s=af5a895f40f48f700e707f628f3db74be3ceae03
https://redd.it/1j7tsy2
@r_php
Need some suggestion on using rector with laravel
So I have been messing around with rector for a while now, including laravel-rector but I think I may have gone a bit overboard with some of the configurations so before I dive too deep, I wanted to get some suggestions from you guys
<?php
declare(stricttypes=1);
use Rector\CodingStyle\Rector\Catch\CatchExceptionNameMatchingTypeRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
use Rector\CodingStyle\Rector\Stmt\RemoveUselessAliasInUseStatementRector;
use Rector\CodingStyle\Rector\Use\SeparateMultiUseImportsRector;
use Rector\Config\RectorConfig;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
use Rector\Set\ValueObject\SetList;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNewArrayRector;
use Rector\ValueObject\PhpVersion;
use RectorLaravel\Rector\Class\AddExtendsAnnotationToModelFactoriesRector;
use RectorLaravel\Rector\Class\ModelCastsPropertyToCastsMethodRector;
use RectorLaravel\Rector\ClassMethod\AddGenericReturnTypeToRelationsRector;
use RectorLaravel\Rector\MethodCall\EloquentWhereRelationTypeHintingParameterRector;
use RectorLaravel\Rector\MethodCall\EloquentWhereTypeHintClosureParameterRector;
use RectorLaravel\Rector\MethodCall\ValidationRuleArrayStringValueToArrayRector;
use RectorLaravel\Rector\MethodCall\WhereToWhereLikeRector;
use RectorLaravel\Rector\PropertyFetch\ReplaceFakerInstanceWithHelperRector;
use RectorLaravel\Set\LaravelSetList;
return RectorConfig::configure()
->withPaths([
DIR.'/app',
DIR.'/bootstrap/app.php',
DIR.'/database',
DIR.'/public',
DIR.'/routes',
DIR.'/tests',
])
->withSkip([
AddOverrideAttributeToOverriddenMethodsRector::class,
EncapsedStringsToSprintfRector::class
]) // also this one which you will understand later why use this or not
->withSets([
SetList::DEADCODE,
SetList::CODEQUALITY,
SetList::CODINGSTYLE,
SetList::TYPEDECLARATION,
SetList::PRIVATIZATION,
SetList::EARLYRETURN,
SetList::STRICTBOOLEANS,
LaravelSetList::LARAVEL110,
LaravelSetList::LARAVELCODEQUALITY,
LaravelSetList::LARAVELCOLLECTION,
LaravelSetList::LARAVELARRAYSTRFUNCTIONTOSTATICCALL,
])
->withRules([
SeparateMultiUseImportsRector::class,
RemoveUselessAliasInUseStatementRector::class,
NewlineAfterStatementRector::class,
CatchExceptionNameMatchingTypeRector::class,
ReturnTypeFromStrictNewArrayRector::class,
AddGenericReturnTypeToRelationsRector::class,
AddExtendsAnnotationToModelFactoriesRector::class,
EloquentWhereRelationTypeHintingParameterRector::class,
EloquentWhereTypeHintClosureParameterRector::class,
ModelCastsPropertyToCastsMethodRector::class,
ReplaceFakerInstanceWithHelperRector::class,
ValidationRuleArrayStringValueToArrayRector::class,
WhereToWhereLikeRector::class,
])
->withImportNames()
->withPhpVersion(PhpVersion::PHP84)
->withPhpSets();
let me know, what's your
So I have been messing around with rector for a while now, including laravel-rector but I think I may have gone a bit overboard with some of the configurations so before I dive too deep, I wanted to get some suggestions from you guys
<?php
declare(stricttypes=1);
use Rector\CodingStyle\Rector\Catch\CatchExceptionNameMatchingTypeRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
use Rector\CodingStyle\Rector\Stmt\RemoveUselessAliasInUseStatementRector;
use Rector\CodingStyle\Rector\Use\SeparateMultiUseImportsRector;
use Rector\Config\RectorConfig;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
use Rector\Set\ValueObject\SetList;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNewArrayRector;
use Rector\ValueObject\PhpVersion;
use RectorLaravel\Rector\Class\AddExtendsAnnotationToModelFactoriesRector;
use RectorLaravel\Rector\Class\ModelCastsPropertyToCastsMethodRector;
use RectorLaravel\Rector\ClassMethod\AddGenericReturnTypeToRelationsRector;
use RectorLaravel\Rector\MethodCall\EloquentWhereRelationTypeHintingParameterRector;
use RectorLaravel\Rector\MethodCall\EloquentWhereTypeHintClosureParameterRector;
use RectorLaravel\Rector\MethodCall\ValidationRuleArrayStringValueToArrayRector;
use RectorLaravel\Rector\MethodCall\WhereToWhereLikeRector;
use RectorLaravel\Rector\PropertyFetch\ReplaceFakerInstanceWithHelperRector;
use RectorLaravel\Set\LaravelSetList;
return RectorConfig::configure()
->withPaths([
DIR.'/app',
DIR.'/bootstrap/app.php',
DIR.'/database',
DIR.'/public',
DIR.'/routes',
DIR.'/tests',
])
->withSkip([
AddOverrideAttributeToOverriddenMethodsRector::class,
EncapsedStringsToSprintfRector::class
]) // also this one which you will understand later why use this or not
->withSets([
SetList::DEADCODE,
SetList::CODEQUALITY,
SetList::CODINGSTYLE,
SetList::TYPEDECLARATION,
SetList::PRIVATIZATION,
SetList::EARLYRETURN,
SetList::STRICTBOOLEANS,
LaravelSetList::LARAVEL110,
LaravelSetList::LARAVELCODEQUALITY,
LaravelSetList::LARAVELCOLLECTION,
LaravelSetList::LARAVELARRAYSTRFUNCTIONTOSTATICCALL,
])
->withRules([
SeparateMultiUseImportsRector::class,
RemoveUselessAliasInUseStatementRector::class,
NewlineAfterStatementRector::class,
CatchExceptionNameMatchingTypeRector::class,
ReturnTypeFromStrictNewArrayRector::class,
AddGenericReturnTypeToRelationsRector::class,
AddExtendsAnnotationToModelFactoriesRector::class,
EloquentWhereRelationTypeHintingParameterRector::class,
EloquentWhereTypeHintClosureParameterRector::class,
ModelCastsPropertyToCastsMethodRector::class,
ReplaceFakerInstanceWithHelperRector::class,
ValidationRuleArrayStringValueToArrayRector::class,
WhereToWhereLikeRector::class,
])
->withImportNames()
->withPhpVersion(PhpVersion::PHP84)
->withPhpSets();
let me know, what's your
Get Raw SQL, Record HTTP & Assert Only Invalid in Laravel 11.44 & 12.1
https://youtu.be/pAIZBIr3HGY
https://redd.it/1j7x8ap
@r_php
https://youtu.be/pAIZBIr3HGY
https://redd.it/1j7x8ap
@r_php
YouTube
Raw SQL, Record HTTP & Assert Only Invalid in Laravel 11.44 & 12.1
What's new in Laravel is back! We share new features of the Laravel framework every week 🙌 (v11.44 & v12.1)
1️⃣ Get Raw SQL
https://github.com/laravel/framework/pull/54849
2️⃣ Record HTTP Requests
https://github.com/laravel/framework/pull/54850
…
1️⃣ Get Raw SQL
https://github.com/laravel/framework/pull/54849
2️⃣ Record HTTP Requests
https://github.com/laravel/framework/pull/54850
…
Laravel Typesafe AI responses with Prism and DTOs
https://www.luckymedia.dev/blog/laravel-typesafe-ai-responses-with-prism-and-dtos
https://redd.it/1j7ywks
@r_php
https://www.luckymedia.dev/blog/laravel-typesafe-ai-responses-with-prism-and-dtos
https://redd.it/1j7ywks
@r_php
Lucky Media
Laravel Typesafe AI responses with Prism and DTOs - Lucky Media
For over a decade, Lucky Media has been a leading Software Development Agency in the US, based in Dallas, TX. We build custom software solutions for your business.
🚀 Keysmith React - API Key Management for Laravel 12 React Starterkit
Hey fellow devs! 👋
I just released Keysmith React, a Laravel 12 + React starter kit for managing API tokens using Laravel Sanctum. This package provides pre-built React components to create, view, and revoke API tokens, making it super easy to add API authentication to your project.
🔥 Why Use Keysmith React?
✅ Pre-built React components – No need to build UI from scratch
✅ Secure API token management – Uses Laravel Sanctum
✅ Easy installation – Simple to set, up and running in minutes
✅ Flexible templates – Standalone API page or integrated settings panel
✅ Custom permissions support – Fine-tune API access control
🔗 Check it out on GitHub: https://github.com/Blaspsoft/keysmith-react
Would love to get your thoughts and feedback! 🙌 If you're building Laravel APIs, does this solve a pain point for you? Let me know what you'd like to see next! 🚀
https://redd.it/1j80le9
@r_php
Hey fellow devs! 👋
I just released Keysmith React, a Laravel 12 + React starter kit for managing API tokens using Laravel Sanctum. This package provides pre-built React components to create, view, and revoke API tokens, making it super easy to add API authentication to your project.
🔥 Why Use Keysmith React?
✅ Pre-built React components – No need to build UI from scratch
✅ Secure API token management – Uses Laravel Sanctum
✅ Easy installation – Simple to set, up and running in minutes
✅ Flexible templates – Standalone API page or integrated settings panel
✅ Custom permissions support – Fine-tune API access control
🔗 Check it out on GitHub: https://github.com/Blaspsoft/keysmith-react
Would love to get your thoughts and feedback! 🙌 If you're building Laravel APIs, does this solve a pain point for you? Let me know what you'd like to see next! 🚀
https://redd.it/1j80le9
@r_php
GitHub
GitHub - Blaspsoft/keysmith-react: 🔑 ⚛️ Keysmith React is a Laravel 12 package that extends the Laravel 12 React Starter Kit by…
🔑 ⚛️ Keysmith React is a Laravel 12 package that extends the Laravel 12 React Starter Kit by enabling API token management through Laravel Sanctum. Built on the Laravel Breeze implementation, it in...
I need advice as a PHP developer
Hi. I generally work as a bit full stack developer for almost 7 years. First about 8 months in symfony 3 since then for 5 years in Yii2 and React and one project in node.js
Generally there are few offers on Yii2 and I want to develop towards the popular and big Symfony or Laravel. I'm currently learning Symfony basics and Laravel I'm also trying to learn but I don't know too much in which direction to go which is the most popular. I like Symfony the most because of the freedom and openness.
(Currently looking for new job) I've been looking for 3 months for new job in this direction but I guess the competition is high because however after every intereview there is no more response.
I need some advice on what direction is best to go now and what tools besides Symfony/Laravel are worth exploring to increase my chances.
Thanks for advice.
https://redd.it/1j84i6g
@r_php
Hi. I generally work as a bit full stack developer for almost 7 years. First about 8 months in symfony 3 since then for 5 years in Yii2 and React and one project in node.js
Generally there are few offers on Yii2 and I want to develop towards the popular and big Symfony or Laravel. I'm currently learning Symfony basics and Laravel I'm also trying to learn but I don't know too much in which direction to go which is the most popular. I like Symfony the most because of the freedom and openness.
(Currently looking for new job) I've been looking for 3 months for new job in this direction but I guess the competition is high because however after every intereview there is no more response.
I need some advice on what direction is best to go now and what tools besides Symfony/Laravel are worth exploring to increase my chances.
Thanks for advice.
https://redd.it/1j84i6g
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Repository Testing Done Right
https://sarvendev.com/posts/repository-testing/
https://redd.it/1j8670q
@r_php
https://sarvendev.com/posts/repository-testing/
https://redd.it/1j8670q
@r_php
Kamil Ruczyński
Repository Testing Done Right
In most projects, there is a need to interact with some kind of database. There is an approach that we have a layer called repository which is responsible for saving and retrieving data from the database. Usually, we write an integration test for the repository…
I created a D&D character API using PHP and Laravel
For the past couple of months I've been building out an API to create and manage D&D characters using the 5E rules. I originally created it just as a learning tool (I'm a developer by profession, but out of work at the moment, the market hasn't been great recently) but I envisage it as an alternative (one day) to many of the bigger paid-for services out there, as it's completely free and has no restrictions.
Currently, the API allows you to:
* Create characters, and set their class, background, race, languages, stats, spells
* Get race-specific name suggestions (not AI, but a custom Markov chain generator)
* Roll dice from the standard 6 types (d4 - d20)
* Generate creature encounters based on a party of characters (limited to a party of a single user currently, but I can adapt this to allow a mix of characters from many users in the future)
* Generate random items, from armor and weapons, to books and gemstones. There is even a small chance to generate magical items!
There are also endpoints for listing out general things like classes, races, languages, spells, and more.
The whole API has a Postman collection to help make it easier to work with as well, and I've documented it on the homepage of the API website.
The API is available at: https://dndapi.ashleysheridan.co.uk/
https://redd.it/1j875qd
@r_php
For the past couple of months I've been building out an API to create and manage D&D characters using the 5E rules. I originally created it just as a learning tool (I'm a developer by profession, but out of work at the moment, the market hasn't been great recently) but I envisage it as an alternative (one day) to many of the bigger paid-for services out there, as it's completely free and has no restrictions.
Currently, the API allows you to:
* Create characters, and set their class, background, race, languages, stats, spells
* Get race-specific name suggestions (not AI, but a custom Markov chain generator)
* Roll dice from the standard 6 types (d4 - d20)
* Generate creature encounters based on a party of characters (limited to a party of a single user currently, but I can adapt this to allow a mix of characters from many users in the future)
* Generate random items, from armor and weapons, to books and gemstones. There is even a small chance to generate magical items!
There are also endpoints for listing out general things like classes, races, languages, spells, and more.
The whole API has a Postman collection to help make it easier to work with as well, and I've documented it on the homepage of the API website.
The API is available at: https://dndapi.ashleysheridan.co.uk/
https://redd.it/1j875qd
@r_php
Fadogen Build and deploy, easily - now open source
Hello everyone, I'm back with updates about my Fadogen project. I've spent almost an entire month working on it since my first post about it. Lots of new features to share with you.
The first and most important update is that the project is now open source:
https://github.com/fouteox/fadogen
This gives you the option to use it locally. But you can still use the website if you prefer: https://fadogen.app
First, as a reminder, Fadogen allows you to initialize applications very easily using Docker and DDEV.
# What's changed since last time?
I've added the ability to deploy self-hosted applications on a Raspberry Pi just as easily (I hope) as initializing them. All this is thanks to Cloudflare tunnels, so without opening any ports on your router. The only prerequisite is having a domain name on your Cloudflare account (you don't even need to configure it).
# Let me explain what happens under the hood
When you initialize an application with Fadogen, you choose different options such as:
\- A database
\- A starter kit
\- Your preferred JavaScript package manager (npm or bun)
\- Horizon with Valkey or Redis
\- Reverb
\- Octane with FrankenPHP
Based on all your choices, Fadogen configures what's necessary for development, but now also for production. Here's everything that's generated for you according to your choices:
\- compose.production.yaml
\- Dockerfile
\- Caddyfile
\- Several supervisor files
\- .env.production
\- A GitHub action file
You don't have to configure anything manually.
Once you're ready to deploy your application, the next step is to run the following command at the root of your project: `ddev prepare`
This is a DDEV add-on that's automatically added to your project during its initialization.
# What does this add-on do?
First, I want to clarify that everything now happens locally, nothing is sent to Fadogen from this point on.
It will ask you several questions in your terminal:
\- It will ask for your Cloudflare email and API key
\- An API call is made to your account to retrieve the domain names linked to your Cloudflare account
\- These domain names are listed and you need to select one
\- Then, the username and local address of your Raspberry Pi is requested
\- Next, you'll be invited to connect to your GitHub account via the CLI
From there, you're definitely done with the "configuration" part. The add-on takes care of the rest.
It will handle adding to your GitHub repository all the secrets that the GitHub workflow will need for deployments:
\- The .env.production file encoded in base64
\- The UID, GID, and username of your Raspberry Pi
\- The SSH address of your Raspberry Pi
\- The remote hostname
\- Your private SSH key for deployments
Now, one last part of the noscript will trigger automatically.
This step configures your Raspberry Pi to install Docker, add your user to the Docker group, install the "cloudflared" tool to enable Cloudflare tunnel usage, make API calls to your Cloudflare account to create the tunnel and redirect traffic from the domain name to your Raspberry Pi, and also create a secure SSH tunnel that will be used in the GitHub action.
A Traefik container will also be created as a reverse proxy to route traffic to the correct containers.
Once everything is done, you're ready!
The next step now lies in GitHub actions. This will trigger with each merge into the main branch or manually via the GitHub interface.
This GitHub action connects to your Raspberry Pi thanks to the Cloudflare tunnel and deploys the new version of your application.
# What should I do to try the tool?
\- [ \] Initialize a project from https://fadogen.app or by cloning the project locally
\- [ \] Have a domain name registered with Cloudflare
\- [ \] Set up a Raspberry Pi (Pi 5 and 4GB recommended) by adding your public SSH key when flashing the SD card (SSD preferred)
\- [ \] Get your Cloudflare API key =>
Hello everyone, I'm back with updates about my Fadogen project. I've spent almost an entire month working on it since my first post about it. Lots of new features to share with you.
The first and most important update is that the project is now open source:
https://github.com/fouteox/fadogen
This gives you the option to use it locally. But you can still use the website if you prefer: https://fadogen.app
First, as a reminder, Fadogen allows you to initialize applications very easily using Docker and DDEV.
# What's changed since last time?
I've added the ability to deploy self-hosted applications on a Raspberry Pi just as easily (I hope) as initializing them. All this is thanks to Cloudflare tunnels, so without opening any ports on your router. The only prerequisite is having a domain name on your Cloudflare account (you don't even need to configure it).
# Let me explain what happens under the hood
When you initialize an application with Fadogen, you choose different options such as:
\- A database
\- A starter kit
\- Your preferred JavaScript package manager (npm or bun)
\- Horizon with Valkey or Redis
\- Reverb
\- Octane with FrankenPHP
Based on all your choices, Fadogen configures what's necessary for development, but now also for production. Here's everything that's generated for you according to your choices:
\- compose.production.yaml
\- Dockerfile
\- Caddyfile
\- Several supervisor files
\- .env.production
\- A GitHub action file
You don't have to configure anything manually.
Once you're ready to deploy your application, the next step is to run the following command at the root of your project: `ddev prepare`
This is a DDEV add-on that's automatically added to your project during its initialization.
# What does this add-on do?
First, I want to clarify that everything now happens locally, nothing is sent to Fadogen from this point on.
It will ask you several questions in your terminal:
\- It will ask for your Cloudflare email and API key
\- An API call is made to your account to retrieve the domain names linked to your Cloudflare account
\- These domain names are listed and you need to select one
\- Then, the username and local address of your Raspberry Pi is requested
\- Next, you'll be invited to connect to your GitHub account via the CLI
From there, you're definitely done with the "configuration" part. The add-on takes care of the rest.
It will handle adding to your GitHub repository all the secrets that the GitHub workflow will need for deployments:
\- The .env.production file encoded in base64
\- The UID, GID, and username of your Raspberry Pi
\- The SSH address of your Raspberry Pi
\- The remote hostname
\- Your private SSH key for deployments
Now, one last part of the noscript will trigger automatically.
This step configures your Raspberry Pi to install Docker, add your user to the Docker group, install the "cloudflared" tool to enable Cloudflare tunnel usage, make API calls to your Cloudflare account to create the tunnel and redirect traffic from the domain name to your Raspberry Pi, and also create a secure SSH tunnel that will be used in the GitHub action.
A Traefik container will also be created as a reverse proxy to route traffic to the correct containers.
Once everything is done, you're ready!
The next step now lies in GitHub actions. This will trigger with each merge into the main branch or manually via the GitHub interface.
This GitHub action connects to your Raspberry Pi thanks to the Cloudflare tunnel and deploys the new version of your application.
# What should I do to try the tool?
\- [ \] Initialize a project from https://fadogen.app or by cloning the project locally
\- [ \] Have a domain name registered with Cloudflare
\- [ \] Set up a Raspberry Pi (Pi 5 and 4GB recommended) by adding your public SSH key when flashing the SD card (SSD preferred)
\- [ \] Get your Cloudflare API key =>
GitHub
GitHub - fouteox/fadogen: Build and deploy applications easily.
Build and deploy applications easily. Contribute to fouteox/fadogen development by creating an account on GitHub.
Profile => API Tokens => Global API Key. It's normally better to use a specific token but there's currently a bug retrieving domain names; I created a topic on the Cloudflare forum (https://community.cloudflare.com/t/authentication-issue-with-api-tokens-when-accessing-cloudflare-registrar-domains/776526/1)
\- [ \] Run the command "ddev prepare" and follow the instructions!
# Why create Fadogen?
Today, the recommended way to create a Laravel application is to use Herd. You can use the free version but if you don't have knowledge about databases, Redis, and Reverb, you need to pay for the pro version: $99 per year.
Now you want to host your application? You need to select a VPS like Hetzner, Digital Ocean, AWS... $5 per month on average.
You now want to deploy the application ? Opt for Laravel Forge: $12/month (or Ploi for $8).
Add a domain name: $10 per year.
Total: $313
I'm not criticizing these tools; I've used them myself and they do the job very well, but for small and medium projects or for quick testing, this can be too expensive.
With Fadogen, you only pay for the domain name and the Raspberry Pi purchase (but in theory, it should work with anything). Cost of a Raspberry Pi 5 with 4GB of RAM: $60 + $10 of electricity per year.
And you can host multiple sites.
Yes, you can have power outages and internet outages, but for every problem there's a solution:
\- A UPS battery where you plug in your internet box and Raspberry Pi, and you're covered for a few hours
\- In France, my ISP Free offers a 4G backup for €5 per month that automatically takes over without specific configuration in case of an outage
And these two solutions are valid for general use, not just for self-hosting.
Fadogen works out of the box, but you're then free to configure it.
I like to imagine that Fadogen can become like what Shadcn is for UI components.
# What's next?
I'm just at the beginning of this project but I have tons of ideas:
\- Adding blue/green deployment to avoid interruptions between two deployments
\- Adding alternatives to Cloudflare like Tailscale
\- A registry of starter kits ready to use
\- Docker swarm compatibility
\- More frameworks supported
\- Allow deployment to VPS
\- k3s, k8s ?
On the technical side, I still need to write a lot of tests and documentation.
As the project is now open source, all contributions are welcome.
https://redd.it/1j83sj9
@r_php
\- [ \] Run the command "ddev prepare" and follow the instructions!
# Why create Fadogen?
Today, the recommended way to create a Laravel application is to use Herd. You can use the free version but if you don't have knowledge about databases, Redis, and Reverb, you need to pay for the pro version: $99 per year.
Now you want to host your application? You need to select a VPS like Hetzner, Digital Ocean, AWS... $5 per month on average.
You now want to deploy the application ? Opt for Laravel Forge: $12/month (or Ploi for $8).
Add a domain name: $10 per year.
Total: $313
I'm not criticizing these tools; I've used them myself and they do the job very well, but for small and medium projects or for quick testing, this can be too expensive.
With Fadogen, you only pay for the domain name and the Raspberry Pi purchase (but in theory, it should work with anything). Cost of a Raspberry Pi 5 with 4GB of RAM: $60 + $10 of electricity per year.
And you can host multiple sites.
Yes, you can have power outages and internet outages, but for every problem there's a solution:
\- A UPS battery where you plug in your internet box and Raspberry Pi, and you're covered for a few hours
\- In France, my ISP Free offers a 4G backup for €5 per month that automatically takes over without specific configuration in case of an outage
And these two solutions are valid for general use, not just for self-hosting.
Fadogen works out of the box, but you're then free to configure it.
I like to imagine that Fadogen can become like what Shadcn is for UI components.
# What's next?
I'm just at the beginning of this project but I have tons of ideas:
\- Adding blue/green deployment to avoid interruptions between two deployments
\- Adding alternatives to Cloudflare like Tailscale
\- A registry of starter kits ready to use
\- Docker swarm compatibility
\- More frameworks supported
\- Allow deployment to VPS
\- k3s, k8s ?
On the technical side, I still need to write a lot of tests and documentation.
As the project is now open source, all contributions are welcome.
https://redd.it/1j83sj9
@r_php
Cloudflare Community
Authentication issue with API tokens when accessing Cloudflare registrar domains
For Workers & Pages, what is the name of the domain? /accounts/{account_id}/registrar/domains What is the error number? 10000 What is the error message? Authentication error What is the issue or error you’re encountering When using an API Token with ‘Read…
Repository Testing Done Right
https://sarvendev.com/posts/repository-testing/
https://redd.it/1j8aurd
@r_php
https://sarvendev.com/posts/repository-testing/
https://redd.it/1j8aurd
@r_php
Kamil Ruczyński
Repository Testing Done Right
In most projects, there is a need to interact with some kind of database. There is an approach that we have a layer called repository which is responsible for saving and retrieving data from the database. Usually, we write an integration test for the repository…
Repository Testing Done Right
https://sarvendev.com/posts/repository-testing/
https://redd.it/1j8bk8y
@r_php
https://sarvendev.com/posts/repository-testing/
https://redd.it/1j8bk8y
@r_php
Kamil Ruczyński
Repository Testing Done Right
In most projects, there is a need to interact with some kind of database. There is an approach that we have a layer called repository which is responsible for saving and retrieving data from the database. Usually, we write an integration test for the repository…