Git Product home page Git Product logo

af4oz / starter-fullstack-graphql-rq Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.3 MB

It includes user authentication flow based on JWT, refreshTokens, tab sync using broadcast channel and uses React, Graphql, Apollo server, Express, Nexus, Prisma, React-query, jest, vite.

Home Page: https://zkindest.github.io/starter-fullstack-graphql-rq/

JavaScript 0.65% Shell 0.80% HTML 0.71% CSS 8.89% TypeScript 88.92% Procfile 0.02%
graphql prisma react react-query ts-jest express apollo-server nexus

starter-fullstack-graphql-rq's Introduction

I moved this repo to poly repo structure, here are links(frontend,backend).

NOTE: This Mono repo isn't being updated anymore because I don't want to use build systems like Nx,Bazel. checkout this website on why these tools are required.

Typescript Full stack starter (Graphql)

It includes user authentication flow based on JWT, refreshTokens, tab synchronization using broadcast channel. It uses React, Graphql, Apollo server, Express, Nexus, React-query, jest, vite, vitest (improved testing for vite).

Requirements

app

  1. node>=14 for vitest

Recomended

  1. mysql vscode extension

Available Scripts

Init

# setup MSW (app)
yarn app msw:init
# Generate artifacts (Prisma Client & Nexus Types)
yarn server run generate

# Generate env types(src/types/env.d.ts) from .env file
yarn server gen:env-types

yarn server dev
yarn server test
yarn server start

# Publish schema to Apollo schema registry (Needs Development server running)
# change `starter-fullstack@current` with your `graph-id@variant` in `package.json`
# more info: https://studio.apollographql.com/sandbox/explorer
yarn server run publish:schema

Check Server for more info.

# download the published GraphQL schema from apollo studio (Need to setup rover auth)
# follow docs: https://www.apollographql.com/docs/rover/configuring/#2-provide-the-api-key-to-rover
npx rover config auth
npx rover graph fetch [your_graph_id]@[variant] > src/__generated__/schema.graphql

# download the GraphQL schema from a local development server (eg:http://localhost:4000)
yarn app download:schema:local

# Generate static types for GraphQL queries. Use the downloaded schema
yarn app gql:codegen

yarn app dev
yarn app test
yarn app coverage
yarn app preview
yarn app build

Future

  1. Add e2e tests
  2. improve token synchronization between tabs โœ…๏ธ

Troubleshoot

Cannot find module '/[redacted]/starter/.yarn/releases/yarn-berry.cjs
rm .yarnrc.yml
yarn set version berry

# and add below line to `.yarnrc.yml`
nodeLinker: node-modules

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.