phi
Hi all,
I’m just getting back to learning Phoenix 1.7 after a small hiatus and I’m building a simple one-page site that connects to a Marketing Email API. Maybe I’m overthinking it, but I was wondering where one would go about placing an Elixir wrapper file for the API integration?
I was thinking it would just go in lib/hello/mailchimp.ex for example, or is there a better organization structure? Doesn’t really matter this specific small project, but was thinking for larger projects I could have many such files.
Thanks for any help!
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Hello,
I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind.
However, when I launch mix phx.server, I get an error...
New
Hi everyone.
My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
Hello folks!
So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
I’m working on a small exercise involving update_in/3, and I came up with this solution:
data = %{
name: "Periodic Table",
category:...
New
How Can I Optimise Compile Time Dependencies
I have been building an elixir application for about 2 years now. Many modules and files ha...
New
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
- #ai
- #full-time-contract
- #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 8 to 1- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
phi
Agreed, especially coming from large monolithic Rails apps, I’ve noticed a lot of engineers prefer things set up very precisely, which now looking back, the PTSD from those experiences is probably why I posted the question to begin with
phi
I always appreciate the contrary opinions, and I do agree especially for smaller projects.
The one downside I see from working with other engineers is that for larger projects they might judge you for having many files in a flat structure (and possibly the same with people that look through the codebase looking to hire you, although one would hope code quality would weigh more heavily).
dimitarvp
Yeah same and I do agree with your stance, it’s just that as you said it’s basically an aesthetic suggestion for anybody else who doesn’t use fuzzy searching and/or people browsing the project from GitHub’s web UI.
Beyond those use cases the relative path of the module indeed has zero value.
gregvaughn
I’ll be the contrary voice. I would not create a subdirectory until it is needed
I’ve dealt with codebases that over time had all sorts of different opinions on how to organize the source code. I learned to fuzzy find a module by name in my preferred editor. I almost never even notice the directory structure when I’m coding.
It is important to understand that at runtime all modules are in one flat namespace. Runtime relationships between modules are much more important than where the source is on the filesystem. I think of it like code “in action” is runtime and code “at rest” is directories on the filesystem. Yes, some people want to use the filesystem to suggest those runtime relationships, and that’s admirable, but it also can become incorrect. The source of truth is the runtime.
whoiswentz
I like to place all my third-party code inside
lib/external/<service_name>/<feature>.exdimitarvp
Elixir being both (a) explicit and (b) giving freedom can really be paralyzing. Many people, myself from the past included, were being PTSD’d into submission by very opinionated frameworks.
krasenyp
I second that. I keep seeing people being afraid of creating directories in
lib/and sometimes even reach for umbrella project.dimitarvp
If you want to future-proof it a little then something like
lib/third-party/<service>.exis an okay way to go about it.