Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ All code snippets should use triple backticks with language specified for syntax

### Images and Links

**CRITICAL - Image Paths**: Images are stored in `app/pages/{version}/images` alongside the markdown files, and **MUST always use absolute paths starting with `/`**.
- ✅ Correct: `![Alt text](/images/screenshot.png)`
- ❌ Wrong: `![Alt text](images/screenshot.png)` or `![Alt text](../images/screenshot.png)`
**CRITICAL - Image Paths**: Images are stored in `app/pages/{version}/images` alongside the markdown files, and **MUST always use a path relative to the version folder, _without_ a starting `/`**.
- ✅ Correct: `![Alt text](images/screenshot.png)`
- ❌ Wrong: `![Alt text](/images/screenshot.png)` or `![Alt text](../images/screenshot.png)`
Images should be checked to ensure the file exists at the specified path.

Internal links should use absolute paths without version numbers to allow automatic version switching.
- ✅ Correct: `[Requirements](/installation/requirements)`
- ❌ Wrong: `[Requirements](installation/requirements)` or `[Requirements](/04.installation/01.requirements)`
Internal links should use relative paths to the version folder, without version numbers to allow automatic version switching.
- ✅ Correct: `[Requirements](installation/requirements)`
- ❌ Wrong: `[Requirements](/installation/requirements)` or `[Requirements](04.installation/01.requirements)`

Pages have anchor links for sections (e.g., `#motivation`). Ensure links point to existing sections.

Expand Down
2 changes: 1 addition & 1 deletion app/pages/6.0/02.background/01.introduction/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The PHP community has evolved considerably over the past two decades, beginning

This breakneck pace has caused a lot of people to get left behind. For someone who hasn't been doing web development continuously for the past decade or more, it can feel like an overwhelming task to get acquainted with all of the new tools and frameworks that seem to be coming out every day. Relevant comic from [Abstruse Goose](http://abstrusegoose.com/503):

![BlooP and FlooP and GlooP](/images/theoretical_mathematics_however_never_goes_out_of_fashion.png)
![BlooP and FlooP and GlooP](images/theoretical_mathematics_however_never_goes_out_of_fashion.png)

The problem is that when you're a busy developer with real-world projects to work on, it's very difficult to set aside time to read a book about technology X - especially when you're not even sure that you really _need_ to learn X!

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: The Client-Server Conversation
description: Many developers do not really understand the basics of how HTTP and web applications work. This discussion attempts to clarify some common misconceptions.
obsolete: true
wip: true
---

One of the most common misconceptions is that web applications are coherent pieces of software that sit on a server somewhere, and that the client "runs" this application in their browser. This is actually an illusion, carefully crafted to provide a smooth experience for the end user.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Develop Locally, Serve Globally
description: The right way to approach development.
obsolete: true
wip: true
---

