GithubHelp home page GithubHelp logo

gitintouch's Introduction

Gitintouch

Welcome to Gitintouch! ๐Ÿ‘‹

Before you get started, please join the community where you can chat with other folks using Bedrock, ask questions and get help:

https://discord.gg/XKU3jArbm7

Getting started

Getting the code

Please do not clone the repository directly, as that would defeat the purpose of using Bedrock โ€” you don't want all of its git history in your own project.

Instead, download the "Source code (.zip)" file of the latest release. Once that download finishes:

  1. Unzip the folder
  2. Rename the unzipped folder from gitintouch-x.y.z to your product's name
  3. Open the directory on your terminal and initialize git:
cd <project>
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:

  • Sign up for Stripe, used for payments
  • Sign up for Postmark, used for sending emails

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 installation instructions for your OS. 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 http://localhost:3000 ๐ŸŽ‰

Scripts

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

  • yarn generate: Generates the Prisma client (docs), which Nexus uses and generates the GraphQL schema (docs), which GraphQL Codegen uses and generates the urql hooks (docs). 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 (docs). Run this whenever you change your database schema.

  • yarn prisma:studio: Starts Prisma Studio 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. (docs)

All the others are used in CI or by those three main scripts, but you should only rarely need to run them manually.


For more information, check out the in-depth docs

gitintouch's People

Contributors

ferhatucar avatar bivtsjenko avatar

Watchers

James Cloos avatar  avatar

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.