Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MP281X/blixter
An open source streaming platform
https://github.com/MP281X/blixter
bun ffmpeg full-stack k3s kubernetes minio monorepo postgresql redis sveltekit typescript
Last synced: 18 days ago
JSON representation
An open source streaming platform
- Host: GitHub
- URL: https://github.com/MP281X/blixter
- Owner: MP281X
- Created: 2023-08-13T10:47:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-04T13:01:55.000Z (7 months ago)
- Last Synced: 2024-08-17T08:05:06.345Z (4 months ago)
- Topics: bun, ffmpeg, full-stack, k3s, kubernetes, minio, monorepo, postgresql, redis, sveltekit, typescript
- Language: TypeScript
- Homepage:
- Size: 1.25 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blixter
Blixter in an open-source streaming platform that i created to improve my frontend and backend skills and knowledge
It's a typescript monorepo that use `typescript` for the backend and `sveltekit` for the frontend
It's deployed on a self-hosted `k3s` cluster an it's powered by the `bun` javascript runtime
It relies on `postgres` as the primary db and `redis` for the cache, pub-sub and queues.
The files are stored on minio, an S3 compatible object storage
## Running Locally
#### Environment Configuration (.env)
To run Blixter locally, create a `.env` file with these environment variables:
```sh
REDIS_URL=redis://{host}:{port}
POSTGRES_URL=postgresql://{username}:{password}@{host}:{port}/blixter?sslmode=disable
S3_KEY=
S3_SECRET=
SALT=
```#### Starting the Projects
```sh
bun install # install the project dependency
bun run dev # run the projects in development mode
bun run preview # simulate production mode
```## Project structure
```sh
├── .github/ # GitHub Actions Configuration
├── app/ # Applications
├── k8s/ # Kubernetes Manifests
├── packages/ # Shared Code
├── scripts/ # Scripts
└── task-runner.ts # Task runner
```## Task Runner
The Task Runner script is a versatile tool:
- It locates and runs scripts specified in the cli args for each project (if the project has that script).
- It handles log formatting, code checks with `prettier`, code generation, and project linting with `tsc`.
- In development mode, it runs all apps in parallel and triggers the code generation scripts when specified files change. It also applies Prettier code formatting and regenerates generated or cached files.
- In test mode, it runs the .test.ts file specified in the script arguments.
- In other modes, it run the code generation on startup, checks TypeScript types with TSC, ensures code formatting with Prettier and reports errors if tasks fail.