PHPackages                             tanhongit/new-mvc-shop - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. tanhongit/new-mvc-shop

ActiveProject[Admin Panels](/categories/admin)

tanhongit/new-mvc-shop
======================

new-mvc-shop project is a simple project to help you understand the MVC model in PHP

v2.0(2y ago)78232MITPHPPHP ^8.0

Since Apr 9Pushed 1y ago8 watchersCompare

[ Source](https://github.com/tanhongit/new-mvc-shop)[ Packagist](https://packagist.org/packages/tanhongit/new-mvc-shop)[ Docs](https://tanhongit.com)[ Fund](https://paypal.me/tanhongcom)[ GitHub Sponsors](https://github.com/tanhongit)[ RSS](/packages/tanhongit-new-mvc-shop/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (13)Used By (0)

Welcome to New PHP MVC by TANHONGIT
===================================

[](#welcome-to-new-php-mvc-by-tanhongit)

The NEW-MVC-SHOP is a free e-commerce website project for everyone to use. It is built in pure PHP language. And anyone can use it.

- Customers do not need to know much about technology.
- Powerful system, many useful functions.
- Easy to access, easy to use.

Support the project
-------------------

[](#support-the-project)

Support this project 😜 🙏

 [![PayPal buymeacoffee TanHongIT](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.me/tanhongcom)

1. Configuration requirements
=============================

[](#1-configuration-requirements)

> - Web Server: Apache
> - Version PHP &gt;= 8.0
> - Composer &gt;= 2.0
> - OpenSSL PHP Extension
> - [Composer](https://getcomposer.org/download/) (Please install composer before running this project).
> - MySQL &gt;= 8.0 (or MariaDB &gt;= 10.0)

2. Technology
=============

[](#2-technology)

- Pure PHP language

3. Feature
==========

[](#3-feature)

```
1. FRONT-END
    - Shopping cart
    - Save cart with database
    - Customer login
    - Content: Page, Post, Product List, Product Details, Category,...
    - Product attributes: cost price, promotion price, detail,...
    - Feedback, Feedback for product, Feedback for order
    - Comment on Product, Post,...
    - Search, pagination,...
    - Checkout, PlaceOrder,...
    ...

=================================================================

2. BACKEND-ADMIN
    - Admin roles, permission
    - Product manager   (Create, delete, update)
    - Category manager  (Create, delete, update)
    - Order management  (Create, delete, update)
    - Comment manager   (Create, delete, update)
    - Feedback manager  (Create, delete, update)
    - User management   (Create, delete, update)
    - Template manager  (Create, update)
    - Backup database
    ...

```

4. Download Database
====================

[](#4-download-database)

This is the path to the database file for you to download: [`/admin/database/***.sql`](https://github.com/TanHongIT/new-mvc-shop/tree/master/admin/database)

Create a new database on **PHPMyAdmin** at your server, then import the .sql file that you just downloaded.

5. Request configuration
========================

[](#5-request-configuration)

Clone the project to your computer:

```
git clone https://github.com/tanhongit/new-mvc-shop.git
```

Copy the .env.example file to .env:

```
cp .env.example .env
```

Run composer install:

```
composer install
```

6. Installation instructions
============================

[](#6-installation-instructions)

After running the above command, you need to edit the following information in the **.env** file:

6.1 Edit Config
---------------

[](#61-edit-config)

You need to change the path in the '**.env**' file to match the location of this source code on your server and must match the domain you registered.

```
PATH_URL=/
PATH_URL_IMG=public/upload/images/
PATH_URL_IMG_PRODUCT=public/upload/products/
```

> **Note:**
>
> The path of the config file that is using these environment variables is located at: [`/lib/config/config.php`](https://github.com/TanHongIT/new-mvc-shop/tree/master/lib/config/config.php)

6.2 Edit Connect Database
-------------------------

[](#62-edit-connect-database)

You need to change the connection information and import sql file to the database after you have cloned my repository so that the website can work.

This is the path to the sql file for you to import to your database: [`/admin/database/***.sql`](https://github.com/TanHongIT/new-mvc-shop/tree/master/admin/database)

And change the connection information to match your database in .env file:

```
DB_HOST=db_server
DB_PORT=3306
DB_USER=root
DB_PASS=root
DB_NAME=new_mvc_shop_db
```

> **Note:**
>
> The path of the database config file that is using these environment variables is located at: [`/lib/config/database.php`](https://github.com/TanHongIT/new-mvc-shop/tree/master/lib/config/database.php)

6.3 Edit .htaccess
------------------

[](#63-edit-htaccess)

Change RewriteBase - Recommend the path that matches your host address.

So we will have:

```
RewriteBase /

```

---

> **Note**: This applies to the case where your project is in a subfolder, and you want it accessible from a subpath URL.
>
> **EXAMPLE**:
>
> ```
> http://localhost/new-mvc-shop/
>
> ```
>
>
>
> So we will have:
>
> ```
> RewriteBase /new-mvc-shop/
>
> ```

6.4 Edit SMTP Mail
------------------

[](#64-edit-smtp-mail)

> The third thing: You need to change the information about **SMTP Mail** to be able to use some functions about user account authentication, change passwords, notify users, ...

Update the following information in the **.env** file:

```
SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_UNAME=add_your_mail
SMTP_PWORD=add_your_application_password_from_your_mail
```

Change the value of the constant **SMTP\_UNAME** and **SMTP\_PWORD** to match the configuration you added on your Gmail.

Tips:

**Where SMTP\_PWORD is the application password for your *gmail.com* account.**

> **Note:**
>
> The path of the email config file that is using these environment variables is located at: [`/lib/config/sendmail.php`](https://github.com/TanHongIT/new-mvc-shop/tree/master/lib/config/sendmail.php)

7. Install with Docker (Optional)
=================================

[](#7-install-with-docker-optional)

> Note:
>
> **Please skip this section if you have already installed the project in the above section.**

If you want to run this project with Docker, you can edit .env file and use the following command:

Please edit the following information in the **.env** file:

(Please set ports for **MYSQL\_PORT, PHPMYADMIN\_PORT, APP\_PORT, SSL\_PORT** and not duplicate with other ports)

**Example:**

```
APP_NAME=nms

APP_PORT=85
SSL_PORT=443 # (optional)

MYSQL_PORT=3307
MYSQL_USER=root
MYSQL_ROOT_PASS=root
MYSQL_DB=new-mvc-shop
MYSQL_PASS=root

PHPMYADMIN_PORT=8081
PHPMYADMIN_UPLOAD_LIMIT=2048M
```

7.1 Installation with bash script:
----------------------------------

[](#71-installation-with-bash-script)

If your OS is **Linux**, you can use the bash script to easily run the project with Docker.

```
bash install.sh
```

---

If not, please follow the instructions below.

7.2 Installation with commands:
-------------------------------

[](#72-installation-with-commands)

Run the following command:

```
docker compose up -d
```

After running the above command, you need to install the composer package for the project.

```
docker compose run --rm -w /var/www/html server composer install
```

Finally, you need to import the database file into the database container.

8. Demo
=======

[](#8-demo)

1. Front-End:
2. Back-End:

> ***Account login on Backend***
>
> ```
> user :
>     username: testna      | email: test@gmail.com        | password: 123456789
>     username: tanhongitii | email: meowwww@gmail.com.com | password: 123456789
> Mod :
>     username: eyteyt      | email: moderator@gmail.com   | password: 12345678
>
> Admin:
>     username: admin       | email: admin@gmail.com       | password: 1234567890
>
> ```

Demo Images
===========

[](#demo-images)

**HomePage**

[![Image](https://camo.githubusercontent.com/b8f7a91d090434407a91a2b766f0c78488ef7e9f49ba299c8c12afc2fcb1a935/68747470733a2f2f696d6775722e636f6d2f726e636c655a302e706e67)](https://camo.githubusercontent.com/b8f7a91d090434407a91a2b766f0c78488ef7e9f49ba299c8c12afc2fcb1a935/68747470733a2f2f696d6775722e636f6d2f726e636c655a302e706e67)

---

**Slide of Homepage**

[![Image](https://camo.githubusercontent.com/f835eeb69dd23f1d12e9d581f5a488faac8a3173b86cf878ef3dea70dc87f4ce/68747470733a2f2f696d6775722e636f6d2f754931556d62612e706e67)](https://camo.githubusercontent.com/f835eeb69dd23f1d12e9d581f5a488faac8a3173b86cf878ef3dea70dc87f4ce/68747470733a2f2f696d6775722e636f6d2f754931556d62612e706e67)

---

**Product Page**

[![Image](https://camo.githubusercontent.com/c807d40e47993920b2ac28e8f0af084adb0b7515ba3809c45bae47cc0a85830e/68747470733a2f2f696d6775722e636f6d2f4578644170744a2e706e67)](https://camo.githubusercontent.com/c807d40e47993920b2ac28e8f0af084adb0b7515ba3809c45bae47cc0a85830e/68747470733a2f2f696d6775722e636f6d2f4578644170744a2e706e67)

---

**Admin Manager Page**

[![Image](https://camo.githubusercontent.com/8b6d4cbfb1693ece9e65d08fb3ed6534414b1789f4fa0a549516ab22ecbf546a/68747470733a2f2f696d6775722e636f6d2f784f70416d62342e706e67)](https://camo.githubusercontent.com/8b6d4cbfb1693ece9e65d08fb3ed6534414b1789f4fa0a549516ab22ecbf546a/68747470733a2f2f696d6775722e636f6d2f784f70416d62342e706e67)

[![Image](https://camo.githubusercontent.com/d3953c97c4c4d67e6c6167f759252ddf28baa32ac8233d994637bda01cb9bca8/68747470733a2f2f696d6775722e636f6d2f75386c586e737a2e706e67)](https://camo.githubusercontent.com/d3953c97c4c4d67e6c6167f759252ddf28baa32ac8233d994637bda01cb9bca8/68747470733a2f2f696d6775722e636f6d2f75386c586e737a2e706e67)

---

 [![license](https://camo.githubusercontent.com/a4b7a1d8377c4252b62962b12857454a352b488c7f58770dcbcadcffaf57247b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646f637472696e652f6f726d2e737667)](https://camo.githubusercontent.com/a4b7a1d8377c4252b62962b12857454a352b488c7f58770dcbcadcffaf57247b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646f637472696e652f6f726d2e737667)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 99.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~342 days

Total

5

Last Release

855d ago

Major Versions

v0.5 → v1.02020-04-29

v1.x-dev → v2.x-dev2022-07-18

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/35853002?v=4)[Tan Nguyen](/maintainers/tanhongit)[@tanhongit](https://github.com/tanhongit)

---

Top Contributors

[![tanhongit](https://avatars.githubusercontent.com/u/35853002?v=4)](https://github.com/tanhongit "tanhongit (345 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![tbreuss](https://avatars.githubusercontent.com/u/1334161?v=4)](https://github.com/tbreuss "tbreuss (1 commits)")

---

Tags

cartcart-phpcrudmvc-shopnew-mvcphpphp-cartphp-crudphp-mvcphp-mvc-shopphp-shopphp-shopping-cartshopshopping-cartsmtp-mailsource-codesource-php-mvctanhongittanhongit-carttanhongit-mvcphpmvcphp-mvcnew-mvc-shopphp-mvc-shopphp-mvc-shop-projectmvc-shop

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tanhongit-new-mvc-shop/health.svg)

```
[![Health](https://phpackages.com/badges/tanhongit-new-mvc-shop/health.svg)](https://phpackages.com/packages/tanhongit-new-mvc-shop)
```

###  Alternatives

[saithink/saiadmin

webman plugin

2709.9k1](/packages/saithink-saiadmin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
