Skip to content

Instantly share code, notes, and snippets.

View derekr's full-sized avatar
💭
Chillin'

Derek Reynolds derekr

💭
Chillin'
View GitHub Profile
@derekr
derekr / sse_survival_guide.md
Last active November 12, 2025 22:44
SSE FAQ

This is just a stub doc for collecting any SSE related tips/tricks/considerations others in the Datastar community want to share. While it will likely serve as a helpful resource itself, the content will be used to author a more user friendly doc or artifact to reference when learning and leveraging SSE.

SSE FAQ

Are there any SSE gotchas?

There are some known gotchas for SSE documented here:

Northstar Tutorial: Building Modern Web Apps with Go and Datastar

This tutorial will guide you through understanding and building features in Northstar, a modern web application stack combining Go, NATS, Datastar, and Templ. It's designed for developers new to Go or the hypermedia/reactive patterns that Datastar enables.

Table of Contents

  1. Understanding the Stack
  2. Core Concepts
  3. Project Architecture
  4. Building Your First Feature
# api service
# I typically start with a clean base image that doesn't have any
# transient dependencies, but in your case you'd still want pnpm etc
# but i don't want any unecessary node_modules or build artifacts
# that aren't helpful at runtime so a clean filesystem is helpful.
FROM node:18-alpine as api
WORKDIR /app
# Then I only want runtime files for the specific target.
@derekr
derekr / Dockerfile
Created November 24, 2021 20:53
Build Postgres 13 with Postgis 3
FROM postgres:13
LABEL maintainer="PostGIS Project - https://postgis.net"
ENV POSTGIS_MAJOR 3
ENV POSTGIS_VERSION 3.1.4+dfsg-3.pgdg110+1
RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
&& apt-get install -y --no-install-recommends \
@derekr
derekr / machine.js
Created October 17, 2019 18:58
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@derekr
derekr / SketchSystems.spec
Last active July 15, 2019 20:53
App Store Review Prompt
App Store Review Prompt
App Launch*
new app version? -> Promptable Session
not been prompted? -> Promptable Session
has been prompted? -> No Prompt Session
No Prompt Session
close app -> App Launch
# Promptable Cycle is per session (app launch to app close)
@derekr
derekr / SketchSystems.spec
Last active July 15, 2019 18:34
App Store Review Prompt
App Store Review Prompt
App Launch*
new app version? -> Promptable Cycle
has been prompted? -> No Prompt Cycle
No Prompt Cycle
Promptable Cycle
Discover
tap listing -> Prompt For Review?
.app-title {
color: red;
}
@derekr
derekr / medium-article.md
Last active October 4, 2016 15:18
What it's like to build a web project in 2016

Hey I want to build a site; fetch some data and renders it in to a filterable list. Could I use jQuery for that?

Yeah sounds simple enough. You could even ditch jQuery and use native DOM APIs. They've come a long way in the past few years.

Chill.