Skip to content

Instantly share code, notes, and snippets.

@PARC6502
PARC6502 / OpenSourceBaas.md
Last active May 3, 2026 14:46
List of open source, self hosted BaaS - Backend as a service

Backend as a Service

Note on sizes: a lot of those might be inaccurate as there might be many microservices required aside from the core release/docker image. I haven't tested these recently so I'm not sure

Supabase - ~94.9K stars

  • Designed explicitly as an open source Firebase alternative
  • Typescript based
  • Docker support
  • Full Postgres database with Realtime subscriptions

PocketBase - ~54.5K stars

@genadyp
genadyp / javascript-useful-links.md
Last active April 30, 2026 05:45
javascript (js) useful links
@masaeedu
masaeedu / state.js
Created March 17, 2018 01:58
State monad in JS
// Functor
export const map = f => s => x0 => {
const [v, x1] = s(x0);
return [f(v), x1];
};
// Applicative
export const pure = a => x => [a, x];
export const ap = stf => stv => x0 => {
const [f, x1] = stf(x0);
// @flow
import { createAction, createReducer, on, onType, Action } from "transdux";
const inc: Action<void> = createAction();
const add: Action<number> = createAction();
const DEC = "DEC";
const SUB = "SUB";
@mvaldesdeleon
mvaldesdeleon / state.js
Created November 20, 2017 19:49
State monad
function State(fn) {
this._fn = fn;
}
State.state = fn => new State(fn);
State.of = val => State.state(state => [val, state]);
State.get = State.state(state => [state, state]);
@branneman
branneman / fp-lenses.js
Last active May 17, 2023 00:56
JavaScript: Lenses (Functional Programming)
// FP Lenses
const lens = get => set => ({ get, set });
const view = lens => obj => lens.get(obj);
const set = lens => val => obj => lens.set(val)(obj);
const over = lens => fn => obj => set(lens)(fn(view(lens)(obj)))(obj);
const lensProp = key => lens(prop(key))(assoc(key));
const Set = (lens, value, target) => lens.set(value, target)
const View = (lens, target) => lens.get(target)
const Over = (lens, func, target) =>
Set(lens, func(View(lens, target), target), target)
const Compose = (...lenses) => {
lenses = lenses.reverse()
const itar = (i, target, value) => {
if (i === lenses.length) return value
return lenses[i].set(itar(i + 1, lenses[i].get(target), value), target)
const B = f => g => x => f(g(x));
const K = a => b => a;
const I = a => a;
const toPair = p => p(a => b => ({ first: a, second: b }));
const toNumber = n => n(x => x + 1)(0);
const toArray = l => l(x => xs => [x, ...xs])([]);
const toBoolean = b => b(true)(false);
const pair = a => b => f => f(a)(b);
@tomfun
tomfun / plural.js
Created August 23, 2016 12:31
JavaScript russian plural function
function getNoun(number, one, two, five) {
let n = Math.abs(number);
n %= 100;
if (n >= 5 && n <= 20) {
return five;
}
n %= 10;
if (n === 1) {
return one;
}
@dypsilon
dypsilon / continuation.js
Created August 8, 2016 09:27
Eager Continuation in JavaScript
const {tagged} = require('daggy');
let Continuation = tagged('x');
Continuation.prototype.of = Continuation.of = x => {
return new Continuation((resolve) => resolve(x));
}
Continuation.prototype.chain = function(f) {
return this.x(f);