Skip to content
The web framework for Golang
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/uadmin Updated documentation link in uadmin command Apr 13, 2019
colors complying with gofmt Dec 22, 2018
docs Changed version from 0.1.0-rc to 0.1.0 Apr 25, 2019
helper fixing go lint errors Dec 22, 2018
static unit tests for 0.1.0-rc1 Dec 19, 2018
templates/uadmin unit tests for rc1 Dec 22, 2018
.gitlab-ci.yml clean up CLCI file Oct 24, 2018
.travis.yml edit .travis Dec 17, 2018
404_handler.go unit tests for 0.1.0-rc1 Dec 19, 2018
404_handler_test.go unit test for rc1 Dec 21, 2018
CHANGELOG.md Version 0.1.1 May 11, 2019
CONTRIBUTES.md Replaced image to Google screen for link tag Apr 24, 2019
LICENSE add license and contributers Oct 20, 2018
README.md Transferred additional installation instructions to Getting Started Feb 9, 2019
admin.go tests for rc1 Dec 23, 2018
admin_test.go unit tests for 0.1.0-rc1 Dec 19, 2018
api_handler.go unit tests for apiHandler Dec 19, 2018
api_handler_test.go unit test for rc1 Dec 21, 2018
auth.go test units from rc1 Dec 17, 2018
auth_test.go unit tests for 0.1.0-rc1 Dec 18, 2018
crop_image_handler.go test units from rc1 Dec 17, 2018
crop_image_handler_test.go tests for rc1 Dec 22, 2018
dashboard_menu.go unit test for rc1 Dec 21, 2018
dashboard_menu_test.go unit test for rc1 Dec 21, 2018
data.go Initial commit Oct 20, 2018
db.go BUGFIX: GetID received reflect.Value May 12, 2019
db_test.go unit tests for apiHandler Dec 19, 2018
delete_handler.go unit test for rc1 Dec 21, 2018
delete_handler_test.go unit test for rc1 Dec 21, 2018
encrypt.go Unit test for ver 0.1.0 Dec 10, 2018
encrypt_test.go running gofmt of source code Dec 22, 2018
export.go tests for rc1 Dec 23, 2018
export_test.go unit tests for 0.1.0-rc1 Dec 19, 2018
forgot_password_handler.go Initial commit Oct 20, 2018
forgot_password_handler_test.go unit tests for 0.1.0-rc1 Dec 19, 2018
form_handler.go Added examples in new API functions Mar 18, 2019
form_handler_test.go tests for rc1 Dec 22, 2018
generate_translation.go Added examples in new API functions Mar 18, 2019
generate_translation_test.go unit tests for rc1 Dec 22, 2018
get_display_name.go Add automated translation file sync Oct 22, 2018
get_form_data.go running gofmt of source code Dec 22, 2018
get_list_data.go tests for rc1 Dec 23, 2018
get_schema.go running gofmt of source code Dec 22, 2018
get_schema_test.go tests for rc1 Dec 23, 2018
global.go Version 0.1.1 May 11, 2019
grouppermission.go BUG FIX:fix some uadmin tags to the new format Nov 12, 2018
home_handler.go make tanslate function public Oct 24, 2018
home_handler_test.go unit tests for rc1 Dec 22, 2018
language.go unit tests for rc1 Dec 22, 2018
list_handler.go unit tests for rc1 Dec 22, 2018
list_handler_test.go unit tests for rc1 Dec 22, 2018
log.go BUG FIX: read logs's table name is not loswered Nov 13, 2018
login_handler.go tests for rc1 Dec 23, 2018
login_handler_test.go tests for rc1 Dec 23, 2018
logout_handler.go Initial commit Oct 20, 2018
main_handler.go add session to 404 parameters Oct 24, 2018
main_handler_test.go unit test for rc1 Dec 21, 2018
media_handler.go Public Access to Media and Allow tags in HTML Oct 31, 2018
model.go Initial commit Oct 20, 2018
new_model.go unit test for rc1 Dec 21, 2018
otp.go Updated documentation link in uadmin command Apr 13, 2019
password_reset_handler.go add session to 404 parameters Oct 24, 2018
process_form.go Revised LogEdit position Mar 19, 2019
process_upload.go Version 0.1.1 May 11, 2019
profile_handler.go unit test for rc1 Dec 21, 2018
profile_handler_test.go tests for rc1 Dec 23, 2018
register.go unit tests for 0.1.0-rc1 Dec 18, 2018
representation.go running gofmt of source code Dec 22, 2018
revert_log_handler.go Remove debug lines Nov 13, 2018
schema.go BUG FIX: Fix add new link for fk Nov 27, 2018
send_email.go HTML Support in Sending Email Mar 9, 2019
send_email_test.go unit tests for 0.1.0-rc1 Dec 19, 2018
server.go fixing go lint errors Dec 22, 2018
server_test.go tests for rc1 Dec 23, 2018
session.go BUG FIX:fix some uadmin tags to the new format Nov 12, 2018
trail.go Initial commit Oct 20, 2018
translation.go Added examples in new API functions Mar 18, 2019
upload_image_handler.go unit tests for apiHandler Dec 19, 2018
user.go test units from rc1 Dec 17, 2018
usergroup.go Initial commit Oct 20, 2018
userpermission.go Initial commit Oct 20, 2018

