GithubHelp home page GithubHelp logo

rock-n-prog / apollo-monorepo-poc Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 476 KB

POC for a Web-TS monorepo using a Apollo Federation API

Home Page: https://rock-n-prog.github.io/apollo-monorepo-poc

License: MIT License

JavaScript 11.56% Shell 0.09% TypeScript 88.35%
apollo apollo-federation graphql nextjs react turborepo

apollo-monorepo-poc's Introduction

Apollo Monorepo POC

Example monorepo to use Apollo Federation in a Turborepo codebase.

See the docs, for list of features, guides, explanations.

Made with love by Fabien Roy.

Status

Name Type Status
General General General
Web App Build Web App
API Gateway Service Build API Gateway
Contents Service Service Build Contents Service Gateway
Reviews Service Service Build Reviews Service Gateway
Contents Database Package Build Contents Database Package
Reviews Database Package Build Reviews Database Package
Theme Package Build Theme Package
Web UI Package Build Web UI Package
Web Forms Package Build Web Forms Package
Web Locales Package Build Web Locales Package
Web Storage Package Build Web Storage Package

Apps

Services

Packages

Setup

Install dependencies

pnpm install

Prepare pre-commit hook

pnpm prepare

Setup database

# Copy env file
pnpm env:local

# Run databases
docker compose up

# Generate Prisma client
pnpm db:generate

# Apply migrations
pnpm db:migrate:dev

# If wanted, generate example data
pnpm db:seed

Setup web GraphQL types and hooks

Be sure that services and API Gateway are running first!

pnpm web:generate

Available scripts

Run apps

pnpm dev

# Running a single app and its deps
pnpm dev:web
pnpm dev:mobile

Run services / API Gateway

pnpm dev

pnpm dev:services

# Run after services
pnpm dev:api

Run storybook

Web UI Library

Storybook will be running on http://localhost:6006;

pnpm storybook:web

Mobile UI Library

Storybook will be running on Expo Go.

pnpm storybook:mobile

Build all

pnpm build

Lint all

pnpm lint

# To fix lint
pnpm lint:fix

# For file names
pnpm lint:ls

# To only apply to root
pnpm lint:root
pnpm lint:root:fix

# Fix lint on staged files
pnpm lint:staged

Format

pnpm format

# To fix format
pnpm format:fix

Cleanup files

pnpm yeet

apollo-monorepo-poc's People

Contributors

fabien-roy avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

flessard

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.