quazar
Suggestion for new app architecture
I am planning a new app which will have web app and desktop desktop counterpart using electron. This would be my first production phoenix project and also first electron project. I would love some suggestion from experience people who has worked with this or similar stacks. Below is my planned tech stack, if possible please share your experience, best practices and tech advice.
- API written in phoenix framework
- Authentication using Guardian
- Web app build with angular 6
- Electron app with angular 6
- Webpack for asset management
- No channels for now but will implement it later for fast search.
I’ll need some advice on
- How to manage frontend angular assets for phoenix and electron. Its one of my main concern. Duplication can turn into nightmare.
- API versioning to so I can deploy web app daily while update desktop app less frequently.
- Website will have some public content part that should be visible to public, search engines and fast to load. I am not sure angular is best fit for such content. If I separate it out as plain html, it would create duplication. Server side rendering is possible with phoenix? If possible how’s your experience with it? I haven’t worked with anything beyond angularjs 1.2 and new version has changed a lot.
- How do you deploy phoenix? I have a build server on linode 1 GB instance and its super slow. Takes around 20-25 min to build release.
Any suggestions are welcome…
Most Liked
kokolegorille
It seems You have already choosen your stack, but let me give You my 2 kopecks…
- You can use Absinthe/GraphQL as API
- You can use Phoenix Token instead of Guardian
- Definitively use channels, there is good js support
But as always… it depends on situation 
PS: I build release on a Linux box, similar to the one I deploy too, and just transfer the tar file.
sribe
Most of it (the ERTS runtime) is the same every time. Expand locally and rsync up (with z flag), you’ll be moving very little data.
LostKobrakai
There not even need to expand something. Distillery can skip the compressing step and just update the plain files in the release folder.








