GithubHelp home page GithubHelp logo

stack's Introduction

Stack

This is my boilerplate for new Elixir/Phoenix-based applications. It includes a fully functional authentication system, integration with Next.js and common utilities like a mailer and API routes.

I optimize for developer happiness and forward-looking (yet rock-solid) technology. The setup is structured as a monorepo for ease of development.

Quick start

export FOLDER=folder; git --git-dir=/dev/null clone --depth=1 https://github.com/matteing/stack $FOLDER; cd $FOLDER; make install; rm -rf .git

Methodology

I'm in the process of writing an article detailing my methodology to building new software. Stay tuned.

Structure

  • .vscode: project-specific editor configuration
  • app: NextJS, Tailwind, Next-Auth boilerplate
  • server: Phoenix boilerplate with additional components
  • .buildpacks: PaaS deployment using heroku-buildpack-monorepo
  • Makefile: management scripts

Installation

To setup this boilerplate:

  • Install the boilerplate by running make install
  • Run make dev to start the development servers

Now you can visit localhost:3000 and localhost:4000 from your browser.

Deploying

Deploying this repo is usually as simple as deploying any other Node or Elixir app, with a couple of caveats related mostly to the monorepo structure.

  1. Create a two PaaS apps: one for the frontend and another for the API.
  2. Set the APP_BASE environment variable depending on the PaaS app.
  3. Deploy, the monorepo buildpack will take care of setting the PaaS container root.

For more deployment guides, please check the Phoenix deployment guides.

Why this stack?

I like React. I've tried to go back to the good ol' days of server rendered multi-page apps, but React just spoiled me.

In terms of the API, Phoenix is the next logical step up from my previous stack (Django). Elixir is a very pleasaant language and the first-class support for realtime is awesome. You don't always need it, but when you do, you know you won't have major issues.

Deploying/scaling realtime Django was a big pain in the past and I don't want to go through that again. Elixir is concurrent and realtime by nature and that makes it dope.

stack's People

Contributors

matteing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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