Skip to content

Workshop about how to create an MVP with Elixir and Phoenix Framework.

License

Notifications You must be signed in to change notification settings

dreamingechoes/create-an-mvp-with-phoenix-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create An MVP With Phoenix Framework

About

This repository is the base for a workshop about how to create an MVP with Elixir and Phoenix Framework. In this workshop, we're going to tackle the development of a product idea, setting our development environment, seeing the structure of a regular Phoenix application, modeling the business logic, building the web and shipping the final result to production.

You can check the slides for this workshop here.

Contents

The Idea

The product we want to create will be a simple application which with we can sync all our notes in the cloud. For the MVP, we just need to store the user’s information, a series of blocknotes created by the user, and the notes which belongs to the blocknotes. The models diagram will look pretty simple, something like this:

So once we have defined the product we're going to develop, and with the data modeling done, the first step we need to do is to setup our development environment.

Environment Setup

We'll need to install the following dependencies:

  • Erlang: a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance.
  • Elixir: a dynamic, functional language designed for building scalable and maintainable applications. Elixir leverages the Erlang VM, known for running low-latency, distributed and fault-tolerant systems, while also being successfully used in web development and the embedded software domain.
  • Phoenix Framework: a productive web framework that does not compromise speed and maintainability.
  • Node.js: asynchronous event driven JavaScript runtime, designed to build scalable network applications.
  • PostgreSQL: a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

There're three main ways to install all this stuff: by instaling all natively, using a version manager to install it in our machine, or creating an isolated Docker container with all the dependencies.

Natively

The first way to have all these dependencies ready is by installing directly in your machine natively. Here you have all the documentation resources so you can check the instructions for your operative system:

Version Manager

If you need to deal with multiple versions of these dependencies, the best option is to install them with a version manager. If you are into Ruby on Rails, probably you have used rvm or rbenv. In this case, we need a version manager capable to handle not only one technology but multiple ones. Here it's when asdf comes to help us.

asdf is an extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more. The setup's quite easy, just follow the steps specified in its setup process. In order to be able to install all our dependencies, we need a plugin for each one. Here you have the list of plugins so you can follow the setup instructions:

It's the best option for setup all natively.

Docker

We can recreate the setup of our servers to have a development environment in the same conditions as the production one. The key files to achieve this are Dockerfile and docker-compose.yml. First you have to install Docker first (following the instructions provided here), so you can start to config your project.

You can check the official documentation in order to see in detail how Docker works, but you can check some examples files to dockerize a Phoenix application I made some time ago here.

Final Product

You can check the final result for our MVP here.


This project was developed by dreamingechoes. It adheres to its code of conduct and contributing guidelines, and uses an equivalent license.

About

Workshop about how to create an MVP with Elixir and Phoenix Framework.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published