Skip to content

Qor Admin - Instantly create a beautiful, cross platform, configurable Admin Interface and API for managing your data in minutes.

Notifications You must be signed in to change notification settings

TykTechnologies/raava-admin

This branch is 204 commits ahead of, 66 commits behind qor/admin:master.

Folders and files

NameName
Last commit message
Last commit date
Dec 8, 2021
Dec 8, 2021
Dec 14, 2021
Jun 21, 2021
Jun 21, 2021
Jun 21, 2021
Dec 23, 2016
Jun 21, 2021
Nov 16, 2021
Jun 21, 2021
Jul 27, 2020
Dec 8, 2021
Mar 5, 2018
Dec 8, 2021
Dec 27, 2016
Mar 3, 2016
Oct 19, 2017
Oct 19, 2017
Dec 8, 2021
Sep 30, 2021
Dec 8, 2021
Dec 8, 2021
Dec 8, 2021
Mar 1, 2021
Dec 8, 2021
Dec 13, 2021
May 9, 2017
Dec 8, 2021
Nov 19, 2021
Jun 21, 2021
Jul 24, 2018
Dec 22, 2017
Sep 30, 2021
Jan 3, 2018
Mar 6, 2018
Apr 23, 2018
Oct 18, 2017
Apr 21, 2021
Jul 2, 2021
Jan 3, 2018
Dec 8, 2021
Jun 21, 2021
Jul 5, 2021
Jun 21, 2021
Dec 13, 2021
Apr 5, 2017
Feb 19, 2021
Oct 17, 2017
Nov 20, 2017
Sep 27, 2017
Apr 21, 2021
Dec 13, 2021
Mar 9, 2018
Dec 8, 2021
Nov 19, 2021
Oct 17, 2017
Apr 27, 2017
Dec 24, 2018
Dec 8, 2021
Apr 27, 2017
Dec 8, 2021
Dec 8, 2021
Jun 24, 2021
Dec 8, 2021

Repository files navigation

Developer Portal Admin

Forked from qor/admin

Instantly create a beautiful, cross platform, configurable Admin Interface and API for managing your data in minutes.

GoDoc Build Status

For security issues, please send us an email to [email protected] and give us time to respond BEFORE posting as an issue or reporting on public forums.

Features

  • Generate Admin Interface for managing data
  • RESTFul JSON API
  • Association handling
  • Search and filtering
  • Actions/Batch Actions
  • Authentication and Authorization
  • Extendability

Quick Start

package main

import (
  "fmt"
  "net/http"
  "github.com/jinzhu/gorm"
  _ "github.com/mattn/go-sqlite3"
  admin "github.com/TykTechnologies/portal-admin"
)

// Create a GORM-backend model
type User struct {
  gorm.Model
  Name string
}

// Create another GORM-backend model
type Product struct {
  gorm.Model
  Name        string
  Description string
}

func main() {
  DB, _ := gorm.Open("sqlite3", "demo.db")
  DB.AutoMigrate(&User{}, &Product{})

  // Initialize
  Admin := admin.New(&admin.AdminConfig{DB: DB})

  // Allow to use Admin to manage User, Product
  Admin.AddResource(&User{})
  Admin.AddResource(&Product{})

  // initialize an HTTP request multiplexer
  mux := http.NewServeMux()

  // Mount admin interface to mux
  Admin.MountTo("/admin", mux)

  fmt.Println("Listening on: 9000")
  http.ListenAndServe(":9000", mux)
}

go run main.go and visit localhost:9000/admin to see the result!

Live DEMO

Documentation

https://doc.getqor.com/admin

To print all registered routes

// adm is a QOR admin instance
adm.GetRouter().PrintRoutes()

ViewPath Note

QOR was developed before go mod was introduced. So it still support go path while finding its template files. The priority is

  1. check vendor, if not found
  2. check $GOPATH/src/github.com/TykTechnologies/portal-admin/views, if still not found
  3. load view path from $GOPATH/pkg/mod/github.com/TykTechnologies/[email protected]/views. the version would be detected automatically by you go.sum file

So if you want to use the template under the pkg/mod, make sure $GOPATH/src/github.com/TykTechnologies/portal-admin is absent.

License

Released under the MIT License.

Frontend Development

Requires Node.js and Gulp for building frontend files

npm install && npm install -g gulp
  • Watch SCSS/JavaScript changes (hot-reload): gulp
  • Build Release files: gulp release

Update Developer Portal to use the latest version

We need the latest commit hash from portal-admin repo. You can get it from the GitHub repo, or:

From a local copy

We need to have the latest version of the master branch

# make sure we are in the correct branch
$ git checkout master
# get the lastest update
$ git pull
# display the hash from the las commit 
$ git log -1 --format='%H'

Now that we got the commit hash, we need to move to the local developer portal folder and do this

$ go get github.com/TykTechnologies/portal-admin@<commit-hash-here>

About

Qor Admin - Instantly create a beautiful, cross platform, configurable Admin Interface and API for managing your data in minutes.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 42.7%
  • Go 33.3%
  • SCSS 19.8%
  • CSS 4.2%