Coder Social home page Coder Social logo

siddheshr12 / chat-rn-gql-prisma Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.51 MB

Group chat app, made with React-native type-script, and apollo graphql client frontend for caching and gql operations, and apollo server with express backend and prism as orm with planet-scale for backend

TypeScript 87.30% JavaScript 0.81% Ruby 2.16% Java 6.85% Objective-C 2.17% Objective-C++ 0.71%

chat-rn-gql-prisma's Introduction

intro

  • React native chat app, group chat made with RN, type-script and apollo-graphql client in frontend for caching and gql operations
  • It uses apollo-server express backend for api resolvers, with Prisma orm connected to planet-scale db
gql-chat-app.mp4

Auth0

setup and links

backend nodejs express ts

  • nodemon, express, bodyparser, cors, http
  • ts-node typescript
  • for node ts and express setup have used above packages, "npm init --yes" without "npm pkg set type="module" worked for me, type="module" caused some problems
  • ts-node and typescript dev dependencies without module seem to work fine for me

Planetscale and prisma

you can follow the following links to setup prisma with planetscale

https://planetscale.com/docs/prisma/prisma-quickstart // blog or doc link https://www.youtube.com/playlist?list=PLlRapu2ErjJ9DGsGHRwhRlm1FJVSN3FK7 // youtube video tutorial playlist

once setup is done use following commands:

pscale connect // connect to planetscale db npx prisma db push // push changes in prisma schema/ migrations to your planetscale db npx prisma studio --port // opens prisma studio to access your db in browser, --port command is optional

Apolo Graphql client and server

Backend

  • @apollo/server graphql
  • @graphql-tools/schema, graphql-subscriptions, graphql-ws, ws, graphql-tag

Frontend

  • @apollo/client, graphql, graphql-ws
  • ws is for websockets/ subscriptions

uses apollo client caching features like writeQuery, writeFragment, optimistic update etc. to make sure messages and conversations are cached, not much strain is put on the api

aws amplify storage

setup and links

https://docs.amplify.aws/react-native/start/getting-started/installation/ // setup aws amplify in frontend root directory which should generate amplify folder in frontend root directory and also adds aws-exports.js and amplifyconfiguration.json files once setup, add storage, by using amplify add storage setup storage properties and name and then amplify push install aws-amplify library I have made my storage bucket public since this is just an example but for a production app you will need to make it private and add proper polices https://awspolicygen.s3.amazonaws.com/policygen.html // you can generate your policy for your s3 bucket here

chat-rn-gql-prisma's People

Contributors

siddheshr12 avatar

Watchers

 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.