All Projects → BrunoBernardino → Snailjs

BrunoBernardino / Snailjs

SnailJS - Slow and thoughtful development with Node and React

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Snailjs

Typescript Webpack React Redux Boilerplate
React and Redux with TypeScript
Stars: ✭ 182 (-1.09%)
Mutual labels:  webpack, boilerplate
React Redux Universal Boilerplate
An Universal ReactJS/Redux Boilerplate
Stars: ✭ 165 (-10.33%)
Mutual labels:  webpack, boilerplate
React Boilerplate
A slightly opinionated yet dead simple boilerplate for React 17.x, Webpack 5 and React Router v5
Stars: ✭ 158 (-14.13%)
Mutual labels:  webpack, boilerplate
Workflow Reactjs
My workflow with ReactJS + Webpack 3+
Stars: ✭ 150 (-18.48%)
Mutual labels:  webpack, boilerplate
Jekyll Webpack Boilerplate
⚡️ A boilerplate with Jekyll and Webpack to make the most performant static websites
Stars: ✭ 182 (-1.09%)
Mutual labels:  webpack, boilerplate
React Webpack 5 Tailwind 2
React 17 Boilerplate with Webpack 5, Tailwind 2, using babel, SASS/PostCSS, HMR, dotenv and an optimized production build
Stars: ✭ 155 (-15.76%)
Mutual labels:  webpack, boilerplate
Template Rwb
A full-featured Webpack setup with hot-reload
Stars: ✭ 165 (-10.33%)
Mutual labels:  webpack, boilerplate
Js Stack Boilerplate
Final boilerplate code of the JavaScript Stack from Scratch tutorial –
Stars: ✭ 145 (-21.2%)
Mutual labels:  webpack, boilerplate
Vue Chrome Extension Boilerplate
Boilerplate for Chrome extension using Vue.js and Webpack with auto-reload enabled.
Stars: ✭ 171 (-7.07%)
Mutual labels:  webpack, boilerplate
Baumeister
👷 The aim of this project is to help you to build your things. From Bootstrap themes over static websites to single page applications.
Stars: ✭ 171 (-7.07%)
Mutual labels:  webpack, boilerplate
Kirby Webpack
💪 A Kirby CMS starter-kit with modern frontend tools
Stars: ✭ 150 (-18.48%)
Mutual labels:  webpack, boilerplate
Essential React
A minimal skeleton for building testable React apps using Babel
Stars: ✭ 2,035 (+1005.98%)
Mutual labels:  webpack, boilerplate
React Redux Styled Hot Universal
react boilerplate used best practices and focus on performance
Stars: ✭ 147 (-20.11%)
Mutual labels:  webpack, boilerplate
Spring React Boilerplate
An example of an isomorphic application using Java + Spring with React, React Router and Redux
Stars: ✭ 156 (-15.22%)
Mutual labels:  webpack, boilerplate
Awesome Chrome Extension Boilerplate
Use react + typescript + webpack to enhance your chrome extension development experience
Stars: ✭ 146 (-20.65%)
Mutual labels:  webpack, boilerplate
Javascriptstuff Db
Lists of JavaScript resources: tools, tutorials, starter projects, example code, etc.
Stars: ✭ 163 (-11.41%)
Mutual labels:  webpack, boilerplate
Project Webcube
Continuously updated JS infrastructure for modern web dev
Stars: ✭ 141 (-23.37%)
Mutual labels:  webpack, boilerplate
Iceberg
Front-End Boilerplate built with React + Babel + Webpack + SASS
Stars: ✭ 144 (-21.74%)
Mutual labels:  webpack, boilerplate
React Core Boilerplate
Powerful ASP.NET Core 3 templates with React, true server-side rendering and Docker support
Stars: ✭ 169 (-8.15%)
Mutual labels:  webpack, boilerplate
Scalable React Typescript Boilerplate
⭐️ Scalable micro-framework featuring React and TypeScript
Stars: ✭ 174 (-5.43%)
Mutual labels:  webpack, boilerplate

SnailJS - Slow and thoughtful development with Node and React

SnailJS is a starter/boilerplate app that attempts to define some structure for projects where the people involved want to dedicate some thought into how they will be built, don't want to give up control, and want to be fairly optimized.

