Coder Social home page Coder Social logo

zeropingheroes / lanager Goto Github PK

View Code? Open in Web Editor NEW
121.0 17.0 31.0 41.66 MB

LAN party management web application

License: GNU Affero General Public License v3.0

PHP 72.38% Vue 3.14% Blade 19.45% Dockerfile 0.19% CSS 2.35% JavaScript 0.82% SCSS 1.67%
lanparty gaming steam

lanager's Introduction

LANager

Stable Branch Develop Branch
Dusk Dusk
StyleCI StyleCI

LANager is a web application designed to make LAN parties more enjoyable for attendees and organisers alike.

Features

Encourage socialising & participation

  • Games being played - by your LAN's attendees, updated every minute from Steam
  • Events timetable - so your attendees know what's on at the LAN
  • Achievements - created by you and awarded to attendees
  • Attendee profiles - with a link to their Steam profile, and their gameplay history at the LAN
  • Games in common - when viewing another attendee's profile
  • Games recently played - showing the top games most recently played by attendees at the LAN

Broadcast useful information

  • Slides - showing games attendees are currently playing, and current and upcoming events, for TVs or projectors around your venue
  • Guides - written by you, to help attendees learn about things like venue facilities, rules, or gameplay guides
  • Links - to other websites, such as your organisation's website, or a game statistics page

Requirements

Setup

  1. Clone the lanager-docker-compose project:

    git clone https://github.com/zeropingheroes/lanager-docker-compose
  2. Copy .env.example to a new file named .env:

    cd lanager-docker-compose
    cp .env.example .env
  3. Open the environment configuration file in a text editor:

    nano .env
  4. Set the following configuration items:

    1. Set APP_KEY to base64: followed by a randomly generated 32 character base64 string
    2. Set APP_URL to the URL you will access LANager through, without a trailing slash, e.g. https://example.com
    3. Set APP_TIMEZONE to your location's timezone
    4. Set STEAM_API_KEY to your Steam API Key
    5. Set DB_PASSWORD to a randomly generated password
    6. Set DB_ROOT_PASSWORD to a different randomly generated password
  5. Bring up the application:

    docker-compose up --detach
  6. Check the application's status:

    docker ps --filter name=lanager
  7. When the container status shows Up x minutes (healthy), initialise the database:

    ./initialise-database.sh

LANager should now be accessible at http://localhost, or at the URL you specified in APP_URL, providing you've created a corresponding DNS A record for the Docker host's IP address, and allowed ports 80 and 443 through the Docker host's firewall.

Troubleshooting

  • Run docker-compose down --rmi local --volumes to delete the database data and LANager container image, and then retry the setup steps above
  • Edit your .env file and enable debugging:
    APP_ENV=staging
    APP_DEBUG=true
    Important: Remove these lines after troubleshooting to avoid leaking sensitive data

If you get stuck, create an issue with the details of what you're experiencing:

  • The commands you've run
  • The output of docker-compose up
  • The output of docker logs lanager
  • Any errors displayed in your browser

Getting started

To set up the LANager for your next LAN party, you need to create a LAN page, then add Events (such as scheduled games or lunch breaks) and Guides (such as game rules) to that LAN page.

Become a Super Admin

The LANager assigns the "Super Admin" role to the first account that logs into it, so make sure you log in as soon as you have completed installation.

Super Admins can perform any action on the site, including assigning roles to other users.

Create your LAN page

The first thing you need to do is to create a LAN page in the LANager. This process is the same whether your LAN party is one day or multiple days. You need to do this before you can create an event schedule, publish any guides or award achievements.

Log into the LANager, and go to ⚙ > LANs, then select the + button to go to the LAN page creation form. Enter your LAN's details, and add a description with Markdown formatting if you want to.

The LANager automatically adds anyone who logs into the LANager during the LAN party to the LAN's list of attendees. For each attendee it displays the current LAN page, which contains the LAN's timetabled events, guides and attendees list.

Create Events & Guides

Once you have a LAN page for your LAN party, you can create Events and Guides to help attendees enjoy your party.

  • Events are a useful way to timetable game tournaments, highlight big game sessions, schedule breaks and mealtimes, and let people know when it's time to go home
  • Guides are a useful way to provide people with the rules and download links to the games you're playing, to let them know where the nearest shops and restaurants are, to provide a code of conduct for your event, and to communicate any other information you think your guests might need.

From the LAN page, click the + button next to the Events and Guides headings to go to their creation forms.

Using links

You can use markdown-formatted links in LANs, guides and events. For example, you can write a single guide, and insert a link to it on several event pages:

If you need any help, please contact one of our [tournament staff](/lans/4/guides/3)

