Developer Guide¶
Welcome to the Preads Platform developer documentation. This guide provides the technical foundation required to extend, customize, and integrate with the platform's core architecture.
🏗️ Architecture Overview¶
The Preads Platform is built on the Laravel 12 (Latest) framework, following modern SOLID principles and a modular, service-oriented architecture.
Core Design Patterns¶
- Service Layer: Business logic is encapsulated in specialized Services (e.g.,
EmailService,IpIntelligenceService), ensuring controllers remain thin and testable. - Modular Addons: A plug-and-play extension system allows for new features (like CPV or Link Lockers) to be implemented without modifying core framework files.
- Repository Pattern: Data access is managed through Eloquent models with a focus on reusable query scopes.
- Event-Driven Architecture: Uses Laravel's internal Event/Listener system for decoupled processes like email logging and postback processing.
💻 Technical Stack¶
The platform leverages modern, high-performance technologies to ensure scalability and developer productivity.
| Layer | Technology | Version |
|---|---|---|
| Backend | PHP (PHP-FPM) | ^8.2 |
| Framework | Laravel | ^12.0 |
| Database | MySQL / MariaDB | ^8.0 / ^10.6 |
| Frontend | Tailwind CSS / Bootstrap | 4.0 / 5.3 |
| JavaScript | Alpine.js / Vite | 3.15 / 7.0 |
| Icons | Phosphor / FontAwesome | Latest |
📂 Directory Structure¶
A high-level map of the codebase to help you navigate the system.
app/Http/Controllers/: Request handlers separated by domain (Admin, Publisher, Frontend).app/Http/Requests/: Validation logic for all incoming data.app/Models/: Eloquent models with standardized field naming and relationships.app/Services/: Core business logic and third-party integrations (IP Intel, Mailers).addons/: Specialized directory for platform extensions (Namespace:HansalDev).resources/views/: Blade templates organized by theme and user role.public/templates/: Publicly accessible assets (CSS/JS) for custom themes.
🧩 Extending the Platform¶
The Preads platform is designed for extensibility. Developers can customize the system through three primary channels:
1. Addon System¶
New monetization tools or dashboard widgets should be developed as Addons. This ensures your custom code is isolated from core updates. Explore Addons →
2. Custom Themes¶
The section-based template engine allows for full UI/UX overhauls. Themes include a schema.json to define editable fields in the admin panel.
Learn about Templates →
3. REST API¶
Build mobile apps or external management tools using the secure, token-based JSON API. API Reference →
🚀 Next Steps¶
Ready to dive deeper? Explore the specific technical tracks below:
-
API Reference¶
Standardized endpoints for user management and reporting. Explore API →
-
Database Schema¶
Entity relationship diagrams and table definitions. View Schema →
-
Security Audit¶
Best practices for production deployments. View Security →