Thanks for your interest in contributing! LiveSQL is an open-source project and we welcome contributions of all kinds.
- Node.js 20+
- pnpm (
npm install -g pnpm) - Docker (for PostgreSQL with
wal_level=logical)
git clone https://github.com/mahabubul470/LiveSQL.git
cd LiveSQL
pnpm install
# Start test PostgreSQL
docker compose -f docker-compose.test.yml up -d
# Build all packages
pnpm build
# Run tests
pnpm testpackages/core → Shared types and wire protocol (zero dependencies)
packages/server → WAL CDC engine + WebSocket server (depends on core)
packages/client → Framework-agnostic browser client (depends on core)
packages/react → React hooks (depends on client)
packages/vue → Vue composables (depends on client)
packages/svelte → Svelte stores (depends on client)
Each package builds independently: pnpm --filter @livesql/<package> build
-
Fork the repo and create a branch from
main:feat/my-feature fix/bug-description docs/update-something -
Make your changes and add tests (vitest)
-
Run checks:
pnpm test # all tests pnpm lint # eslint + prettier pnpm typecheck # TypeScript strict mode
-
Open a pull request against
main
- TypeScript strict mode —
strict: true,exactOptionalPropertyTypes: true,noUncheckedIndexedAccess: true - Files:
kebab-case.ts - Classes:
PascalCase - Functions/variables:
camelCase - Constants:
UPPER_SNAKE_CASE - Interfaces:
PascalCase(noIprefix) - Use
interfacefor object shapes,typefor unions/intersections - Use
BigIntfor offsets and LSNs - Export types explicitly — no
export *
Use conventional commits:
feat(core): add ChangeEvent wire protocol types
fix(server): prevent WAL slot leak on disconnect
test(integration): add reconnection backfill test
docs: update architecture diagram
# Unit tests for a package
pnpm --filter @livesql/server test
# Integration tests (requires Docker PostgreSQL)
pnpm --filter integration test
# Chaos tests
npx vitest run --config tests/chaos/vitest.config.ts tests/chaos/Before diving into the code, read these docs:
- Architecture overview — system design and data flow
- API specification — wire protocol and public APIs
- Decision records — why things are built this way
- Failure modes — production risks and mitigations
By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.