npx agentspec-cli install 9c235e7a-f6ca-4833-9dc5-8045a4387f27 --file-type windsurfrules→ .windsurf/rules/
# Tina4 PHP v3.10.70
Lightweight, zero-dependency PHP web framework. Docs: https://tina4.com
## Project Structure
```
src/routes/ — Route handlers (auto-discovered)
src/orm/ — ORM models
src/templates/ — Twig templates
src/app/ — Service classes
src/scss/ — SCSS (auto-compiled)
src/public/ — Static assets
src/seeds/ — Database seeders
migrations/ — SQL migration files
tests/ — PHPUnit tests
```
## Route Example
```php
use Tina4\Router;
Router::get("/api/users", function(\Tina4\Request $request, \Tina4\Response $response) {
return $response(["users" => []]);
});
Router::post("/api/users", function(\Tina4\Request $request, \Tina4\Response $response) {
return $response(["created" => $request->body["name"]], 201);
})->noAuth();
```
## ORM Example
```php
class User extends \Tina4\ORM {
public $tableName = "users";
public $primaryKey = "id";
}
```
## Conventions
1. Routes return $response() — always $response(data) not Response::json()
2. GET routes are public, POST/PUT/PATCH/DELETE require auth by default
3. Use ->noAuth() to make write routes public, ->secure() to protect GET routes
4. Every template extends base.twig
5. All schema changes via migrations — never create tables in route code
6. Use built-in features — never install packages for things Tina4 already provides
7. Service pattern — complex logic in src/app/, routes stay thin
## Built-in Features
Router, ORM, Database (SQLite/PostgreSQL/MySQL/MSSQL/Firebird), Frond templates (Twig-compatible), JWT auth, Sessions (File/Redis/Valkey/MongoDB/DB), GraphQL + GraphiQL, WebSocket + Redis backplane, WSDL/SOAP, Queue (File/RabbitMQ/Kafka/MongoDB), HTTP client, Messenger (SMTP/IMAP), FakeData/Seeder, Migrations, SCSS compiler, Swagger/OpenAPI, i18n, Events, Container/DI, HtmlElement, Inline testing, Error overlay, Dev dashboard, Rate limiter, Response cache, Logging, MCP server
## Documentation
https://tina4.comFlightPHP/Core Project Instructions
This is the main FlightPHP core library for building fast, simple, and extensible PHP web applications. It is dependency-free for core usage and supports PHP 7.4+.
by AgentHub Crawler
Laravel Module Implementation Patterns
Function/method calls use a space before `(` — see `.cursor/rules/code-style.mdc`: $content = QueryBuilder::for ($callback ()); array_map (fn (RoleEnum $role) => $role->value, RoleEnum::cases ());
by AgentHub Crawler
Laravel MCP Server Development Rules
This is a Laravel package for implementing Model Context Protocol (MCP) servers with Streamable HTTP transport and legacy SSE support. Focus on secure, enterprise-ready MCP implementations.
by AgentHub Crawler
Sign in to leave a comment.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
by AgentHub Crawler