Coder Social home page Coder Social logo

eric-potter / rust-full-stack Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 145 KB

Highly opinionated boilerplate for creating full stack applications with Rust

License: Apache License 2.0

Dockerfile 1.69% Shell 4.55% Rust 77.91% SCSS 3.31% HTML 0.51% CSS 10.95% JavaScript 1.08%
rust yew

rust-full-stack's Introduction

Yew Fullstack Boilerplate

This boilerplate was created in order to have a place for sharing efforts in creating full stack applications using Rust. It is supposed to give creators of rust frameworks a notion of how people use their technologies.

It has been created to easily get up to speed with projects that might profit from full stack development in Rust. So why go through all the trouble?

  • Modern web applications are bloated, large and slow. Rust and WASM can help to reverse that trend and to build way more capable web applications.
  • Rust is fast. The libraries used in this project are fast.
  • Rust is safe. At least it's way safer than other languages. Hint: borrow checker.
  • Especially large applications in JS or Typescript take more effort to maintain the larger they get. With Rust your application is way less likely to crash once it has been built. At least if you stuck to a few paradigms.

If you want to support my work please consider donating at Patreon.

Prerequisites

The following software should be installed on your development machine:

  • Rust, of course, alongside your favourite IDE (or not if you really like to suffer)
  • The latest version of Node.js (Deno is not yet tested with this project.)
  • The latest version of Yarn (installable via npm install -g yarn after you installed Node.js)
  • The latest version of the Docker engine
  • The latest version of docker-compose (on MacOS it is shipped with the Docker Engine, for usage on Linux please consult the installation manual)

Usage

First thing to do when using this boilerplate for your new project: Update the contents of backend/src/secret.key. It needs to be exactly 32 bytes in size, it can be binary.

This boilerplate is built around the concept of single command building. So here are a few commands that will bring you up to speed fast:

  • scripts/run-dev.sh boots up the whole stack in one go. It will take a little while, especially the first time you run it. It is the command you are likely to be wanting to use first.
  • scripts/stop-dev.sh is the command that removes all dev docker containers.
  • scripts/build.sh will build a production version of the whole stack in one docker container
  • scripts/run.sh will start up the container built using the previous command.
  • scripts/build-and-run.sh will do what the previous two commands did but in one go.
  • scripts/stop.sh will remove all docker containers associated with the production build of your application.
  • scripts/run-dev-force-recreate.sh will help you if you screwed anything up with scripts/run-dev.sh. After it ran successfully you should be able to use scripts/run-dev.sh again.

About

This project is a highly opinionated boilerplate for creating full stack applications with Rust using the following technologies:

Its authentication mechanism is built around JWT.

Feel free to clone this project and build on top anything you like. If there are updates to the template you can just merge it into your project and you are up to date.

For custimizing the name of the project use your favorite search and replace tool and search for the the terms yew-fullstack, YEW_FULLSTACK, Yew Fullstack Boilerplate and Yew Fullstack (in that order) and replace them with whatever you like.

Showcase

Projects built on top of this boilerplate will have names and links put here. Just tell me or open a PR and I will put them here.

rust-full-stack's People

Contributors

william-toptal-dev avatar

Stargazers

vittorioPiotti avatar Paul Koop avatar

Watchers

hardworking 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.