Skip to content

Phoenix 1.6 example app with auth provided by mix phx.gen.auth converted to live view plus avatar uploads backed by it.

License

Notifications You must be signed in to change notification settings

karolsluszniak/live_auth_and_avatars-phoenix-1.6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phoenix 1.6 example app with live auth and avatars

Sponsored by Hawku.

Features

This repo includes a sample Phoenix app that may be useful to kickstart an own project with a foundation for a web app driven by live views thanks to following features:

  • Application generated by mix phx.new
  • Preconfigured ex_check making all code checks & tests runnable via mix check
  • Preconfigured phoenix_live_controller enabling live controllers with consistent auth
  • Accounts management generated by mix phx.gen.auth
  • Home, login, registration and profile settings converted to live views navigated w/o redirects
  • Profile settings extended with validated Twitter handle field
  • Profile settings extended with avatar upload powered by live view, waffle and S3
  • All controller tests converted to live view tests

Follow the commit history to see how each was implemented.

Usage

To start the server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

To start with S3 uploads enabled:

  • Authorize with export AWS_ACCESS_KEY_ID=x AWS_SECRET_ACCESS_KEY=y AWS_S3_BUCKET=z
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.


Project & OTP app is called outer with all modules called Outer - feel free to find & replace to start own project.

About

Phoenix 1.6 example app with auth provided by mix phx.gen.auth converted to live view plus avatar uploads backed by it.

Topics

Resources

License

Stars

Watchers

Forks