Skip to content

Repository files navigation

192x192

Upstream: Simple and open events logging platform for your SaSS projects.

npm version npm downloads License Build

This is a passion project I've been developing for the past few months, and using it internally across my apps. I needed a simple logging platform that was quick to setup for new projects, had awesome logging capabilities, and beautiful UI, hence, this is what I came up with.

Basically, Upstream is a easy way to integrate logging into your own applications. It takes minutes to setup - you create a account, project, API key, and integrate it with your project using my SDK. For me, I'm mostly using Upstream for product logs like user signups, reports, etc as I can easily view these alerts on the mobile app with push notifications support for essential events!

image

Check it out at https://up.linus.my

I want to try Upstream!

  1. Go to https://up.linus.my and register an API key for your project.
  2. Install the sdk
npm i @uplabs/sdk
  1. Start ingesting events, below is an example.
import { Upstream } from '@uplabs/sdk'

const up = new Upstream({
  apiKey: "YOUR_API_KEY"
})

up.events.ingest({
    title: "Hello, World!",
    icon: "😁",
});

Running locally for development

Pretty straightforward. Heres how:

  1. git clone https://github.com/linuskang/up && cd up

  2. npm install

  3. cd apps/web && npx prisma generate

  4. Add your .env into the root directory at /apps/web

  5. Run db migrations npx prisma migrate dev

Finally, run the development server using npm run dev

After, go to http://localhost:3000 and start editing!

Contributing.

Please see the CONTRIBUTING guide for more information. Upstream isn't currently accepting PRs, however, if your wanting to fix small bugs, create a PR and I will take a look.

Before creating PRs, please create an issue to discuss with me what you are planning to add/fix and I will let you know whether we are ok with this (dont want to waste your time!).

After we exit beta, all public contributions will be accepted!

Self-host

Lucky for you, you can self-host using docker!

Here's the docker-compose.yml for you to get started.

  1. Copy paste this into your directory:
services:
  app:
    image: ghcr.io/linuskang/up:latest
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "3000:3000"
    env_file: .env
    restart: unless-stopped
    depends_on:
      - db
    networks:
      - upstream_net
  db:
    image: postgres:17-alpine
    environment:
      POSTGRES_USER: upstream
      POSTGRES_PASSWORD: upstream
      POSTGRES_DB: upstream
    volumes:
      - upstream_data:/var/lib/postgresql/data
    ports:
      - "5432:5432"
    restart: unless-stopped
    networks:
      - upstream_net
volumes:
  upstream_data:
networks:
  upstream_net:
    driver: bridge
  1. Add your .env in the same directory:
DATABASE_URL=""
BASE_URL=""

BETTER_AUTH_SECRET=""
BETTER_AUTH_URL=""

GITHUB_CLIENT_ID=""
GITHUB_CLIENT_SECRET=""

RESEND_API_KEY=""
RESEND_EMAIL_FROM=""

CRON_SECRET=""
ALLOW_SIGNUP=""

VAPID_PUBLIC_KEY=""
VAPID_PRIVATE_KEY=""
VAPID_EMAIL=""
  1. Run docker compose up -d

  2. Apply the database migrations using npx prisma migrate deploy

  3. Visit the site at 0.0.0.0:3000

Some notes

We are very very early in this project. Expect bugs.

We are not accepting contributions yet.

Documentation lives in apps/docs and can be deployed as a standalone Fumadocs site.

If you REALLY want to contibute still...

Read CONTRIBUTING.md before opening an issue or PR. We use vouch to organise trust levels in this repository.

AI Declaration

See ai.md

License

Upstream is licensed under CC BY-NC 4.0.

This means you can:

  • ✅ Share — copy and redistribute the material in any medium or format
  • ✅ Adapt — remix, transform, and build upon the material

As long as you:

  • ✅ Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • ❌ NonCommercial — You may not use the material for commercial purposes.
  • ❌ No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.

Please see the license file for more information.

Built with ❤️ by Linus Kang

About

Simple and open logging for your next project

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages