Max Stoiber - Bedrock: Jumpstart your next SaaS product

Max Stoiber - Bedrock: Jumpstart your next SaaS product

Register & Get access to index

TUTProfessor

Processing....
Staff member
Administrator
Uploader
Jul 31, 2020
9,107
972,893
129
TUTProfessor submitted a new resource:

Max Stoiber - Bedrock: Jumpstart your next SaaS product - Jumpstart your next SaaS product with Bedrock

RQatZdb.png


Jumpstart your next SaaS product with Bedrock​

The modern full-stack Next.js & GraphQL boilerplate with user authentication, subscription payments, teams, invitations, emails and everything else you need

Tools​

Bedrock combines all the best tools the JS ecosystem has to offer and makes them work well together. This means you get the best developer experience and can just focus on building your...

Read more about this resource...
 

TUTProfessor

Processing....
Staff member
Administrator
Uploader
Jul 31, 2020
9,107
972,893
129
How to Use it?

  1. Unzip the folder
  2. Rename the unzipped folder from bedrock-x.y.z to your product's name
  3. Open the directory on your terminal and initialize git:
cd git init

After that, you're ready to get started!

Initial setup

You'll need certain environment variables to run Bedrock's functionality in local development. The first step is to:

Then, copy .env.example to .env and fill out the .env file with your environment variables!

cp .env.example .env

Note: do not delete the .env.example file, as it's used by some code generation processes and is useful for potential future team members as a reference.

Now you're ready to set everything up locally:

  1. Install Docker by following their
    Please, Log in or Register to view URLs content!
    ... Bedrock uses Docker to start the local development database.
  2. Then, install the dependencies with yarn:
yarn

  1. Start the local development database as well as the Stripe CLI webhook listener (to make payments work) with docker-compose:
docker-compose up

  1. Copy the webhook secret that the Stripe CLI logged, something like “> Ready! Your webhook signing secret is whsec _ *** ”. Copy that secret and add it to your .env file.
  2. Migrate your local development database to the base schema:
yarn prisma: migrate

Development workflow​

To develop your app, you always need to have two commands running concurrently:

  1. Start the development database with:
docker-compose up

  1. Start the development process , which also runs all the necessary code generators:
yarn dev

That's it! Now you should have Bedrock running locally and should be able to visit
Please, Log in or Register to view URLs content!
🎉

Scripts

The three most important commands you'll run frequently during development:

  • yarn generate: Generates the Prisma client (
    Please, Log in or Register to view URLs content!
    ), which Nexus uses and generates the GraphQL schema (
    Please, Log in or Register to view URLs content!
    ), which GraphQL Codegen uses and generates the urql hooks (
    Please, Log in or Register to view URLs content!
    ). Run this whenever you change the database schema, GraphQL schema or GraphQL queries.
  • yarn prisma:migrate: Creates migration files from your Prisma schema changes and runs those migrations on your local dev db (
    Please, Log in or Register to view URLs content!
    ). Run this whenever you change your database schema.
  • yarn prisma:studio: Starts
    Please, Log in or Register to view URLs content!
    on localhost:5555 where you can inspect your local development database.
  • yarn cypress:open: Opens Cypress so you can write and run your end-to-end tests. (
    Please, Log in or Register to view URLs content!
    )
All the others are used in CI or by those three main scripts, but you should only rarely need to run them manually.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 

TUTProfessor

Processing....
Staff member
Administrator
Uploader
Jul 31, 2020
9,107
972,893
129
TUTProfessor updated Max Stoiber - Bedrock: Jumpstart your next SaaS product with a new update entry:

New Update

Component Updated 3-2022

updates

v1.4.0: Prisma v3, remove nexus-plugin-prisma, add pagination

What's Changed
  • Remove nexus-plugin-prisma by @zoontek
  • Add client side pagination + fix backend pagination by @zoontek
  • fixed prisma comments by @b-schwab
  • upgrade next by @nikgraf
  • upgrade deps by @nikgraf
  • fix migration by @nikgraf
  • Bump next from 12.0.3 to 12.0.7 by @dependabot
  • Run prettier on the whole codegen by @zoontek
  • Update breaking deps + fix...

Read the rest of this update entry...
 

Latest resources