Skip to content
forked from alan345/TER

Fullstack Boilerplate GraphQL. Made with React & Prisma + authentication & roles + upload file + chat

License

Notifications You must be signed in to change notification settings

Bjoernstjerne/naperg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Apollo Prisma Express React GraphQL
 

Boilerplate for a Fullstack GraphQL App with React & Prisma

Authentication with roles & permissions. Backend & Frontend

Upload image with expressJs

Chat with GraphQL Subscriptions


image

🚀 Bootstrap your fullstack GraphQL app within seconds
Basic starter kit for a fullstack GraphQL app with React and Node.js - based on best practices from the GraphQL community.

Project

GitHub issues GitHub forks GitHub stars GitHub license price paypal

Twitter

Screenshots

Signup with key 'Enter' to change field Chat
Signup Chat
Order by / pagination Email Validation
Mobile friendly image
Forget Password
image image
Users List User profile
connected object User profile
Login Resend Link to validate email
Login Link to validate email
Create Draft with connected object (car & user) Update Password in app
connected object connected object
Mobile Friendly Login with Avatar Profile
Mobile friendly avatar profile
REST API with graphql-yoga
REST API with graphql-yoga

Getting started

1/ In folder /server/src/config rename file config_example.js to config.js and add your own settings

2/ Install docker and Prisma cli. (https://www.prisma.io/docs/get-started/01-setting-up-prisma-new-database-a002/)

3/ In folder /server, run:

#init app
docker-compose up -d


#Deploy app
prisma deploy

4/ In 3 different terminals:

# Prisma: Graphql and mySql (port 4000)
cd server
yarn install
yarn start
# Media server: ExpressJs (port 8000)
cd media
yarn install
yarn start
# Frontend: ReactJs (port 3000)
cd react
yarn install
yarn start

Go to url: http://localhost:3000

Features

  • Scalable GraphQL server: The server uses graphql-yoga which is based on Apollo Server & Express
  • Pre-configured Apollo Client: The project comes with a preconfigured setup for Apollo Client
  • GraphQL database: Includes GraphQL database binding to Prisma (running on MySQL)
  • Tooling: Out-of-the-box support for GraphQL Playground
  • Extensible: Simple and flexible data model – easy to adjust and extend
  • Chat: Made with Prisma & apollo subscription. (WebSocket)
  • Email management:
    • Welcome email + link to validate the email
    • Forget password email
  • Signup management:
    • Check password strength
    • Send welcome email + link to validate the email
    • App knows if email has been approved by the link

For a fully-fledged React & Apollo tutorial, visit How to GraphQL.

Documentation

useful Commands

  • prisma reset

  • docker container ls list container

  • docker stop database_prisma_1 stop container

  • docker rm database_prisma_1 remove container

  • docker stop $(docker ps -a -q) stop all container

  • docker rm $(docker ps -a -q) remove all container

  • docker-compose up -d init app

  • prisma deploy Deploy app

  • eslint . Check JS/react syntax with eslint-plugin-react

  • yarn start starts GraphQL server on http://localhost:4000

  • yarn dev starts GraphQL server on http://localhost:4000 and opens GraphQL Playground

  • yarn playground opens the GraphQL Playground for the projects from .graphqlconfig.yml

  • yarn prisma <subcommand> gives access to local version of Prisma CLI (e.g. yarn prisma deploy)

Note: We recommend that you're using yarn dev during development as it will give you access to the GraphQL API or your server (defined by the application schema as well as to the Prisma API directly (defined by the Prisma database schema. If you're starting the server with yarn start, you'll only be able to access the API of the application schema.

Made with..

Frontend:

Backend:

Contributing

-Your feedback is very helpful, please share your opinion and thoughts! If you have any questions or want to contribute yourself, don't hesitate!

-Tests must be implemented. Feel free to create a PR :)

-Add a react hook as an example. https://reactjs.org/docs/hooks-intro.html

-Add a star to this Repo! It helps a lot!

Buy me a drink!

If this project help you reduce time to develop, you can give me a cup of coffee :)

paypal

About

Fullstack Boilerplate GraphQL. Made with React & Prisma + authentication & roles + upload file + chat

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.8%
  • CSS 1.6%
  • HTML 0.6%