TL;DR: I built Lighthouse PHP Framework because modern frameworks got too complex. It lets you handle forms in views (like PHP intended), uses SQLite out of the box, includes security by default, and gets you productive in 30 seconds. No controllers, no magic, just productive PHP development.TL;DR: I built Lighthouse PHP Framework because modern frameworks got too complex. It lets you handle forms in views (like PHP intended), uses SQLite out of the box, includes security by default, and gets you productive in 30 seconds. No controllers, no magic, just productive PHP development.

Tired of Learning 50 New Concepts to Build a Form? Say Hello to Lighthouse for PHP

2025/12/04 14:22

Building modern web apps shouldn't require learning 50 new concepts. Sometimes you just want to write PHP.

The Problem with Modern PHP Frameworks

Don't get me wrong—Laravel, Symfony, and other frameworks are incredible. But sometimes you're building a simple web app and you find yourself:

  • 📚 Reading documentation for hours just to create a basic form
  • 🔧 Configuring dozens of services you don't need
  • 🐘 Fighting with complex abstractions for simple tasks
  • ⚡ Waiting for slow development servers to restart

What if there was a better way?

Meet Lighthouse 🚨

Lighthouse is a minimal, predictable PHP micro-framework that embraces the simplicity PHP was meant for. It's designed around one core principle: get productive immediately.

<?php // That's it. Your first route. route('/', function() { return view('home.php', ['message' => 'Hello World!']); });

Why Lighthouse is Different

1. Logic Where It Makes Sense

Instead of forcing everything through controllers, Lighthouse lets you handle form logic directly in views—the way PHP was designed:

<?php // views/contact.php $errors = []; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $email = sanitize_email($_POST['email']); $message = sanitize_string($_POST['message']); if (!validate_email($email)) { $errors[] = 'Invalid email'; } if (empty($errors)) { db_insert('contacts', ['email' => $email, 'message' => $message]); $success = 'Message sent!'; } } ?> <form method="POST"> <?php if ($success ?? false): ?> <div class="success"><?= $success ?></div> <?php endif; ?> <input type="email" name="email" required> <textarea name="message" required></textarea> <button type="submit">Send</button> </form>

Self-contained. Predictable. No magic.

2. Modern Stack, Zero Configuration

  • PHP 8+ with type hints and modern features
  • SQLite for zero-config databases
  • HTMX for dynamic interactions
  • Pico.css for beautiful, minimal styling

# Get started in 30 seconds lighthouse new my-app cd my-app php -S localhost:8000 -t public/

3. Security by Default

// CSRF protection built-in <?= csrf_field() ?> // Input sanitization included $clean_input = sanitize_string($_POST['data']); // Rate limiting ready if (!check_rate_limit($_SERVER['REMOTE_ADDR'])) { // Handle rate limit }

4. Database Operations That Make Sense

// Simple, predictable database operations $users = db_select('users', ['active' => 1]); $user_id = db_insert('users', ['name' => $name, 'email' => $email]); db_update('users', ['last_login' => date('Y-m-d H:i:s')], ['id' => $user_id]);

Real-World Example: Authentication in 5 Minutes

Here's how you build a complete login system:

<?php // routes.php route('/login', function() { return view('login.php'); }); route('/dashboard', function() { if (!auth_user()) { header('Location: /login'); exit; } return view('dashboard.php'); });

<?php // views/login.php if ($_SERVER['REQUEST_METHOD'] === 'POST') { $email = sanitize_email($_POST['email']); $password = $_POST['password']; $user = db_select_one('users', ['email' => $email]); if ($user && auth_verify_password($password, $user['password'])) { auth_login($user['id']); header('Location: /dashboard'); exit; } $error = 'Invalid credentials'; } ?> <form method="POST"> <?php if ($error ?? false): ?> <div class="error"><?= $error ?></div> <?php endif; ?> <input type="email" name="email" required> <input type="password" name="password" required> <?= csrf_field() ?> <button type="submit">Login</button> </form>

That's it. No controllers, no middleware configuration, no service providers. Just PHP doing what PHP does best.

When to Use Lighthouse

Lighthouse shines when you're building:

  • 🚀 MVPs and prototypes - Get to market fast
  • 📊 Internal tools and dashboards - No need for complexity
  • 🏢 Small business websites - Contact forms, simple e-commerce
  • 🎓 Learning projects - Focus on concepts, not framework magic
  • 🔧 API backends - Lightweight and fast

The Philosophy

Lighthouse embraces pragmatic PHP development:

  • Start simple - Use logic in views for rapid development
  • Refactor when needed - Move to more complex patterns as you grow
  • Choose what fits - Multiple approaches supported
  • Stay productive - Don't over-engineer simple problems

Getting Started

# Install the CLI bash -c "$(curl -fsSL https://raw.githubusercontent.com/max-yterb/Lighthouse/main/scripts/install.sh)" # Create your first app lighthouse new my-awesome-app cd my-awesome-app # Start building php -S localhost:8000 -t public/

What's Next?

Lighthouse is actively developed with a focus on:

  • 🔐 Enhanced authentication providers (OAuth, SAML)
  • 🗄️ Multiple database support (MySQL, PostgreSQL)
  • ⚡ Performance monitoring tools
  • 📱 Advanced HTMX integration patterns

Try It Today

If you're tired of complex frameworks for simple projects, give Lighthouse a try. It might just remind you why you fell in love with PHP in the first place.

  • 📖 Documentation: max-yterb.github.io/Lighthouse
  • 💻 GitHub: github.com/max-yterb/Lighthouse
  • 💬 Discussions: GitHub Discussions

What do you think? Are you ready to try a framework that gets out of your way? Drop a comment below with your thoughts on modern PHP development!

Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact service@support.mexc.com for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.

