jhoonhan / magento2-event-page-builder

A simple module that allows users to create web pages for company events.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HanStudio_EventPageBuilder

Table of contents

Summary

Creating a web page for a company event can be exhausting exprience, revisions after revisions. This module enables users to create a responsive company event web pages based on information users provide in Magento 2 admin grid.

The frontend is developed with React 18 with TypeScript so that it is highly scalable and customizable.

Usage

Working...

How It Works

  1. Upon installation of this module, the module creates 4 new tables in the Magento 2 database. The tables are:
  • hanstudio-eventpagebuilder-event - This table stores the event information such as event name, event date, event timezone location, and event description.
  • hanstudio-eventpagebuilder-schedule - This table stores the event schedule information such as schedule date, schedule time, schedule title, and schedule description.
  • hanstudio-eventpagebuilder-speaker - This table stores the event speaker information such as speaker name, speaker title, speaker description, and speaker image.
  • hanstudio-eventpagebuilder-schspk - This table stores relationships between schedule and speaker.

Database Diagram

  1. The module creates a new admin grid in the Magento 2 admin panel under the Content > Event Page Builder. The admin grid is used to manage the event, schedule, and speaker information. The master admin can authorize access to other users to the module.

  2. The module creates a CRUD API access points for the frontend to access the event.

Example http request to the API:tl

https://testsite.dev/rest/V1/data/1
// This will return the event information with the id of 1 with associated schedules and speakers.
  1. When a user create new event, the module automatically creates a CMS Block with given url key. The generated CMS Block can be inserted to any page in the Magento 2 store to display the event information.

  2. Currently, in version 1, it only creates a CMS Block for an event programme. In the future version, it will create a CMS Page for other information such as event speakers, event location, and event sponsors.

Frontend

The frontend is build with React 8 on TypeScript. The code is located in HanStudio/EventPageBuilder/React/. To spin up a local instance, you must run "npm start" command from the React folder root (ex: HanStudio/EventPageBuilder/React/event-page-builder/).

Start Local Instance

npm start
// Spin up a local instance

Build

npm run build
// This runs react build script and additional gulp commands to make the code usuable within Magento 2.

Built html file gets saved in ./view/adminhtml/templates/BlockTemplates/ as a phtml file so that it can get event_id from the Magento block.
Each time a change is made, you must build and update the Magento module so that the update is applied to the Magento.



About

A simple module that allows users to create web pages for company events.


Languages

Language:HTML 78.4%Language:PHP 11.9%Language:JavaScript 6.5%Language:TypeScript 2.5%Language:SCSS 0.7%Language:Dockerfile 0.0%