Methodology - JadenGil/Jaden-Tech-Journal GitHub Wiki
- Network Setup
Server Type:
Ideally we will be choosing a Linux server like Ubuntu CLI or Rocky Linux for hosting both the MySQL database and the Laravel application. These are programs that I am very familiar with because of my time at champlain and I think they’ll be a good fit and help make certain things easier.
We’ll be using Apache to serve the Laravel application, and make sure it is configured to handle HTTPS with a “Let's Encrypt SSL” certificate for secure data transmission. Although I’ll be looking into other methods than just “Let’s Encrypt.
Database Security:
We’ll secure the MySQL server by enabling UFW to allow only specific IP addresses to connect.
We’ll use SSL/TLS encryption for database connections and ensure MySQL users have strong, unique passwords.
High Availability:
For the sake of redundancy we’ll attempt to use HAProxy to handle web traffic.
This would also help with MySQL replication (master-slave or master-master) for high availability.
Virtualization/Containerization:
I’m going to attempt to use Docker or Podman to containerize the Laravel app and database, making deployments easier and scalable. This is something that I am less experienced with but I’d like to attempt to implement Docker (or a similar program) for virtualization.
Networking:
We’ll ensure proper VLAN segmentation if it’s running on a shared network (will touch base with Grant to see if it is), and potentially use VPN or SSH tunnels to access the servers remotely for management from home.
- Data Generation
User Data:
We’ll use form validation in Laravel to gather data. Implement reCAPTCHA to prevent bots. I’ve never set something like this up before but I would very much like to make it happen to prevent the potential of bot attacks
For the Discord integration, I’d like to try and use the Discord API to verify users and gather their Discord details. I’d like to make this optional just in case users don’t have discord but it likely won’t be an option for those who do because this is crucial info for WNFC
Email Verification:
Luckily I’ve Laravel offers built-in functionality for email verification. Use services like Mailgun or SendGrid for email sending and verification. Unique User ID:
MySQL’s AUTO_INCREMENT feature for primary keys can generate a unique User ID.
Password Hashing:
I’ll also be researching how to store passwords securely using Laravel’s bcrypt or argon2 hashing mechanisms.
Games Played:
Track the games by having a QR code at each station that allows the players to log what games they’re playing through the website. There will be a drop down menu with the most commonly played games and an “other” option so player can enter a game that might not bve played as often. Further research will need to be done to ensure that “Other” games are properly sorted and not just thrown about in the database
- Tools to Use
We will be using MySQL for the database, as it's well-supported, scalable, and integrates easily with Laravel.
We will use Laravel for the web interface due to its built-in tools for validation, authentication, and ease of use.
I’d like to use phpMyAdmin or Adminer for database management, though you can also use CLI-based tools like mysql for simplicity.
I’d like to use Nmap Wireshark for network troubleshooting and security audits.
I found a software called Fail2ban to prevent brute force attacks on SSH and database login attempts. I’m not familiar with this tool yet but in my research it seemed user friendly and somewhat easy to setup https://github.com/fail2ban/fail2ban Fail2Ban Guide
As for backup tools it seems rsync or borg would be ideal for automated backups with encryption.
- Algorithms and Statistical Methods
User Activity Analysis:
For the "most frequently played game," a simple COUNT query can be used to track the frequency of each game.
Analysis of Game Trends:
Use SQL GROUP BY with COUNT() and MAX() to find the most popular games.
Statistical Methods:
Descriptive Statistics: Basic counts, averages (mean/median) for metrics like average player age, where players are coming from, etc. Clustering/Segmentation: We could apply K-means clustering on the data to group players based on game preferences.