Tutorial to build a blog platform with Elixir Phoenix and Next.js

Loi Le
3 min readOct 19, 2023

--

In this tutorial, you will learn how to develop a web application from scratch using modern technologies such as Elixir Phoenix, Next.js, and more. I will guide you step by step to build a Blog Platform that showcases these technologies. By the end of this tutorial, you will have a solid understanding of these technologies and the ability to build a reliable and maintainable web application.

This tutorial is suitable for anyone who wants to learn modern technologies like Elixir Phoenix for Backend and React Next.js for Frontend. You do not need any formal prerequisites to follow this tutorial. However, if you have some experience as a web application developer in other languages, you will find it easier and faster to grasp the concepts. If you are a junior developer or do not have much experience in Backend or Frontend development, you can still benefit from this tutorial as it provides detailed steps and explanations. You just need to spend more time and focus on the tutorial.

If you want to see the final result of this tutorial, you can check out this:

https://github.com/tanloiit2010/lani-blog-platform

What features are we going to build?

In this tutorial, you will create a simple Blog platform that allows users to view various posts written by different authors. In order to create posts and manage them, users need to register and log in to the Blog platform. Once they are logged in, they can write new posts and edit or delete their existing posts.

What technologies will we use?

For the frontend development, we will use the Next.js framework and some popular tools from the React ecosystem. These include React Query for managing server data state, React Hook Form for handling forms, Tailwind CSS for styling, and Headless UI for common UI components. We will also use NextAuth.js as our authentication solution.

For the backend development, we will use the Phoenix Framework to create the API that serves our frontend. We will use Ecto to interact with the MySQL database and Pow to secure our API with authentication.

Development environment

First of all, you need to set up your development environment:

  • The Phoenix Framework provide the detail installation docs, so please follow these.
  • For frontend side, please make sure you in Node.js 16.8 or later
  • Please install MySQL as we will use it as our database.

--

--