Sign inSign up

evenchange4/calendar-todo-server

By evenchange4

•Updated about 8 years ago

https://github.com/evenchange4/calendar-todo

Image
0

2.3K

evenchange4/calendar-todo-server repository overview

⁠Calendar-todo

Google calendar todo list application with GraphQL proxy.

Travis Codecov Status license

⁠Demo

https://calendar-todo-web.now.sh/⁠

There are two micro-services in this application:

  1. GraphQL Server⁠: GraphQL proxy to Google calendar API
  2. Web⁠: Website portal

stack

⁠Usage

Pull automated-build images from DockerHub⁠:

$ docker run --rm -it \
  -p 4000:4000 \
  -e "NODE_ENV=production" \
  -e "PORT=4000" \
  -e "DEBUG=server" \
  -e "GOOGLE_CLIENT_ID=927669772833-ou0jjulc4p68dbfmfnltjqk83rgd5mtr.apps.googleusercontent.com" \
  -e "GOOGLE_CLIENT_SECRET=jmn2fzU9n55PIX6FwswyWcDV" \
  -e "GOOGLE_REDIRECT_URL=urn:ietf:wg:oauth:2.0:oob" \
  evenchange4/calendar-todo-server:latest
# Enter the code...

$ docker run --rm -it \
  -p 4001:4001 \
  -e "NODE_ENV=production" \
  -e "PORT=4001" \
  -e "DEBUG=web" \
  -e "API_DOMAIN=http://localhost:4000/graphql" \
  evenchange4/calendar-todo-web:latest

Screenshot:

docker

⁠Technology Stack

  • Apollo server 2 - GraphQL proxy server
  • Next.js - React Server side render
  • Apollo client
  • Material-ui
  • Docker & Pkg - binary in docker

⁠Development

  • node >= v10.7.0
  • yarn >= 1.9.4
⁠Get Google API Key

Your application must use OAuth 2.0 to authorize requests. https://developers.google.com/calendar/auth⁠

Screenshot: auth

⁠GraphQL server
$ cd packages/server
$ cp .env.example .env # input your own config
$ npm run dev # dev server
> 🚀 Server ready at http://localhost:4000/graphql

# or
$ docker build -t calendar-todo/server .
VariableDefaultDescription
NODE_ENVproduction
PORT4000Server port
DEBUGserverfor npm debug
GOOGLE_CLIENT_IDclient id of google oauth
GOOGLE_CLIENT_SECRETclient secret of google oauth
GOOGLE_REDIRECT_URLredirect url of google oauth

Screenshot: graphql


⁠Web server
$ cd packages/web
$ cp .env.example .env # input your own config
$ npm run dev # dev server
> Ready on http://localhost:4001

# or
$ docker build -t calendar-todo/web .
VariableDefaultDescription
NODE_ENVproduction
PORT4001Server port
DEBUGwebfor npm debug
API_DOMAINDomain name of GraphQL proxy server

Screenshot: web

⁠CONTRIBUTING

  • ⇄ Pull requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.
  • Pull requests must be accompanied by passing automated tests.

⁠LICENSE⁠

MIT: http://michaelhsu.mit-license.org⁠

Tag summary

Content type

Image

Digest

Size

23.7 MB

Last updated

about 8 years ago

docker pull evenchange4/calendar-todo-server