GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mirzakhany/crud: CRUD - A lightweight and user-friendly web-based admin panel for Golang applications.

BranchesTags
Open more actions menu

Latest commit

 

History

21 Commits
21 Commits

Folders and files

NameName
Last commit message
Last commit date
assets
assets
 
 
demo
demo
 
 
screenshots
screenshots
 
 
templates
templates
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
admin.go
admin.go
 
 
database.go
database.go
 
 
functions.go
functions.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
models.go
models.go
 
 
options.go
options.go
 
 

Repository files navigation

Crud - A lightweight and user-friendly web-based admin panel for Golang applications.

Crud is a lightweight and user-friendly web-based admin panel for Golang applications. It simplifies the process of managing database tables by offering a straightforward CRUD (Create, Read, Update, Delete) user interface. With minimal configuration, you can quickly set up and customize an admin dashboard for your application, saving you time and effort.

Installation

To install Crud, run the following command:

go get github.com/mirzakhany/crud

Features

  • User-friendly interface - Crud provides a simple and intuitive user interface for managing database tables. It is designed to be easy to use, even for non-technical users.

  • Minimal configuration - Crud is designed to be easy to set up and use. It requires minimal configuration and can be integrated into your application in minutes.

  • Customizable - Crud is highly customizable. You can easily change the look and feel of the admin panel by modifying the HTML templates and CSS stylesheets.

How to use

To use Crud, you need to create a new instance of the Crud struct and pass chi router to it. The following example shows how to create a new instance of the Crud struct:

package main

import (
	"net/http"

	"github.com/go-chi/chi/v5"
	"github.com/mirzakhany/crud"
)

func main() {
   
    // Define your entities.
	entities := []crud.Entity{
		{
			TableName:     "tasks",
			PrimaryKey:    "id",
			TitlePlural:   "Tasks",
			TitleSingular: "task",
			Description:   "User tasks",
			SelectColumns: []string{"id", "name", "description", "status"},
			EditColumns:   []string{"name", "description", "status"},
			FavIcon:       "fa-tasks",
			Order:         1,
		},
	}

    // Create a new instance of the Crud struct.
   	a, err := crud.New(
		crud.WithDatabaseURI("postgres://postgres:postgres@localhost:15432/postgres?sslmode=disable"),
		crud.WithBaseURL("/admin"),
		crud.WithEntities(entities))

	if err != nil {
		panic(err)
	}

    // Create a new HTTP router.
    httpRouter := chi.NewRouter()
    // Register the Crud handlers.
	a.PrepareHandlers(httpRouter)

	server := http.Server{
		Addr:    ":8080",
		Handler: httpRouter,
	}

    // Start the HTTP server. and open http://localhost:8080/admin in your browser.
	server.ListenAndServe()
}

Screenshots

Dashboard Create Retrive Update Delete

License

This project is licensed under the terms of the MIT license.

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

About

CRUD - A lightweight and user-friendly web-based admin panel for Golang applications.

Topics

admincrudgolangguiui

Resources

Readme
MIT license
Activity

Stars

9 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.