zen

module
v0.0.0-...-644f586 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2026 License: MIT

README

Zen

Zen is an application for structuring your daily routine.

zen-logo

[!NOTE]
Zen has no feature to read your mind yet; therefore, cheating your way up the leaderboard is possible. However, keep in mind that doing so does not outsmart the developers, but yourself.

Deployment

Tool prerequisites:

  • pulumi
  • go
  • npm/nodejs
  • awscli

AWS prerequisites:

  • Create a route53 public hosted zone for your domains if you want monk to automatically setup all required records.
  • To make the Email verification work correctly your AWS account must be unsandboxed from SES.

The deployment of zen is facilitated via monk 🪬, a tiny cli tool that wraps the underlying pulumi process which builds and deploys the software. The process is interactive, so the only command you ever need (for both deployment and upgrades) is this:

go run cmd/monk/monk.go

[!IMPORTANT] If you are not me, you should change the privacy policy and terms of service before deploying.

Technical Information


Zen was built to run highly available on an extremely low-cost cloud-infrastructure while allowing me to ship changes very quickly. This comes with certain drawbacks:

  • Zen is based on various eventually consistent mechanisms (e.g. timing updates from the weekend might be added to next weeks leaderboard). Certain operations might seem to be magically swallowed or disappear in hyperedgecases.
  • The leaderboard cannot be queried server-side; you must load the full json and sort it client-side (+ the json is aggressively cached by cloudfront).
  • The frontend planner is dogwater spaghetti code. Right now this keeps it very simple and maintainable for me* (due to very loosely requirements).

For this particular scope, this is totally fine; however, please do NOT take this as an example or argument of how to correctly implement business-critical software!

Directories

Path Synopsis
cmd
leaderboard command
manager command
monk command
scheduler command
internal
auth
package auth wraps the email code authentication logic.
package auth wraps the email code authentication logic.
captcha
package captcha provides a store implementation for dchest/captcha.Store that uses s3.
package captcha provides a store implementation for dchest/captcha.Store that uses s3.
deploy
package deploy provides an operator used to deploy the zen infrastructure with pulumi.
package deploy provides an operator used to deploy the zen infrastructure with pulumi.
deploy/util
package util contains some basic helpers for specific tasks in deployment.
package util contains some basic helpers for specific tasks in deployment.
httplambda
package httplambda provides operations to convert net/http requests and responses to lambda function url events.
package httplambda provides operations to convert net/http requests and responses to lambda function url events.
model/email
package email provides an application aware wrapper for the required dynamodb communication on the email model.
package email provides an application aware wrapper for the required dynamodb communication on the email model.
model/leaderboard
package leaderboard provides an application aware wrapper for the required s3 communication on the leaderboard model.
package leaderboard provides an application aware wrapper for the required s3 communication on the leaderboard model.
model/rating
package rating provides an application aware wrapper for the required queue mechanism of the rating change communication.
package rating provides an application aware wrapper for the required queue mechanism of the rating change communication.
model/user
package user provides an application aware wrapper for the required dynamodb communication on the user model.
package user provides an application aware wrapper for the required dynamodb communication on the user model.
rating
rating provides the function that calculates leaderboard rating changes.
rating provides the function that calculates leaderboard rating changes.
token
package token provides a tokenCtrl used to issue and verify access tokens.
package token provides a tokenCtrl used to issue and verify access tokens.
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL