Newbie needs some guidance - I want to build an incredible tool!

Introduction (you can skip it)

Hello dear Elixir community,

I am very new to programming, I never did any studies around it, and I even don’t have a scientific background.

Now, I have a nice project idea and I’m not alone thinking it is nice.
It would be an application to make you able to reference products you own, and then send you notifications for their good maintenance. I’m from France, and in France, data says 50% of failures come from a lack of maintenance. It represents 14 millions household appliances per year.

I’m not a passionate of programming as many of you probably are.

But I’m a hard working person when I believe in what I do, and I truly believe my project can bring something good to the world, by making us able to keep longer the products we own. The long-term vision is also far bigger, because such a tool with many products referenced and accounted could become a global observatory to gain more transparency about our products life (the data which are currently kept private inside after-sale services).

I’m at the very begining, but I’m pressed, cause the world isn’t waiting. I already made an app (in french) that I could translate and show you if you’re interested.
But this app is currently all made on Adalo, which is a no-code tool that allow you to create and then publish native apps (which is crucial to send push notifications).
But Adalo doesn’t allow me to develop the feature I want, and for that, I’ll need to make my own back-end, and plug it to my Adalo app through an API.

My brother is a developer, and he is really really good at what he does.
He helped me for other side projects (mostly artistic ones) by the past.
He will also help me in the future with this current project.

But I also need to put hands in the mechanics of programming if I want my application to advance as fast as I need it. To be transparent, I’m currently full time on this project, and I estimate that I only have 17 months to make it viable. My brother is not at all full-time on it, and he will be able to allow me only a few hours per week, so I have to be more autonomous on what I’m doing.

More succint problem description

I’m a newbie on programming. I’m currently starting with Elixir and Phoenix framework to developp an API for a native application (and then probably a full native application).

I’m following Phoenix Guides (which I adapt to my project), and I’m currently stucked at the Context Guide.

More precisely, I did the first steps and things are working correctly, except:

  1. Adding Catalog Functions: I don’t see the view updating on the screen. However, logs seems to be exactly what is described in the guide.
↳, at: lib/prepair_web/controllers/product_controller.ex:32
[debug] QUERY OK source="products" db=0.4ms queue=0.5ms idle=1790.1ms
UPDATE "products" AS p0 SET "views" = p0."views" + $1 WHERE (p0."id" = $2) RETURNING p0."views" [1, 1]
↳ Prepair.Data.inc_page_views/1, at: lib/prepair/data.ex:116
  1. In-context Relationships: I can see the correct select form I put in the product_form.html.heex template, and it contains the sample categories I put in the seeds.exs. I can only select one category as I modified the multiple option to false. But I can select a category. It seems OK.
    However, after I added (or updated) a product, the category list item I put in the show.html.heex template is empty from any value.
    In the logs below, I can see the link with the product_categories join in the database seems to happen.
[debug] Processing with
  Parameters: %{"id" => "1"}
  Pipelines: [:browser]
[debug] QUERY OK source="products" db=0.8ms idle=635.5ms
SELECT p0."id", p0."bought_new", p0."country_of_origin", p0."date_of_purchase", p0."date_of_registration", p0."description", p0."end_year", p0."image", p0."in_service", p0."manufacturer_name", p0."name", p0."notifications", p0."original", p0."parts", p0."profile", p0."reference", p0."serial_number", p0."start_year", p0."user", p0."user_manual", p0."warranty_duration", p0."views", p0."inserted_at", p0."updated_at" FROM "products" AS p0 WHERE (p0."id" = $1) [1]
↳ Prepair.Data.get_product!/1, at: lib/prepair/data.ex:40
[debug] QUERY OK source="categories" db=1.0ms idle=636.5ms
SELECT c0."id", c0."average_lifetime", c0."image", c0."name", c0."notifications", c0."product", c0."inserted_at", c0."updated_at", p1."product_id"::bigint FROM "categories" AS c0 INNER JOIN "product_categories" AS p1 ON c0."id" = p1."category_id" WHERE (p1."product_id" = ANY($1)) ORDER BY p1."product_id"::bigint [[1]]
↳, at: lib/prepair_web/controllers/product_controller.ex:32
[debug] QUERY OK source="products" db=0.7ms idle=637.8ms
UPDATE "products" AS p0 SET "views" = p0."views" + $1 WHERE (p0."id" = $2) RETURNING p0."views" [1, 1]
↳ Prepair.Data.inc_page_views/1, at: lib/prepair/data.ex:116

I’m a bit lost, so any help is very welcome!

I’ll very probably have other questions soon as my project will go further :slight_smile:


Hey @Guy14 welcome! Can you push your code up to github? The kinds of questions you’re asking are going to be a lot easier to answer if we can see and run the code.

As a general rule when you ask a question about the behavior of some code, you need to also include that code, otherwise it is very hard to help just off us imagining what your code might look like! :smiley:


