All Projects → thematters → matters-web

thematters / matters-web

Licence: Apache-2.0 license
Website of Matters.News, built with Next.js.

Programming Languages

typescript
32286 projects
CSS
56736 projects
shell
77523 projects

Projects that are alternatives of or similar to matters-web

GitHunt-Polymer
An example of a client-side app built with Polymer and Apollo Client.
Stars: ✭ 13 (-81.43%)
Mutual labels:  apollo, apollo-client
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 (+117.14%)
Mutual labels:  apollo, apollo-client
Graphql Directive
Use custom directives in your GraphQL schema and queries 🎩
Stars: ✭ 142 (+102.86%)
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 (+2132.86%)
Mutual labels:  apollo, apollo-client
bookshelf
My GraphQL playground
Stars: ✭ 64 (-8.57%)
Mutual labels:  apollo, apollo-client
Awesome Apollo Graphql
A curated list of amazingly awesome things regarding Apollo GraphQL ecosystem 🌟
Stars: ✭ 126 (+80%)
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 (+2518.57%)
Mutual labels:  apollo, apollo-client
Apollo Upload Client
A terminating Apollo Link for Apollo Client that allows FileList, File, Blob or ReactNativeFile instances within query or mutation variables and sends GraphQL multipart requests.
Stars: ✭ 1,176 (+1580%)
Mutual labels:  apollo, apollo-client
Apollo Cache Redux
Redux cache for Apollo Client 2.0. This project is no longer maintained.
Stars: ✭ 179 (+155.71%)
Mutual labels:  apollo, apollo-client
Agollo
An elegant Go client for Ctrip Apollo
Stars: ✭ 167 (+138.57%)
Mutual labels:  apollo, apollo-client
Apollo Link
🔗 Interface for fetching and modifying control flow of GraphQL requests
Stars: ✭ 1,434 (+1948.57%)
Mutual labels:  apollo, apollo-client
Booben
Web app constructor based on React, with GraphQL bindings
Stars: ✭ 96 (+37.14%)
Mutual labels:  platform, apollo
Guide
📖 The GraphQL Guide website
Stars: ✭ 104 (+48.57%)
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 (+81.43%)
Mutual labels:  apollo, apollo-client
Polymer Apollo
🚀 Polymer Apollo Integration
Stars: ✭ 77 (+10%)
Mutual labels:  apollo, apollo-client
Apollo Php Client
携程Apollo配置中心PHP客户端
Stars: ✭ 147 (+110%)
Mutual labels:  apollo, apollo-client
Cynthesize Frontend
Frontend written in Angular 7 and deployed GraphQL for Cynthesize. Development build: https://cynthesize-develop.netlify.com
Stars: ✭ 65 (-7.14%)
Mutual labels:  apollo, apollo-client
Artemis Dev Tool
An Apollo GraphQL Query Schema Testing Tool
Stars: ✭ 66 (-5.71%)
Mutual labels:  apollo, apollo-client
Ddp Apollo
DDP link for Apollo with GraphQL Subscriptions support
Stars: ✭ 163 (+132.86%)
Mutual labels:  apollo, apollo-client
Kit
ReactQL starter kit (use the CLI)
Stars: ✭ 232 (+231.43%)
Mutual labels:  apollo, apollo-client

matters-web

Deployment Status Build Status Test Status Commitizen friendly

Getting Started

Start local dev

  • Install dependencies: npm i --legacy-peer-deps
  • Environment variables: cp .env.local.example .env.local
  • Run npm run gen:type
  • Run npm run dev, then go to http://localhost:3000/

Build and run production server

npm run build && npm run start

Start local dev with Docker

  • Environment variables: cp .env.local.example .env
  • Set command alias: source bin/dc-alias
  • Build docker image: dc build
  • Run:
    • dc up or dc run --service-ports web npm run dev
    • then go to http://localhost:3000/

NOTE: If new packages are added to package.json, dc up will use npm i to install those packages. But if you are using dc run --service-ports web npm run dev, you need to run dc run web npm i manually to make sure that new packages are installed.

Build with docker

  • Set command alias: source bin/dc-alias
  • dc run web npm run build

Push and pull docker image

  • Set command alias: source bin/dc-alias
  • Build docker image: dc build
  • aws configure, then input your access key and secret
  • Login AWS ECR with $(aws ecr get-login --no-include-email --region ap-southeast-1)
  • Push:
    • docker push 903380195283.dkr.ecr.ap-southeast-1.amazonaws.com/matters-web:latest
    • docker tag matters-web:latest 903380195283.dkr.ecr.ap-southeast-1.amazonaws.com/matters-web:latest
  • Pull:
    • docker pull 903380195283.dkr.ecr.ap-southeast-1.amazonaws.com/matters-web:latest
    • docker tag 903380195283.dkr.ecr.ap-southeast-1.amazonaws.com/matters-web:latest matters-web:latest

Testing

See Playwright Testing Guide.

Conventions

See Conventions.

Static Files

./public/static/
├── apple-touch-icon.png # favicons
├── favicon-16x16.png
├── icon-96x96.png
├── icons # icons in different sizes
│   ├── 12px
│   │   ├── ...
│   │   └── draft-edit.svg
│   ├── 72px
│   │   ├── ...
│   │   └── empty-warning.svg
│   └── stripe.svg
├── images # illustrations
│   ├── ...
│   └── publish-4.svg
├── manifest.json # configurations
└── opensearch.xml

Icon

We use SVGR to transform SVGs into React components. For reusability and bundle optimization:

  • If the icon color isn't static:
    • Replace the values of fill and stroke attributes with currentColor, and
    • Add fill="none" to <svg>.
  • If the icon is resuable, create a component file under components/Icon and export it from components/Icon/index.tsx.

Tools

VS Code

Settings

See .vscode/settings.json

Extensions

See .vscode/extensions.json

Vim

Settings

For vim users, you might want to see .vim/.vimrc (using vim-plug).

Troubleshooting

  1. If styled-jsx is installed in both next and our own package.json, the built-in styled-jsx SSR of Next.js will fail. See #533.
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].