defmodule SyntropyWeb.Router do use SyntropyWeb, :router pipeline :browser do plug :accepts, ["html"] plug :fetch_session plug :fetch_live_flash plug :put_root_layout, html: {SyntropyWeb.Layouts, :root} plug :protect_from_forgery plug :put_secure_browser_headers end pipeline :api do plug :accepts, ["json"] plug SyntropyWeb.Plugs.ApiAuth end pipeline :api_public do plug :accepts, ["json"] end scope "/api", SyntropyWeb.Api, as: :api do pipe_through :api_public get "/health", StatusController, :health get "/ready", StatusController, :ready end scope "/api", SyntropyWeb.Api, as: :api do pipe_through :api get "/cluster", ClusterController, :show get "/agents", AgentController, :index get "/agents/:id", AgentController, :show get "/tasks", TaskController, :index get "/tasks/:id", TaskController, :show post "/tasks", TaskController, :create get "/runs", RunController, :index get "/runs/:id", RunController, :show post "/runs", RunController, :create get "/history", HistoryController, :index get "/history/:id", HistoryController, :show get "/recommendations", RecommendationController, :index get "/recommendations/:id", RecommendationController, :show get "/events", EventController, :index end scope "/", SyntropyWeb do pipe_through :browser live "/", LatticeLive, :index live "/tasks", TasksLive, :index live "/history", HistoryLive, :index live "/agent/:id", AgentLive, :show end end