Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Welcome to CodeCrafters Docs, the official documentation hub for all open-source projects created and maintained by the CodeCrafters community. Whether you are a seasoned developer, a budding coder, or simply someone interested in the vibrant world of open-source software, this site is your go-to resource for comprehensive, well-organized, and user-friendly documentation.
CodeCrafters is a passionate community of developers dedicated to crafting high-quality, innovative, and impactful open-source projects. Our community thrives on collaboration, knowledge-sharing, and the collective effort to push the boundaries of what’s possible in software development.
At CodeCrafters Docs, you will find detailed documentation for a wide array of projects spanning various domains and technologies. Our documentation is designed to help you:
Understand the Projects: Get in-depth information about the purpose, functionality, and architecture of each project.
Get Started Quickly: Follow step-by-step guides to set up and start using our projects with ease.
Contribute Effectively: Learn how to contribute to projects, from reporting issues to submitting pull requests and participating in discussions.
Explore Examples and Use Cases: Discover real-world examples and use cases to understand how our projects can be applied to solve real problems.
We believe that open-source is all about community. We encourage you to join us, contribute to our projects, and help us make CodeCrafters a thriving hub of innovation and excellence. Whether you’re fixing bugs, writing documentation, creating new features, or simply spreading the word, every contribution counts.
Stay up-to-date with the latest developments by following our blog, joining our forums, and connecting with us on social media. We also host regular meetups, webinars, and coding sessions to foster learning and collaboration.
Thank you for visiting CodeCrafters Docs. We are excited to have you here and look forward to building amazing things together.
Welcome to the journey of creating, learning, and innovating with CodeCrafters!
Happy Coding!
The CodeCrafters Community
Are you passionate about open-source development and eager to collaborate with like-minded individuals? Joining the CodeCrafters community is easy and rewarding. Follow the steps below to become a part of our vibrant and innovative network of developers.
Send an email to Rupadana at rupadanawayan[@]gmail.com with the subject line "Joining CodeCrafters Community". In your email, please include the following information:
Name: Your full name.
GitHub Username: Your GitHub username or profile link.
Skills and Interests: A brief description of your programming skills, languages you are proficient in, and areas of interest.
Projects: Any relevant open-source projects you have worked on or are currently working on (if applicable).
Motivation: A short paragraph on why you want to join CodeCrafters and how you hope to contribute.
Once your email is received, our team will review your application. You will receive a response within a few days with further instructions on how to proceed. We may ask for additional information or a brief interview to better understand your skills and interests.
Upon acceptance, you will be onboarded into the CodeCrafters community. This includes:
Access to Community Platforms: You will be invited to join our forums, chat groups, and other collaborative platforms where you can interact with fellow members.
Introduction to Projects: You will receive an overview of ongoing projects and find out how you can start contributing immediately.
Guidelines and Resources: We will provide you with community guidelines, coding standards, and other resources to help you get started.
With access to our community and projects, you can begin contributing in various ways:
Code Contributions: Write code, fix bugs, and implement new features in our open-source projects.
Documentation: Help improve project documentation to make it easier for others to understand and use.
Support and Mentorship: Provide support to other community members, mentor new contributors, and share your knowledge.
Community Engagement: Participate in discussions, attend meetups, and collaborate on new ideas and initiatives.
We are thrilled to have you consider joining CodeCrafters and look forward to your contributions. Together, we can continue to create amazing open-source projects and foster a collaborative, supportive environment for developers everywhere.
For any questions or additional information, feel free to contact Rupadana at [email protected].
Welcome to CodeCrafters!
The CodeCrafters Community
A simple API service for supporting FilamentPHP
You can install the package via composer:
Register it to your filament Provider
Since version 3.0, routes automatically registered. it will grouped as '/api/admin'. admin is panelId. to disable panelId prefix, please set route.panel_prefix to false
So, You don't need to register the routes manually.
The routes will be :
On CreateHandler, you need to be create your custom request validation.
By default, Token resource only show on super_admin role. you can modify give permission to other permission too.
Token Resource is protected by TokenPolicy. You can disable it by publishing the config and change this line.
[!IMPORTANT] If you use Laravel 11, don't forget to run
php artisan install:apito publish the personal_access_tokens migration after that runphp artisan migrateto migrate the migration, but as default if you run thephp artisan install:apiit will ask you to migrate your migration.
We used "spatie/laravel-query-builder": "^5.3" to handle query selecting, sorting and filtering. Check out for more information. You can specified allowedFilters and allowedFields in your model. For example:
To create a handler you can use this command. By default, i'm using CreateHandler
or
it will be create BlogTransformer in App\Filament\Resources\BlogResource\Api\Transformers
next step you need to edit & add it to your Resource
You can edit prefix & group route name as you want, default this plugin use model singular label;
You can add or override middlewares at two specific places. Via the Filament Panel Provider and/or via the Resources $routeMiddleware.
If you set route.use_resource_middlewares to true, the package will register the middlewares for that specific resource as defined in:
Then your API resource endpoint will go through these middlewares first.
Another method of adding/overriding middlewares is via the initialization of the plugin in your Panel Provider by adding the middleware() method like so:
When you want to enable Tenancy on this package you can enable this by setting the config tenancy.enabled to true. This makes sure that your api responses only retreive the data which that user has access to. So if you have configured 5 tenants and an user has access to 2 tenants. Then, enabling this feature will return only the data of those 2 tenants.
If you have enabled tenancy on this package but on a specific Resource you have defined protected static bool $isScopedToTenant = false;, then the API will honour this for that specific resource and will return all records.
If you want to make api routes tenant aware. you can set tenancy.awareness to true in your published api-service.php. This way this package will register extra API routes which will return only the specific tenant data in the API response.
Now your API endpoints will have URI prefix of {tenant} in the API routes when tenancy.awareness is true.
It will look like this:
Overriding tenancy ownership relationship name by adding this property to the Handlers protected static ?string $tenantOwnershipRelationshipName = null;
Since version 3.0, it will automatically detect routes and secure it using sanctum.
To Generate Token, you just need create it from admin panel. It will be Token Resource there.
Set API to public by overriding this property on your API Handler. Assume we have a PaginationHandler
The MIT License (MIT).
composer require rupadana/filament-api-serviceuse Rupadana\ApiService\ApiServicePlugin;
$panel->plugins([
ApiServicePlugin::make()
])DELETE
/api/admin/blogs/1
Delete resource
GET
/api/admin/blogs
Return LengthAwarePaginator
GET
/api/admin/blogs/1
Return single resource
PUT
/api/admin/blogs/1
Update resource
POST
/api/admin/blogs
Create resource
To running this project you need to prepare a VPS or you can do it locally on your dev environment and run it with ngrok to optimize push to deploy feature.
VPS Minimum Spesification :
CPU : 1 core
Ram : 1 GB
Disk : 20GB
OS : Ubuntu 24.04
After creating the VPS, you need to install cloudpanel. Follow this to install it.
Let's create a server first. please use root user.
After creating the server, we need to adding public key to our server. if you did'nt setup the server yet, please follow this .
Copy the ssh public key.
Remote your server with root user
open authorized_keys and paste your public key
and then Check connection, make sure the connection is successfully
CodeDeploy is an advanced deployment tool specifically designed for developers who want to streamline the process of deploying web applications directly from GitHub. Leveraging the Push to Deploy method, CodeDeploy simplifies the deployment workflow, enabling developers to deploy code with a single push to their repository.
Key Features:
Push to Deploy: Automatically deploy your web application with each push to your GitHub repository, eliminating the need for manual deployments.
Optimized Performance: Engineered for speed and efficiency, CodeDeploy ensures that your web projects are deployed quickly and reliably.
Monitor failed or success deployment using discord notification, create your own notification bot webhook.
And then add it to Notification at Server detail.
Now you will get updated for every Quick Deployment!
First thing first, lets clone the repository
change your directory to project and install packages
Run this command to setup .env file or you can do it manually.
Generate laravel app key using :
Run this command to migrate & create super admin user
Log in to dashboard and create team!
php artisan vendor:publish --tag=api-service-config
return [
'navigation' => [
'token' => [
'cluster' => null,
'group' => 'User',
'sort' => -1,
'icon' => 'heroicon-o-key'
]
],
'models' => [
'token' => [
'enable_policy' => true,
],
],
'route' => [
'panel_prefix' => true,
'use_resource_middlewares' => false,
],
'tenancy' => [
'enabled' => false,
'awareness' => false,
]
];php artisan make:filament-api-service BlogResource'models' => [
'token' => [
'enable_policy' => false // default: true
]
],class User extends Model {
// Which fields can be selected from the database through the query string
public static array $allowedFields = [
'name'
];
// Which fields can be used to sort the results through the query string
public static array $allowedSorts = [
'name',
'created_at'
];
// Which fields can be used to filter the results through the query string
public static array $allowedFilters = [
'name'
];
}php artisan make:filament-api-handler BlogResourcephp artisan make:filament-api-handler Blogphp artisan make:filament-api-transformer Blog<?php
namespace App\Filament\Resources\BlogResource\Api\Transformers;
use Illuminate\Http\Resources\Json\JsonResource;
class BlogTransformer extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return $this->resource->toArray();
// or
return md5(json_encode($this->resource->toArray()));
}
} use App\Filament\Resources\BlogResource\Api\Transformers\BlogTransformer;
class BlogResource extends Resource
{
...
public static function getApiTransformer()
{
return BlogTransformer::class;
}
...
} class BlogApiService extends ApiService
{
...
protected static string | null $groupRouteName = 'myblog';
...
}class BlogResource extends Resource
{
...
protected static string | array $routeMiddleware = []; // <-- your specific resource middlewares
...
}use Rupadana\ApiService\ApiServicePlugin;
$panel->plugins([
ApiServicePlugin::make()
->middleware([
// ... add your middlewares
])
]) POST api/admin/{tenant}/blog
GET|HEAD api/admin/{tenant}/blog
PUT api/admin/{tenant}/blog/{id}
DELETE api/admin/{tenant}/blog/{id}
GET|HEAD api/admin/{tenant}/blog/{id}class PaginationHandler extends Handlers {
public static bool $public = true;
}Automated Testing: Run automated tests before deployment to catch issues early, ensuring your production environment is always stable.
Rollback Capabilities: Easily roll back to a previous version of your application if something goes wrong, minimizing downtime and disruption.
Secure Deployments: Built with security in mind, CodeDeploy integrates seamlessly with GitHub, providing a secure deployment pipeline for your web projects.
User-Friendly Interface: Manage your deployments with an intuitive and easy-to-use interface designed to simplify the deployment process for developers of all skill levels.
Who It's For:
CodeDeploy is ideal for web developers, DevOps teams, and software development companies looking to automate and optimize their deployment processes. Whether you're working on a small personal project or a large-scale web application, CodeDeploy provides the tools you need to deploy with confidence.
Why Choose CodeDeploy?
CodeDeploy takes the complexity out of web deployment. By integrating directly with GitHub, it offers a seamless, automated solution that saves time, reduces errors, and ensures your web applications are always up to date. As an open-source project, CodeDeploy is continuously evolving with contributions from a vibrant community of developers. With its powerful features, user-friendly design, and the flexibility of open-source, CodeDeploy is the go-to choice for developers who want to focus on coding, not deploying.

