Skip to content
Go backend and Vue frontend template with social logins
JavaScript Go Vue HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
api Update Aug 28, 2018
web Update Aug 28, 2018
.gitignore First commit Sep 6, 2017 Update Readme Aug 28, 2018
config.json.dist Update Aug 28, 2018
main.go Update Aug 28, 2018
scheme.sql Update template, fixes #1 Aug 28, 2018
userstore.go Update Aug 28, 2018

Go Vue template

Go-Vue-template is a project that serves as a template for future web applications involving a Go backend (API server) and Vue frontend (SPA client). It has the following features:

  • Vue for a Single Page Application frontend structure
  • OAuth2 authentication using social logins
  • Authentication using JWT
  • Semantic-UI for interface design
  • Webpack to bundle files

This package will be updated as I go. Incomplete todo list:

  • Use TLS for everything
  • Automatic logout using Vuex and timeout
  • Logout blacklists user at the server


Make sure you have the Go compiler and NPM installed. Then issue:

# Download and install this package
go get

# Download and install client NPM packages
cd web/
npm install


Development mode

Server with DevURL set in config.json will enable CORS headers from localhost:8080. Running the Vue client will automatically open the browser at http://localhost:8080/

# Start API server at :3000

# Start Vue client with hot-reloading at :8080
cd web/
npm run dev

Production mode

Remove DevURL from config.json, and run:

# Build the web files to web/dist/
npm run build

# Start the webserver at :3000

Now navigate to http://localhost:3000/. You can change the port in the config.json file.

# Analyze filesizes
npm run build --report

For detailed explanation on how things work at the client, checkout the guide and docs for vue-loader.

Ready-up for your application

  • Rename config.json.dist to config.json and set name and URLs
  • Add social login client IDs and secrets to config.json
  • Create your database scheme in scheme.sql
  • Set title in web/index.html
  • Develop your API server and web interface


Released under the MIT license.

You can’t perform that action at this time.