You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consistent messaging is important throughout the codebase. Follow these guidelines for errors, logs, and user-facing messages:
126
+
127
+
#### Error messages
128
+
- Lowercase for internal errors and logs: `failed to start session` (no ending period)
129
+
- Uppercase for user-facing errors: `Requested object does not exist. Specify your request.` (with ending period)
130
+
- Omit articles ("a", "an", "the") for brevity: use `failed to update clone` not `failed to update the clone`
131
+
- Be specific and actionable whenever possible
132
+
- For variable interpolation, use consistent formatting: `failed to find clone: %s`
133
+
134
+
#### CLI output
135
+
- Use concise, action-oriented language
136
+
- Present tense with ellipsis for in-progress actions: `Creating clone...`
137
+
- Ellipsis (`...`) indicates an ongoing process where the user should wait
138
+
- Always follow up with a completion message when the operation finishes
139
+
- Past tense with period for results: `Clone created successfully.`
140
+
- Include relevant identifiers (IDs, names) in output
141
+
142
+
#### Progress indication
143
+
- Use ellipsis (`...`) to indicate that an operation is in progress and the user should wait
144
+
- For longer operations, consider providing percentage or step indicators: `Cloning database... (25%)`
145
+
- When an operation with ellipsis completes, always provide a completion message without ellipsis
146
+
- Example sequence:
147
+
```
148
+
Creating clone...
149
+
Clone "test-clone" created successfully.
150
+
```
151
+
152
+
#### UI messages
153
+
- Be consistent with terminology across UI and documentation
154
+
- For confirmations, use format: `{Resource} {action} successfully.`
155
+
- For errors, provide clear next steps when possible
156
+
- Use sentence case for all messages (capitalize first word only)
157
+
158
+
#### Commit messages
159
+
- Start with lowercase type prefix: `fix:`, `feat:`, `docs:`, etc.
160
+
- Use imperative mood: `add feature` not `added feature`
161
+
- Provide context in the body if needed
162
+
124
163
### Documentation styleguide
125
164
Documentation for Database Lab Engine and additional components is hosted at https://postgres.ai/docs and is maintained in this GitLab repo: https://gitlab.com/postgres-ai/docs.
126
165
@@ -132,6 +171,94 @@ We're building documentation following the principles described at https://docum
132
171
133
172
Learn more: https://documentation.divio.com/.
134
173
174
+
### API design and testing
175
+
The DBLab API follows RESTful principles with these key guidelines:
176
+
- Clear resource-based URL structure
177
+
- Consistent usage of HTTP methods (GET, POST, DELETE, etc.)
178
+
- Standardized error responses
179
+
- Authentication via API tokens
180
+
- JSON for request and response bodies
181
+
- Comprehensive documentation with examples
182
+
183
+
#### API Documentation
184
+
We use readme.io to host the API docs: https://dblab.readme.io/ and https://api.dblab.dev.
185
+
186
+
When updating the API specification:
187
+
1. Make changes to the OpenAPI spec file in `engine/api/swagger-spec/`
188
+
2. Upload it to readme.io as a new documentation version
189
+
3. Review and publish the new version
190
+
191
+
#### Testing with Postman and Newman
192
+
Postman collection is generated based on the OpenAPI spec file, using [Portman](https://github.com/apideck-libraries/portman).
@@ -190,10 +317,27 @@ Components have a separate version, denoted by either:
190
317
191
318
192
319
### Building from source
193
-
Use `Makefile` to build Database Lab components from source.
320
+
The Database Lab Engine provides multiple build targets in its `Makefile`:
321
+
322
+
```bash
323
+
cd engine
324
+
make help# View all available build targets
325
+
make build # Build all components (Server, CLI, CI Checker)
326
+
make build-dle # Build Database Lab Engine binary and Docker image
327
+
make test # Run unit tests
328
+
```
329
+
330
+
You can also build specific components:
331
+
332
+
```bash
333
+
# Build the CLI for all supported platforms
334
+
make build-client
335
+
336
+
# Build the Server in debug mode
337
+
make build-debug
194
338
195
-
Run `make help` to see all available targets.
339
+
# Build and run DLE locally
340
+
make run-dle
341
+
```
196
342
197
-
<!--
198
-
mention dev images: See our [GitLab Container Registry](https://gitlab.com/postgres-ai/database-lab/container_registry) to find the images built for development branches.
199
-
-->
343
+
See our [GitLab Container Registry](https://gitlab.com/postgres-ai/database-lab/container_registry) to find pre-built images for development branches.
<strong>⚡ Blazing-fast Postgres cloning and branching 🐘</strong><br /><br />
17
+
<strong>⚡ Blazing-fast PostgreSQL cloning and branching 🐘</strong><br /><br />
18
18
🛠️ Build powerful dev/test environments.<br />
19
19
🔃 Cover 100% of DB migrations with CI tests.<br>
20
20
💡 Quickly verify ChatGPT ideas to get rid of hallucinations.<br /><br />
21
-
Available for any PostgreSQL, including self-managed and managed<sup>*</sup> like AWS RDS, GCP CloudSQL, Supabase, Timescale.<br /><br />
22
-
Can be installed and used anywhere: all clouds and on-premises.
21
+
Available for any PostgreSQL, including self-managed and managed services<sup>*</sup> like AWS RDS, GCP Cloud SQL, Supabase, and Timescale.<br /><br />
22
+
It can be installed and used anywhere: across all cloud environments and on-premises.
23
23
</div>
24
24
25
25
<br />
@@ -60,11 +60,11 @@ For example, cloning a 1 TiB PostgreSQL database takes just about 10 seconds. On
- Visit [Postgres.ai Console](https://console.postgres.ai/), set up your first organization and provision a DBLab Standard Edition (DBLab SE) to any cloud or on-prem
63
+
- Visit [Postgres.ai Console](https://console.postgres.ai/), set up your first organization, and provision a DBLab Standard Edition (DBLab SE) to any cloud or on-premises environment.
64
64
-[Pricing](https://postgres.ai/pricing) (starting at $62/month)
65
-
-[Doc: How to install DBLab SE](https://postgres.ai/docs/how-to-guides/administration/install-dle-from-postgres-ai)
65
+
-[Documentation: How to install DBLab SE](https://postgres.ai/docs/how-to-guides/administration/install-dle-from-postgres-ai)
66
66
- Demo: https://demo.dblab.dev (use the token `demo-token` to access)
67
-
- Looking for a free version? Install DBLab Community Edition by [following this tutorial](https://postgres.ai/docs/tutorials/database-lab-tutorial)
67
+
- Looking for a free version? Install the DBLab Community Edition by [following this tutorial](https://postgres.ai/docs/tutorials/database-lab-tutorial).
68
68
69
69
## How it works
70
70
Thin cloning is fast because it is based on [Copy-on-Write (CoW)](https://en.wikipedia.org/wiki/Copy-on-write#In_computer_storage). DBLab employs two technologies for enabling thin cloning: [ZFS](https://en.wikipedia.org/wiki/ZFS) (default) and [LVM](https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)).
@@ -88,20 +88,20 @@ Read more:
88
88
89
89
## Features
90
90
- Speed & scale
91
-
- Blazing-fast cloning of Postgres databases – clone in seconds, irrespective of database size
91
+
- Blazing-fast cloning of PostgreSQL databases – clone in seconds, irrespective of database size
92
92
- Theoretical max of snapshots/clones: 2<sup>64</sup> ([ZFS](https://en.wikipedia.org/wiki/ZFS), default)
93
93
- Maximum size of PostgreSQL data directory: 256 quadrillion zebibytes, or 2<sup>128</sup> bytes ([ZFS](https://en.wikipedia.org/wiki/ZFS), default)
94
94
- Support & technologies
95
95
- Supported PostgreSQL versions: 9.6–17
96
96
- Thin cloning ([CoW](https://en.wikipedia.org/wiki/Copy-on-write)) technologies: [ZFS](https://en.wikipedia.org/wiki/ZFS) and [LVM](https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux))
97
97
- UI for manual tasks and API & CLI for automation
98
98
- Packaged in Docker containers for all components
99
-
-Postgres containers
99
+
-PostgreSQL containers
100
100
- Popular extensions including contrib modules, pgvector, HypoPG and many others ([docs](https://postgres.ai/docs/database-lab/supported-databases#extensions-included-by-default))
101
101
- Customization capabilities for containers ([docs](https://postgres.ai/docs/database-lab/supported-databases#how-to-add-more-extensions))
102
-
- Docker container and Postgres config parameters in DBLab config
102
+
- Docker container and PostgreSQL configuration parameters in the DBLab config
103
103
- Source database requirements
104
-
- Location flexibility: self-managed Postgres, AWS RDS, GCP CloudSQL, Azure, etc. No source adjustments needed
- No ZFS or Docker requirements for source databases
106
106
- Data provisioning & retrieval
107
107
- Physical (pg_basebackup, WAL-G, pgBackRest) and logical (dump/restore) provisioning
@@ -128,8 +128,8 @@ The simplest way to show your support is by giving us a star on GitHub or GitLab
128
128

129
129
130
130
### Spread the word
131
-
-Shoot out a tweet and mention [@Database_Lab](https://twitter.com/Database_Lab)
132
-
- Share this repo's link on your favorite social media platform
131
+
-Tweet about DBLab and mention [@Database_Lab](https://twitter.com/Database_Lab).
132
+
- Share a link to this repository on your favorite social media platform.
133
133
134
134
### Share your experience
135
135
If DBLab has been a vital tool for you, tell the world about your journey. Use the logo from the `./assets` folder for a visual touch. Whether it's in documents, presentations, applications, or on your website, let everyone know you trust and use DBLab.
@@ -157,10 +157,7 @@ For darker backgrounds:
157
157
```
158
158
159
159
### Propose an idea or report a bug
160
-
Check out our [contributing guide](./CONTRIBUTING.md) for more details.
161
-
162
-
### Participate in development
163
-
Check out our [contributing guide](./CONTRIBUTING.md) for more details.
160
+
For proposals, bug reports, and participation in development, see our [Contributing Guide](./CONTRIBUTING.md).
164
161
165
162
166
163
### Reference guides
@@ -173,8 +170,11 @@ Check out our [contributing guide](./CONTRIBUTING.md) for more details.
173
170
-[How to install and initialize Database Lab CLI](https://postgres.ai/docs/how-to-guides/cli/cli-install-init)
174
171
-[How to manage DBLab](https://postgres.ai/docs/how-to-guides/administration)
175
172
-[How to work with clones](https://postgres.ai/docs/how-to-guides/cloning)
173
+
-[How to work with branches](XXXXXXX) – TBD
174
+
-[How to integrate DBLab with GitHub Actions](XXXXXXX) – TBD
175
+
-[How to integrate DBLab with GitLab CI/CD](XXXXXXX) – TBD
176
176
177
-
More you can find in [the "How-to guides" section](https://postgres.ai/docs/how-to-guides) of the docs.
177
+
You can find more in the ["How-to guides" section](https://postgres.ai/docs/how-to-guides) of the documentation.
DBLab source code is licensed under the OSI-approved open source license [Apache 2.0](https://opensource.org/license/apache-2-0/).
186
+
The DBLab source code is licensed under the OSI-approved open source license [Apache 2.0](https://opensource.org/license/apache-2-0/).
187
187
188
188
Reach out to the Postgres.ai team if you want a trial or commercial license that does not contain the GPL clauses: [Contact page](https://postgres.ai/contact).
189
189
190
190
## Community & Support
191
-
-["Database Lab Engine Community Covenant Code of Conduct"](./CODE_OF_CONDUCT.md)
192
-
- Where to get help: [Contact page](https://postgres.ai/contact)
191
+
-[Database Lab Engine Community Covenant Code of Conduct](./CODE_OF_CONDUCT.md)
192
+
- Where to get help: [Contact page](https://postgres.ai/contact).
193
193
-[Community Slack](https://slack.postgres.ai)
194
-
- If you need to report a security issue, follow instructions in ["Database Lab Engine security guidelines"](./SECURITY.md)
194
+
- If you need to report a security issue, follow the instructions in [Database Lab Engine Security Guidelines](./SECURITY.md).
0 commit comments