Skip to content

This is gonna be backend for backer (pun intended) project built in elixir.

Notifications You must be signed in to change notification settings

virkillz/backerbackend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backerbackend

Many project require admin panel. This is a simple boilerplate for admin panel using phoenix. It already have user authentication. And modified HTML generator to make it slightly nicer.

Everytime you need a project which require backend admin portal, clone this and continue. Save several hours of mine.

Screenshot

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Check your database setting at config/dev.exs and match your postgresql credential
  • Create and migrate your database with mix ecto.create && mix ecto.migrate
  • Install Node.js dependencies with cd assets && npm install
  • Run seed mix run priv/repo/seeds.exs (if you are from asset folder, dont forget to back to root project folder cd ..)
  • Start Phoenix endpoint with mix phx.server
  • Login with username 'administrator' and passsword 'administrator'

Now you can visit localhost:4000 from your browser.

Add other data!

You can start do the regular way, using generator or such. For example:

mix phx.gen.html Content Post post title:string content:string is_published:boolean

OR

mix backerbackend.gen.html Content Post post title:string content:string is_published:boolean

The later one will give nicer html output.

Put resources "/post", PostController in the router /lib/Yourapp_web/router.ex

Run migration mix ecto.migrate

Add link to your menu at '/lib/Yourapp_web/templates/layout/app.html.eex'

Now you got CMS!

I know its not a lot. Just spend half day doing this. But It cound save me hours everytime I need admin panel.

TODO LIST:

  • Sign in - sign out activity record
  • Modify generated template
  • Fix activity display and remove delete button
  • Boilerplate for notification, probably use channel?

About

This is gonna be backend for backer (pun intended) project built in elixir.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published