🀯 zART-stack β€” Zero-API, React [Native], & TypeScript

Overview

zART-Stack 🀯

Zero-API, React, & TypeScript

⚑️ Probably the fastest way to build a React Native app with your own backend ⚑️

Introduction

A monorepo containing:

  • Next.js web app
  • React Native app with Expo
  • A tRPC-API which is inferred straight into the above.
  • Prisma as a typesafe ORM

In tRPC you simply write API-functions that are automatically inferred straight into your frontend - no matter if it's React, React Native, or something else (that is TS/JS-based).

Video

Very rough video recorded in 2 minutes πŸ˜…

ZART

Getting started

git clone [email protected]:KATT/zart.git
cd zart
yarn
yarn dev

Press i after yarn dev in to launch the iOS Simulator.

Now - head over to one of the ./apps, whilist updating a router in tRPC or the Database Schema and see that the data is directly inferred.

Available commands

Command Description
yarn dev Starts Postgres, Expo & Next.js
yarn db-up Starts Postgres on port 5466
yarn db-migrate-dev Runs the latest Database migrations after updating the Prisma schema
yarn db-nuke Stops and deletes the the database

Folder structure

.
β”œβ”€β”€ apps
β”‚   β”œβ”€β”€ expo    # Expo/RN application
β”‚   └── nextjs  # Server-side rendered Next.js application
β”œβ”€β”€ packages
β”‚   β”œβ”€β”€ api           # tRPC API 
β”‚   β”œβ”€β”€ react         # Shared React-helpers
β”‚   └── react-native  # RN components. **Could** be shared between Expo & Next.js if you're in to that sort of thing.
└── prisma      # Prisma setup

Further reading

Deployment

Vercel

  • Create a Postgres Database
  • Set env DATABASE_URL pointing towards that db

Questions?

Shoot me a message on Twitter!

Credits

You might also like...
A set of React components implementing Google's Material Design specification with the power of CSS Modules
A set of React components implementing Google's Material Design specification with the power of CSS Modules

React Toolbox is a set of React components that implement Google's Material Design specification. It's powered by CSS Modules and harmoniously integra

CSS media queries in react - for responsive design, and more.

react-responsive Information Package react-responsive Description Media queries in react for responsive design Browser Version = IE6* Demo The best s

Immutable state for React.js
Immutable state for React.js

react-cursor Immutable state for React.js react-cursor hello-world in a fiddle What is react-cursor Cursors are a tool for working with recursive or d

Mobile App Framework powered by React

TouchstoneJS Mobile App Framework powered by React. See the demo at touchstonejs.io. Follow @touchstonejs on Twitter for updates. See the touchstone-s

Centrally manage state for React applications with CSP

State Trooper Install npm npm install state-trooper Yarn yarn add state-trooper Example Usage Call StateTrooper.patrolRunLoop in your route handler/ma

Maple.js is a React webcomponents based framework mixing ES6 with Custom Elements, HTML Imports and Shadow DOM. It has in-built support for SASS and JSX, including a Gulp task for vulcanizing your project.
Maple.js is a React webcomponents based framework mixing ES6 with Custom Elements, HTML Imports and Shadow DOM. It has in-built support for SASS and JSX, including a Gulp task for vulcanizing your project.

Heroku: http://maple-app.herokuapp.com/ npm: npm install maple.js Bower: bower install maple.js Maple is a seamless module that allows you to organise

A performant, scalable and pluggable approach to instrumenting your React application.
A performant, scalable and pluggable approach to instrumenting your React application.

react-i13n react-i13n provides a performant, scalable and pluggable approach to instrumenting your React application. Typically, you have to manually

svg react icons of popular icon packs

React Icons Include popular icons in your React projects easily with react-icons, which utilizes ES6 imports that allows you to include only the icons

Plain functions for a more functional Deku approach to creating stateless React components, with functional goodies such as compose, memoize, etc... for free.
Plain functions for a more functional Deku approach to creating stateless React components, with functional goodies such as compose, memoize, etc... for free.

"Keo" is the Vietnamese translation for glue. Plain functions for a more functional Deku approach to creating stateless React components, with functio

Comments
  • Bump prisma version to 3.5.0

    Bump prisma version to 3.5.0

    Hey Katt!

    This is an awesome repo!

    I just saw that it was using prisma version 2.x which lacks some niceties they added on 3.x, so here's a PR that bumps the version!

    Best regards

    opened by mikealche 3
  • Modernizing to tRPC v10

    Modernizing to tRPC v10

    refs trpc/trpc#2118

    • Adds turborepo
    • Upgrades tRPC to v10
    • Replaces some scripts for turbo repo pipelines
    • Fixes wrong import for expo
    • Adds type safety for next.config.js
    opened by zomars 14
Owner
Alex Johansson
Fully stacked typescripter. tRPC creator. Been coding for 20+ years. "KATT" means cat in Swedish. @alexdotjs on Twitter. Independent consultant.
Alex Johansson
A lightweight reactivity API for other UI libraries to be built on top of.

This is a tiny (~850B minzipped) library for creating reactive observables via functions. You can use observables to store state, create computed properties (y = mx + b), and subscribe to updates as its value changes.

Maverick 533 Jan 2, 2023
Magic Quadrant built with React & Typescript

Magic Quadrant Interactive Magic Quadrant built with React & Typescript Demo Demo Link Firebase: https://magic-quadrant-3eaf1.web.app/ Usage Install D

Aykut Ulış 7 Apr 10, 2022
A blazing fast, dependency free, 1kb runtime type-checking library written entirely in typescript, meant to be used with it.

A blazing fast, dependency free, 1kb runtime type-checking library written entirely in typescript, meant to be used with it.

Gabriel Vaquer 90 Dec 9, 2022
React, React Native and Vue UI components for building data-driven apps with Elasticsearch

Reactive Search UI components library for Elasticsearch: Available for React, Vue and React Native Read how to build an e-commerce search UI a.) with

appbase.io 4.7k Jan 4, 2023
⚑️ Lightning-fast search for React and React Native applications, by Algolia.

React InstantSearch is a library for building blazing fast search-as-you-type search UIs with Algolia. React InstantSearch is a React library that let

Algolia 2k Dec 27, 2022
A minimum and lightweight external store for React and React Native application

Reactive store - a minimum and lightweight external store for React and React Native application Table of contents Features Installation Usage 3.1 Cre

HΓ²a VΓ΅ 7 Nov 21, 2022
React ESI: Blazing-fast Server-Side Rendering for React and Next.js

React ESI: Blazing-fast Server-Side Rendering for React and Next.js React ESI is a super powerful cache library for vanilla React and Next.js applicat

KΓ©vin Dunglas 633 Jan 5, 2023
react-pdf-highlighter is a React library that provides annotation experience for PDF documents on web.

β˜•οΈ Buy me a coffee react-pdf-highlighter react-pdf-highlighter is a React library that provides annotation experience for PDF documents on web. It is

Vladyslav 9 Dec 2, 2022
React-cursor-chat - A react component for cursor chat

@yomo/react-cursor-chat ?? Introduction A react component for cursor chat Press

YoMo 84 Nov 17, 2022
Automatically AJAXify plain HTML with the power of React. It's magic!

React-Magic and HTMLtoJSX React-Magic is an experimental library that uses the power of Facebook's React library to inject AJAX-loading goodness into

React Community 921 Dec 16, 2022