Coder Social home page Coder Social logo

aobakwewastaken / prisma-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 2wce/prisma-template

0.0 0.0 0.0 2.51 MB

Template for Prisma 3.* with Permissions,Tests & Auth

Home Page: https://www.prisma.io/?utm_source=Prisma+Ambassador&utm_medium=Blog+post&utm_campaign=Prisma+AP+Kudakwashe+Mupeni

License: MIT License

Shell 1.20% JavaScript 2.58% TypeScript 96.23%

prisma-template's Introduction

Prisma Template

Release

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Before we get started, we're going to need to make sure we have a few things installed and available on our machine.

Node >= 12

Docker

Use the installation guide from here:

https://www.docker.com/products/docker-desktop

MacOS
curl "https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE 's|.*>node-(.*)\.pkg</a>.*|\1|p')}.pkg" > "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/"
Other

See the installation guides available @ nodejs.org:

https://nodejs.org/en/download/package-manager/

Installing

Below is a series of step by step instructions that tell you how to get a development env running.

Create a local clone of the repository

git clone [email protected]:2wce/prisma-template.git

Enter the cloned repositories' directory

cd prisma-template

Create a .env file based on the .env.example template

If you have a local MySQL database you can use it's details in the .env file. If not, you can run the docker container & use it's default values.

docker compose up -d

Export the contents of the created .env file to the current terminal session.

set -o allexport; source .env; set +o allexport

Install the projects dependencies

npm i

Start the projects development server

yarn dev

The project should now be available at http://localhost:4000

graphql playground

Start the db viewer in another terminal to view your database

npx prisma studio

Testing

You can run local tests using

yarn test

Example Flow

You can find the example flow & queries in here: ExampleFlow.md

Deployment

Deployments are handled by github actions, below is an overview of how the deployments work:

  1. Dependencies are installed with npm i
  2. Unit tests are run with yarn test

Environment Variables

These are the environment variables required to successfully deploy the application.

key description
DATABASE_URL DB url

Built With

Details of the tech stack that has been used.

  • Typescript - TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
  • Prisma - Next-generation ORM for Node.js and TypeScript

Versioning

This project uses SemVer for versioning. Versioning occurs automatically in the pipelines using Semantic Release. For the versions available, see the tags on this repository.

Changelog

A running changelog can be found here: CHANGELOG.md

Authors

Licenses

├─ MIT: 386
├─ ISC: 32
├─ BSD-3-Clause: 30
├─ Apache-2.0: 11
├─ BSD-2-Clause: 7
├─ CC-BY-4.0: 1
├─ (MIT AND BSD-3-Clause): 1
├─ 0BSD: 1
└─ (MIT OR CC0-1.0): 1

Meta

Version Author Date
0.0.1 Kudakwashe Mupeni [email protected] 20/09/2021
0.0.2 Kudakwashe Mupeni [email protected] 21/09/2021

prisma-template's People

Contributors

2wce avatar deepsource-autofix[bot] avatar deepsourcebot avatar dependabot[bot] avatar mr-emeka avatar sdessai-sovtech avatar semantic-release-bot 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.