# Bytebase
**Repository Path**: sunhacker/Bytebase
## Basic Information
- **Project Name**: Bytebase
- **Description**: Bytebase 是一款聚焦在 Database schema change and version control 的工具
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: main
- **Homepage**: https://www.oschina.net/p/bytebase
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 22
- **Created**: 2022-07-22
- **Last Updated**: 2024-10-13
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
Live Demo •
Install •
Help •
Development •
Design Doc
[Bytebase](https://bytebase.com/?source=github) is a web-based, zero-config, dependency-free database schema change and version control management tool for the **DevOps** team.
## For Developer and DevOps Engineer - Holistic view of database schema changes
Regardless of working as an IC in a team or managing your own side project, developers using Bytebase will have a holistic view of all the related database info, the ongoing database schema change tasks and the past database migration history.
## For DBA - 10x operational efficiency
A collaborative web-console to allow DBAs to manage database tasks and handle developer tickets much more efficiently than traditonal tools.
## For Tech Lead - Improve team velocity and reduce risk
Teams using Bytebase will naturally adopt industry best practice for managing database schema changes. Tech leads will see an improved development velocity and reduced outages caused by database changes.
## Features
- [x] Web-based database change and management workspace for teams
- [x] SQL Review
- [UI based change workflow](https://www.bytebase.com/docs/change-database/change-workflow)
- [Version control based change workflow](https://www.bytebase.com/docs/vcs-integration/overview) (Database-as-Code)
- [SQL Review Rules](https://www.bytebase.com/docs/sql-review/review-rules/overview)
- [x] Built-in SQL Editor
- [x] Detailed migration history
- [x] Multi-tenancy (rollout change to homogeneous databases belonged to different tenants)
- [x] Backup and restore
- [x] Point-in-time recovery (PITR)
- [x] Anomaly center
- [x] Environment policy
- Approval policy
- Backup schedule enforcement
- [x] Schema drift detection
- [x] Backward compatibility schema change check
- [x] Role-based access control (RBAC)
- [x] MySQL support
- [x] PostgreSQL support
- [x] TiDB support
- [x] Snowflake support
- [x] ClickHouse support
- [x] GitLab CE/EE support (Database-as-Code, login with GitLab account, project membership sync)
- [x] Webhook integration for Slack, Discord, MS Teams, DingTalk(钉钉), Feishu(飞书), WeCom(企业微信)
- [ ] GitLab.com support
- [ ] GitHub support
Fig.1 - Dashboard

Fig.2 - SQL review issue pipeline

Fig.3 - GitLab based schema migration (Database-as-code)

Fig.4 - Built-in SQL Editor

## 📕 Docs
### [Installation](https://www.bytebase.com/docs/get-started/install/overview?source=github)
### [User doc](https://bytebase.com/docs?source=github)
In particular, get familar with various product concept such as [data model](https://bytebase.com/docs/concepts/data-model?source=github), [roles and permissions](https://bytebase.com/docs/concepts/roles-and-permissions?source=github) and etc.
### Design doc
https://github.com/bytebase/bytebase/tree/main/docs/design
### Version upgrade policy
https://github.com/bytebase/bytebase/tree/main/docs/version-management.md
## 🕊 Interested in contributing?
1. Checkout issues tagged with [good first issue](https://github.com/bytebase/bytebase/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
1. We are maintaining an [online database glossary list](https://bytebase.com/database-glossary/?source=github), you can add/improve content there.
**Note**: We are quite disciplined on tech stack. If you consider bringing a new programming language, framework and any non-trivial external dependency, please open a discussion first.
## 🏗 Development
Bytebase is built with a curated tech stack. It is optimized for **developer experience** and is very easy to start
working on the code:
1. It has no external dependency.
1. It requires zero config.
1. 1 command to start backend and 1 command to start frontend, both with live reload support.
**[Coding guideline](https://github.com/bytebase/bytebase/tree/main/docs/dev-guide.md)**
**Tech Stack**

**Data Model**

### Prerequisites
- [Go](https://golang.org/doc/install) (1.18 or later)
- [pnpm](https://pnpm.io/installation)
- [Air](https://github.com/cosmtrek/air#installation) (1.27.10 or later). This is for backend live reload.
### Steps
1. Install [Air](https://github.com/cosmtrek/air#installation).
1. Pull source.
```bash
git clone https://github.com/bytebase/bytebase
```
1. Set up pre-commit hooks.
- Install [pre-commit](https://pre-commit.com/index.html#install)
```bash
cd bytebase
pre-commit install
pre-commit install --hook-type commit-msg
```
1. Start backend using air (with live reload).
```bash
air -c scripts/.air.toml
```
Change the open file limit if you encounter "error: too many open files".
```
ulimit -n 10240
```
1. Start frontend (with live reload).
```bash
cd frontend && pnpm i && pnpm dev
```
Bytebase should now be running at https://localhost:3000 and change either frontend or backend code would trigger live reload.
## Star History
[](https://star-history.com/#bytebase/bytebase&Date)
## We are hiring
We are looking for engineers and developer advocates, interns are also welcomed. Check out our [jobs page](https://bytebase.com/jobs?source=github).