Skip to content

Latest commit

 

History

History
201 lines (145 loc) · 6.2 KB

README.md

File metadata and controls

201 lines (145 loc) · 6.2 KB

Visitors GitHub contributors

TMN2234 (G03) Web Based System Development Assignment

Project: Web Hosting Service

🏆 Developed By Team: Semicolon

  • 79880 LIM HONG YANG
  • 79065 CHIN TECK YUNG
  • 78855 ANNASTASHA CHANG SEE MAY
  • 79260 EE CHEE FAT
  • 79027 CHAI CHENG KANG

This project is intended strictly for educational purposes. It is important to note that no tangible costs will be accrued. We wish to emphasize that any potential loss or damage to assets cannot be attributed to our accountability. We advise exercising caution and assuming full responsibility when opting to download and install this software.


⚠️ Important Pre-requisite!

This web application must be develop ONLINE, because the belows are implemented:

  1. PayPal Subscription
    • Ask credentials from developer or; use your own client ID & secret
  2. Chart.js

🌐 Deploying Website To Local Machine

Click to expand!

Option 1

  1. Empty your xampp/htdocs/ directory and replace it with all the project files

Option 2

  1. Open XAMPP
  2. Click config (Apache)
  3. Select Apache (httpd.conf)
  4. Search for DocumentRoot, change the directory to your project folder

You will see this (by default):

DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">

Change to:

DocumentRoot "path/to/your/project/folder"
<Directory "path/to/your/project/folder">
  1. Save it, restart XAMPP and start Apache and MySQL
  2. Import id20654951_semicolonix.sql to database (assuming no error)
  3. Done, try localhost/index.php

🔑 Setup Composer for dotenv Environment

Click to expand!
  1. Download Composer.exe (v2.5.8 as of 08-Aug-2023) Video Tutorial
  2. Install as default setting

If missing dotenv folder

  1. Create a dotenv folder
  2. Open vsCode terminal, cd dotenv
  3. type in composer require vlucas/phpdotenv
  4. Will see the package installed: composer.json & composer.lock

☁️ How To Host Website Temporarily Using ngrok (FREE)

Click to expand!
  1. Register ngrok account
  2. Login ngrok aacount
  3. Download ngrok (please remember the download directory)
  4. Run cmd
  5. cd /absolute/path/to/your/ngrok-v3-stable-windows-amd64 (ngrok.exe should be inside)
  6. type ngrok & hit ENTER - check if is correctly install (assuming no error)
  7. Run your XAMPP/WampServer (Start Apache & MySQL)
  8. Goto ngrok Dashboard to get your AuthToken
  9. Go back to cmd
  10. type ngrok config add-authtoken PUT_YOUR_AuthToken_HERE & hit ENTER (only need to do this ONCE)
  11. type ngrok http 80 & hit ENTER (listening port 80, may vary depends on your local server)
  12. You will now see beautiful interface in cmd
  13. Copy the Forwarding link
  14. Paste the link to any browser
  15. to QUIT/Close tunnel: Ctrl + C in cmd

Extra

🔁 Repeat Step [4], [5], [11-15] if you wish to re-open a tunnel
✒️ Note: The link will be expired if you choose to close the tunnel (Ctrl + C)
✒️ How to update ngrok: ngrok udpate

🧾 Generate PDF Receipt using FPDF

Click to expand!
  1. Download the latest fpdf as zip file (v1.85 as of 18-6-2023)
  2. Extract and put in the project directory

📒 Dummy Data

Click to expand!
hashing method : password_hash("YOUR_PASSWORD", PASSWORD_BCRYPT);
verify method  : password_verify("YOUR_PASSWORD", $hash);
Role Email PWD
ADMIN [email protected] 12356
----- ---------------------- -----------
USER [email protected] 123
USER [email protected] 123
USER [email protected] 123
USER [email protected] 123
USER [email protected] alex456@
USER [email protected] Alicepass
USER [email protected] qwerty789
USER [email protected] emily123
USER [email protected] brown123
USER [email protected] secret456
USER [email protected] password123
USER [email protected] laura524
USER [email protected] mike78900
USER [email protected] sarah456

💳 PayPal Subscription Integration

Click to expand!

Types of payment

  1. One-time payment/checkout
  2. Recurring Payment (we use this)

Note

Paypal Credentials

Ask from developer

Folder Hierarchy

project/
├── admin/
├── assets/
│   ├── font/
│   ├── icon/
│   └── image/
├── auth/
├── config/
├── css/
├── dotenv/
│   └── vendor/
├── Error/
├── handlers/
├── includes/
├── js/
├── pages/
├── vendor/
└── index.php

Tips on SQL

  1. Reset auto increment using ALTER TABLE table_name AUTO_INCREMENT = desired_value