Skip to content
프로젝트

소개

Hosting, but secure. Virtbase is providing secure and open-source VPS hosting.

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
기록 수집 중
in 15 days
기록 수집 중
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original
Hosting, but secure. Virtbase is providing secure and open-source VPS hosting.

Virtbase

Hosting, but secure.
Learn more »

Getting Started · Tech Stack · Contributing

Twitter License

Getting Started

You need Bun and Docker. scripts/setup.sh does the rest and is safe to re-run - every step checks whether it is already done.

bun install
bun setup

bun setup copies .env.example to .env, starts Postgres, the Neon proxy and Redis from docker-compose.yml, applies the migrations and seeds the database. Use bun setup:cluster to also create the local Proxmox cluster in tooling/proxbase (it needs proxbase and /dev/kvm) - nothing can be provisioned without one.

Filling in .env

The copied example does not boot as it stands. @t3-oss/env validates the environment when the app starts, and an empty value fails exactly like a missing one, so every key the example leaves blank has to be given a value or commented out.

  • Give a value to BETTER_AUTH_SECRET, CRON_SECRET, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY and NOVNC_PROXY_URL. Any non-empty string will do for the ones you are not exercising; the feature behind it simply stays broken.
  • NOVNC_PROXY_SECRET is the exception: it must be 64 hex characters, because the noVNC proxy refuses to start with anything else. bun setup generates one; otherwise use openssl rand -hex 32.
  • Point Redis at the container docker-compose.yml already runs: UPSTASH_REDIS_REST_URL=http://localhost:8079 and UPSTASH_REDIS_REST_TOKEN=example_token.
  • Comment out the optional keys you are not using rather than leaving them empty: DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET, GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, NEXT_PUBLIC_SENTRY_DSN and SENTRY_URL.

CONFIG_ENCRYPTION_KEY is worth generating too (openssl rand -base64 32). Without it every integration reports as disabled, because integration credentials live encrypted in Postgres and are configured in the admin console rather than here.

bun dev

The database is not a plain Postgres

packages/db/src/client.ts speaks the Neon serverless protocol, not the Postgres wire protocol, so docker-compose.yml runs a neon-proxy container in front of Postgres. DATABASE_URL points at db.localtest.me, which the client recognises and rewrites onto the proxy on port 4444. Pointing it at a bare local Postgres does not work.

One app, four hostnames

The marketing site, the dashboard, the admin console and the public API are served on separate hosts, and the session is a cookie scoped to .virtbase.localhost:

http://virtbase.localhost:3000 marketing site
http://app.virtbase.localhost:3000 customer dashboard
http://admin.virtbase.localhost:3000 admin console
http://api.virtbase.localhost:3000 public API

http://localhost:3000 never receives that cookie, so signing in there appears to do nothing. Most systems resolve *.localhost to loopback on their own; if yours does not, add the four names to /etc/hosts.

Everyday commands

bun dev              # the web app; packages are compiled from source
bun check:write      # lint and format
bun typecheck        # TypeScript
bun run test         # unit and integration tests
bun run e2e          # Playwright

bun run test, not bun test: the bare form is Bun's own runner, which starts from the repository root and so misses the per-package bunfig.toml and .env.test that the test script points it at.

Tech Stack

Contributing

We love our contributors! Here's how you can contribute:

  • Open an issue if you believe you've encountered a bug.
  • Make a pull request to add new features, make quality-of-life improvements, or fix bugs.
  • Fix or improve a translation with a pull request: the catalogs are in apps/web/src/i18n/messages, the website content in packages/content.

Recommended Versions

Package Version
bun >= v1.4.3

Node.js is not needed: everything, Next.js included, runs on Bun.

Repo Activity

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3).

관련 프로젝트 살펴보기

불러오는 중…