You May Also Like

Grayscale debuts first US spot crypto ETPs with staking

Grayscale debuts first US spot crypto ETPs with staking

The post Grayscale debuts first US spot crypto ETPs with staking appeared on BitcoinEthereumNews.com. Grayscale Investments has just launched the first US-listed spot crypto exchange-traded products (ETPs) offering staking. The Grayscale Ethereum Trust ETF (ETHE) and Grayscale Ethereum Mini Trust ETF (ETH) now enable Ether staking, while the Grayscale Solana Trust (GSOL) has activated staking capabilities ahead of its proposed uplisting as a spot Solana ETP. The move provides traditional brokerage investors with access to staking rewards — previously confined to native crypto platforms — through regulated vehicles. The products are not registered under the Investment Company Act of 1940, meaning they operate outside the framework governing traditional mutual funds and ETFs. Staking, the process of locking up tokens to secure proof-of-stake blockchains like Ethereum and Solana in exchange for rewards, introduces yield potential but also adds operational and network risks.  Grayscale said staking will be managed through institutional custodians and diversified validator networks to reduce single-party risk. This marks the first time US investors can access staking yield through exchange-traded exposure to Ethereum and Solana, expanding upon regulatory acceptance that began with spot Bitcoin ETFs in January 2024 and spot Ether ETFs in July 2024.  Grayscale CEO Peter Mintzberg called the initiative “first mover innovation,” underscoring the firm’s role in shaping institutional crypto access. This is a developing story. This article was generated with the assistance of AI and reviewed by editor Jeffrey Albus before publication. Get the news in your inbox. Explore Blockworks newsletters: Source: https://blockworks.co/news/grayscale-us-spot-crypto-etps-staking
Share
BitcoinEthereumNews2025/10/06 21:29
Spot XRP ETFs Nears $1B AUM Milestone as Streak of No Outflows Continues

Spot XRP ETFs Nears $1B AUM Milestone as Streak of No Outflows Continues

The post Spot XRP ETFs Nears $1B AUM Milestone as Streak of No Outflows Continues appeared on BitcoinEthereumNews.com. The U.S. Spot XRP ETFs is now near the $1 billion mark of assets under management in less than a month since their launch. This follows from the product maintaining consistent inflows with no single outflow recorded yet. XRP ETFs See Continuous Inflows Since Launch Since its first launch on November 14, spot XRP funds have seen continued inflows. According to data from SoSoValue, the total inflows into these funds have now risen to $881.25 million. The funds attracted $12.84 million of new money yesterday. The daily trading volumes remained stable at $26.74 million. Source: SoSoValue Reaching nearly $1 billion in less than 30 days makes the product among the fastest growing crypto investment products in the United States. Notably, Spot Solana ETFs also accumulated over $600 million since their launch. On the other hand, Bitcoin and Ethereum ETFs are holding about $58 billion and about $13 billion in assets under management respectively. Much of the early growth traces back to the first Canary Capital’s XRP ETF. Its opening on November 13 brought one of the strongest crypto ETF openings to date. It saw more than $59 million in first-day trading volume and $245 million in net inflows. Shortly after Canary’s launch, firms like Grayscale, Bitwise, and Franklin Templeton introduced their own XRP products. Bitwise’s fund also did well on its launch, recording over $105 million in early inflows. Meanwhile, the market is getting ready for yet another addition. 21Shares’ U.S. spot XRP fund also got the green light from the SEC. It will trade under the ticker TOXR on the Cboe BZX Exchange. XRP Products Keep Gaining Momentum in the Market The token’s funds continued to expand this week. REX Shares and Tuttle Capital have launched the T-REX 2X Long XRP Daily Target ETF. This new ETF allows traders…
Share
BitcoinEthereumNews2025/12/05 14:11
Headwind Helps Best Wallet Token

Headwind Helps Best Wallet Token

The post Headwind Helps Best Wallet Token appeared on BitcoinEthereumNews.com. Google has announced the launch of a new open-source protocol called Agent Payments Protocol (AP2) in partnership with Coinbase, the Ethereum Foundation, and 60 other organizations. This allows AI agents to make payments on behalf of users using various methods such as real-time bank transfers, credit and debit cards, and, most importantly, stablecoins. Let’s explore in detail what this could mean for the broader cryptocurrency markets, and also highlight a presale crypto (Best Wallet Token) that could explode as a result of this development. Google’s Push for Stablecoins Agent Payments Protocol (AP2) uses digital contracts known as ‘Intent Mandates’ and ‘Verifiable Credentials’ to ensure that AI agents undertake only those payments authorized by the user. Mandates, by the way, are cryptographically signed, tamper-proof digital contracts that act as verifiable proof of a user’s instruction. For example, let’s say you instruct an AI agent to never spend more than $200 in a single transaction. This instruction is written into an Intent Mandate, which serves as a digital contract. Now, whenever the AI agent tries to make a payment, it must present this mandate as proof of authorization, which will then be verified via the AP2 protocol. Alongside this, Google has also launched the A2A x402 extension to accelerate support for the Web3 ecosystem. This production-ready solution enables agent-based crypto payments and will help reshape the growth of cryptocurrency integration within the AP2 protocol. Google’s inclusion of stablecoins in AP2 is a massive vote of confidence in dollar-pegged cryptocurrencies and a huge step toward making them a mainstream payment option. This widens stablecoin usage beyond trading and speculation, positioning them at the center of the consumption economy. The recent enactment of the GENIUS Act in the U.S. gives stablecoins more structure and legal support. Imagine paying for things like data crawls, per-task…
Share
BitcoinEthereumNews2025/09/18 01:27