:construction: Closed. A website and user system (Gin/Backbone).

Overview

A website and user system starter. Implemented with gin and Backbone. Gowall is port of Drywall

Go Node.js
Repository here Drywall
Site Gowall Drywall
Demo Gowall demo Drywall demo

I cloned Drywall from commit

Technology

Server side, Gowall is built with the gin framework. We're using MongoDB as a data store.

The front-end is built with Backbone. You can use Grunt for the asset pipeline. Grunt's settings are located in Drywall's repository.

On The Server On The Client Development
Gin Bootstrap Grunt
html.template Backbone.js
mgo jQuery
markbates/goth Underscore.js
gopkg.in/gomail.v2 Font-Awesome
Moment.js

Live demo

Platform Username Password
https://go-wall.herokuapp.com/ root h3r00t

Note: The live demo has been modified so you cannot change the root user, the root user's linked admin role or the root admin group. This was done in order to keep the app ready to use at all times.

Diference

I keer session in cookies.

Requirements

You need MongoDB installed and running.

We use mgo as mongodb driver. If you have issues with sasl refer to this issue.

We use golang.org/x/crypto/bcrypt for hashing secrets.

Installation

Exetuble file has to be located in the same directory where public is located

Setup

First you need to setup your config file. It's located just inside. cmd/gowall/config.example.go I decided that you know better how you want keep your config. It support system environments.

Next, you need a few records in the database to start using the user system.

Run these commands on mongo via the terminal. Obviously you should use your email address.

use Gowall; // or your mongo db name if different
db.admingroups.insert({ _id: 'root', name: 'Root' });
db.admins.insert({ name: {first: 'Root', last: 'Admin', full: 'Root Admin'}, groups: ['root'] });
var rootAdmin = db.admins.findOne();
db.users.save({ username: 'root', isActive: 'yes', email: '[email protected]', roles: {admin: rootAdmin._id} });
var rootUser = db.users.findOne();
rootAdmin.user = { id: rootUser._id, name: rootUser.username };
db.admins.save(rootAdmin);

Running the app

$ ./gowall

Now just use the reset password feature to set a password.

  • Go to http://localhost:3000/login/forgot/
  • Submit your email address and wait a second.
  • Go check your email and get the reset link.
  • http://localhost:3000/login/reset/:email/:token/
  • Set a new password.

Login. Customize. Enjoy.

Error handling

I use exception model for errors from std or third part libraries. If mgo.Query.Find return err != mgo.ErrNotFound I do panic If mgo.ErrNotFound It's common behaviour except some cases when one object is nonsense if other object doesn't exist. (I mean that case when necessary manual update of db) In that case I am doing panic but with my own error description. That sysadmin could see it errors in log. I like go error flow idea but if error has to be written in log i do panic. I created func EXCEPTION(i interface{}) where you can specify your handler/ You can even remove panic from here.

Philosophy

  • Create a website and user system.
  • Write code in a simple and consistent way.
  • Only create minor utilities or plugins to avoid repetitiveness.
  • Find and use good tools.
  • Use tools in their native/default behavior.

Features

  • Basic front end web pages.
  • Contact page has form to email.
  • Login system with forgot password and reset password.
  • Signup and Login with Facebook, Twitter, GitHub, Google and Tumblr.
  • Optional email verification during signup flow.
  • User system with separate account and admin roles.
  • Admin groups with shared permission settings.
  • Administrator level permissions that override group permissions.
  • Global admin quick search component.

Questions and contributing

Any issues or questions (no matter how basic), open an issue. Please take the initiative to include basic debugging information like operating system and relevant version details such as:

If you're changing something non-trivial, you may want to submit an issue first.

Thanks

Big thanks to @jedireza for Drywall!!

License

MIT

  1. Can't do dynamic providers
  2. Can't init check hostName
You might also like...
Collection of tools to interact with Intigriti website
Collection of tools to interact with Intigriti website

Small tool, written in Go, that constantly monitors Activity feed on https://app.intigriti.com Dashboard page and sends Slack/Discord notifications on

๐Ÿ”ฅ Hugo website builder, Hugo themes & Hugo CMS. No code, build with widgets!
๐Ÿ”ฅ Hugo website builder, Hugo themes & Hugo CMS. No code, build with widgets!

Wowchemy: the website builder for Hugo Join 750,000+ Sites. No Code. Easily Create Future-Proof Websites โœ๏ธ ๐Ÿ“ฐ ๐Ÿš€ ๐Ÿ”ฅ 1. Create any kind of website

Vela plugin designed for generating a static documentation website with Hugo.

Vela plugin designed for generating a static documentation website with Hugo.

API from AnonURL website, an anonymous URL shortener

API from AnonURL website, an anonymous URL shortener

This is my personal website, hosted on GitHub Pages

astrophena.name This is my personal website, hosted on GitHub Pages. Serving locally You need the latest Go and Node.js installed.

GinGoExample - Implement rest api using gin and go and mongodb

GinGoExample Implement rest api using gin and go and mongodb Optimizations using Singlton pattern to avoid repetetive commiunication with mongodb . Fe

Automated penetration and auxiliary systems, providing XSS, XXE, DNS log, SSRF, RCE, web netcat and other Servers,gin-vue-admin
Automated penetration and auxiliary systems, providing XSS, XXE, DNS log, SSRF, RCE, web netcat and other Servers,gin-vue-admin

Simple DNS log Server,easy to ACME DNS challenge log easy send to elasticsearch https://github.com/hktalent/DNS_Server go4Hacker Automated penetration

Birthdays is a web service that stores the birthday date of users and calculates the remaining days until the user's birthday.
Birthdays is a web service that stores the birthday date of users and calculates the remaining days until the user's birthday.

Birthdays is a web service that stores the birthday date of users and calculates the remaining days until the user's birthday. Features Metrics servic

GoTrue is a small open-source API written in Golang, that can act as a self-standing API service for handling user registration and authentication for Jamstack projects.
GoTrue is a small open-source API written in Golang, that can act as a self-standing API service for handling user registration and authentication for Jamstack projects.

GoTrue is a small open-source API written in Golang, that can act as a self-standing API service for handling user registration and authentication for Jamstack projects.

Comments
  • Template Rendering is failing?

    Template Rendering is failing?

    I'm facing issue when browsing through pages with <% and %> tags included. Template rendering is failing. Can you please share more detailed setup steps ? (How to do Asset pipeline with grunt and building front end)

    .... [GIN-debug] PUT /account/settings/identity/ --> main.changeIdentity (9 handlers) [GIN-debug] PUT /account/settings/password/ --> main.changePassword (9 handlers) [GIN-debug] GET /account/providerSettings/:provider/ --> main.settingsProvider_ (9 handlers) [GIN-debug] GET /account/providerSettings/:provider/disconnect/ --> main.disconnectProvider (9 handlers) [GIN-debug] Listening and serving HTTP on :3000 [GIN] 2017/04/26 - 17:44:31 | 200 | 1.9995ms | ::1 |  GET / [GIN] 2017/04/26 - 17:44:34 | 200 | 2.0009ms | ::1 |  GET /about/ html/template:default.html: """ in attribute name: "has-error" : "" %>">\n\t\t

    I have my setup with Go+mongodb on win10.

    opened by rkarumanchi 1
Owner
Petr
Science fan. DIY enthusiast.
Petr
Go-service-gin - Simple Web api application developed in Golang and Gin

Simple Web api application developed in Golang and Gin Initial Tutorial URL http

Nurul Huda Robin 0 Jan 4, 2022
Go-gin-ddd-cqrs - Clean api rest with Go, Gin and GORM

GOLANG API REST Clean api rest with Go, Gin and GORM. Clean Architecture with DD

Juan Cantรณn Rodrรญguez 17 Oct 21, 2022
Go-gin-mongo-api - A backend RESTful API built using golang, gin and mongoDB

go-gin-mongo-API This is a RESTful backend API which is developed using the gola

Humbe Jeffrey 6 Jul 19, 2022
Go (Golang) API REST with Gin FrameworkGo (Golang) API REST with Gin Framework

go-rest-api-aml-service Go (Golang) API REST with Gin Framework 1. Project Description Build REST APIs to support AML service with the support of exte

Tony Aizize 1 Nov 21, 2021
Gin-boilerplate - This repository contains boilerplate code of a REST service using Gin (golang) framework.

Boilerplate REST service using Gin web framework (golang) Introduction This repository contains a boilerplate REST API service using Gin web framework

null 6 Apr 28, 2022
Gin-easy-todo - golang ์˜ RESTful API ํ”„๋ ˆ์ž„์›Œํฌ gin ์„ ํ™œ์šฉํ•ด ์•„์ฃผ ๊ฐ„๋‹จํ•œ Todo ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋งŒ๋“ค์–ด๋ณด์ž.

๋ชฉ์ฐจ 1. ์š”์•ฝ 2. ๋ชฉํ‘œ 3. API ๋ชฉ๋ก 4. ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ 5. ํŒจํ‚ค์ง€ ๋ณ„ ๊ธฐ๋Šฅ๊ณผ ๊ด€๊ณ„ 6. ์‚ฌ์ „ ์ž‘์—… 6.1. DB, Table ์ƒ์„ฑ 6.2. ๋ชจ๋“ˆ ์ƒ์„ฑ 6.3. ํŒจํ‚ค์ง€ ๋‹ค์šด๋กœ๋“œ 7. Gin ์ž‘์„ฑ 7.1. ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์„ค์ • 7.2. ํ…Œ์ด๋ธ”, ์Šคํ‚ค๋งˆ ์ •์˜ 7.3.

jongbae_park 0 Jan 2, 2022
Gin-boilerplate - Gin boilerplate preconfigured with basic rest api features

Gin Boilerplate Build apis with gin faster with this template Features Validatio

Mohan barman 4 Jun 24, 2022
Self-hosted video-hosting website and video archival manager for Niconico, Bilibili, and Youtube

Self-hosted video-hosting website and video archival manager for Niconico, Bilibili, and Youtube

null 758 Dec 1, 2022
Everything a semantic desktop search engine combined with a single-user document management system

Everything will be a semantic desktop search engine combined with a single-user document management system. It will apply ideas of the semantic web and knowledge graphs to organize your data, allowing you to maintain private knowledge graphs as well as make use of public knowledge graphs, such as Wikidata.

Dominik Honnef 22 May 21, 2022
ๅฏผ่ˆช็ฝ‘็ซ™็”Ÿๆˆๅ™จ(Navigation website generator)

gena ๅฏผ่ˆช็ฝ‘็ซ™็”Ÿๆˆๅ™จ | English Document ๅฎ‰่ฃ… ไธ€้”ฎ็”Ÿๆˆ๏ผˆๆŽจ่๏ผ‰ ไปŽ gena-template ่‡ชๅŠจ็”Ÿๆˆๅนถ่‡ชๅŠจ้ƒจ็ฝฒๅˆฐ GitHub Pages ๆบ็ ๅฎ‰่ฃ… go1.16 required go get -u github.com/x1ah/gena/cmd/gena > gen

x1ah 43 Nov 20, 2022