For smaller projects, we entirely adhere to the Laravel's directory and naming structure as outlined in the official documentation. This structure offers clarity and predictability. However, for larger projects that require advanced modularization, we slightly modify the default Laravel structure to adhere to Domain Driven Design (DDD) principles. Specifically:
/domain directory./domain directory follows the standard Laravel application structure, promoting consistent conventions even as the codebase grows.Our inclination is towards monolithic architectures. For larger projects, this monolith is modularized using DDD principles. We generally avoid microservices, reserving their use only for specific scenarios where they're absolutely necessary.
For small-scale applications, the conventional Laravel structures are our guide. In contrast, expansive projects are organized by domain, ensuring separation of concerns and better code manageability.
We recommend the excellent Guide to Domain-Driven Design called Laravel Beyond Crud by Spatie. We will provide you with a copy of this course if you are working on a project that requires this approach.
Our approach to databases is simple: stick to Laravel's conventions. Custom implementations or divergences from these conventions are discouraged.
API versioning is done sparingly. When required, versions are indicated using URL prefixes, e.g., /v1/.
For ensuring security and consistency across environments:
All essential documentation resides within the /documentation directory. In cases where domains are used, each domain will have a dedicated .readme file. The project's primary entry point for documentation is the main README file.
For applications requiring high scalability, we trust Laravel Vapor. Most projects, however, are hosted using Laravel Forge on servers provided by Hetzner Cloud. Cloudflare serves as our preferred Content Delivery Network (CDN) and Web Application Firewall (WAF).
We're avid users of Fathom Analytics for insightful, privacy-focused web analytics. However, our philosophy leans towards minimizing reliance on third-party services unless absolutely indispensable. In terms of payment integrations, we utilize both Stripe and Lemon Squeezy as our trusted payment providers. Regarding search, we use Algolia for its robust search capabilities.