Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Storing puppet show state to server #14

Closed
5 tasks done
brianchirls opened this issue Mar 3, 2017 · 8 comments
Closed
5 tasks done

Storing puppet show state to server #14

brianchirls opened this issue Mar 3, 2017 · 8 comments
Assignees

Comments

@brianchirls
Copy link
Member

brianchirls commented Mar 3, 2017

For now, we're going to keep show state very simple, based on a single URL. CRUD, authentication, etc. will be listed under one or more separate issues and implemented as time allows.

  • All state will be stored in Firebase (see Record puppet show #4)
  • Load puppet show by URL
  • Create a new puppet show if none given in URL
  • "New" button for starting a new show from scratch
  • Erase files and data on reset?

For development purposes, there will be no authentication. Will have to discuss write permission design with @cvan and @caseyyee and make sure Firebase account is configured accordingly.

@brianchirls brianchirls self-assigned this Mar 3, 2017
@brianchirls
Copy link
Member Author

@cvan Have you guys thought about where this is going to be hosted? It will affect how we can form the URLs.

@brianchirls brianchirls mentioned this issue Mar 3, 2017
9 tasks
brianchirls added a commit that referenced this issue Mar 3, 2017
- Load puppet show by URL (hash, Firebase key)
- Create new show if none found in URL
- Button for creating a new show
brianchirls added a commit that referenced this issue Mar 3, 2017
...uhh, just forgot to add all these files in previous commit
@cvan
Copy link
Collaborator

cvan commented Mar 4, 2017

@brianchirls we'll host it on a Digital Ocean droplet: nginx, Ubuntu, LetsEncrypt, Cloudflare. I can set that all up in about 30 min - I can do it sometime next week.

@brianchirls
Copy link
Member Author

@cvan Okay, if we can get it set up to do a catch-all 200 response, then we can not sure hashes in URLs and set an actual path with History API.

I'm using the key I get back from Firebase for now as the unique identifier for each puppet show recording. It's not ideal 'cause they're long, case sensitive and have dashes and underscores. But it's easy and (more or less) guaranteed not to collide.

Is there an easy deploy command/script for it that I can install as an npm dependency?

@cvan
Copy link
Collaborator

cvan commented Mar 4, 2017

@cvan Okay, if we can get it set up to do a catch-all 200 response, then we can not sure hashes in URLs and set an actual path with History API.

yeah, do you have a good page router you use? I have a few (that actually preserve scroll position, which so few seem to do, including the popular react-router).

@cvan Okay, if we can get it set up to do a catch-all 200 response, then we can not sure hashes in URLs and set an actual path with History API.

we could let users just load up any URL and use that slug as the key.

we did something like that for https://github.com/etherworld/etherworld:

Is there an easy deploy command/script for it that I can install as an npm dependency?

I'll have it auto-deploy based on a GitHub Webhook, so any pushed commits to master (or a prod branch) deploy to the production (or staging) server. (I use a similar setup for my WebVR Agent. it's slick.)

@cvan
Copy link
Collaborator

cvan commented Mar 4, 2017

Filed #15 for myself for early next week.

@brianchirls
Copy link
Member Author

re: webhook - very cool. There's a build process, but I think I have some scripts that will let me easily check on a branch that's just for built output.

I don't need no router. It's not that complicated. I'm just parsing the URL with a regex and setting some state. And there's no scrolling.

@cvan
Copy link
Collaborator

cvan commented Mar 4, 2017

yeah, any commands that need to be run, just put them in a deploy script

@cvan
Copy link
Collaborator

cvan commented Mar 4, 2017

I don't need no router. It's not that complicated. I'm just parsing the URL with a regex and setting some state. And there's no scrolling.

okay, sweet. I don't see any usage of pushState yet. (do any of the npm modules handle that?)

brianchirls added a commit that referenced this issue Mar 7, 2017
- use Firebase anonymouse authentication
- request authentication only when needed for editing (unless we already have it)
- save user id of show creator
- block editing if authenticated user doesn't match creator of show
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants