Skip to content

robinmonjo/switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Switch

To start your Phoenix app:

  • Install dependencies with mix deps.get
  • Create your database with mix ecto.create
  • Start Phoenix endpoint with mix phoenix.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more

TODOs

  • users can see every domains but can't update or delete them
  • super admin has full access and can add users
  • delete user (keep its domains)
  • remove the registration form (only super admin can register people)
  • test admin (domain controller / domain index)
  • change password users (me controller with show / edit / update)
  • migrate to phoenix 1.3 (watch this before: https://www.youtube.com/watch?v=tMO28ar0lW8)
  • new context and stuff + with in controller (not using context for now)
  • move cache to a new service and add info about hit number / last hit at / last hit IP (Gen server with ETS table that runs in phoenix supervision tree)
  • domain info service (check if it exists, whois, dig ...)
  • live cache consultation (using channels)
  • empty cache super admin
  • add domains via "chat bot" wiht an ELM client for the chat interface

TODO:

  • validate domains and redirect format (may do a custom validation with a DNS check to see if the redirected domain exists) => masterize this: https://hexdocs.pm/ecto/Ecto.Changeset.html
  • validate domain NX record in a background task (over engineering :))
  • validate name != redirect
  • validate uniqueness of name
  • invalidate cache when a domain get deleted
  • authentication from scratch

Mid project clean up

  • allow users to see all domains (even if they didn't created them)

  • prevent users to update or delete a domain they didn't created

  • manually invalidate cache

  • consult cache

  • manually recheck domain existence

  • last redirect_at

  • domains users pagination

Login flow:

  • generate invitation link (invitation token)
  • send this link
  • the guy can connect with email and add users
  • only super admin can generate link to invite people

About

Manage host redirection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published