fastsitephp/starter-site

Starter Site using FastSitePHP

1.5.0 2023-04-23 23:47 UTC

This package is auto-updated.

Last update: 2024-04-24 02:23:44 UTC


README

Thanks for visiting! 🌠👍

globe_with_meridians earth_americas earth_asia earth_africa
Español Sitio de inicio de FastSitePHP
Português (do Brasil) FastSitePHP Starter Site

This is the main Starter Site for FastSitePHP. It includes several examples pages and provides a basic directory/file structure. The site is designed to provide structure for basic content (JavaScript, CSS, etc) while remaining small in size so that it is easy to remove files you don’t need and customize it for your site.

🚀 Getting Started

Getting started with PHP and FastSitePHP is extremely easy. If you do not have PHP installed then see instructions for Windows, Mac, and Linux on the getting started page:

https://www.fastsitephp.com/en/getting-started

The starter site does not include the Framework so you will need to run scripts/install.php to download it and install it. Once setup you can launch a site from the command-line as show below or if you use a Code Editor or IDE [Visual Studio Code, GitHub Atom, etc] then you can launch the site directly from your editor. See the above getting started page for more.

Download and run this site

# Download this Repository
cd {starter-site-root}
php ./scripts/install.php
php -S localhost:3000

Create a new project using Composer (PHP Dependency/Package Manager)

In addition to downloading this repository you can also start a new project using Composer.

composer create-project fastsitephp/starter-site my-app
cd my-app
php -S localhost:3000

Install directly on a server

A bash script is available for a quick setup of a Web Server (Apache or nginx), PHP, and FastSitePHP with a Starter Site. This script works for a full setup on a default OS when nothing is installed.

Supported Operating Systems (more will be added in the future):

  • Ubuntu 22.04 LTS
  • Ubuntu 20.04 LTS
  • Ubuntu 18.04 LTS
  • Ubuntu 16.04 LTS

Confirmed Cloud Environments:

  • Amazon AWS Lightsail with user ubuntu
  • DigitalOcean with user root
wget https://www.fastsitephp.com/downloads/create-fast-site.sh
sudo bash create-fast-site.sh

Supported Versions of PHP

  • The FastSitePHP Starter Site works with all versions of PHP from 5.3 to 8.2.
  • If you need to install the Starter Site on a Server with PHP 5.3 you will need to set the short_open_tag = On on your server's php.ini file.

Directory Structure

{root}
|
|   # PHP Code
├── app
|   ├── Controllers/*.php
|   ├── Middleware/*.php
|   ├── Models/*.php
|   ├── Views/*.php
│   └── app.php       # Main Application File
│
|   # Application Data Files
├── app_data
│   └── i18n/*.json   # JSON Files for Multiple languages
│
|   # Documentation
├── docs
│
|   # Web Root Folder
├── public
|   ├── css/*
|   ├── img/*
|   ├── js/*
│   └── index.php  # Entry point for web root
│
|   # Application Scripts
├── scripts
│
|   # Vendor files (created when installing dependencies)
└── vendor

🖥️ Starter Site Print Screens (Screenshots)

Starter Site Home Page

Starter Site Example Page

Starter Site Login Page

🔒 🚀 Security and Performance

FastSitePHP’s Starter Site is designed to provide strong security using best practices and high performance with the initial template. When using Chrome DevTools Lighthouse the Starter Site will score 100 in website categories for both Mobile and Desktop. On tested Cloud Systems using low cost servers a score of 100 is also achieved.

Chrome DevTools Lighthouse

Chrome DevTools Network

🤝 Contributing

  • If you find a typo or grammar error please fix and submit.
  • If you would like to help with translations then please submit the JSON language files in app_data/i18n.
  • If you would like to submit any other changes then please open an issue first. This is intended to be a minimal site so adding more code needs a good reason.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.