Giter VIP home page Giter VIP logo

uadmin's Introduction

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
  • 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/dekunt/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/dekunt/todo1/models
[   OK   ]   Created: /home/abdullah/go/src/github.com/dekunt/todo1/api
[   OK   ]   Created: /home/abdullah/go/src/github.com/dekunt/todo1/views
[   OK   ]   Created: /home/abdullah/go/src/github.com/dekunt/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: [email protected]
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
}

uadmin's People

Contributors

twistedhardware avatar dekunt avatar renzrod18 avatar ngmedina14 avatar

Watchers

James Cloos avatar  avatar

Forkers

laogubashi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.