Where possible, it's good practice to use relative links as demonstrated above, so that if you change your domain, the links continue to work.

Using images

You can upload images to LAN pages, Events and Guides. To do this, follow these steps:

  1. Below the "description" text box, select "upload images".
  2. Upload the image you want to use.
  3. Next to the image, select ⚙ > Copy Markdown
  4. Paste the markdown into the guide, event or LAN's description field, in the location you want it to appear in the text.

Display slides

The slides feature allows you to display a looping slideshow of live data and useful info for your attendees, such as which event is starting next, which games people are playing, and how to log into the LANager.

To display the slideshow, log in as an admin, and navigate to ⚙ > LANs > (your LAN) > Slides.

Load the slideshow on a big TV or projector so that attendees can see the info easily.

Create and award Achievements

Click ⚙ > Achievements and then click the + button to create achievements that you can award to users.

To award an Achievement to an attendee, go to the navigation bar and select Achievements. This opens the list of Achievements you have awarded to attendees of the current LAN. At the bottom of the page, choose the Achievement and the attendee to award it to, then select Award.

Customise the navigation bar

Click ⚙ > Navigation to customise the links shown on the navigation bar. You can link to pages on the LANager or to third-party sites, organise the links into drop-down menus, and choose the order that the links appear in the navbar or dropdown.

Backup

Run ./backup.sh to back up LANager's configuration, database data and uploaded images.

Restore a backup

Run ./backup-restore.sh <file> to restore a backup.

Development

Development environment setup

  1. Follow the steps from the Setup section above

  2. Stop the running containers

    docker-compose down
  3. Check out the development branch of lanager-docker-compose

    cd lanager-docker-compose
    git checkout develop
  4. Edit lanager-docker-compose/.env and add the following lines:

    APP_ENV=local
    APP_DEBUG=true
  5. In a directory outside of lanager-docker-compose, clone the lanager repository:

    git clone --branch develop https://github.com/zeropingheroes/lanager
  6. Install composer on your host computer

  7. From the lanager directory, install composer dependencies:

    composer install --no-scripts
  8. Set an environment variable with the path to where you cloned the lanager repository (without a trailing slash)

    export PATH_TO_LANAGER=/path/to/lanager
  9. From the lanager-docker-compose directory, run envsubst to substitute in the path to lanager into docker-compose.override.yml:

    envsubst < docker-compose.override.yml.example > docker-compose.override.yml
  10. Start the containers

    docker-compose up --detach
  11. After a minute or so, visit http://localhost

The container will run the code from your host computer, rather than the static copy of the code in the container's image, so any changes you make to the files in the project directory (except for the storage/ directory) will be seen by the running containers.

Start and stop the development environment

To stop the development environment run docker-compose stop.

When you're ready to start developing again run docker-compose start.

Destroy the development environment

To destroy the development environment and all volumes that store lanager data, run:

docker-compose down --volumes

Follow the setup steps above to get a fresh development environment.

Enable pre-commit hooks

To automatically check for and fix problems with your code before you commit:

  1. Install pre-commit
  2. Install PHP Codesniffer & Code beautifier
  3. From the lanager/ directory, run pre-commit install

To check your code, run pre-commit run --all-files or attempt to run git commit

Recompiling JavaScript & CSS assets

To recompile JavaScript & CSS assets, from the lanager directory, run:

  1. docker run -it --rm -v "$PWD":/var/www/html -w /var/www/html node:14-alpine npm install
  2. docker run -it --rm -v "$PWD":/var/www/html -w /var/www/html node:14-alpine npm run dev

To recompile whenever changes to files are detected, run:

  1. docker run -it --rm -v "$PWD":/var/www/html -w /var/www/html node:14-alpine npm run watch-poll

To recompile minified versions suitable for committing, run:

  1. docker run -it --rm -v "$PWD":/var/www/html -w /var/www/html node:14-alpine npm run prod

Running tests

Before submitting pull requests, please run the functional test suite to check your changes don't break existing functionality.

Run docker exec -it lanager php artisan dusk to run LANager's browser test suite.

Feedback & Contributions

  • Found a bug? Got a great feature idea? Post it to the issue tracker!
  • Want to contribute?
    • Fork the project and add the features you want to see.
    • Work on new features / bug fixes in the issue tracker.
    • If you're really hardcore, request commit access.

If you want to support the project in a non-technical way, we'd love it if you donated to us:

Flattr this git repo

Enjoy using the LANager!

lanager's People

Contributors

agent-squirrel avatar dependabot[bot] avatar dincahill avatar dryj avatar esjex avatar ilumos avatar msmollin avatar mt-inside avatar poxydoxy avatar sawy7 avatar t3rminalv avatar tannerkrewson avatar vstone avatar x-zempt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lanager's Issues