README.md

uAdmin the Golang Web Framework

Easy to use, blazing fast and secure.

go report card GoDoc codecov Build Status License: MIT

Originally open source by IntegrityNet Solutions and Services

For Documentation:

Social Media:

Screenshots

Dashboard Menu

Dashboard  

Log

Log  

Login Form

Login Form  

Features

  • API configuration
  • Authentication and Permissions
  • Clean and sharp UI
  • Dashboard customization
  • Database schema migration
  • Export to Excel
  • Image cropping
  • IP address and port configuration
  • Log feature that keeps track of many things in your app
  • Multilingual translation
  • MySQL Database Support
  • Offers FREE hosting for your app while you are developing by using a single command: uadmin publish
  • Pretty good security features (SSL, 2-Factor Authentication, Password Reset, Hash Salt, Database Encryption)
  • Public access to media
  • Self relation of foreign key/many2many
  • Sending an email from your app by establishing an email configuration
  • Tag support for fields
  • Validation for user input

Minimum requirements

Operating System Architectures Notes
FreeBSD 10.3 or later amd64, 386 Debian GNU/kFreeBSD not supported
Linux 2.6.23 or later with glibc amd64, 386, arm, arm64, s390x, ppc64le CentOS/RHEL 5.x not supported. Install from source for other libc.
macOS 10.10 or later amd64 Use the clang or gcc that comes with Xcode for cgo support.
Windows 7, Server 2008 R2 or later amd64, 386 Use MinGW gcc. No need for cygwin or msys.
  • A C compiler is required only if you plan to use cgo.
  • You only need to install the command line tools for Xcode. If you have already installed Xcode 4.3+, you can install it from the Components tab of the Downloads preferences panel.

Hardware

  • RAM - minimum 256MB
  • CPU - minimum 2GHz

Software

  • Go Version 1.10.3 or later

Installation

$ go get -u github.com/uadmin/uadmin/...

To test if your installation is fine, run the uadmin command line:

$ uadmin
Usage: uadmin COMMAND [-e email] [-d domain]
This tools allows you to publish your project online

Commands:
  publish         This publishes your project online
  prepare         Generates folders and prepares static and templates
  version         Shows the version of uAdmin

Arguments:
  -e, --email     Your email. This is required for you to be able to maintain your project.
  -d, --domain    You can choose your domain name which will customize your URL

Get full documentation online:
https://uadmin.io/docs/

Your First App

Let's build your first app which is a Todo list. First, we will create a folder for your project and prepare it.

$ mkdir -p ~/go/src/github.com/your_name/todo
$ cd ~/go/src/github.com/your_name/todo
$ uadmin prepare
[   OK   ]   Created: /home/abdullah/go/src/github.com/uadmin/todo1/models
[   OK   ]   Created: /home/abdullah/go/src/github.com/uadmin/todo1/api
[   OK   ]   Created: /home/abdullah/go/src/github.com/uadmin/todo1/views
[   OK   ]   Created: /home/abdullah/go/src/github.com/uadmin/todo1/media
[   OK   ]   Created: /home/abdullah/go/src/github.com/uadmin/todo1/static
[   OK   ]   Created: /home/abdullah/go/src/github.com/uadmin/todo1/templates

Now use your code editor to create main.go and put this code inside it.

package main

import (
	"github.com/uadmin/uadmin"
	"time"
)

type Todo struct {
	uadmin.Model
	Name        string
	Description string `uadmin:"html"`
	TargetDate  time.Time
	Progress    int `uadmin:"progress_bar"`
}

func main() {
	uadmin.Register(Todo{})
	uadmin.StartServer()
}

Now to run your code:

$ go build; ./todo
[   OK   ]   Initializing DB: [9/9]
[   OK   ]   Initializing Languages: [185/185]
[  INFO  ]   Auto generated admin user. Username: admin, Password: admin.
[   OK   ]   Server Started: http://0.0.0.0:8080
         ___       __          _
  __  __/   | ____/ /___ ___  (_)___
 / / / / /| |/ __  / __  __ \/ / __ \
/ /_/ / ___ / /_/ / / / / / / / / / /
\__,_/_/  |_\__,_/_/ /_/ /_/_/_/ /_/

Publish your app

To take your app live, it is simple:

$ uadmin publish
Enter your email: me@example.com
Your project will be published to https://my-proj.uadmin.io
Enter the name of your sub-domain (my-proj) [auto]: my-app
Did you change the default port from 8080?
This is the port you have in uadmin.Port = 8080
Enter the port that your server run on [8080]:
[   OK   ]   Compressing [420/420]
[   OK   ]   Your application has been uploaded
[   OK   ]   Application installed succesfully
[   OK   ]   Your Project has been published to https://my-app.uadmin.io/

Quick Reference

Overriding Save Function

func (m *Model)Save(){
	//business logic
	uadmin.Save(m)
}

Validation

func (v Validate) Validate() (ret map[string]string) {
  ret = map[string]string{}
  if v.Name != "test" {
    ret["Name"] = "Error name not found"
  }
  return
}
You can’t perform that action at this time.