- Typescript: React JS / Next JS / Express / GQL / Postgres
- run in a kubernetes cluster
- on Google Cloud
I tried to add nice features that would be good to have when starting an arbitrary react webserver project. I based this on my own experience of developing apps for many different companies and clients. Most people will agree a good webserver has many features which I will summarize below
- Performant and reliable
- the server should serve responses quickly and be reliable under load
- performance should be equally fast across regions
- Scaleable
- Easy to work on - features should be easy to build, test and iterate on
- Stock starters are a bit lame
Ideally a web server should be scalable to
- Webserver - Next.js
- Server-side rendering, tree shaking, CSS optimization out of the box
- Build pipeline
- Webpack
- -> tree shaking [next.js]
- -> CSS optimization [purgecss],
- -> Docker container
- Build pipeline
- Dev environment
- Local: run dev server directly on host machine with node
- Kubernetes: run locally with minikube and deploy to GKE
-
Uses Terraform, Docker and Kubernetes - Infrastructure as code, horizontally scalable
-
Advanced local dev - fully loaded with everything you need to start executing from day 1
- Dockerized DB managed with typeorm - reliable db
-
Framer motion
This is a basic repository designed to be a good jumping off point into an early project.
- Frontend / Webserver - node js process uses next.js with express
- Containerization - docker wrapper and kubernetes setup for minikube and gcloud kubernetes cluster
- Storage - Google cloud storage, CloudSQL Postgres (coming soon)
- Infrastructure - gcloud managed with terraform backend
- node js
- gcloud
- docker
- kubectl
- minikube
- terraform
You will learn about: node js, react, babel, graphql, express
By the end of the tutorial you will cover the 58 initial files in this repo and understand what each one is about.
- Clone the repository
yarn install
. This will install a lot of things but they will (mostly) be worth it. Heck I don't know....you be the judge.
-
Run a local postgres database using docker
yarn db:local:start
-
The
server/entity
contains the typeorm models for the app. You can update these depending on your needs -
yarn typeorm-migration-generate
-
typeform-migration-run
-
yarn dev
gcloud container clusters get-credentials abhi-250902-gke --region us-west1
https://codefresh.io/docker-tutorial/not-ignore-dockerignore-2/