Download the PHP package naghashyan/ngs-php-framework without Composer
On this page you can find all versions of the php package naghashyan/ngs-php-framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download naghashyan/ngs-php-framework
More information about naghashyan/ngs-php-framework
Files in naghashyan/ngs-php-framework
Package ngs-php-framework
Short Description The Naghashyan PHP framework
License MIT
Homepage https://ngsframework.com
Informations about the package ngs-php-framework
What is NGS
NGS (Naghashyan Framework) is a high performance, component-based PHP framework for rapidly developing modern Web applications.
What is NGS Best for?
NGS is a generic Web programming framework, meaning that it can be used for developing all kinds of Web applications using PHP. Because of its component-based architecture and sophisticated caching support, it is especially suitable for developing large-scale applications such as portals, forums, content management systems (CMS), e-commerce projects, RESTful Web services, and so on.
How does NGS Compare with Other Frameworks?
If you're already familiar with another framework, you may appreciate knowing how NGS compares:
- Like most PHP frameworks, NGS implements the MVC (Model-View-Controller) architectural pattern and promotes code organization based on that pattern.
- NGS takes the philosophy that code should be written in a simple yet elegant way. NGS will never try to over-design things mainly for the purpose of strictly following some design pattern.
- NGS is a full-stack framework providing many proven and ready-to-use features: query builders and ActiveRecord for both relational and NoSQL databases; RESTful API development support; multi-tier caching support; and more.
- NGS is extremely extensible. You can customize or replace nearly every piece of the core's code. You can also take advantage of NGS's solid extension architecture to use or develop redistributable extensions.
- High performance is always a primary goal of NGS.
Requirements and Prerequisites
NGS requires PHP 7.4.0 or above. You can find more detailed requirements for individual features by running the requirement checker included in every NGS release.
Using NGS requires basic knowledge of object-oriented programming (OOP), as NGS is a pure OOP-based framework. NGS also makes use of the latest features of PHP, such as namespaces and traits. Understanding these concepts will help you more easily pick up NGS.
🚀 Starting a New NGS Project with Docker
To start a new project using the NGS framework, you can use the prebuilt Docker image along with a Docker Compose configuration. This setup includes PHP, Nginx, MySQL, and SSH, and allows you to add additional PHP extensions during build time.
📄 Steps to Get Started
- Create a new project directory This will be your project root:
2. Create a docker-compose.yml
file
Inside your project's root directory, create a file named docker-compose.yml
and copy the following content into it:
⚙️ Alternative: Using Git Submodule
Instead of manually creating the file, you can include it directly from a shared repository:
⚠️ Additional Note:
If you're checking out the main project from Git, the submodule directory will initially be empty. To fetch the contents of the submodule, you must explicitly initialize and update it with the following command:
After running this command, the submodule's content will become available within your project's directory structure.
🚀 Extending the Docker Compose configuration
To customize the Docker Compose setup specifically for your individual project, create a file named docker-compose.override.yml
in your project's root directory. Docker Compose automatically merges this file with the main docker-compose.yml
, allowing you to override or extend any settings.
Example: Create docker-compose.override.yml
to customize your project:
📌 Running the combined configuration (PowerShell script):
A PowerShell script named Start-Compose.ps1
is already included in your Docker Compose template repository (ngsdocker-compose
). This script automatically detects if an override file exists in your project's main directory and runs Docker Compose accordingly.
Executing the PowerShell script:
Run the script directly from your project root:
This will launch your Docker environment, automatically applying any overrides you've defined.
🗑️ Removing MySQL Volume (PowerShell script):
A PowerShell script named Remove-MySQL-Volume.ps1
is also included in the Docker Compose template repository. This script safely removes the Docker volume associated with your project's MySQL data. Use this command if you need to reset your MySQL database:
Executing the PowerShell script to remove MySQL volume:
Run the script directly from your project root:
This structured approach ensures consistency across projects using NGS, providing flexibility for project-specific needs through straightforward customization with Docker Compose overrides and PowerShell automation.
-
Start the Docker environment
Run the following command in the root of your project:
This will build the image (if needed) and launch your containers in the background.
-
Access your project
- Open http://localhost:8080 in your browser to see your app.
- Use port 3307 for connecting to MySQL.
- SSH access is available at localhost:2222.
⚙️ Optional Customization
-
Add extra PHP extensions You can modify the
ADDITIONAL_PHP_EXTENSIONS
build argument to install any extra extensions your project needs.Example:
- Customize environment variables
Change database credentials or PHP version using the
environment
section in the Compose file.
📌 Setting Up a Project via Composer in Docker Environment
To set up your NGS project using Composer within the Docker environment, follow these steps:
-
Connect to Docker container terminal:
-
Navigate to project directory:
-
Initialize the project with Composer:
-
Verify your installation:
Ensure that your composer.json now contains the NGS framework dependency:
Now your project is ready to start using NGS within your Docker environment.
By following these steps, each new NGS project will have a consistent, self-contained Docker-based setup — no need to install PHP, MySQL, or Nginx locally.