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

sforzando/make-jp

Repository files navigation

make-jp

Greenkeeper badge

for Maker Faire Tokyo

CircleCI

/registration /survey /thanks

How to Setup

Requirements

Google Cloud SDK for GAE/Python

Case of MacOS w/ Homebrew

$ brew cask install google-cloud-sdk
$ gcloud components install app-engine-python

Case of others

Download SDK from official site and install it.

Install Python Packages

$ pip install -t lib -r requirements.txt --upgrade

Install Node.js Packages

$ yarn install

How to Develop

Encrypt SENDGRID_API_KEY at app.yaml

Write SENDGRID_API_KEY at app.yaml like

runtime: python27
api_version: 1
threadsafe: yes
env_variables:
  SENDGRID_API_KEY: 'zzzzzzzzzzzzzzzz'

And yarn run cover to encrypt.

Bundle with Parcel

$ yarn run build

How to Test

Local

$ yarn start
$ yarn test

Production

$ yarn test:production

How to Deploy

$ yarn run build:production

To bundle minified code.

GAE via Circle CI

Prepare Service Account's JSON

Prepare json key at IAM & Role.

$ base64 make-jp-xxxxxxxxxxxx.json

And to enable Google App Engine Admin API.

Set Environment Variables on Circle CI

Add Base64 encoded key to Circle CI Environment Variables like $GCP_SERVICE_ACCOUNT_KEY.

GAS via clasp

$ clasp login
$ clasp clone GAS_PROJECT_ID
$ touch globals.js

GAS project can be shared.

globals.js should be written sheetId and headerColumns like

var sheetId = {
  REGISTRATION_MASTER: 'xxxxxxxxxxxxxxxx',
  REGISTRATION_WORKSHEET: 'yyyyyyyyyyyyyyyy'
};
var headerColumns = [
  '1-01. 出展者名',
  '1-02. 出展者名ふりがな',
  '1-03. 出展者名の英文表記',
  '1-04. 代表者名(姓)',
  '1-05. 代表者名(名)',
  '1-06. 代表者名(姓)ふりがな',
  '1-07. 代表者名(名)ふりがな',
  '1-08. 代表者のメールアドレス',
  '送信日時'
];

After clasp push for each project, do some function on web to get the privileges. And Publish as Web application to get POST action.

ToDo

See Issues.

Misc.

Contributes

LICENSE

WTFPL