All Projects → rabbotio → nap

rabbotio / nap

Licence: MIT license
[Deprecated] NextJS + Apollo + PassportJS

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to nap

Next Graphql Blog
🖊 A Blog including a server and a client. Server is built with Node, Express & a customized GraphQL-yoga server. Client is built with React, Next js & Apollo client.
Stars: ✭ 152 (+192.31%)
Mutual labels:  apollo, mongoose, apollo-client
Agollo
An elegant Go client for Ctrip Apollo
Stars: ✭ 167 (+221.15%)
Mutual labels:  apollo, apollo-client
Reactql
Universal React+GraphQL starter kit: React 16, Apollo 2, MobX, Emotion, Webpack 4, GraphQL Code Generator, React Router 4, PostCSS, SSR
Stars: ✭ 1,833 (+3425%)
Mutual labels:  apollo, apollo-client
Apollo Cache Redux
Redux cache for Apollo Client 2.0. This project is no longer maintained.
Stars: ✭ 179 (+244.23%)
Mutual labels:  apollo, apollo-client
GitHunt-Polymer
An example of a client-side app built with Polymer and Apollo Client.
Stars: ✭ 13 (-75%)
Mutual labels:  apollo, apollo-client
Graphql Directive
Use custom directives in your GraphQL schema and queries 🎩
Stars: ✭ 142 (+173.08%)
Mutual labels:  apollo, apollo-client
Ddp Apollo
DDP link for Apollo with GraphQL Subscriptions support
Stars: ✭ 163 (+213.46%)
Mutual labels:  apollo, apollo-client
boilerplate
Boilerplate for @prisma-cms
Stars: ✭ 22 (-57.69%)
Mutual labels:  apollo, apollo-client
matters-web
Website of Matters.News, built with Next.js.
Stars: ✭ 70 (+34.62%)
Mutual labels:  apollo, apollo-client
ctrip-apollo
The most delightful and handy Node.js client for ctrip apollo configuration service.
Stars: ✭ 56 (+7.69%)
Mutual labels:  apollo, apollo-client
React Redux Graphql Apollo Bootstrap Webpack Starter
react js + redux + graphQL + Apollo + react router + hot reload + devTools + bootstrap + webpack starter
Stars: ✭ 127 (+144.23%)
Mutual labels:  apollo, apollo-client
bookshelf
My GraphQL playground
Stars: ✭ 64 (+23.08%)
Mutual labels:  apollo, apollo-client
Awesome Apollo Graphql
A curated list of amazingly awesome things regarding Apollo GraphQL ecosystem 🌟
Stars: ✭ 126 (+142.31%)
Mutual labels:  apollo, apollo-client
Apollo Php Client
携程Apollo配置中心PHP客户端
Stars: ✭ 147 (+182.69%)
Mutual labels:  apollo, apollo-client
React Graphql Github Apollo
🚀 A React + Apollo + GraphQL GitHub Client. Your opportunity to learn about these technologies in a real world application.
Stars: ✭ 1,563 (+2905.77%)
Mutual labels:  apollo, apollo-client
Apollo Link
🔗 Interface for fetching and modifying control flow of GraphQL requests
Stars: ✭ 1,434 (+2657.69%)
Mutual labels:  apollo, apollo-client
Boilerplate Vue Apollo Graphql Mongodb
Start your magical stack journey!
Stars: ✭ 85 (+63.46%)
Mutual labels:  apollo, mongoose
Guide
📖 The GraphQL Guide website
Stars: ✭ 104 (+100%)
Mutual labels:  apollo, apollo-client
Kit
ReactQL starter kit (use the CLI)
Stars: ✭ 232 (+346.15%)
Mutual labels:  apollo, apollo-client
react-redux-passport-uikit-express-boiler
A React+Redux boilerplate using Express as backend, UIKit for frontend, MongoDB for storage & Passport for auth.
Stars: ✭ 59 (+13.46%)
Mutual labels:  mongoose, passportjs

Commitizen friendly

nap

[WIP] NextJS/ApolloJS/PassportJS Build in Next JS for SSR, Apollo Client for GraphQL, Passport JS for authentication, Docker for development and production.

Overview

○ Docker
├─ ○ NodeJS
│  ├─ ○ NextJS
│  │  ├─ ./pages      : /usr/app/pages
│  │  ├─ ./components : /usr/app/components
│  │  ├─ ./lib        : /usr/app/lib
│  │  ├─ ./routes     : /usr/app/routes
│  │  └─ ./server     : /usr/app/server
│  │
│  ├─ ○ Apollo
│  │  └─ ./graphql    : /usr/app/graphql
│  │
│  └─ ○ PassportJS
│     └─ ./providers  : /usr/app/providers
│
├─ ○ Redis            : redis://redis
│  └─ data            : /data
│
└─ ○ MongoDB          : mongodb://mongo/graphql
   └─ data            : /data/db

Stacks

Extras


Configurations

Copy from .env.example template and .env as you wish

cp .env.example .env

Develop

# Will build and run then attach with docker compose (it take sometime for first build)
npm run up-dev

# Try modify files and see the HMR result
open http://localhost:3000

# Try modify file in ./graphql and see the result via GraphiQL
open http://localhost:3000/graphql

Debug

  • Server side : Use VSCode and press F5 to attach with nodejs
  • Client side : Use Chrome Dev Tool

Addition

# Will kill all and tear down
npm run down

# Will dive into container
npm run in

Production

# Will pull image and run with docker compose (won't build)
npm run up

Test

# Will need to run server for integration test (WIP)
npm run up-dev

# To test all with Jest
npm run test

# To see coverage
npm run cover

Passport (cookie)

Passport (token via GraphQL)


Client example

DOING

  • Optional asking for user from facebook graph query.
  • Link facebook-token with auth/facebook user.
  • Link facebook-token with auth/email user.
  • Unlink Facebook via React web.
  • Handle cookies via React Native

TODO

TOTEST

  • Redis fail test.
  • MongoDB fail test.
  • HTTP fail test.
  • HTTPS fail test.
  • Unit test graphql-compose.
  • Basic signin test.
  • Passport test.
  • Sessions expire test.
  • Chaos testing with pumba

TOCUSTOM

TOHAVE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].