Skip to content

CodyGuo/uadmin

This branch is 29 commits behind uadmin/uadmin:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

365febb · Apr 3, 2023
Apr 3, 2023
Nov 22, 2022
Jul 2, 2019
Dec 23, 2022
Nov 22, 2022
Nov 25, 2022
Apr 28, 2021
Jul 2, 2019
Nov 14, 2022
Apr 28, 2021
Nov 14, 2022
Apr 28, 2021
Aug 7, 2020
Feb 17, 2020
Nov 25, 2022
Jul 28, 2020
Nov 16, 2022
Nov 14, 2022
Aug 2, 2020
Dec 12, 2022
Nov 14, 2022
Nov 14, 2022
Nov 14, 2022
Nov 22, 2022
Nov 14, 2022
Mar 7, 2023
Nov 14, 2022
Jul 4, 2019
Jul 4, 2019
Mar 7, 2023
Dec 12, 2022
Apr 8, 2022
Apr 3, 2023
Mar 4, 2023
Jan 24, 2023
Dec 26, 2019
Nov 25, 2022
Nov 25, 2022
Dec 7, 2022
Feb 1, 2023
Mar 4, 2023
Dec 23, 2022
Nov 25, 2022
Dec 7, 2022
Mar 4, 2023
Mar 4, 2023
Dec 7, 2022
Nov 25, 2022
Nov 16, 2022
Dec 7, 2022
Aug 2, 2020
Nov 14, 2022
Jul 2, 2019
Nov 11, 2022
Apr 3, 2023
Dec 7, 2022
Nov 14, 2022
Jul 10, 2021
Nov 14, 2022
Nov 17, 2022
Nov 14, 2022
Feb 20, 2023
May 5, 2021
Nov 14, 2022
Jul 4, 2019
Nov 14, 2022
Dec 12, 2022
Nov 25, 2022
May 29, 2022
Nov 14, 2022
Apr 3, 2023
Nov 14, 2022
Jul 2, 2019
Aug 2, 2020
May 29, 2022
Nov 11, 2022
Aug 2, 2020
Nov 27, 2022
Nov 14, 2022
Apr 3, 2023
Feb 20, 2023
Feb 20, 2023
Nov 17, 2022
Nov 14, 2022
Nov 14, 2022
Apr 28, 2021
Nov 14, 2022
Apr 7, 2021
Nov 14, 2022
May 28, 2022
Nov 14, 2022
Feb 28, 2023
Nov 16, 2022
Nov 25, 2022
Nov 14, 2022
Apr 28, 2021
Nov 22, 2022
Nov 14, 2022
Apr 8, 2022
Apr 28, 2021
Jul 10, 2021
Jul 10, 2021
Dec 23, 2022
Nov 22, 2022
Apr 3, 2023
Dec 12, 2022
Nov 11, 2022
Apr 3, 2023
Apr 28, 2021
Nov 14, 2022
Nov 16, 2022
Feb 27, 2023
Apr 8, 2022
Apr 8, 2022
Jul 10, 2021
Jul 10, 2021
Nov 14, 2022
Dec 7, 2022
Nov 14, 2022
Feb 9, 2023
Nov 14, 2022
Nov 11, 2022
Apr 3, 2023
Dec 26, 2019
Nov 16, 2022
Nov 14, 2022
Apr 28, 2021
Nov 14, 2022
Jul 4, 2019
Nov 16, 2022
Apr 8, 2022
Nov 11, 2022
Jan 2, 2020
Nov 16, 2022
Nov 11, 2022
Nov 11, 2022
Nov 11, 2022
Nov 11, 2022
Apr 3, 2023
Jan 25, 2023
Dec 31, 2019
Nov 17, 2022

Repository files navigation

uAdmin the Golang Web Framework

Easy to use, blazing fast and secure.

go report card GoDoc codecov License: MIT

Originally open source by IntegrityNet Solutions and Services

For Documentation:

join gophers.slack.com

Social Media:

Screenshots

Dashboard Menu

Dashboard  

Log

Log  

Login Form

Login Form  

Features

  • AB Testing System
  • API Configuration
  • Approval System
  • Authentication and Permissions
  • Clean and sharp UI
  • Dashboard customization
  • Data Access API (dAPI)
  • Database schema migration
  • Error Handling
  • Export to Excel
  • Form and List customization
  • Image Cropping
  • IP address and port configuration
  • Log feature that keeps track of many things in your app
  • Metric System
  • 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
  • System settings could be used system-wide to keep application settings
  • Tag support for fields
  • Translation files preloading
  • Validation for user input
  • Webcam support on image and file fields

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.16 or later

Installation

go get -u github.com/uadmin/uadmin/
go install github.com/uadmin/uadmin/cmd/uadmin@latest

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

$ uadmin
Usage: uadmin COMMAND [--src]
This tools helps you prepare a folder for a new project or update static files and templates

Commands:
  prepare         Generates folders and prepares static and templates
  version         Shows the version of uAdmin

Arguments:
  --src           If you want to copy static files and templates from src folder

Get full documentation online:
https://uadmin-docs.readthedocs.io/en/latest/

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: /Users/abdullah/go/src/github.com/twistedhardware/test/models
[   OK   ]   Created: /Users/abdullah/go/src/github.com/twistedhardware/test/api
[   OK   ]   Created: /Users/abdullah/go/src/github.com/twistedhardware/test/views
[   OK   ]   Created: /Users/abdullah/go/src/github.com/twistedhardware/test/media
[  INFO  ]   Copying static/templates from: /Users/abdullah/go/pkg/mod/github.com/uadmin/[email protected]
[   OK   ]   Created: /Users/abdullah/go/src/github.com/twistedhardware/test/static
[   OK   ]   Created: /Users/abdullah/go/src/github.com/twistedhardware/test/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()
}

Prepare modules

$ go mod init
go: creating new go.mod: module github.com/twistedhardware/test
go: to add module requirements and sums:
	go mod tidy

$ go mod tidy
go: finding module for package github.com/uadmin/uadmin
go: found github.com/uadmin/uadmin in github.com/uadmin/uadmin v0.6.0

Run your app (Linux, Apple macOS or Windows):

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

In Windows:

> go build && todo.exe
[   OK   ]   Initializing DB: [14/14]
[   OK   ]   Initializing Languages: [185/185]
[  INFO  ]   Auto generated admin user. Username:admin, Password:admin.
[   OK   ]   Synching System Settings: [49/49]
[   OK   ]   Server Started: http://0.0.0.0:8080
         ___       __          _
  __  __/   | ____/ /___ ___  (_)___
 / / / / /| |/ __  / __  __ \/ / __ \
/ /_/ / ___ / /_/ / / / / / / / / / /
\__,_/_/  |_\__,_/_/ /_/ /_/_/_/ /_/

Quick Reference

Overriding Save Function

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

Validation

func (m Model) Validate() (ret map[string]string) {
  ret = map[string]string{}
  if m.Name != "test" {
    ret["Name"] = "Error name not found"
  }
  return
}

About

The web framework for Golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 56.2%
  • JavaScript 27.9%
  • HTML 13.2%
  • CSS 2.6%
  • Other 0.1%