diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 00000000..da035de2
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 00000000..cee7cf51
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/torrent-project.iml b/.idea/torrent-project.iml
new file mode 100644
index 00000000..5e764c4f
--- /dev/null
+++ b/.idea/torrent-project.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 00000000..94a25f7f
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/main.go b/main.go
new file mode 100644
index 00000000..5cec422c
--- /dev/null
+++ b/main.go
@@ -0,0 +1,72 @@
+package main
+
+import (
+ "flag"
+ "fmt"
+ "github.com/gorilla/mux"
+ "github.com/gorilla/websocket"
+ "html/template"
+ "log"
+ "net/http"
+ "os"
+ "time"
+)
+
+var (
+ httpAddr = flag.String("addr", ":8000", "Http server address")
+ baseTmpl string = "templates/base.tmpl"
+
+ APP_ID = os.Getenv("APP_ID")
+ APP_SECRET = os.Getenv("APP_SECRET")
+)
+
+var upgrader = websocket.Upgrader{
+ ReadBufferSize: 1024,
+ WriteBufferSize: 1024,
+}
+
+func serveHome(w http.ResponseWriter, r *http.Request) {
+ s1, _ := template.ParseFiles("templates/home.tmpl")
+ s1.ExecuteTemplate(w, "base", map[string]string{"APP_ID": APP_ID})
+}
+
+func main() {
+
+ r := mux.NewRouter()
+
+ r.HandleFunc("/", serveHome)
+ http.Handle("/static/", http.FileServer(http.Dir("public")))
+ http.Handle("/", r)
+ http.HandleFunc("/websocket", func(w http.ResponseWriter, r *http.Request) {
+ conn, err := upgrader.Upgrade(w, r, nil)
+ if err != nil {
+ log.Println(err)
+ return
+ }
+ for {
+ msgType, msg, err := conn.ReadMessage()
+ if err != nil {
+ fmt.Println(err)
+ return
+ }
+ if string(msg) == "ping" {
+ fmt.Println("ping")
+ time.Sleep(2 * time.Second)
+ err = conn.WriteMessage(msgType, []byte("pong"))
+ if err != nil {
+ fmt.Println(err)
+ return
+ }
+ } else {
+ conn.Close()
+ fmt.Println(string(msg))
+ return
+ }
+ }
+ })
+ if err := http.ListenAndServe(*httpAddr, nil); err != nil {
+ log.Fatalf("Error listening, %v", err)
+ }
+
+ //
+}
diff --git a/projectFilesBackup/.idea/workspace.xml b/projectFilesBackup/.idea/workspace.xml
new file mode 100644
index 00000000..866e12c0
--- /dev/null
+++ b/projectFilesBackup/.idea/workspace.xml
@@ -0,0 +1,172 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ DEFINITION_ORDER
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/static/css/gridbase.css b/public/static/css/gridbase.css
new file mode 100644
index 00000000..a53b771c
--- /dev/null
+++ b/public/static/css/gridbase.css
@@ -0,0 +1,120 @@
+* {box-sizing: border-box;}
+.wrapper {
+ display: grid;
+ grid-gap: 10px;
+ width: 100%;
+ height: 100%;
+ background-color: #F8F9F9;
+ grid-template-columns: 200px 1fr;
+
+}
+
+.box {
+ background-color: #F2F3F4;
+ border-radius: 1px;
+
+}
+
+.navcolumn {
+ grid-column: 1;
+ grid-row: 2 / span 2;
+ border-style: double;
+}
+
+.navcolumnImage {
+ padding-right: 10%;
+ vertical-align: middle;
+}
+
+.liNavcolumn {
+ padding: 0;
+}
+
+.liNavcolumn:hover {
+ background-color: grey;
+
+}
+
+.navsettings {
+ grid-column: 1 / span 2;
+ grid-row: 1;
+ border-style: double;
+ max-height: 80px;
+}
+
+.imagezoom {
+ height: 50px;
+}
+
+
+.imagezoom:hover {
+ background-color: grey;
+}
+
+
+.torrentlist {
+ grid-column: 2;
+ grid-row: 2;
+ border-style: double;
+ min-height: 400px;
+}
+
+.torrentdetails {
+ grid-column: 2;
+ grid-row: 3;
+ border-style: double;
+ min-height: 100px;
+}
+
+ul.none {
+ list-style-type: none;
+ padding: 0 2% 0 0;
+}
+
+ul.navsettingsUl {
+ list-style-type: none;
+ margin: 0;
+ padding-left: 0;
+}
+
+li.top {
+ display: inline;
+}
+
+
+hr {
+ border-width: 2px;
+ padding: 0;
+}
+
+.verticalLine {
+ border-left: solid grey;
+}
+
+table {
+ width: 100%;
+ border-collapse: collapse;
+}
+
+td, th {
+ border: 1px solid #dddddd;
+ text-align: left;
+ padding: 8px;
+ background-color: #3B83CB;
+}
+
+tr:nth-child(even) {
+ background-color: #dddddd;
+}
+
+.activeButton {
+ background-color: red;
+}
+
+.tab {
+ display: none;
+}
+
+.defaultTab {
+ display: initial;
+}
\ No newline at end of file
diff --git a/public/static/images/iconActiveTorrents.png b/public/static/images/iconActiveTorrents.png
new file mode 100644
index 00000000..c98be70f
Binary files /dev/null and b/public/static/images/iconActiveTorrents.png differ
diff --git a/public/static/images/iconAddTorrent.png b/public/static/images/iconAddTorrent.png
new file mode 100644
index 00000000..6e2653dc
Binary files /dev/null and b/public/static/images/iconAddTorrent.png differ
diff --git a/public/static/images/iconAddTorrentLink.png b/public/static/images/iconAddTorrentLink.png
new file mode 100644
index 00000000..f7929c3c
Binary files /dev/null and b/public/static/images/iconAddTorrentLink.png differ
diff --git a/public/static/images/iconDelete.png b/public/static/images/iconDelete.png
new file mode 100644
index 00000000..666dc00f
Binary files /dev/null and b/public/static/images/iconDelete.png differ
diff --git a/public/static/images/iconDownList.png b/public/static/images/iconDownList.png
new file mode 100644
index 00000000..c438dbe2
Binary files /dev/null and b/public/static/images/iconDownList.png differ
diff --git a/public/static/images/iconDownload.png b/public/static/images/iconDownload.png
new file mode 100644
index 00000000..2349d891
Binary files /dev/null and b/public/static/images/iconDownload.png differ
diff --git a/public/static/images/iconInactiveTorrents.png b/public/static/images/iconInactiveTorrents.png
new file mode 100644
index 00000000..99c8deeb
Binary files /dev/null and b/public/static/images/iconInactiveTorrents.png differ
diff --git a/public/static/images/iconPause.png b/public/static/images/iconPause.png
new file mode 100644
index 00000000..d317a7fe
Binary files /dev/null and b/public/static/images/iconPause.png differ
diff --git a/public/static/images/iconRSS.png b/public/static/images/iconRSS.png
new file mode 100644
index 00000000..59f1f019
Binary files /dev/null and b/public/static/images/iconRSS.png differ
diff --git a/public/static/images/iconScrollDown.png b/public/static/images/iconScrollDown.png
new file mode 100644
index 00000000..06c0af06
Binary files /dev/null and b/public/static/images/iconScrollDown.png differ
diff --git a/public/static/images/iconScrollUp.png b/public/static/images/iconScrollUp.png
new file mode 100644
index 00000000..99fca2e1
Binary files /dev/null and b/public/static/images/iconScrollUp.png differ
diff --git a/public/static/images/iconSettings.png b/public/static/images/iconSettings.png
new file mode 100644
index 00000000..045dd943
Binary files /dev/null and b/public/static/images/iconSettings.png differ
diff --git a/public/static/images/iconStart.png b/public/static/images/iconStart.png
new file mode 100644
index 00000000..e76a660b
Binary files /dev/null and b/public/static/images/iconStart.png differ
diff --git a/public/static/images/iconStop.png b/public/static/images/iconStop.png
new file mode 100644
index 00000000..13b9197b
Binary files /dev/null and b/public/static/images/iconStop.png differ
diff --git a/public/static/images/iconTorrent.png b/public/static/images/iconTorrent.png
new file mode 100644
index 00000000..96351fb1
Binary files /dev/null and b/public/static/images/iconTorrent.png differ
diff --git a/public/static/images/iconUpList.png b/public/static/images/iconUpList.png
new file mode 100644
index 00000000..7dfa68ee
Binary files /dev/null and b/public/static/images/iconUpList.png differ
diff --git a/public/static/images/iconUpload.png b/public/static/images/iconUpload.png
new file mode 100644
index 00000000..e68def0b
Binary files /dev/null and b/public/static/images/iconUpload.png differ
diff --git a/public/static/images/testicon.png b/public/static/images/testicon.png
new file mode 100644
index 00000000..c08f5bed
Binary files /dev/null and b/public/static/images/testicon.png differ
diff --git a/templates/home.tmpl b/templates/home.tmpl
new file mode 100644
index 00000000..6d12bb44
--- /dev/null
+++ b/templates/home.tmpl
@@ -0,0 +1,161 @@
+{{define "base"}}
+
+
+
+
+ torrent-project
+
+
+
+
+
+
+
+
+
All Torrents
+
Downloading
+
Uploading
+
Active
+
Inactive
+
+
+
+
+
+
+
+ Name |
+ Size |
+ Done |
+ Status |
+ Seeds |
+ Peers |
+ Down Speed |
+ Up Speed |
+ ETA |
+ Ratio |
+ Avail. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
General
+
General Information
+
+
+
+
Peers
+
+
+ IP |
+ Client |
+ Flags |
+ Percent |
+ Down Speed |
+ Up Speed |
+ Reqs |
+ Uploaded |
+ Downloaded |
+ Peer dl. |
+
+
+
+
+
+
Files
+
+
+ Name |
+ Size |
+ Done |
+ Percent |
+ Priority |
+
+
+
+
+
+
Speed
+
Speed Graph Here
+
+
+
+
Logger
+
Logger lines here
+
+
+
+
+
+
+