Screenshot

It's not very opinionated. It's meant to build an app using Webpack (for dev/prod optimizations), Babel (for the nice import syntax and other ES6+ goodies), a Koa backend, a React frontend, and TypeScript (if you prefer Flow static typing, check the last commit with it), with some common needs like routing, absolute paths, SASS parsing, tests, and build processes.

Other than that, it doesn't force you to specific tech solutions like how to code split, redux, mobx, mustache, mongo, mysql, etc. There are other tools for that kind of opinionated app building like SailsJS.

If you need a simple frontend app, try create-react-app. If you need a bit more complexity (or a "webpacked" node app), Neutrino is pretty good as well. For frontend and backend coupled things I've been enjoying a lot of Next.js.

This really serves the purpose of someone wanting/needing something like SailsJS but without all the magic/opinionated code.

Requirements

node (ideally via nvm, so .nvmrc is respected).

Development

Here's a list of the available commands:

make install  # for getting everything setup
make start  # for dev build. Check if you want to update your `.env.local` file (it's unversioned)
make lint  # to run linting and TypeScript checking
make test  # to run `make lint` and tests
make test/update  # to run `make lint` and tests, updating snapshots
make pretty  # to run `prettier` on all code
make test/pretty  # to check if `prettier` needs to change anything
make build  # for prod build
make test/build  # to run `make build` and serve it locally in production mode
make deploy  # will deploy a server to DigitalOcean with the app (read more below). Make sure to run `make build` first
make deploy/update  # will update the frontend and backend of a deployed server (so `make deploy` has to have been executed first, and make sure to have run `make build`)
make deploy/destroy  # will destroy the infra/server
make deploy/serverless  # will deploy the whole app using `vercel`, in a serverless fashion. Learn more below. Make sure to run `make build` first

Deployment ("cool kids" serverless)

This is using vercel (install via npm i vercel -g) and quite unoptimized, but any other alternatives should be simple to adapt. Also, please note for serverless you might want to split/isolate the frontend and backend to keep things a bit faster, but it's not mandatory.

Deployment ("old school" server)

Note this is a simple deployment setup. It's scalable, but not necessarily following best security practices. Ideally you'll have/use a non-root user, VPNs/VPCs, load balancers, and all that, but you never need that upfront, so this is meant to help get your feet off the ground and into space, not Mars (and it should define a structure to get there when you need to).

Before you run make deploy, set the variables inside the deploy/variables.tf file. Here's a sample with fake data that explains where/how to get them:

variable "do_token" {
  default = "Token From DigitalOcean. Get it at https://cloud.digitalocean.com/account/api/tokens"
}
variable "pub_key" {
  default = "~/.ssh/id_rsa.pub"
}
variable "pvt_key" {
  default = "~/.ssh/id_rsa"
}
variable "ssh_fingerprint" {
  default = "The MD5 Fingerprint from your SSH Key at https://cloud.digitalocean.com/account/security"
}

That assumes DigitalOcean already has your ~/.ssh/id_rsa.pub key in https://cloud.digitalocean.com/account/security.

After you run make deploy you'll be able to ssh [email protected]_ADDRESS and cd /app && ./stop.sh, cd /app && ./start.sh, orcd /app && ./restart.sh. Ideally you'll also setup a cron or manually run certbot renew to update the SSL certificates.

If you need to update the app, just run IP=IP_ADDRESS make deploy/update and it'll build the assets, push them over, and restart the server.

First Deployment

There's a couple of manual things you need to do right now for the first time deploying (this can totally be improved with some more dedicated time), like setting up nginx properly and the certificates:

ssh [email protected]_ADDRESS

certbot --nginx -d example.com -d www.example.com
# I'd recommend option 2 (redirect HTTP to HTTPS).

nano /etc/nginx/sites-enabled/default
# Add the content below inside the main `server` block, near the bottom, for the `listen 443` piece:
location / {
  proxy_pass http://localhost:3000/;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection 'upgrade';
  proxy_set_header Host $host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_cache_bypass $http_upgrade;
}

Now start the app: /app/restart.sh.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].