First off, thanks for taking the time to contribute! Whether you are fixing a bug in the AIS ingestion engine or improving the React map interface, we appreciate the help.
SIST is a full-stack application. You will need both PHP 8.3+ and Node.js 20+ installed.
-
Fork and Clone the repository: git clone https://github.com/your-username/SIST.git cd SIST
-
Backend Setup (Laravel): composer install cp .env.example .env php artisan key:generate touch database/database.sqlite php artisan migrate
-
Frontend Setup (React/Vite): pnpm install
-
Start Development Servers:
php artisan serve
pnpm dev
-
Create a Feature Branch: git checkout -b feat/your-descriptive-feature-name
-
Make Your Changes:
- Keep Laravel logic in
app/androutes/. - Keep React components and frontend logic in
resources/js/. - Follow existing patterns (Inertia.js for data bridge, Tailwind for styling).
- Keep Laravel logic in
-
Run Local Checks: Before committing, ensure everything is green:
pnpm typecheck pnpm lint pnpm format:check
pnpm format:php:test php artisan test
-
Commit Your Changes: We use Husky for pre-commit hooks. If you are on Windows and the commit fails with "Code 1", ensure your
.husky/pre-commitfile uses LF line endings.git add . git commit -m "feat: adds real-time vessel filtering"
-
Open a Pull Request: Target the
mainbranch. Provide a clear description of the changes and link any relevant issues.
- Use the
route()helper: We use Ziggy for routing. Do not hardcode URLs; useroute('ships.index'). - Formatting: Prettier is enforced. Ensure "Format on Save" is enabled in VS Code.
- Components: Leverage the existing Layouts and shared components in
resources/js/Components.
- Formatting: Laravel Pint is used for PHP. Run
pnpm format:phpto fix styling automatically. - Type Hinting: Use 3+ type hints for method arguments and return types.
- Migrations: Ensure all database changes have a corresponding migration.
- When dealing with AIS coordinates, always use
decimal(10, 7)to ensure map accuracy.
This project follows our CODE_OF_CONDUCT.md. Please be respectful and constructive in all communications.
- Vite Manifest Error: If CI fails with "Vite manifest not found", ensure your tests extend
Tests\TestCase, which handles$this->withoutVite(). - Husky Errors: If you cannot commit due to Husky errors on Windows, use the terminal instead of the VS Code Git UI, or use
git commit --no-verifyas a last resort (but ensure CI passes!).