Just about every week, we see someone wander into [chat](https://chat.userfrosting.com) and ask:
Expand All @@ -28,7 +28,7 @@ In this same vein, any framework or CMS that has you do a "one-click install" is

## Setting up a local development environment

If you think that setting up a local environment is too much work, think again! On a MacOS or Linux computer, setting up a local environment simply consist of installing a couple of apps through the command line. On a Windows 10 or 11 machine, an additional step is required : Installing the *Windows Subsystem for Linux (WSL2)*!
If you think that setting up a local environment is too much work, think again! On a MacOS or Linux computer, setting up a local environment simply consist of installing a couple of apps through the command line. On a Windows 10 or 11 machine, an additional step is required : Installing the *Windows Subsystem for Linux (WSL2)*!

And the sprinkle on the cupcake is the [next chapter](installation) will teach you how to do everything yourself!

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Don't Reinvent the Wheel
description: Using third-party components reduces the amount of software maintenance you have to do and documentation you have to write, and lets you draw on the wider community of other developers who use those packages for troubleshooting and support.
obsolete: true
wip: true
---

I think that for a lot of developers - novices and professionals alike - building on top of others' work can seem like a betrayal of our trade. We're not "real" developers unless we built everything with our bare hands from scratch, and know firsthand the nitty-gritty details of how our code works. With third-party components, we have to take time to actually *learn* how to use them, and follow *their* rules. I get it. It all feels so antithetical to the DIY spirit that got so many of us into coding in the first place. Trust me, as someone who built a cold frame out of some doors and framing I found in the dumpster, I know:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Server Misconfiguration
description: Server misconfiguration is one of the top 10 vulnerabilities of any web application, according to OWASP. Most of these misconfigurations occur because of inexperienced developers or system administrators, and are simple to fix.
obsolete: true
wip: true
---

As we discussed in [The Client-Server Conversation](background/the-client-server-conversation), it's important to distinguish between the code that is running on the server, and the response that it sends back to the client.
Expand Down
2 changes: 1 addition & 1 deletion app/pages/6.0/02.background/05.security/docs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Security
description: It is essential to understand some basic security concepts before diving into web development. With an understanding of how the most common vulnerabilities work and some diligence in configuring your system, UserFrosting sets you up with an application that is robust against most common attack vectors.
obsolete: true
wip: true
---

It is essential to understand some basic security concepts before diving into web development.
Expand Down
2 changes: 1 addition & 1 deletion app/pages/6.0/02.background/06.seo/docs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Search Engine Optimization
description: Search Engine Optimization (SEO) is an integral part of the design and development process. We discuss the major important factors in getting a page to rank well, and how they fit in with UserFrosting's features and overall architecture.
obsolete: true
wip: true
---

Search Engine Optimization (SEO) is an integral part of the design and development process. Getting the public side of your website to rank well in search results should be something you consider from the very beginning, and not an afterthought once you're getting ready to deploy.
Expand Down
2 changes: 1 addition & 1 deletion app/pages/6.0/02.background/chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ description: "UserFrosting has a not-so-secret ulterior motive: to get you to be

# Web Dev, the Right Way

UserFrosting has a not-so-secret ulterior motive: **to get you to become a better developer**.
UserFrosting has a not-so-secret ulterior motive: **to get you to become a better developer**.

In this chapter, we'll talk about the state of modern web development tools and practices, and clear up some common misconceptions about how web applications actually work. Then, we'll go over key security concepts. Finally, we'll discuss best practices to make sure that users will be able to find and use your application when it's finished.
4 changes: 2 additions & 2 deletions app/pages/6.0/03.structure/01.introduction/docs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Your Application
description: A Sprinkle can contain assets, configuration files, translations, routes, PHP classes, and Twig templates.
obsolete: true
wip: true
---

UserFrosting 4 introduced the **Sprinkle system** as a way to completely isolate the code and content that you and your team produce from the core UserFrosting installation. **UserFrosting 5** takes this concept a step further, requiring a new chapter on the basic UserFrosting project structure before even talking about downloading any code!
Expand All @@ -14,7 +14,7 @@ To make things easier, UserFrosting 5 now separates all of your code from UserFr

## The App Skeleton, your project's template

The **app skeleton** is a bare-bone UserFrosting project. Think of it like a starting kit, or template, to create your own application. Everything in the skeleton is meant to be modified. As such, the skeleton doesn't need to be a synced copy of the UserFrosting Github repository (called a ***fork***). It provides example pages and all the basic configuration to run a default UserFrosting application.
The **app skeleton** is a bare-bone UserFrosting project. Think of it like a starting kit, or template, to create your own application. Everything in the skeleton is meant to be modified. As such, the skeleton doesn't need to be a synced copy of the UserFrosting Github repository (called a ***fork***). It provides example pages and all the basic configuration to run a default UserFrosting application.

> [!IMPORTANT]
> While there is an official UserFrosting App Skeleton, it doesn't need to be the only one. Many skeletons could exist as starting points for new UserFrosting-based projects
Expand Down
8 changes: 4 additions & 4 deletions app/pages/6.0/03.structure/02.dependencies/docs.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: Built on the shoulders of giants
description: Detailed breakdown of a UserFrosting's dependencies.
obsolete: true
wip: true
---

As detailed in a previous chapter, it's important [not to reinvent the wheel](background/dont-reinvent-the-wheel). That's why UserFrosting depends on a number of external libraries, called dependencies. Those are written by people and organizations external to UserFrosting, providing the base that UserFrosting works on. These dependencies are not tied to UserFrosting and can be used by anyone. Think of dependencies as the raw materials, like wood and concrete, you get from the hardware store to build a house. We simply "glued" them together to create awesomeness!
As detailed in a previous chapter, it's important [not to reinvent the wheel](background/dont-reinvent-the-wheel). That's why UserFrosting depends on a number of external libraries, called dependencies. Those are written by people and organizations external to UserFrosting, providing the base that UserFrosting works on. These dependencies are not tied to UserFrosting and can be used by anyone. Think of dependencies as the raw materials, like wood and concrete, you get from the hardware store to build a house. We simply "glued" them together to create awesomeness!

While UserFrosting uses dozens of dependencies, here's a rundown of the most important ones:

## Slim 4
**[Slim](https://www.slimframework.com)** is a PHP _micro framework_ that helps you quickly write simple yet powerful web applications and APIs. Slim is the backbone of UserFrosting. To be more precise, **UserFrosting _is_ a Slim Application**!
**[Slim](https://www.slimframework.com)** is a PHP _micro framework_ that helps you quickly write simple yet powerful web applications and APIs. Slim is the backbone of UserFrosting. To be more precise, **UserFrosting _is_ a Slim Application**!

Except for the Bakery system (which uses _[Symfony Console](#symfony-console-5)_), UserFrosting uses Slim at every level to perform middleware management, route collections, and everything else needed to actually display a web page.

Expand All @@ -28,7 +28,7 @@ Eloquent is one of the most powerful and easy to use tools available to interact
**[Twig](https://twig.symfony.com/doc/)** is a flexible, fast, and secure template engine for PHP. Initially developed for the Symfony framework, Twig is easy to use. Twig provides the necessary tools to use the data generated by PHP and render the HTML page the end user gets to see.

## Symfony Console 5
**[Symfony Console](https://symfony.com/doc/5.4/components/console.html)** eases the creation of beautiful and testable command line interfaces. This is used to power the **Bakery** command line interface tool used by UserFrosting.
**[Symfony Console](https://symfony.com/doc/5.4/components/console.html)** eases the creation of beautiful and testable command line interfaces. This is used to power the **Bakery** command line interface tool used by UserFrosting.

## Webpack Encore 4
**[Webpack Encore](https://symfony.com/doc/current/frontend.html)** wraps Webpack, providing a clean & powerful API for bundling JavaScript modules, pre-processing CSS & JS and compiling and minifying assets. Encore is a professional asset system that's a delight to use. It is used by UserFrosting to serve all CSS and Javascript files, while enabling the use of other frameworks, like Vue.js, in the future.
4 changes: 2 additions & 2 deletions app/pages/6.0/03.structure/03.framework/docs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: The Framework
description: A simple description of the UserFrosting Framework.
obsolete: true
wip: true
---

The [**UserFrosting Framework**](https://github.com/userfrosting/framework/) contains the critical services required for UserFrosting to work. This is the only part of UserFrosting that is not considered a sprinkle. The reason for it not being considered a sprinkle is simple : the Framework contains the code required for the Sprinkle system to work. If it was a sprinkle itself, we'd be in a loop!
Expand All @@ -11,7 +11,7 @@ Aside from managing sprinkles (through the cleverly named _SprinkleManager_), th
## Shared Usage
The UserFrosting Framework also contains some parts that are not tied directly to UserFrosting. These parts could be used outside of UserFrosting, in a completely separate application.

The documentation for each part is embedded in the next chapters, but you can still see each part's documentation on it's own :
The documentation for each part is embedded in the next chapters, but you can still see each part's documentation on it's own :
- [Cache](https://github.com/userfrosting/framework/tree/5.1/src/Cache) : Wrapper function for Laravel cache system for easier integration of the cache system in standalone projects.
- [Config](https://github.com/userfrosting/framework/tree/5.1/src/Config) : Configuration files aggregator
- [Fortress](https://github.com/userfrosting/framework/tree/5.1/src/Fortress) : A schema-driven system for elegant whitelisting, transformation and validation of user input, on both the client and server sides, from a unified set of rules.
Expand Down
4 changes: 2 additions & 2 deletions app/pages/6.0/03.structure/04.sprinkles/docs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Sprinkles, what are they?
description: Detailed breakdown of a sprinkle's contents.
obsolete: true
wip: true
---

Sprinkles are an integral part of UserFrosting. We'll see in detail how they work in [a later chapter](sprinkles), but for now it's important to have an overview.
Expand All @@ -14,7 +14,7 @@ Your app can have as many sprinkles as you want. A sprinkle could even depend on

## Bundled Sprinkles

A default UserFrosting installation comes with **four** sprinkles, each of which will be downloaded by [Composer](installation/requirements/essential-tools-for-php#composer) in the `/vendor` directory during installation.
A default UserFrosting installation comes with **four** sprinkles, each of which will be downloaded by [Composer](installation/requirements/essential-tools-for-php#composer) in the `/vendor` directory during installation.

Because UserFrosting is modular, you can decide to use these bundled sprinkles or not. You may or may not need the functionality each provides in your app. We'll go over how to enable and disable them [later](sprinkles/recipe#removing-default-sprinkles). For now, let's focus on their features.

Expand Down
2 changes: 1 addition & 1 deletion app/pages/6.0/03.structure/chapter.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: App Structure
description: UserFrosting is modular application framework built on the shoulders of giants. This chapter describes how UserFrosting is structured.
obsolete: true
wip: true
---

#### Chapter 3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Basic Stack Requirements
description: UserFrosting requires a web server, PHP, and some sort of database.
obsolete: true
wip: true
---

The basic stack requirements for running UserFrosting are pretty typical of any web framework or CMS. Those requirements are the software required to _run_ UserFrosting, usually on a "server". These are different from the [developer tools used to build your website](installation/requirements/essential-tools-for-php) which we'll see on the next page.
Expand All @@ -20,7 +20,7 @@ To run UserFrosting, you'll need four things :

To run any website, you need *web server software*. Its tasks are to receive client requests, execute them, and send a reply. For a PHP website, the web server software won't execute the PHP code itself. Instead, it passes it to PHP which interprets the code and returns a response for the web server to display.

The most popular web servers today are :
The most popular web servers today are :

- [Nginx](https://www.nginx.com)
- [Apache](https://httpd.apache.org)
Expand Down Expand Up @@ -49,7 +49,7 @@ As for your local development environment ([You _do_ have a local development en

### PHP Extensions

UserFrosting and its dependencies requires some PHP Libraries and Extensions to be installed and enabled :
UserFrosting and its dependencies requires some PHP Libraries and Extensions to be installed and enabled :

- [GD](https://www.php.net/manual/en/book.image.php)
- [DOM](https://www.php.net/manual/en/book.dom.php)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Essential Tools for Modern PHP
description: A minimal set of tools that every PHP developer should have installed in their development environment.
obsolete: true
wip: true
---

On the previous page, we saw the softwares required to run UserFrosting. Now it's time to look at tools you'll need during development to build your UserFrosting application. These tools are not strictly required to be installed on your production server, which we'll cover in a [later chapter](going-live).
Expand Down Expand Up @@ -47,7 +47,7 @@ Composer also handles autoloading, which means that the days of needing long blo

## Node.js

**[Node.js](https://nodejs.org/en/)** is an an extremely popular JavaScript runtime built on Chrome's V8 JavaScript Engine. In recent years it has become extremely popular for creating multiplatform applications, and for its role in providing a means to run platform independent build tools like `gulp` and `grunt` (to name just a few). Node.js also includes `npm` (Node.js Package Manager).
**[Node.js](https://nodejs.org/en/)** is an extremely popular JavaScript runtime built on Chrome's V8 JavaScript Engine. In recent years it has become extremely popular for creating multiplatform applications, and for its role in providing a means to run platform independent build tools like `gulp` and `grunt` (to name just a few). Node.js also includes `npm` (Node.js Package Manager).

Although UserFrosting does not _run_ on Node.js, it does use several Node-based tools to fetch client-side Javascript and CSS dependencies, as well as perform critical build tasks.

Expand All @@ -59,7 +59,7 @@ Although UserFrosting does not _run_ on Node.js, it does use several Node-based

## npm

[npm](https://www.npmjs.com) stands for **N**ode **P**ackage **M**anager. npm is to Node.js what Composer is to PHP. It is used to grab the various Node packages that are required by UserFrosting's installation and build tools.
[npm](https://www.npmjs.com) stands for **N**ode **P**ackage **M**anager. npm is to Node.js what Composer is to PHP. It is used to grab the various Node packages that are required by UserFrosting's installation and build tools.

> [!NOTE]
> UserFrosting 5 requires **NPM 9** or above.
Expand Down
4 changes: 2 additions & 2 deletions app/pages/6.0/04.installation/01.requirements/chapter.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Requirements
description: UserFrosting has a few basic, sensible requirements - requirements that just about any modern web developer should already have set up!
obsolete: true
wip: true
---

# Requirements

UserFrosting has a few basic requirements and makes use of some modern development tools - requirements and tools that just about any modern web developer should already have set up!
UserFrosting has a few basic requirements and makes use of some modern development tools - requirements and tools that just about any modern web developer should already have set up!
Loading