Methodology Final - JadenGil/Jaden-Tech-Journal GitHub Wiki
Capstone Project Methodology: WNFC Webpage + Database
NOTE All the code that I've included is an example and does not necessarily reflect what the final product will look like.
Introduction
This methodology paper will outline the approach taken to develop a webpage and database for WNFC LLC in Essex Junction. The project aims to create a MySQL database to track player data, such as age, name, Discord user info, email, password, unique user ID, student status and grade, location, and games played. A web-based interface will be built using Laravel to allow efficient interaction with the database. The system will run on a Windows based environment.
Environment Setup
The setup involves the following hardware and software components:
Development Machines: Operating System: Windows 10 Applications: XAMPP (includes MySQL, Apache), Laravel, Composer, PHP, Node.js Network Configuration: Local environment with no external connections unless specified for future testing or deployment.
MySQL Database:
Installed via XAMPP. Custom database schema designed for player tracking (including player information and game history).
Laravel Web Application:
PHP framework used to create the web interface. Composer used to install dependencies. Node.js for managing front-end assets and Laravel Mix.
Database Setup
Step 1: Install MySQL
On Windows 10:
https://dev.mysql.com/doc/refman/8.4/en/windows-installation.html
Step 2: Database Design
The database schema will include the following tables:
Players: Stores player information like name, email, Discord ID, student status, etc.
Games: Contains information on the available games at the arcade.
Player_Game_Records: A junction table to track games played by each player.
Laravel
Install Composer from https://getcomposer.org/.
Install Laravel via Composer:
composer create-project --prefer-dist laravel/laravel wnfc-system
Laravel Configuration
Configure the .env file for database connection:
(Example)
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=wnfc_db
DB_USERNAME=root
DB_PASSWORD=
Implement Models and Migrations
Create Eloquent models for the Player, Game, and PlayerGameRecord tables:
(Example)
php artisan make:model Player -m
php artisan make:model Game -m
php artisan make:model PlayerGameRecord -m
Add fields to migration files:
(Example)
// In migration file
Schema::create('players', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('discord_id');
$table->string('email')->unique();
$table->string('password');
$table->string('student_status');
$table->integer('grade');
$table->string('location');
$table->timestamps();
});
Set Up Routes, Controllers, and Views
Define routes for the front-end to interact with the system:
(Example)
Route::get('/', [PlayerController::class, 'index']);
Route::post('/register', [PlayerController::class, 'register']);
#Front-End Development
Installing dependencies
On Windows 10:
Install Node.js and npm from https://nodejs.org/.
Installing dependencies via npm:
npm install
Developing Pages
We will build forms to collect player information, including name, email, Discord ID, student status, and game choices. As well as a dynamic display of games and player records given we have the time to do so.
Testing and validation:
For testing and validation, We'll first ensure that the system is functioning correctly by checking if the database is populated with the right player information. This involves verifying that when data is entered through the web interface, it’s properly stored in the MySQL database. Next, We’ll test the Laravel routes, controllers, and views to confirm that data is being displayed correctly on the front end. This means making sure that player details, game records, and other important information show up properly when accessed through the web application.
I’ll also perform unit testing on key features like user registration and login. For example, I’ll check that users can create an account, log in, and view their information without any issues. This will help ensure that all core functionalities are working as expected before moving on to the next phase of the project.
Treatment Phase:
During this phase, we will simulate typical user interactions within the arcade system, such as player registration, game history tracking, and status updates.
Player Registration:
Create new players through the web interface by entering player information (name, email, etc.). Register players with various student statuses and grades for later analysis.
Game Tracking:
Players play games, and records of their game sessions (game name, score, and time played) are stored in the database. Players can update their status or game records through the web interface.
Game Interaction:
Players log in, view game lists, and update their records. Interaction with the system will be tracked to monitor the effects of different actions on the database.