Skip to content

fastsitephp/starter-site

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

🌟 FastSitePHP Starter Site

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 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.1.
  • 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.