Back to Tutorials
Getting Started
5 min read Beginner
📋 YOUR FIRST PHPUE APP

Build Your First App in 5 Minutes

No prior PHPue experience needed! We'll walk through creating a simple welcome page step by step.

🎯

What You'll Build

A clean welcome page with dynamic content and styling

📄
2 Files
Instant Results
🎨
Beautiful UI

🏗️ How PHPue Apps Are Structured

🧠

App.pvue - The Brain of Your App

This is your main application file. Think of it as the controller that manages your entire app.

What App.pvue Does:

Loads your navigation and pages
Handles routing between pages
Sets up global styles and scripts
Manages shared data
🌐

Views - Your App's Pages

Each .pvue file in the views folder becomes a page in your app. This is where you build your user interface.

Every View Has Three Parts:

1
<script> - Server Logic
PHP code that runs on the server
2
<template> - HTML Layout
What users see in their browser
3
<cscript> - Browser JavaScript
Runs in the user's browser

PHPue Offers PHP + Syntax Sugar

If any P-Directives break, just fall back to PHP! P-Directives are meant for basic use and not as a replacement for PHP.

1
p-if="$isAvailable"
Compiles to: <?php if($isAvailable): ?> ... <?php endif; ?>
2
p-for="$item in $items"
Compiles to: <?php foreach($items as $item): ?> ... <?php endforeach; ?>
3
{{$variable}}
In <template>: <?= htmlspecialchars($variable) ?>
In <cscript>: <?= json_encode($variable) ?>
4
PHP Just Works Everywhere!
In <script>: // Write normal PHP code here
In <template>: <?php if($isAvailable): ?>
  <div>Content</div>
<?php endif; ?>
In <cscript>: <?php if($isAvailable): ?>
  console.log("Conditional JS");
<?php endif; ?>
⚠️ In <header>: PHP is forbidden for security (use variables from <script> with {{}})

👀 See Your App in Action

This Is What You're Building!

When you run your app, this is exactly what you'll see in the browser.

PHPue

Welcome to PHPue - Unique Experience

A modern PHP framework with Vue-like syntax

Fast
Simple
Powerful

🎉 This is powered by the exact code we just explored!

🚀 Ready for the Next Step?

🎨
Recommended

Add Some Style

Learn how to customize colors, layouts, and make your app look exactly how you want.

📚
Resources

Explore Documentation

Dive deeper with the full PHPue documentation. Find advanced features and examples.

🎊

You Did It!

You now understand the basics of PHPue and have seen how easy it is to create a beautiful, functional web app.

What You Learned:

App.pvue structure
View components
PHP in templates
p-for directives