From 77aaabeaa14cd2328265c7717ee7786bf2083942 Mon Sep 17 00:00:00 2001 From: Rostislav Dugin Date: Tue, 11 Nov 2025 16:56:33 +0300 Subject: [PATCH] FEATURE (docs): Update readme and docs links --- README.md | 21 +++-- assets/logo.svg | 11 ++- contribute/README.md | 94 ------------------- contribute/how-to-add-notifier.md | 45 --------- contribute/how-to-add-storage.md | 51 ---------- .../notifiers/EditSlackNotifierComponent.tsx | 2 +- .../notifiers/EditTeamsNotifierComponent.tsx | 2 +- .../EditGoogleDriveStorageComponent.tsx | 2 +- .../edit/storages/EditS3StorageComponent.tsx | 2 +- 9 files changed, 26 insertions(+), 204 deletions(-) delete mode 100644 contribute/README.md delete mode 100644 contribute/how-to-add-notifier.md delete mode 100644 contribute/how-to-add-storage.md diff --git a/README.md b/README.md index 59b55d3..9ffe76c 100644 --- a/README.md +++ b/README.md @@ -40,13 +40,13 @@ - **Precise timing**: run backups at specific times (e.g., 4 AM during low traffic) - **Smart compression**: 4-8x space savings with balanced compression (~20% overhead) -### 🗄️ **Multiple Storage Destinations** +### 🗄️ **Multiple Storage Destinations** (docs) - **Local storage**: Keep backups on your VPS/server - **Cloud storage**: S3, Cloudflare R2, Google Drive, NAS, Dropbox and more - **Secure**: All data stays under your control -### 📱 **Smart Notifications** +### 📱 **Smart Notifications** (docs) - **Multiple channels**: Email, Telegram, Slack, Discord, webhooks - **Real-time updates**: Success and failure notifications @@ -58,13 +58,20 @@ - **SSL support**: Secure connections available - **Easy restoration**: One-click restore from any backup +### 👥 **Suitable for Teams** (docs) + +- **Workspaces**: Group databases, notifiers and storages for different projects or teams +- **Access management**: Control who can view or manage specific databases with role-based permissions +- **Audit logs**: Track all system activities and changes made by users +- **User roles**: Assign viewer, member, admin or owner roles within workspaces + ### 🐳 **Self-Hosted & Secure** - **Docker-based**: Easy deployment and management - **Privacy-first**: All your data stays on your infrastructure - **Open source**: Apache 2.0 licensed, inspect every line of code -### 📦 Installation +### 📦 Installation (docs) You have three ways to install Postgresus: @@ -118,8 +125,6 @@ This single command will: Create a `docker-compose.yml` file with the following configuration: ```yaml -version: "3" - services: postgresus: container_name: postgresus @@ -149,9 +154,9 @@ docker compose up -d 6. **Add notifications** (optional): Configure email, Telegram, Slack, or webhook notifications 7. **Save and start**: Postgresus will validate settings and begin the backup schedule -### 🔑 Resetting Admin Password +### 🔑 Resetting Password (docs) -If you need to reset the admin password, you can use the built-in password reset command: +If you need to reset the password, you can use the built-in password reset command: ```bash docker exec -it postgresus ./main --new-password="YourNewSecurePassword123" --email="admin" @@ -169,4 +174,4 @@ This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENS ## 🤝 Contributing -Contributions are welcome! Read [contributing guide](contribute/README.md) for more details, prioerities and rules are specified there. If you want to contribute, but don't know what and how - message me on Telegram [@rostislav_dugin](https://t.me/rostislav_dugin) +Contributions are welcome! Read contributing guide for more details, prioerities and rules are specified there. If you want to contribute, but don't know what and how - message me on Telegram [@rostislav_dugin](https://t.me/rostislav_dugin) diff --git a/assets/logo.svg b/assets/logo.svg index b484a2c..7f18a5b 100644 --- a/assets/logo.svg +++ b/assets/logo.svg @@ -1,5 +1,12 @@ - - + + + + + + + + + diff --git a/contribute/README.md b/contribute/README.md deleted file mode 100644 index 35f117e..0000000 --- a/contribute/README.md +++ /dev/null @@ -1,94 +0,0 @@ -### Prerequisites - -1. Read docs in /docs folder, README.md in /backend and /frontend folders -2. Run both backend and frontend following the instructions in their respective README.md files (for development) -3. Read this file till the end - -### How to create a pull request? - -We use gitflow approach. - -1. Create a new branch from main -2. Make changes -3. Create a pull request to main -4. Wait for review -5. Merge pull request - -Commits should be named in the following format depending on the type of change: - -- `FEATURE (area): What was done` -- `FIX (area): What was fixed` -- `REFACTOR (area): What was refactored` - -To see examples, look at commit history in main branch. - -Branches should be named in the following format: - -- `feature/what_was_done` -- `fix/what_was_fixed` -- `refactor/what_was_refactored` - -Example: - -- `feature/add_support_of_kubernetes_helm` -- `fix/make_healthcheck_optional` -- `refactor/refactor_navbar` - -Before any commit, make sure: - -1. You created critical tests for your changes -2. `make lint` is passing (for backend) and `npm run lint` is passing (for frontend) -3. All tests are passing -4. Project is building successfully -5. All your commits should be squashed into one commit with proper message (or to meaningful parts) -6. Code do really refactored and production ready -7. You have one single PR per one feature (at least, if features not connected) - -### Automated Versioning - -This project uses automated versioning based on commit messages: - -- **FEATURE (area)**: Creates a **minor** version bump (e.g., 1.0.0 → 1.1.0) -- **FIX (area)**: Creates a **patch** version bump (e.g., 1.0.0 → 1.0.1) -- **REFACTOR (area)**: Creates a **patch** version bump (e.g., 1.0.0 → 1.0.1) -- **BREAKING CHANGE**: Creates a **major** version bump (e.g., 1.0.0 → 2.0.0) - -The system automatically: - -- Analyzes commits since the last release -- Determines the appropriate version bump -- Generates a changelog grouped by area (frontend/backend/etc.) -- Creates GitHub releases with detailed release notes -- Updates package.json version numbers - -To skip automated release (for documentation updates, etc.), add `[skip-release]` to your commit message. - -### Docs - -If you need to add some explanation, do it in appropriate place in the code. Or in the /docs folder if it is something general. For charts, use Mermaid. - -### Priorities - -Before taking anything more than a couple of lines of code, please write Rostislav via Telegram (@rostislav_dugin) and confirm priority. It is possible that we already have something in the works, it is not needed or it's not project priority. - -Nearsest features: -- add API keys and API actions -- add encryption - -Storages tasks: -- check AWS S3 support -- check Google Cloud S3 support -- add FTP -- add Dropbox -- add OneDrive -- add NAS -- add Yandex Drive - -Notifications tasks: -- add Mattermost -- make webhooks flexible -- add Gotify - -Extra: - -- add HTTPS for Postgresus \ No newline at end of file diff --git a/contribute/how-to-add-notifier.md b/contribute/how-to-add-notifier.md deleted file mode 100644 index 8f836e1..0000000 --- a/contribute/how-to-add-notifier.md +++ /dev/null @@ -1,45 +0,0 @@ -# How to add new notifier to Postgresus (Discord, Slack, Telegram, Email, Webhook, etc.) - -## Backend part - -1. Create new model in `backend/internal/features/notifiers/models/{notifier_name}/` folder. Implement `NotificationSender` interface from parent folder. - - The model should implement `Send(logger *slog.Logger, heading string, message string) error` and `Validate() error` methods - - Use UUID primary key as `NotifierID` that references the main notifiers table - -2. Add new notifier type to `backend/internal/features/notifiers/enums.go` in the `NotifierType` constants. - -3. Update the main `Notifier` model in `backend/internal/features/notifiers/model.go`: - - Add new notifier field with GORM foreign key relation - - Update `getSpecificNotifier()` method to handle the new type - - Update `Send()` method to route to the new notifier - -4. If you need to add some .env variables to test, add them in `backend/internal/config/config.go` (so we can use it in tests) - -5. If you need some Docker container to test, add it to `backend/docker-compose.yml.example`. For sensitive data - keep it blank. - -6. If you need some sensitive envs to test in pipeline, message @rostislav_dugin so I can add it to GitHub Actions. For example, API keys or credentials. - -7. Create new migration in `backend/migrations` folder: - - Create table with `notifier_id` as UUID primary key - - Add foreign key constraint to `notifiers` table with CASCADE DELETE - - Look at existing notifier migrations for reference - -8. Make sure that all tests are passing. - -## Frontend part - -If you are able to develop only backend - it's fine, message @rostislav_dugin so I can complete UI part. - -1. Add models and validator to `frontend/src/entity/notifiers/models/{notifier_name}/` folder and update `index.ts` file to include new model exports. - -2. Upload an SVG icon to `public/icons/notifiers/`, update `src/entity/notifiers/models/getNotifierLogoFromType.ts` to return new icon path, update `src/entity/notifiers/models/NotifierType.ts` to include new type, and update `src/entity/notifiers/models/getNotifierNameFromType.ts` to return new name. - -3. Add UI components to manage your notifier: - - `src/features/notifiers/ui/edit/notifiers/Edit{NotifierName}Component.tsx` (for editing) - - `src/features/notifiers/ui/show/notifier/Show{NotifierName}Component.tsx` (for display) - -4. Update main components to handle the new notifier type: - - `EditNotifierComponent.tsx` - add import, validation function, and component rendering - - `ShowNotifierComponent.tsx` - add import and component rendering - -5. Make sure everything is working as expected. diff --git a/contribute/how-to-add-storage.md b/contribute/how-to-add-storage.md deleted file mode 100644 index e26ee5b..0000000 --- a/contribute/how-to-add-storage.md +++ /dev/null @@ -1,51 +0,0 @@ -# How to add new storage to Postgresus (S3, FTP, Google Drive, NAS, etc.) - -## Backend part - -1. Create new model in `backend/internal/features/storages/models/{storage_name}/` folder. Implement `StorageFileSaver` interface from parent folder. - - The model should implement `SaveFile(logger *slog.Logger, fileID uuid.UUID, file io.Reader) error`, `GetFile(fileID uuid.UUID) (io.ReadCloser, error)`, `DeleteFile(fileID uuid.UUID) error`, `Validate() error`, and `TestConnection() error` methods - - Use UUID primary key as `StorageID` that references the main storages table - - Add `TableName() string` method to return the proper table name - -2. Add new storage type to `backend/internal/features/storages/enums.go` in the `StorageType` constants. - -3. Update the main `Storage` model in `backend/internal/features/storages/model.go`: - - Add new storage field with GORM foreign key relation - - Update `getSpecificStorage()` method to handle the new type - - Update `SaveFile()`, `GetFile()`, and `DeleteFile()` methods to route to the new storage - - Update `Validate()` method to include new storage validation - -4. If you need to add some .env variables to test, add them in `backend/internal/config/config.go` (so we can use it in tests) - -5. If you need some Docker container to test, add it to `backend/docker-compose.yml.example`. For sensitive data - keep it blank. - -6. If you need some sensitive envs to test in pipeline, message @rostislav_dugin so I can add it to GitHub Actions. For example, Google Drive envs or FTP credentials. - -7. Create new migration in `backend/migrations` folder: - - Create table with `storage_id` as UUID primary key - - Add foreign key constraint to `storages` table with CASCADE DELETE - - Look at existing storage migrations for reference - -8. Update tests in `backend/internal/features/storages/model_test.go` to test new storage - -9. Make sure that all tests are passing. - -## Frontend part - -If you are able to develop only backend - it's fine, message @rostislav_dugin so I can complete UI part. - -1. Add models and api to `frontend/src/entity/storages/models/` folder and update `index.ts` file to include new model exports. - - Create TypeScript interface for your storage model - - Add validation function if needed - -2. Upload an SVG icon to `public/icons/storages/`, update `src/entity/storages/models/getStorageLogoFromType.ts` to return new icon path, update `src/entity/storages/models/StorageType.ts` to include new type, and update `src/entity/storages/models/getStorageNameFromType.ts` to return new name. - -3. Add UI components to manage your storage: - - `src/features/storages/ui/edit/storages/Edit{StorageName}Component.tsx` (for editing) - - `src/features/storages/ui/show/storages/Show{StorageName}Component.tsx` (for display) - -4. Update main components to handle the new storage type: - - `EditStorageComponent.tsx` - add import and component rendering - - `ShowStorageComponent.tsx` - add import and component rendering - -5. Make sure everything is working as expected. diff --git a/frontend/src/features/notifiers/ui/edit/notifiers/EditSlackNotifierComponent.tsx b/frontend/src/features/notifiers/ui/edit/notifiers/EditSlackNotifierComponent.tsx index 308a0b0..93d3e2b 100644 --- a/frontend/src/features/notifiers/ui/edit/notifiers/EditSlackNotifierComponent.tsx +++ b/frontend/src/features/notifiers/ui/edit/notifiers/EditSlackNotifierComponent.tsx @@ -14,7 +14,7 @@ export function EditSlackNotifierComponent({ notifier, setNotifier, setIsUnsaved
diff --git a/frontend/src/features/notifiers/ui/edit/notifiers/EditTeamsNotifierComponent.tsx b/frontend/src/features/notifiers/ui/edit/notifiers/EditTeamsNotifierComponent.tsx index 186c361..0bea827 100644 --- a/frontend/src/features/notifiers/ui/edit/notifiers/EditTeamsNotifierComponent.tsx +++ b/frontend/src/features/notifiers/ui/edit/notifiers/EditTeamsNotifierComponent.tsx @@ -30,7 +30,7 @@ export function EditTeamsNotifierComponent({ notifier, setNotifier, setIsUnsaved
diff --git a/frontend/src/features/storages/ui/edit/storages/EditGoogleDriveStorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditGoogleDriveStorageComponent.tsx index c0431f0..8d39a0f 100644 --- a/frontend/src/features/storages/ui/edit/storages/EditGoogleDriveStorageComponent.tsx +++ b/frontend/src/features/storages/ui/edit/storages/EditGoogleDriveStorageComponent.tsx @@ -40,7 +40,7 @@ export function EditGoogleDriveStorageComponent({ storage, setStorage, setIsUnsa
- + How to connect Google Drive?
diff --git a/frontend/src/features/storages/ui/edit/storages/EditS3StorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditS3StorageComponent.tsx index e90e9ea..bda1184 100644 --- a/frontend/src/features/storages/ui/edit/storages/EditS3StorageComponent.tsx +++ b/frontend/src/features/storages/ui/edit/storages/EditS3StorageComponent.tsx @@ -16,7 +16,7 @@ export function EditS3StorageComponent({ storage, setStorage, setIsUnsaved }: Pr