Last Updated: 3/8/2026
Development Guide
Getting Started with LinkAce Development
This guide will help you set up a local development environment for contributing to LinkAce.
Prerequisites
Required Software
- Docker & Docker Compose: For containerized development
- Git: Version control
- Node.js: v16 or higher (for frontend assets)
- Composer: PHP dependency manager (if developing without Docker)
Optional Tools
- PHP 8.1+: For local development without Docker
- MySQL 8.0+ or PostgreSQL 12+: Database (if not using Docker)
- Redis: For caching and queues (optional)
Setting Up Development Environment
1. Clone the Repository
git clone https://github.com/Kovah/LinkAce.git
cd LinkAce2. Choose Your Development Method
Option A: Docker Development (Recommended)
Start the development environment:
docker-compose up -dThis will start:
- Application container (PHP-FPM + Nginx)
- MySQL database
- Redis (optional)
Install dependencies:
# PHP dependencies
docker-compose exec app composer install
# JavaScript dependencies
npm installRun migrations:
docker-compose exec app php artisan migrateCompile frontend assets:
npm run devAccess the application:
- URL: http://localhost
- Database: localhost:3306 (root/secret)
Option B: Local PHP Development
Install dependencies:
composer install
npm installConfigure environment:
cp .env.example .env
php artisan key:generateEdit .env with your database credentials.
Run migrations:
php artisan migrateStart development server:
php artisan serveCompile assets:
npm run devProject Structure
LinkAce/
├── app/ # Application code
│ ├── Console/ # CLI commands
│ ├── Http/ # Controllers, middleware
│ ├── Models/ # Eloquent models
│ ├── Repositories/ # Data access layer
│ └── Services/ # Business logic
├── config/ # Configuration files
├── database/ # Migrations and seeders
│ ├── migrations/
│ └── seeders/
├── lang/ # Translations
├── public/ # Public assets
├── resources/ # Views and raw assets
│ ├── assets/ # JS, CSS source files
│ └── views/ # Blade templates
├── routes/ # Route definitions
│ ├── api.php # API routes
│ └── web.php # Web routes
├── storage/ # Logs, cache, uploads
└── tests/ # Test suite
├── Feature/
└── Unit/Development Workflow
Making Changes
-
Create a feature branch:
git checkout -b feature/your-feature-name -
Make your changes following the coding standards
-
Test your changes:
# Run PHP tests php artisan test # Run specific test php artisan test --filter=TestName -
Check code style:
# PHP CodeSniffer ./vendor/bin/phpcs # Auto-fix issues ./vendor/bin/phpcbf -
Commit your changes:
git add . git commit -m "feat: add new feature"
Frontend Development
Watch for changes (auto-recompile):
npm run watchBuild for production:
npm run productionLinting:
npm run lintDatabase Changes
Create a new migration:
php artisan make:migration create_something_tableRun migrations:
php artisan migrateRollback last migration:
php artisan migrate:rollbackRefresh database (drop all tables and re-migrate):
php artisan migrate:freshSeed database with test data:
php artisan db:seedWorking with Queues
Start queue worker:
php artisan queue:workProcess failed jobs:
php artisan queue:retry allTesting
Running Tests
All tests:
php artisan testWith coverage:
php artisan test --coverageSpecific test file:
php artisan test tests/Feature/LinkTest.phpWriting Tests
Feature test example:
namespace Tests\Feature;
use Tests\TestCase;
use App\Models\User;
class LinkTest extends TestCase
{
public function test_user_can_create_link()
{
$user = User::factory()->create();
$response = $this->actingAs($user)->post('/links', [
'url' => 'https://example.com',
'title' => 'Test Link'
]);
$response->assertStatus(201);
$this->assertDatabaseHas('links', [
'url' => 'https://example.com'
]);
}
}Debugging
Laravel Telescope
Telescope is available in development mode:
- URL: http://localhost/telescope
- View requests, queries, jobs, exceptions, etc.
Debug Bar
The debug bar appears at the bottom of pages in development.
Logging
View logs:
tail -f storage/logs/laravel.logLog levels:
Log::debug()- Detailed debug informationLog::info()- Interesting eventsLog::warning()- Exceptional occurrencesLog::error()- Runtime errors
Coding Standards
PHP
- Follow PSR-12 coding style
- Use type hints and return types
- Write descriptive variable and method names
- Add PHPDoc blocks for classes and methods
- Keep methods focused (single responsibility)
JavaScript
- Use ES6+ syntax
- Follow consistent formatting
- Add comments for complex logic
Blade Templates
- Use
@directives for control structures - Escape output with
{{ }}by default - Use
{!! !!}only for trusted HTML
Contributing
Before submitting a pull request:
- Read CONTRIBUTING.md
- Ensure all tests pass
- Follow the code style guidelines
- Update documentation if needed
- Write clear commit messages
Commit Message Format
type(scope): subject
body (optional)
footer (optional)Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changesrefactor: Code refactoringtest: Adding testschore: Maintenance tasks
Translations
LinkAce uses Crowdin for translations:
- Join the translation project
- Translations are synced automatically
- See Translations Guide
Resources
Getting Help
If you need help:
- Check existing GitHub Discussions
- Search closed issues
- Ask in the community discussions
- For supporters: Get dedicated help via Open Collective , Patreon , or GitHub Sponsors