Giter VIP home page Giter VIP logo

ifl-partymechanics's Introduction

Some in-process WordPress and Arduino files for Idea Fab Labs Santa Cruz's Mint party project

rest-api.php contains the code for these API endpoints:

  • quote_pair - call it with two token IDs NFC1 and NFC2 and it returns the movie quote assigned to that pairing (if that pairing has not been seen previously, then a new quote gets assigned to it and is then returned)
  • get_user_id_from_token_id - call it with a token ID TOKEN_ID to retrieve the user ID that token was registered to
  • get_token_ids_from_user_id - call it with a user ID USER_ID to retrieve all token IDs registered to that user
  • add_token_id_and_user_id_to_tokens_table - call it with a token ID TOKEN_ID and a user ID USER_ID to register that token to that user in the tokens table

ifl-party-mechanics.php is a WordPress plugin containing the functions used by rest-api.php, and some in-process events/attendance/special guests code. Most of the movie quotes functionality has been moved to movie-quotes.php below, but the functions used by the four endpoints above are now just wrappers for calling those functions in movie_quotes.php

movie-quotes.php - the MovieQuotes class contains functions for working with the movie quotes, user pairings, and rf tokens tables in general.

quotes.csv is the database of short science fiction movie quotes in CSV form.

##Party Mechanics Web Socket Architecture: ┌──────────────────────────────────────┐
│ Vercel Hosting and Deployment │
└──────────────────────────────────────┘
┌──────────────────────────────────────────────────┐
│ NextJs Monolith │
│ - API endpoints │
│ - Nodejs Server logic for game progress events │
│ - React Frontend for ESP logs monitoring │
└──────────────────────────────────────────────────┘




┌──────────────────────────────────────┐
│ Pusher Websockets │
https://pusher.com/
│ - Event Message ingestion │
└──────────────────────────────────────┘
▲ ▲
│ │
▼ ▼
┌───────────────────────────────────────────┐ ┌───────────────────────────────────────────┐ │ ESP 1 │ │ ESP 2 │ │ Unique ID: Friendly-Name_{CHIP_ID} │ │ Unique ID: Friendly-Name_{CHIP_ID} │ │Status: Active | Disabled | Offline | Error│ │Status: Active | Disabled | Offline | Error│ │ - Pull Log Files Log files │ │ - Pull Log Files Log files │ │ - Event Listener or Broadcaster │ │ - Event Listener or Broadcaster │ └───────────────────────────────────────────┘ └───────────────────────────────────────────┘

##Party Mechanics Websocket Event Definition (WIP) ┌──────────────────────────────┐ │ Pusher Events │ │ Channel: partymechanics │ │ │ └──────────────────────────────┘ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ Subscribe to these events to │ │see new users online:
pusher:subscription_succeeded │ │pusher:member_added
pusher:member_removed │ │
─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ Party_ESP_Events │ │ {
chipId: │ │ chipName:
triggerAction: │ │ UserTriggererId:
UserCheckpoint: │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─

The Party Mechanics Notes Google Doc is the place to collaborate on more extensive documentation.

Right now the Arduino folder contains the ESP example sketch WiFiMulti, illustrating configuring your WeMos D1 R1 board to connect to whichever one of one or more predefined wifi networks is available, and many in-process sketches from just before last March's Doublemint party.

Right now loading the "Exhibition RSVPs" custom menu from the wp-admin dashboard creates some of the tables for this project if they didn't already exist. With the wp-attendance and wp-special-guests tables, because they use the wp-users table's ID field as a foreign key, the wp-users table needs to be using the InnoDB storage engine rather than the MyISAM storage engine, because the latter doesn't support foreign keys. See https://kinsta.com/knowledgebase/convert-myisam-to-innodb/

/zone-plus-one contains files for the Plus One Zones WordPress plugin-in-progress:

  • Functions for creating and working with tables for zones, zone tokens, and plus-ones registered by touching a zone token to a particular zone's RFID-reader microcontroller installation.
  • A custom Plus One Zones admin menu page which just contains testing stuff at the moment, and a custom Manage Zone Names submenu page that lets you add new zones and edit the names of existing zones.

ifl-partymechanics's People

Contributors

factor8 avatar tachyonlabs avatar johnszy avatar coopernewby avatar gbodkin avatar aldenmichaels avatar kaspermeck avatar

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.