zenw0lf
Hello all!
For those wanting to try your hands at Elixir / Phoenix, I wrote a comprehensive tutorial on doing a simple JSON API with said technologies.
Touches on everything: From language installation, app creation, schemas and endpoints, CORS configuration, simple authentication, to sessions (with cookies) and a bit of testing.
I updated it to latest Phoenix version:
Building a JSON API in Elixir with Phoenix 1.5+
Updated link: Build a JSON API with Phoenix · lobo_tuerto's notes
Any feedback is appreciated!
Trending in Guides/Tuts
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #ai
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
drakvuf
Thanks! It’s a really nice tutorial.
zenw0lf
You are welcome!
AstonJ
I’ve also bookmarked it
(will go thro it when I’ve finished reading Programming Phoenix)
Thanks - we could definitely do with more tuts like this
zenw0lf
I’m thinking about writing one about building a basic GraphQL API with Phoenix and Absinthe in Elixir.
Could also touch on writing a frontend for it using Vue.js + Apollo.
Let me know if this sounds interesting to you people.
gshaw
I’d be interested an updated GraphQL tutorial.
AstonJ
I’d be interested in one for…
(can you tell I’d like to minimise JS!)
And then perhaps:
You could start a poll btw “What kind of tutorial would you like to see?” and see what kind of response you get
Nullstrike
Vue.js + apollo would be great.
jswny
Great tutorial! I really appreciate your style of tutorial (I can tell you have thought it through from the introduction)! I’m glad that you went through a bit of testing, which is often neglected these days. Even including things like custom 500 error pages is really nice because these are the things people just glaze over in their tutorials.
I am actually about to start a project where I need to setup Phoenix for a JSON API and I have been wondering about how to do authentication (JWT, API keys, etc.). I’m really glad I came across your tutorial since the session based method that you use seems the most simple and straight forward to me, and it’s in line with much of the authentication I’ve done in the past for Phoenix apps with interfaces.
Thanks again, great work and I really like your blog as well
zenw0lf
Ok, I’ve thinking about the poll idea, and here is the stuff I’ve come up with:
Those are the 3 things I’ve been wanting to dabble in, and plan to get a tutorial out of them.
For the GraphQL API one, it’d be similar to the JSON API one, but you’ll have GraphQL endpoints ready for use with something like
vue-apollo.For the static site generator, I’m currently working on one, the idea is to use it for my own blog to replace Hugo , since I can’t really stand its templating language
And as for the game server, probably will go for a multiplayer Battleship game using Phoenix and WebSockets.
Let me know what y’all think. Thx.
ibarch
Just FYI, there is a nice book about writing Battleship game using Elixir and Phoenix Channels. The game in the book is called Islands, but it’s the same thing. You would better pick a unique game to attract more readers.