All Projects → nice-boys → Product Boilerplate

nice-boys / Product Boilerplate

Quickly ship your apps with the power of code generation.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Product Boilerplate

Serverless Prisma
AWS Serverless Prisma Boilerplate
Stars: ✭ 126 (-81.39%)
Mutual labels:  graphql, prisma
Este
This repo is suspended.
Stars: ✭ 5,467 (+707.53%)
Mutual labels:  graphql, prisma
Typegraphql Prisma
Prisma 2 generator to emit TypeGraphQL types and CRUD resolvers from your Prisma 2 schema
Stars: ✭ 137 (-79.76%)
Mutual labels:  graphql, prisma
Howtographql
The Fullstack Tutorial for GraphQL
Stars: ✭ 7,999 (+1081.54%)
Mutual labels:  graphql, prisma
Prisma Ecommerce
💰A graphql e-commerce real-world fullstack example (backoffice included)
Stars: ✭ 231 (-65.88%)
Mutual labels:  graphql, prisma
Prisma Kubernetes Deployment
Demo how to deploy a Prisma server to a Kubernetes cluster.
Stars: ✭ 89 (-86.85%)
Mutual labels:  graphql, prisma
Prisma Examples
🚀 Ready-to-run Prisma example projects
Stars: ✭ 3,017 (+345.64%)
Mutual labels:  graphql, prisma
Ra Data Opencrud
A react-admin data provider for Prisma and GraphCMS
Stars: ✭ 142 (-79.03%)
Mutual labels:  graphql, prisma
Canner
⚡️[NOT MAINTAINED] Content Management Framework creates custom CMS fast and easy. Support data sources such as Firebase/Firestore, GraphQL and Restful APIs.
Stars: ✭ 2,472 (+265.14%)
Mutual labels:  graphql, prisma
Modern Graphql Tutorial
📖 A simple and easy GraphQL tutorial to get started with GraphQL.
Stars: ✭ 219 (-67.65%)
Mutual labels:  graphql, prisma
Nexus Plugin Prisma
A plugin for Nexus that integrates Prisma
Stars: ✭ 728 (+7.53%)
Mutual labels:  graphql, prisma
Shop
🛍🛒 Full-stack React/Prisma/TS/GraphQL E-Commerce Example
Stars: ✭ 359 (-46.97%)
Mutual labels:  graphql, prisma
Graphql Prisma Typescript
🏡 GraphQL server reference implementation (Airbnb clone) in Typescript using Prisma & graphql-yoga
Stars: ✭ 723 (+6.79%)
Mutual labels:  graphql, prisma
Production Ready Expressjs Server
Express.js server that implements production-ready error handling and logging following latest best practices.
Stars: ✭ 101 (-85.08%)
Mutual labels:  graphql, prisma
Prisma Auth0 Example
Boilerplate Prisma Startup
Stars: ✭ 184 (-72.82%)
Mutual labels:  graphql, prisma
Awesome Prisma
A collection of awesome things regarding Prisma ecosystem.
Stars: ✭ 310 (-54.21%)
Mutual labels:  graphql, prisma
Pizzaql
🍕 Modern OSS Order Management System for Pizza Restaurants
Stars: ✭ 631 (-6.79%)
Mutual labels:  graphql, prisma
Elixir Boilerplate
⚗ The stable base upon which we build our Elixir projects at Mirego.
Stars: ✭ 627 (-7.39%)
Mutual labels:  graphql
Graphql Birdseye
View any GraphQL schema as a dynamic and interactive graph. 🦅
Stars: ✭ 650 (-3.99%)
Mutual labels:  graphql
Graphqlbundle
This bundle provides tools to build a complete GraphQL server in your Symfony App.
Stars: ✭ 628 (-7.24%)
Mutual labels:  graphql

Nice Boys™️ Product Boilerplate

Quickly ship your apps with the power of code generation.

Philosophy

"Speed of developer iteration is the single most important factor in how quickly a technology company can move."

— Paul Biggar, cofounder CircleCI

Product boilerplate is @brianlovin and @mxstbr's personal setup to quickly build new apps. It aims to get all the common stuff out of the way and make shipping and subsequently iterating on a product as quick as possible.

There are three important traits in all the included tooling that we pay attention to:

  1. Mastery: We know most of these tools inside and out and have a lot of experience with them.
  2. Code generation: The less boilerplate code we need to write, the more we can focus on our app. Code generation allows us to automate the tedious parts.
  3. Type safety: Counterintuitively, having strict type safety lets you move faster because you get warnings about bugs right in your IDE without having to recompile.

Note that this is our personal boilerplate. You are more than welcome to use it (that's why it's open source), but we cannot give any support when using it. Make sure you understand the tools in it before using it!

Stack

The entire app (front- and backend) uses Next.js in serverless-mode for development, and deployment is powered by Now.

Tools

Frontend

Backend

Working with the boilerplate

Code Generation

There are three code generators at work in this boilerplate:

  • GraphQL Codegen automatically generates React components for the frontend that fetch from the API. They are fully typed too, so you know exactly what the shape of the returned data is.
  • Prisma generates a fully type-safe database client from our datamodel.
  • GraphQL Nexus (in combination with Prisma) lets us expose a production-ready GraphQL API from the database client.

Routing

All routing happens via the folder structure in the web/pages/ folder. Any route under web/pages/api will be treated as an API route, all others as React routes.

To add dynamic routing use the Next.js dynamic routes feature.

Commands

To start the app locally you have to run these two commands:

  • yarn run dev: Stars the development process for the serverless front- and backend, as well as all generation processes.
  • yarn run db: Starts the database locally (note: requires Docker to be up and running and docker-compose to be installed)

Further, you will frequently use these commands while developing and they are automatically run whenever you switch branches or pull new code to make sure your generated files are up to date:

  • yarn run db:deploy: Update your local database with changes you made to the datamodel.
  • yarn run generate: Runs all the codegeneration commands in sequence. You can also run them manually if necessary:
    • yarn run generate:db: Generate the Prisma database client for the server.
    • yarn run generate:server: Generate the schema.graphql file for the backend from the Nexus schema
    • yarn run generate:web: Generate the fetching hooks and types for the frontend from the .graphql files contained within it

These are automatically run in a pre-commit hook, so don't worry about calling them manually unless you have a reason to:

  • yarn run prettify: Prettifies the src folder with Prettier.
  • yarn run lint: Lints the src folder with ESLint.

Deployment

To deploy the database, look at the Prisma docs, e.g. their tutorial on deploying the database to AWS fargate.

Once that is up and running, to deploy the app you simply run now, that's it! We recommend enabling the Now GitHub integration for CD.

License

Licensed under the MIT License.

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].