A critical bug with Form and HTML Facades

Don't know, whether this bug only occurs to me, or to everyone.

As I was tinkering with Lanager a week ago, everything seemed to work fine.
Until yesterday.

Any attempt to open any kind of form results in the error:
Example:
Non-static method Illuminate\Html\FormBuilder::open() should not be called statically, assuming $this from incompatible context
screenshot from 2014-10-21 13 47 30
Another example:
Call to undefined method Bootstrapper\Table::open()
screenshot from 2014-10-21 13 50 11

This occurs also with fresh cloned lanager.
As I was looking for the issue - found this:
https://laracasts.com/discuss/channels/general-discussion/43-forms

This is critical. We are having big LAN this weekend.

Add team management for the players

Players should be given the ability to create a team.

Teams will be later on used in signing up to tournaments.

Team consists of:
Captain (team creator)
Team members (added by team captain)

Currently planned unlimited size teams. Specifications and additional features will be detailed later.

Playlist Videos Do Not Play

I open a screen and any videos I put on will play for about 1/2 a second with sound and all and stop. The history page works but will generate an error after awhile.

404 on shouts

Everything seems to have installed correctly (using WAMP on win 8.1).

Trying to hit the localhost, just redirects me to localhost/shout and gives

Not Found

The requested URL /shouts was not found on this server.

Apache/2.4.9 (Win64) PHP/5.5.12 Server at localhost Port 80

Any ideas on what I done wrong?

Submission of duplicate video causes loop

When a video is submitted and immediately submitted again one or more times (so it occupies two or more sequential positions in the playlist) the playback engine gets in a loop.

Laravel Issues - Container class not found

Hey,

After resolving the issue with creating the database, I started getting this in my apache logs (page is blank when attempting to visit it):

[Tue Sep 16 15:13:58 2014] [warn] [client 10.12.0.1] mod_fcgid: stderr: PHP Fatal error: Class 'Illuminate\\Container\\Container' not found in /path/lanager/vendor/laravel/framework/src/Illuminate/Foundation/Application.php on line 24

The setup and everything went fine but it seems to have problem loading those. I tried forcing composer to use 4.2.8 which got rid of the laravel issue, but then gave this:

[Tue Sep 16 13:03:39 2014] [warn] [client 10.12.0.1] mod_fcgid: stderr: PHP Fatal error: Class 'Whoops\\Handler\\Handler' not found in /path/lanager/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php on line 16

Any ideas?

Missing admin role eddition

How to change user roles in lanager? i see Role manager but there are no add/edit buttons. Only delete option is possible. Am i missing something? any help appreciated.

install hang after php artisan lanager:install

I've tried installing lanager in both Ubuntu server 14.04 and Windows 2008r2 it stalls out at the same point on each at step 8:

In a terminal in the lanager/ directory, run:

php artisan lanager:install

The terminal will say all is good and get to this message and just go idle; "creating database structure..."

I've let it sit for hours and nothing happens. Any suggestions?

Add archive and initialise functionality for repeat events

Requested by @darabman

For recurring LAN parties using the same install of LANager, add functionality to download an archive of the previous party's data and initialise the database ready for the next party.

For each section of the database (e.g. shouts, videos, events, info etc) an admin could choose to one or both of the following:

Download an archive of the section's data
Reset the section's data to system defaults

From old Repo:

Create a SQL script or admin page that allows authorised users to 'initialise' the database ready for a new party. Such a script should ideally perform the following actions:

Archive all shouts
Archive non-privileged users
Disable (but not delete) events, perhaps marking them as invisible so commonly-used events (e.g. Food orders, award ceremonies, party open/close times) can be edited and reused
As above, but with info pages
Archive video playlist and initialise
'Archiving' would usefully have the option of either dumping CSV/SQL or outright deleting the deprecated records

Add seating planner

Could we look at getting a seating planner added? ie, when a user buys ticket (Maybe with PayPal payment complete) the user is granted access to a seat planner where a user can then pick a seat. The admin can design the seat plan in a drag and drop interface maybe? Or even with div's which have a specific class maybe such as class="seat-1" and the php script knows that assign div class seat-X to user Y?

Allow batch importing of Steam users

By Steam ID (64bit), URL or account name.
Accept info as SteamParty.info does
Users with the role UserAdmin should be the only ones allowed to do this

Add seating planner?

Hi guys,

New to github, not new to LAN's! I run a LAN and this tool looks brilliant - any chance we could get a seat planner included so when someone buys a ticket they can choose a seat?

Cheers!
Ash

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.