Skip to content

About

A full-stack Laravel 12 web application built for the Sport Education Unit of Sabaragamuwa University of Sri Lanka. Features a public landing page, user profile management, an interactive community feed with nested comments/media uploads, a store section, and an admin dashboard.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Sport Management System Web Project

A Laravel-based web application for managing the Sport Education Unit of Sabaragamuwa University of Sri Lanka. The system provides a public landing page, user authentication, community posting, sports team browsing, a store section, and an admin area for managing sports-related content.

Features

Public Website

  • Landing page for the Sport Education Unit.
  • Image carousel with university sports visuals.
  • Public statistics for students, sports, and staff/coaches.
  • Latest news display on the homepage.
  • Public access to sports teams and store item listings.

User Features

  • User registration and login using Laravel UI authentication.
  • Profile edit and update functionality.
  • Community post feed.
  • Create posts with text descriptions.
  • Upload post media, including images and videos.
  • React to posts.
  • Add comments and nested replies.
  • Delete owned posts and related media.

Admin Features

  • Separate admin login guard.
  • Admin dashboard.
  • Manage coaches.
  • Manage members/students.
  • Manage sports teams.
  • Manage store items with image uploads.
  • Manage news posts with optional images.
  • View and delete users.
  • Manage community posts.
  • Manage and delete comments.

Content Modules

  • Sports teams
  • Coaches
  • Students/members
  • Store inventory
  • News
  • Community posts
  • Post media
  • Reactions
  • Nested comments

Tech Stack

Backend

  • PHP 8.2+
  • Laravel 12
  • Laravel UI
  • Laravel session authentication
  • Eloquent ORM
  • MySQL

Frontend

  • Blade templates
  • Bootstrap 5
  • Sass
  • Vite
  • JavaScript
  • Axios

Development and Testing

  • Composer
  • NPM
  • PHPUnit
  • Laravel Pint
  • Laravel Sail support
  • Laravel Pail

Requirements

Install the following before running the project:

  • PHP 8.2 or higher
  • Composer
  • Node.js and NPM
  • MySQL or MariaDB
  • Git

Useful PHP extensions for Laravel projects:

  • BCMath
  • Ctype
  • cURL
  • DOM
  • Fileinfo
  • JSON
  • Mbstring
  • OpenSSL
  • PDO
  • PDO MySQL
  • Tokenizer
  • XML

Clone the Repository

git clone https://github.com/kAveeShA161/Sport_Management_System_WebProject.git
cd Sport_Management_System_WebProject

Installation

Install PHP dependencies:

composer install

Install JavaScript dependencies:

npm install

Create the environment file:

cp .env.example .env

On Windows PowerShell, use:

Copy-Item .env.example .env

Generate the Laravel application key:

php artisan key:generate

Database Setup

Create a MySQL database for the project. The default .env.example uses:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=sampleapp
DB_USERNAME=root
DB_PASSWORD=

Update these values in .env to match your local database.

Run migrations:

php artisan migrate

Optionally run the database seeder:

php artisan db:seed

The current seeder creates a test user record. It does not create an admin account by default.

Create an Admin Account

Because the admin area uses the admins table and admin guard, create an admin account manually after running migrations:

php artisan tinker

Then run:

App\Models\Admin::create([
    'name' => 'Admin',
    'email' => 'admin@example.com',
    'password' => 'password',
]);

The Admin model hashes the password automatically.

Storage Setup

The application stores uploaded post media, store item images, and news images on the public storage disk. Create the public storage link:

php artisan storage:link

Uploaded files will be served from:

public/storage

Run the Project

Start the Laravel development server:

php artisan serve

Start the Vite development server in another terminal:

npm run dev

Open the application:

http://127.0.0.1:8000

You can also run the combined Laravel development command defined in composer.json:

composer run dev

This starts:

  • Laravel server
  • Queue listener
  • Vite development server

Build Frontend Assets

For production assets:

npm run build

Run Tests

Run the Laravel test suite:

php artisan test

Or use the Composer script:

composer test

Main Routes

Route Description
/ Public landing page
/register User registration
/login User login
/home Authenticated user home
/profile/edit Edit user profile
/community Community post feed
/posts Post listing
/sports Sports teams page
/store Store items page
/admin/login Admin login
/admin/dashboard Admin dashboard
/admin/coaches Manage coaches
/admin/members Manage members/students
/admin/teams Manage sports teams
/admin/store_items Manage store items
/admin/news Manage news
/admin/users Manage users
/admin/posts/manage Manage community posts
/admin/comments Manage comments

Project Structure

app/
  Http/Controllers/      Application and admin controllers
  Models/                Eloquent models
bootstrap/               Laravel bootstrap files
config/                  Laravel configuration
database/
  migrations/            Database schema files
  seeders/               Database seeders
public/
  images/                Public image assets
resources/
  views/                 Blade templates
  css/                   CSS entry files
  js/                    JavaScript entry files
  sass/                  Sass styles
routes/
  web.php                Web routes
storage/                 Logs, cache, uploaded files
tests/                   PHPUnit tests

Environment Notes

  • The default database connection is MySQL.
  • The default session driver is database, so migrations must be run before using sessions.
  • Queue connection is configured as database in .env.example.
  • Mail is configured with the log mailer by default.
  • Uploaded media requires php artisan storage:link.

Troubleshooting

If the app key is missing:

php artisan key:generate

If pages fail because database tables are missing:

php artisan migrate

If uploaded images or videos do not appear:

php artisan storage:link

If frontend styles or scripts are missing during development:

npm run dev

If dependencies are missing:

composer install
npm install

Whatch Project Demo Here:

Watch Demo - University Sports Management System

License

This project is based on the Laravel framework, which is open-sourced software licensed under the MIT license.

About

A full-stack Laravel 12 web application built for the Sport Education Unit of Sabaragamuwa University of Sri Lanka. Features a public landing page, user profile management, an interactive community feed with nested comments/media uploads, a store section, and an admin dashboard.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages