Git Product home page Git Product logo

go-mini-starter's Introduction

go-mini-starter

[ ๐Ÿ›  this is under construction ]

Golang minimal web starter boilerplate with MongoDB.

  • Routing with go-chi/chi

  • Request logging with go-chi/chi/middleware/Logger

  • Simple templating structure

  • Tailwind CSS for styling

  • Vanilla JavaScript client side form validations

  • Simple error handling

  • Server side validations with go-ozzo/ozzo-validation

  • Password hash with x/crypto/bcrypt

  • Sessions and cookies with x/crypto/rand and x/crypto/hmac

  • CSRF/XSRF with gorilla/csrf

  • CSS/XSS

App structure

|---contexts
|   |---usercontext.go
|---handlers
|   |---signinwithcookie.go
|   |---static.go
|   |---user.go
|---helpers
|   |---errors.go
|   |---hashstring.go
|   |---normalize.go
|   |---tokens.go
|   |---validate.go
|---middlewares
|   |---checkuser.go
|   |---loggeduser.go
|   |---requireuser.go
|---models
|   |---dbconnect.go
|   |---user.go
|---static
|   |---css
|       |---style.css
|   |---img
|   |   |---forest.jpg
|   |---js
|   |   |---main.js
|   |---favicon.ico
|---views
|   |---templates
|   |   |---layouts
|   |   |   |---base.html
|   |   |   |---footer.html
|   |   |   |---navbar.html
|   |   |---user
|   |   |   |---dashboard.html
|   |   |   |---login.html
|   |   |   |---signup.html
|   |   |---contacts.html
|   |   |---home.html
|   |---view.go
|   |---viewdata.go
|---.env
|---.gitignore
|---create-user.png
|---main.go
|---Makefile
|---README.md
|---routes.go
|---static.png

Request-Response cycle of the static page

static page request-response

Request-Response cycle of the signup page

signup page request-response

@kristaponis

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.