Welcome to the forum. :heart:

Can you talk about the use-cases of that project? The way I understand it so far:

  1. It will serve as a personal inventory tracker – like here’s where we keep the data that we have a fridge of this and that brand and we bought it at JUNE 2019 and has warranty up until JUNE 2021, our stove is this brand and is bought e.g. AUGUST 2021 but has no warranty, etc.?
  2. It will also serve as a reminder telling you “call a washing machine handyman and ask him to inspect it”?

You can always find help about certain technical problems but it’s also important that you’re focusing on the right ones. For example a counter not updating might mean your Phoenix app is not created with LiveView?


Welcome to the forum Guillaume! :023:

It’s great to see how enthusiastic you are about your project - with enough dedication I am sure you will be able to achieve your goals! :smiley: With that said I’d like to share some tips:

  • Firstly as Ben mentioned when posting on the forum you need to provide people with enough information so that they can picture the problem you are facing in order to help you. This means explaining what you are trying to do, providing code, what you have tried, error messages etc.

  • Secondly, it’s not clear from your post what you have tried so far in learning Elixir and Phoenix but if you haven’t done much on that front yet I would encourage you to spend a few months on it - you’ll be glad you did in the long run.

Also check out our #learning-resources:books and #learning-resources:courses - we’re really lucky that Elixir has so many! If you click through the threads you’ll often see reviews that people have left, and if you look through the #learning-questions-discussions:learning-questions section you’ll find recommendations for people coming to Elixir at all sorts of levels.

Good luck and keep us posted on how you get on!


I would add to all said before that if you want to get both help in how to design the product and how to solve technical problems, it will be very hard for us to guide you, just from the lack of the context.

If you are willing to make the project open-source or at least partly open-source, then it will be easier for us to guide you on how to make the best decisions based on our experience.


Thanks a lot for all your kind welcoming words and answers!! :heart:

@benwilson512, thank you for giving me the good practices, I will follow this way! Here is the code:
As you will see, I’m mostly following the Phoenix Guides for the moment.

@dimitarvp, this is exactly what you understood, but the reminders will more be oriented to make you better at doing the maintenance yourself, this is the first goal. Then, if a lot of people reference their products on the app, it will also be a good place for every spare parts vendors to propose their services. And people will not have to search for the spare parts: spare parts will be indexed on the products referenced on your profile.

@AstonJ, I followed Ben guidance and uploaded my debut code on Github. I’m really new to programming. I used to do some side projects in Rust with my brother, but without him I wouldn’t have done anything on them. I recently read and made exercises with “The Joy of Elixir” which I found really nice as a starter for my level. Now I’m following the Phoenix Guides that I read very attentively, and I want to practice directly on “the big thing” I have in mind, because I don’t have much time, and people are already waiting for my MVP.

@D4no0, The first vision of my project is open-source. I also want to provide open-data if it works as I expect, to become a really transparent observatory tool. A kind of Open Food Facts, but for manufactured products instead of food. I planned to write a manifesto to explain the philosophy of this project. I hope I will find the time to do so (in french, my native language, and then I could translate it to english to internationalize the project). If I want to preserve the open-source philosophy of this project, I’ll need to convince rapidly many users to join the app. A strong community on the first tool of that kind would probably discourage another bigger private actor to do a fork and market the solution with another (non-open) vision. This is currently part of the challenge, and this is beautiful to think of.

I spent a lot of time to understand better how git works today. I hope I will advance a bit more on features tomorrow :slight_smile: (still following the Phoenix Guides at this point!).


This is a great thing that you want to open-source such a useful tool. God bless you!

This is sadly the reality, we have to fight nowadays in open-source for freedom, enterprise open-source sadly is a dirty place to live (as Red Hat showed recently, but I can’t blame them). The only thing I am sure of is that elixir/erlang community exceeded in how open-source software should be designed and delivered, this is one of the things that makes me cling to this community,

I am definitely not an expert on French consumer protection laws (or a lawyer at all) but you should consider consulting somebody who IS both of those things to write up a “Terms of Use” document to prevent nightmares like “the instructions were wrong and I broke my appliance, now I’m suing YOU!!!”

Sorry guys for my late answer!

@al2o3cr thanks for your input on this project! For sure, we will have to say somewhere in the app conditions that we proudly encourage everyone to understand better the products it owns, and to be comfortable with maintaining them. But at the same time, that we disclaim for any harm caused to the products. It’s true that we cannot handle such a risk, and we clearly don’t target customers that would look for money by attacking us…

@D4no0 thank you for your encouragements :slightly_smiling_face:

By the way, does anyone found in the code I published what could be the cause of the lacking « view update » on the product show page, and the lacking categories as well?

I’m advancing on the comprehension of other functionalities, but those above are still unfixed.

It looks to me that you are not setting your categories in your product Changeset.
Look at the sql when you create or update, so you see that table being changed.