Ubuntu 18.04 or later LTS
6 core physical CPU or More
32GB of RAM
240GB SSD storage or more



git clone https://github.com/rupadana/code-deploycomposer installcomposer run-script post-root-package-installphp artisan key:generate --ansinano .ssh/authorized_keysphp artisan shield:installManage site.You will see this page
Now lets check if the site is installed successfully, navigate to Deployment Page. And add php artisan about to see if it working. Then, click deploy now.
Click Enable Quick Deploy If you want to activate Push to Deploy.
Next step, Let's navigate to Repository page.
Repository
If your GitHub account is connected with CodeDeploy, you will see a list of your repositories.
You can leave this empty if the account is not connected.
Branch
CodeDeploy uses this branch to gather details of the latest commit when you deploy your application.
Site detail
CodeDeploy uses this data to deploy your application
Deploy Webhook URL
You can use this URL to trigger deployments remotely, You can send a "post" request to this URL.
Let's change the branch to the main & generate webhook url
Copy the webhook url, and then add it to github.






RDB is a web application built using FilamentPHP v3.
This tool offers a seamless and secure way to manage and back up your databases remotely. With an intuitive user interface, it allows you to schedule backups, and monitor backup with ease.
Designed for efficiency and reliability, RDB is the perfect solution for businesses and developers looking to safeguard their critical data effortlessly.
You must install mysql-client and postgresql-client since this project uses mysqldump and pg_dump.
Clone the repository
Update your local environment
Run artisan app:install
Default user
email : [email protected]
password : 12345678
This project must use supervisorctl to manage database queues. Make sure you configure it itself.
Currently, we support two runners to back up mysql and postgresql databases.
You can easly adding your custom runner by extends class AbstractBackupRunner and register it on AppServiceProvider
In order to ensure that the Laravel community is welcoming to all, please review and abide by the .
If you discover a security vulnerability within this project, please send an e-mail to Rupadana via . All security vulnerabilities will be promptly addressed.
The Remote Database Backup is open-sourced software licensed under the .
ver="1.22.2"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile
source ~/.bash_profile
go versionecho "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="Moniker"" >> $HOME/.bash_profile
echo "export EMPED_CHAIN_ID="empe-testnet-2"" >> $HOME/.bash_profile
echo "export EMPED_PORT="14"" >> $HOME/.bash_profile
source $HOME/.bash_profilecd $HOME
curl -LO https://github.com/empe-io/empe-chain-releases/raw/master/v0.1.0/emped_linux_amd64.tar.gz
tar -xvf emped_linux_amd64.tar.gz
mv emped ~/go/binemped init $MONIKER --chain-id empe-testnet-2
emped config chain-id $EMPED_CHAIN_ID
emped config keyring-backend testwget -O $HOME/.empeObtain a Groq API key from the Groq Console
(Optional) Obtain an Openrouter API key from Openrouter
Obtain SCOUT_UID and WEBHOOK_API_KEY from the Chasm Website
1 vCPU
1GB RAM
20GB Disk
Static IP
2 vCPU
4GB RAM
50GB SSD
Static IP
Click _mint(scout)
Log in to the website and retrieve your webhook API key and UID as the first step.
Install Docker: Follow the Docker Installation Guide
Set up the environment file: Use nano .env or vim .env to create a file with the following content:
💡Do not use single quotes (') or double quotes (") in your .env file, as Docker has issues with them.
Get Required Credentials from Chasm
Prepare the .env File (as shown above)
Verify Scout Ranking: Check your scout ranking at the Leaderboard. Note: The node status may take up to an hour to update.
Monitor Scout Performance:Copy
Restart Docker Container (if needed):Copy
Test LLM Functionality:Copy
Test Server Response:Copy
Expected response: OK
Verify Server Status:Copy
Run the Docker Container:Copy
Pull the Docker Image:Copy
Environment Variables
Double-check that all required environment variables are correctly set in the .env file.
Additional Resources
Optimization Guide: Follow the optimization guide for performance improvements.
Update Guide: Follow the update guide for updating your scout.
This guide should help you set up and run the Chasm Scout server effectively. For more detailed instructions and troubleshooting, refer to the original repository and additional resources provided.
The Most Modern Mobile Touch Slider now on FilamentPHP
This is a Swiper Component for filament, using SwiperJS.
You can install the package via composer:
Available API
Create a class whatever u want. example App\Livewire\Widgets\Swipget and extends Rupadana\FilamentSwiper\Widgets\SwiperWidget,
and register it to your Filament Provider
There is a bug. we need contributor to fix it.
There is module has been implemented in this project.
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
All Contributors
The MIT License (MIT). Please see License File for more information.
PORT=3001
LOGGER_LEVEL=debug
# Chasm
ORCHESTRATOR_URL=https://orchestrator.chasm.net
SCOUT_NAME=
SCOUT_UID=
WEBHOOK_API_KEY=
# Scout Webhook Url, update based on your server's IP and Port
# e.g. http://123.123.123.123:3001/
WEBHOOK_URL=
# Chosen Provider (groq, openai)
PROVIDERS=groq
MODEL=gemma2-9b-it
GROQ_API_KEY=
# Optional
OPENROUTER_API_KEY=
OPENAI_API_KEY=docker stats scoutdocker stop scout
docker rm scout
docker run -d --restart=always --env-file ./.env -p 3001:3001 --name scout johnsonchasm/chasm-scoutsource ./.env
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $WEBHOOK_API_KEY" \
-d '{"body":"{\"model\":\"gemma2-9b-it\",\"messages\":[{\"role\":\"system\",\"content\":\"You are a helpful assistant.\"}]}"}' \
$WEBHOOK_URLcurl localhost:3001docker logs scoutdocker run -d --restart=always --env-file ./.env -p 3001:3001 --name scout chasmtech/chasm-scoutdocker pull chasmtech/chasm-scout:latestcomposer create-project rupadana/remote-database-backupphp artisan app:install\App\Filament\Resources\DatabaseResource\Services\Backup\BackupRunner::register(CustomBackupRunner::class);composer require rupadana/filament-swiper

public function infolists(Infolists $infolists) {
return $infolists
->schema([
\Rupadana\FilamentSwiper\Infolists\Components\SwiperImageEntry::make('attachment')
->navigation(false)
->pagination()
->paginationType(SwiperImageEntry::BULLETS)
->paginationClickable()
->paginationDynamicBullets()
->paginationHideOnClick()
->paginationDynamicMainBullets(2)
->scrollbar()
->scrollbarDragSize(100)
->scrollbarDraggable()
->scrollbarSnapOnRelease()
->scrollbarHide(false)
->height(300)
->autoplay()
->effect(SwiperImageEntry::CARDS_EFFECT)
->cardsPerSlideOffset(2)
->autoplayDelay(500)
->centeredSlides()
->slidesPerView(2)
])
} <?php
namespace App\Livewire\Widgets;
use App\Livewire\Components\Feature;
use Rupadana\FilamentSwiper\Widgets\SwiperWidget;
class Swipget extends SwiperWidget
{
public function getComponents(): array
{
return [
// Your livewire component
];
}
}
The easiest way to shout announcements in filament!
You can install the package via composer:
Run migration
Optionally, you can publish the views using
publish config
You must enable Announce by adding FilamentAnnouncePlugin class to your Filament Panel's plugin() or plugins([]) method:
To override the plugins announcementResource with your own custom resource, you should append usingResource method when registering the plugin:
Now you can announce whatever to users:
By default, the alignments will be start and you might want to adjust them:
You can also use alignStart(), alignCenter(), alignEnd(), alignJustify(), alignBetween(), alignLeft() and alignRight() for your convenience.
Since Announce extends Filament Notification, you can add Filament Notification Actions to your announcements:
Read more about .
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
All Contributors
The MIT License (MIT). Please see License File for more information.
composer require rupadana/filament-announce# Laravel 11 and higher
php artisan make:notifications-table
# Laravel 10
php artisan notifications:tablephp artisan migratephp artisan vendor:publish --tag="filament-announce-views"php artisan vendor:publish --tag="filament-announce-config"return [
'navigation' => [
'group' => '',
'sort' => 1
],
'can_access' => [
'role' => ['super_admin']
]
];use Rupadana\FilamentAnnounce\FilamentAnnouncePlugin;
use Filament\Support\Colors\Color;
class CustomersPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
...
->plugin(
FilamentAnnouncePlugin::make()
->pollingInterval('30s') // optional, by default it is set to null
->defaultColor(Color::Blue) // optional, by default it is set to "primary"
)
}
}
use Rupadana\FilamentAnnounce\FilamentAnnouncePlugin;
use Filament\Support\Colors\Color;
class CustomersPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
...
->plugin(
FilamentAnnouncePlugin::make()
->usingResource(MyCustomAnnouncementResource::class)
->pollingInterval('30s') // optional, by default it is set to null
->defaultColor(Color::Blue) // optional, by default it is set to "primary"
)
}
}
use App\Models\User;
use Rupadana\FilamentAnnounce\Announce;
Announce::make()
->title('Big News!')
->icon('heroicon-o-megaphone')
->body('Filament can now show very important message to specific users!')
->disableCloseButton() // Optional, if you want ur announcement discloseable
->announceTo(User::all());use App\Models\User;
use Filament\Support\Enums\Alignment;
use Rupadana\FilamentAnnounce\Announce;
Announce::make()
->title('Big News!')
->icon('heroicon-o-megaphone')
->body('Filament can now show very important message to specific users!')
->alignment(Alignment::Center) // this will set both title and body alignments (common alignment)
->titleAlignment(Alignment::Start) // this will set title alignment and take precedence over common alignment methods
->bodyAlignment(Alignment::Start) // this will set body alignment and take precedence over common alignment methods
->actions([
Action::make('view')
->button(),
Action::make('undo')
->color('gray'),
])
->announceTo(User::all());use App\Models\User;
use Rupadana\FilamentAnnounce\Announce;
Announce::make()
->title('Big News!')
->icon('heroicon-o-megaphone')
->body('Filament can now show very important message to specific users!')
->actions([
Action::make('view')
->button(),
Action::make('undo')
->color('gray'),
])
->announceTo(User::all());composer test



