Giter VIP home page Giter VIP logo

control's Introduction

Control

Introduction

LAN Party user accounts, ticket management and seat picker. It is designed to work with multiple social authentication providers and ticket providers.

Social Provider Support

  • Discord
  • Steam (No authentication, just account linking)
  • Twitch

These are using Laravel Socialite, so any provider supported by Socialite can be integrated.

Ticket Provider Support

  • Ticket Tailor
  • WooCommerce
  • Internal

These are custom integrations but more can be added and used if people develop them. The Internal provider allows you to manually issue tickets to users.

Setup

You will need to create a Discord application and have the Client ID and Client Secret available.

cp .env.example .env
docker compose up -d redis db
docker compose run --rm composer install
docker compose run --rm artisan key:generate
docker compose run --rm artisan migrate
docker compose run --rm artisan db:seed
docker compose run --rm artisan control:setup-discord
docker compose run --rm npm install
docker compose run --rm npm run build
docker compose up -d

Add the redirect URLs from the control:setup-discord step to your Discord OAuth2 configuration.

You should now be able to login. The first user will be given the admin role.

Production Deployment

I use the following docker-compose for running this in production:

version: '3'
services:
  nginx:
    image: ghcr.io/mintopia/control-nginx:develop
    env_file: .env.nginx
    restart: unless-stopped
    depends_on:
      - php-fpm
    networks:
      - frontend
      - default
    volumes:
      - ./public:/var/www/storage/public

  php-fpm:
    image: ghcr.io/mintopia/control-php-fpm:develop
    env_file: .env
    restart: unless-stopped
    depends_on:
      - redis
      - database
    volumes:
      - ./logs:/var/www/storage/logs
      - ./public:/var/www/storage/public

  redis:
    image: redis:6.2.6
    restart: unless-stopped

  database:
    image: mariadb:10.5-focal
    env_file: .env.mariadb
    restart: unless-stopped
    volumes:
      - ./database:/var/lib/mysql

  worker:
    image: ghcr.io/mintopia/control-php-fpm:develop
    restart: unless-stopped
    deploy:
      replicas: 2
    env_file: .env
    depends_on:
      - database
      - redis
    volumes:
      - ./logs:/var/www/storage/logs
      - ./public:/var/www/storage/public
    entrypoint: ['php']
    command: 'artisan queue:work'


  scheduler:
    image: ghcr.io/mintopia/control-php-fpm:develop
    restart: unless-stopped
    env_file: .env
    depends_on:
      - database
      - redis
    volumes:
      - ./logs:/var/www/storage/logs
      - ./public:/var/www/storage/public
    entrypoint: ['php']
    command: 'artisan schedule:work'

  artisan:
    image: ghcr.io/mintopia/control-php-fpm:develop
    profiles:
      - artisan
    env_file: .env
    depends_on:
      - database
      - redis
    volumes:
      - ./logs:/var/www/storage/logs
      - ./public:/var/www/storage/public
    entrypoint: ['php', 'artisan']

networks:
  frontend:
    external: true

I'm running with an external docker network called frontend with Caddy running as HTTP/HTTPS ingress. To bring up the site, run the following:

# Create your docker compose file
# Create your .env file from the project's .env.example and edit as required.
docker compose up -d redis database
docker compose run --rm artisan key:generate
docker compose run --rm artisan migrate
docker compose run --rm artisan db:seed
docker compose run --rm artisan control:setup-discord
docker compose up -d

You should now be able to visit the site and login. From here you can use the admin menu to configure the site.

Contributing

It's an open source project and I'm happy to accept pull requests. I am terrible at UI and UX, which is why this is entirely using server-side rendering. If someone wants to use Vue/Laravel Livewire - please go ahead!

Roadmap

The following features are on the roadmap:

  • Better UI/UX. I'm currently using tabler.io and entirely server-side rendering.
  • Full-featured API. There's a basic one to support seating plan refreshes. I need to refactor it and improve it.
  • UI Customisation from Admin Pages. Currently the UI colours, branding is all either in the .env or compiled into the CSS at build.
  • Unit Tests. This was very rapidly developed, I'm sorry!
  • PHPCS and PHPStan. Should be aiming for PSR-12 and level 8 PHPStan.

Thanks

This would not exist without the support of the following:

  • UK LAN Techs

License

The MIT License (MIT)

Copyright (c) 2023 Jessica Smith

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

control's People

Contributors

mintopia avatar rushmead avatar mathewburnett avatar

Stargazers

Alex Knight avatar  avatar  avatar David Eberhardt avatar Rus avatar

Watchers

 avatar  avatar DaGeek avatar  avatar

control's Issues

Filter by clan on admin seat picker

In the manage seats view it would be nice to filter the unseated users by clan. For example when seating users in the STAFF clan into a staff area.

Option to hide full name

As a user when I join a clan all users can see my full name. Add an option in user profile to hide realname to anyone but admin

Access level to hide full names and emails to "mini-admins"

Create a new admin level who can access the commands, but is limited to not see GDPR related data (full names and emails)

Possibly also allow some level of control on this "moderator" that they can't create events / access global settings?

Support seat types

Have a seating plan that has a mapping between seat types and ticket types. Examples like

  • staff ticket for staff seat
  • VIP
  • Volunteer etc

Fully working and documented API

Current basic API endpoints are built using Fractal, should switch to standard Laravel Resources and have them for all resources.

Ability to add API keys in admin pages.

Exclusive discord roles

When attaching a discord role to a ticket type it would be nice to choose between modes.

  • exclusive: Manages only people with a ticket to have the role
  • addition: Simply adds that role to a ticketed user

Draft events

When setting up an event it would be nice to hide it

  • can't see at all with normal login
  • indicates draft with admin login

Blacklist of Clan Names

With clans showing up as tags, we probably want to avoid users being able to enter specific clan tags, eg. 'Admin', 'Staff', etc. Should be configurable.

Ticket Import

Ability to import tickets using a CSV and the Internal Ticket Provider.

Sync checked in status

Would be nice to be able to handle/view checked in status through seatpicker. Particularly useful in the situation where one person buys tickets and then passes them on to other users.

  • if checked in from ticket provider pull the status though
  • view to see checked-in coverage for admins

Potentially

  • ability to checkin through seatpicker for admins
  • sync back status over users checked in this way

FR: Add discord role to member with specific event ticket

Automatically link a discord server & role to an event, then for each user with a valid (or transferred ticket) automatically grant them that role.

Bonus points> Allow the role to be ticket type specific (EG: BYOC gets one role, indoor sleeping another)

Schedule open/close of the seating

Would be nice to be able to schedule when the seat plan opens for an event.

  • open datetime
  • close datetime
  • optional schedule for certain ticket types (VIP, early bird etc)

At close it would be nice to have a who to contact if you still need help (although this might be useful all the time i suppose)

Basic theme choices

nothing extravagant but it would be nice to set some colours to match brand

  • sidebar colour
  • main view background colour
  • possibility light/dark text

Seating plan colours - per-clan colour

One feature request I would have, as an attendee looking to seat myself, is a view that colour-codes clans so I can quickly see if I'm around a bunch of people together or not etc. Rather than having to hover over every seat to figure it out.

It was something an old-insomnia picker did, and something I userscript-hacked for epic:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.