• Stars
    star
    136
  • Rank 267,670 (Top 6 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A tool for sharing weekly task updates with teammates.

whatgotdone

CircleCI GitHub commit activity GitHub last commit License

Architecture

Overview

What Got Done Architecture

What Got Done has a simple architecture consisting of the following parts:

  • What Got Done Backend: A Go HTTP service that handles all HTTP requests, datastore requests, and user authentication (via UserKit).
  • What Got Done Frontend: A Vue2 app that renders pages in the user's browser.
  • SQLite: What Got Done's storage provider.
  • Litestream: (optional) Syncs What Got Done's SQLite database to cloud storage.
  • UserKit: A third-party service that manages What Got Done's user authentication.

Page Rendering Flow

What Got Done uses a somewhat unusual system for rendering pages. The Go backend first pre-renders the page server-side to populate tags related to SEO or social media that need to be set server-side. The Vue2 frontend renders the remainder of the page client-side. To avoid conflicts between the two systems' template syntax, Go uses [[, ]] delimiters, while Vue uses {{, }} delimiters.

What Got Done Render Flow

The Go backend handles all of What Got Done's /api/* routes. These routes are What Got Done's RESTful interface between the frontend and the backend. These routes never send HTML, and instead only send JSON back and forth.

User authentication

What Got Done uses UserKit for user authentication. For user signup, user login, and password reset, What Got Done loads the UserKit UI widgets in JavaScript. On the backend, the auth package is responsible for translating UserKit auth tokens into What Got Done usernames.

Contributing to What Got Done

Interested in contributing code or bug reports to What Got Done? That's great! Check our Contibutor Guidelines for more details.

QuickStart

To run What Got Done in a Docker container, run

docker-compose up

What Got Done will be running at http://localhost:3001.

Dev-mode authentication uses UserKit dummy mode. You can log in with any username using the password password.

Development notes

Pre-requisites

Start hot reloading server

Run the following command to start a What Got Done development server:

./dev-scripts/serve
  1. Builds the Vue frontend.
  2. Starts a hot reloading server for the Vue frontend.
  3. Starts a hot reloading server for the backend.

Quirks of the dev environment

Because the production What Got Done server runs both the frontend and the backend on a single port, there are a few hacks to make a development version work:

  • CORS is enabled in dev mode so that the frontend can make CORS requests to the backend from a different HTTP port.
  • CSRF protection is disabled in dev mode because the Vue dev server doesn't know how to render the <meta name="csrf-token" /> tag.
  • Page titles don't work properly in dev mode because the Vue dev server doesn't know how to render the <title> tag.
  • The Content Security Policy header in dev mode needs unsafe-eval and unsafe-inline, whereas we disable this in production.

Optional: Run backend unit tests

Unit tests run in normal Golang fashion:

go test ./...

Optional: Run e2e tests

End-to-end tests run all components together using UserKit dummy mode as authentication:

dev-scripts/run-e2e-tests

Optional: Enable image uploads

What Got Done optionally allows image uploads from users. To enable this:

  1. Create a Google Cloud Storage bucket
  2. Choose uniform permissions for the bucket
  3. Add to the bucket permissions for the allUsers user with the role "Storage Object Viewer"
  • This makes all images in the bucket world-readable.
  1. When launching What Got Done, set the environment variable PUBLIC_GCS_BUCKET to the name of your GCS bucket.

When users paste images into their What Got Done entries, they will upload to your GCS bucket and auto-link from the entry editor.

More Repositories

1

picoshare

A minimalist, easy-to-host service for sharing images and other files
Go
2,011
star
2

logpaste

A simple web service for storing text log files
Go
306
star
3

key-mime-pi

Use your Raspberry Pi as a remote-controlled keyboard that accepts keystrokes through a web browser.
Python
101
star
4

hello-world-cypress

A simple example of using Cypress.io for end-to-end testing
Go
54
star
5

mtlynch.io

Source for mtlynch.io, a blog about technology and entrepreneurship.
HTML
43
star
6

resticpy

Minimal Python wrapper around the restic backup command-line interface.
Python
41
star
7

process-home-videos

Helper scripts for processing home videos and uploading them to MediaGoblin
Python
36
star
8

pre-vue

A template for building pre-rendered web apps with Vue + Nuxt
Vue
30
star
9

mediagoblin-docker

Docker image for MediaGoblin, adapted from https://notabug.org/dachary/mediagoblin-docker
Dockerfile
22
star
10

zfs-encrypted-backup

Shell
18
star
11

python3_seed

A boilerplate Python 3 project
Shell
17
star
12

docker-sia

An unofficial Docker image for Sia [Deprecated as of 2020-04-02]
Dockerfile
16
star
13

zestful-client

Python
14
star
14

mediagoblin

Python
10
star
15

ansible-role-key-mime-pi

Ansible role for installing key-mime-pi service
Shell
9
star
16

beancount-chase-bank

Beancount importer for Chase bank
Python
9
star
17

mtlynch-backup

The Python script I use to back up my data with restic
Python
8
star
18

ansible-role-sia

Ansible role for the Sia distributed storage network
Shell
7
star
19

social-go

A Go parser for various social media handles and URLs
Go
6
star
20

sia_metrics_collector

Python
6
star
21

ansible-role-clipbucket

An Ansible role for the Clipbucket video platform
Python
6
star
22

plausible-proxy

Reverse proxy for Plausible Analytics, implemented as Google Cloud Function
Go
5
star
23

sia_load_tester

https://blog.spaceduck.io/sia-load-test-preview/
Python
5
star
24

beancount-mercury

Beancount importer for Mercury Startup Checking
Python
4
star
25

gofn-prosper

Go bindings for the Prosper P2P Lending API
Go
4
star
26

hello-world-vue-pre-rendered

A basic example of a website generated with Vue + Nuxt using pre-rendering.
Vue
4
star
27

stripe-snooping-example

A proof of concept of the snooping behavior of Stripe's official JavaScript library
Vue
3
star
28

ansible-role-litestream

Role for installing the Litestream sqlite replication tool
Jinja
3
star
29

docker-flask-upload-demo

Dockerfile
3
star
30

ansible-role-storj

An Ansible role for the Storj distributed storage network
Shell
3
star
31

customize-rpi

Customize a redistributable Raspberry Pi image
Shell
3
star
32

slide-decks

Nix
3
star
33

zig-c-simple

Simple example of calling C code from Zig
Zig
3
star
34

docker-cypress

Dockerfile
3
star
35

simple-encrypt

Python
2
star
36

prosperbot

An automated Prosper peer to peer lending bot
Go
2
star
37

dummy_file_generator

Python
2
star
38

python_seed

A boilerplate Python 2 project
Shell
2
star
39

process-hit-the-front-page

Process videos from Hit the Front Page of Hacker News
Shell
2
star
40

chat_unifier

Python
2
star
41

screenjournal

Like Goodreads but for couch potatoes
Go
2
star
42

rss-proxy

Go
2
star
43

dummy-appengine-demo

Python
2
star
44

eth-zvm

An implementation of the Ethereum virtual machine in pure Zig.
Zig
2
star
45

migrate-mtlynch-to-hugo

A quick 'n dirty script to migrate the Jekyll-based mtlynch.io to Hugo
Python
1
star
46

hid-formatter

HTML
1
star
47

godot-platformer-1

Just playing around with Godot Engine
GDScript
1
star
48

appengine-python-seed

Python
1
star
49

sia_timestamp_dumper

Dumps block timestamps from Sia
Python
1
star
50

docker-gifsicle

Dockerfile
1
star
51

ndt-raspi-viz

HTML
1
star
52

docker-godot

Dockerized image for Godot Game Engine
Dockerfile
1
star
53

picoshare-fly-debug

Deploy a dev environment to Fly.io for debugging PicoShare
Dockerfile
1
star
54

simpleauth

A simple Go authentication and session management library for web apps.
Go
1
star
55

zestful-frontend2

Demo page for the Zestful ingredient parser (using Vue + Nuxt)
Vue
1
star
56

syncthing-fly.io

Deploy a syncthing instance to fly.io
1
star
57

dev-scripts

Canonical version of my best dev scripts for automating programming tasks
Shell
1
star
58

show-and-tell-code-of-conduct

Ruby
1
star
59

docker-syncthing

Unofficial Docker image of syncthing
Dockerfile
1
star
60

docker-protractor

Dockerfile
1
star
61

prosperbot-frontend

Go
1
star
62

google-analytics-v4-example

A basic example of using the Google Analytics Core Reporting v4 API
Go
1
star
63

free-usage-videos

A collection of public domain / Creative Commons videos
1
star
64

ansible-role-nginx-rtmp

Shell
1
star