Giter VIP home page Giter VIP logo

tanhongit / webapp_blog_yii_php Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 85.15 MB

It's a free e-commerce website project for everyone to use. It is built in Yii PHP Framework.

Home Page: https://appyii.tanhongit.com/

CSS 0.62% JavaScript 1.08% PHP 98.26% Batchfile 0.01% HTML 0.02% Hack 0.01%
yii php-shop yii-framework webapp-yii yii-php-framework tanhongit tanhongit-mvc php php-framework

webapp_blog_yii_php's Introduction

Welcome to Webapp Blog Yii PHP Framework

It's a free e-commerce website project for everyone to use. It is built in Yii PHP Framework.

1. Configuration requirements

- Version PHP 7.2, 7.4
- OpenSSL PHP Extension

2. Technology

  • PHP language (Yii PHP Framework)
  • Using MVC model
  • Javascript (Jquery, Bootstrap,...)

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,...
    - Comment on Product, Post,...
    - Search, pagination,...
    - Checkout, PlaceOrder,...
    ...

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

2. BACKEND-ADMIN
    - Product manager   (Create, delete, update)
    - Category manager  (Create, delete, update)
    - Order management  (Create, delete, update)
    - User management   (Create, delete, update)
    ...

4. Edit Connect Database

You need to change the connection information to the database if you want to store and use data for the website.

Path: /config/database.php

Change host, dbname, username, password to your database information.

return array(
    'connectionString' => 'mysql:host=localhost;dbname=webapp_blog_yii_php',
    'emulatePrepare' => true,
    'username' => 'root',
    'password' => 'root',
    'charset' => 'utf8',
    'tablePrefix' => 'tbl_',
);

5. Change SMTP Mail (phpmailer information)

You need to change the information about SMTP Mail to be able to use some functions about user account authentication, change passwords, notify users, ...

  1. Go to /protected/libs
  2. Create setting_mail.php file from setting_mail_copy.php file in the folder libs (copy setting_mail_copy.php to setting_mail.php)
  3. Change the information about SMTP Mail:
define('SMTP_HOST','smtp.gmail.com');
define('SMTP_PORT','465');
define('SMTP_UNAME','add_your_mail');
define('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.

  • add_your_mail: Your email address
  • add_your_application_password_from_your_mail: Get Your application password from your email

Tips: https://support.google.com/accounts/answer/185833?hl=en

6. Install and using ssl certificate

Using mkcert to create ssl certificate

On Ubuntu

sudo apt install libnss3-tools

sudo wget https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64 && \
sudo mv mkcert-v1.4.3-linux-amd64 mkcert && \
sudo chmod +x mkcert && \
sudo cp mkcert /usr/local/bin/

Now that the mkcert utility is installed, run the command below to generate and install your local CA:

mkcert -install

Create ssl certificate for this project

Run:

cd /var/www/certs
mkcert local.webapp_blog_yii_php.com

Update configuration

Change local.webapp_blog_yii_php.com.conf file (/apache2/sites-available/ to this)

<VirtualHost *:80>
	ServerAdmin localserver@localhost
	ServerName local.webapp_blog_yii_php.com
	ServerAlias www.webapp_blog_yii_php.vdx.com
	DocumentRoot /var/www/webapp_blog_yii_php
	ErrorLog /var/www/logs/error-webapp_blog_yii_php.log
    CustomLog /var/www/logs/access-webapp_blog_yii_php.log combined
</VirtualHost>

<VirtualHost *:443>
    ServerAdmin localserver@localhost
    ServerName local.webapp_blog_yii_php.com
    ServerAlias www.local.webapp_blog_yii_php.com
    DocumentRoot /var/www/webapp_blog_yii_php

    ErrorLog /var/www/logs/error-webapp_blog_yii_php.log
    CustomLog /var/www/logs/access-webapp_blog_yii_php.log combined

    SSLEngine on
	SSLCertificateFile /var/www/certs/local.webapp_blog_yii_php.com.pem
	SSLCertificateKeyFile /var/www/certs/local.webapp_blog_yii_php.com-key.pem

    <Directory /var/www/webapp_blog_yii_php>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Demo

When done, you can test the website by opening the browser and typing the following URL:

Admin account:

username: admin
password: admin

Frontend some demo URLs:

APP_URL/category/list/2
APP_URL/contact
APP_URL/product/list/2
APP_URL/post/view/post-1
...

Backend Admin Manager URLs:

APP_URL/admin/slug/
APP_URL/admin/product/
APP_URL/admin/post/
APP_URL/admin/category/
APP_URL/admin/tag/

2022-07-09_100848

webapp_blog_yii_php's People

Contributors

dependabot[bot] avatar tanhongit avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

moahmednaser

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.