Skip to content

FREDVUNI/laravel-vue-events

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

343 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Event Management

This is a full-stack web application for Event Management. It provides a backend API built with Laravel and two frontend applications: a landing page and a dashboard. The landing page showcases events, while the dashboard allows for event management and attendee registration.

Requirements

  • PHP >= 7.4
  • Composer
  • Laravel >= 8.0
  • MySQL or another supported database
  • Node.js
  • npm or Yarn

Installation

  1. Clone the repository:
git clone https://github.com/FREDVUNI/laravel-vue-events
  1. Install backend dependencies:
cd event-management
composer install
  1. Set up the environment:
cp .env.example .env

Edit the .env file and provide the necessary configuration for your database connection.

  1. Generate the application key:
php artisan key:generate
  1. Database Setup & Seeding:

To get the application running with high-quality sample data, follow these steps:

  1. Configure Admin: Open database/seeders/DatabaseSeeder.php. Update the $myEmail and $myPassword variables with your preferred login details.
  2. Verify Migration Order: Ensure the create_events_table.php has an older timestamp (e.g., 2020_01_01...) than the attendees and tickets migrations.
  3. Run Migrations & Seed:
    php artisan migrate:fresh --seed
  4. Cleanup: Once the command finishes, you can remove your personal details from the DatabaseSeeder.php file.

Project Changelog

v1.2.0 (Current) — Logic & Relational Integrity

  • Admin Seeder: Implemented updateOrCreate for the Admin user to allow for repeatable seeding without "Duplicate Email" crashes.
  • ID Mapping: Fixed nested loops to correctly pass $event->id and $ticket->id down the chain (Events ➔ Attendees ➔ Tickets ➔ Payments).

v1.1.0 — Mock Data Engine

  • Dynamic Imagery: Integrated LoremFlickr API to generate high-resolution party and concert photography instead of grey placeholders.
  • Data Consistency: Added ->unique() modifiers to Faker attributes (slugs, emails, phones) to ensure stable database population.

v1.0.0 — Database Architecture

  • Migration Ordering: Resolved errno: 150 (Foreign Key Constraint) by prioritizing the "Parent" table (Events) in the migration sequence.
  • Schema Alignment: Added transaction_id and amount columns to the payments table to support realistic checkout simulation.

Updated API Endpoints (For your README)

Since you've built out the full relational structure, here are the core endpoints your frontend applications are using:

Endpoint Method Description
/api/events GET Fetch all events with images and locations.
/api/events/{slug} GET Get detailed information for a single event.
/api/attendees POST Register a new attendee for an event.
/api/tickets POST Process a ticket purchase and generate a payment record.
/api/admin/stats GET (Dashboard) Get total attendees and revenue per event.
  1. Install frontend dependencies for the landing page:
cd landing
npm install
  1. Install frontend dependencies for the dashboard:
cd admin
npm install

Usage

Start the Development Server

To start the Laravel development server and serve the backend API and frontend applications together, run the following command:

php artisan serve

The application will now be accessible at http://localhost:8000.

Landing Page

The landing page is built with Vue.js and Tailwind CSS. It showcases events and provides information to users. To compile the frontend assets and run the landing page, use the following command:

cd landing
npm run dev

The landing page will be accessible at http://localhost:5173.

Screenshot

image

Dashboard

The dashboard is also built with Vue.js and Tailwind CSS. It allows for event management and attendee registration using the Laravel API.

To compile the frontend assets and run the dashboard, use the following command:

cd admin
npm run dev

The dashboard will be accessible at http://localhost:5179

Screenshot

image

API Endpoints

The backend API provides various endpoints for managing events, attendees, registrations, and other related functionalities. Refer to the API documentation for detailed information on the available endpoints and request/response formats.

Authentication and Authorization

You can implement authentication and authorization in the Laravel API using Laravel's built-in features or popular packages like Laravel Passport or Sanctum. Secure your API endpoints and dashboard routes as needed to ensure proper access control.

Testing

You can run the automated tests for the Laravel API using the following command:

php artisan test

For the frontend applications, you can run tests using the following commands:

  • Landing Page: cd landing && npm run test
  • Dashboard: cd dashboard && npm run test

The tests ensure that the API endpoints, frontend components, and their functionalities are working correctly.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request.

License

This project is licensed under the MIT License

About

A Laravel & Vue JS events management system that enables users, attendees, admins, organizers manage events

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors