PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
FEATURE (docs): Update docs how to run frontend and backend
Rostislav Dugin76d67d6be807
diff --git a/backend/Makefile b/backend/Makefilenew file mode 100644index 00000000..435ed021--- /dev/null+++ b/backend/Makefile@@ -0,0 +1,20 @@+run:+ go run cmd/main.go++test:+ go test -count=1 ./internal/...++lint:+ golangci-lint fmt && golangci-lint run++migration-create:+ goose create $(name) sql++migration-up:+ goose up++migration-down:+ goose down++swagger:+ swag init -g ./cmd/main.go -o swaggerdiff --git a/backend/README.md b/backend/README.mdindex d2d6b161..8f47ff24 100644--- a/backend/README.md+++ b/backend/README.md@@ -9,44 +9,39 @@ instead of postgresus-db from docker-compose.yml in the root folder.# Run-To build:--> go build /cmd/main.go-To run:-> go run /cmd/main.go+> make runTo run tests:-> go test ./internal/...+> make testBefore commit (make sure `golangci-lint` is installed):-> golangci-lint fmt-> golangci-lint run+> make lint# MigrationsTo create migration:-> goose create MIGRATION_NAME sql+> make migration-create name=MIGRATION_NAMETo run migrations:-> goose up+> make migration-upIf latest migration failed:To rollback on migration:-> goose down+> make migration-down# SwaggerTo generate swagger docs:-> swag init -g .\cmd\main.go -o swagger+> make swaggerSwagger URL is:diff --git a/contribute/README.md b/contribute/README.mdindex 6e59270d..3583c239 100644--- a/contribute/README.md+++ b/contribute/README.md@@ -37,7 +37,7 @@ Example:Before any commit, make sure:1. You created critical tests for your changes-2. `golangci-lint fmt` and `golangci-lint run` are passing+2. `make lint` is passing (for backend) and `npm run lint` is passing (for frontend)3. All tests are passing4. Project is building successfullydiff --git a/frontend/README.md b/frontend/README.mdindex 9aa3e7c9..9324f7e5 100644--- a/frontend/README.md+++ b/frontend/README.md@@ -1,54 +1,39 @@-# React + TypeScript + Vite--This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.--Currently, two official plugins are available:--- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh-- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh--## Expanding the ESLint configuration--If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:--```js-export default tseslint.config({- extends: [- // Remove ...tseslint.configs.recommended and replace with this- ...tseslint.configs.recommendedTypeChecked,- // Alternatively, use this for stricter rules- ...tseslint.configs.strictTypeChecked,- // Optionally, add this for stylistic rules- ...tseslint.configs.stylisticTypeChecked,- ],- languageOptions: {- // other options...- parserOptions: {- project: ['./tsconfig.node.json', './tsconfig.app.json'],- tsconfigRootDir: import.meta.dirname,- },- },-});+# Frontend Development++## Development++To run the development server:++```bash+npm run dev+```++## Build++To build the project for production:++```bash+npm run build+```++This will compile TypeScript and create an optimized production build.++## Code Quality++### Linting++To check for linting errors:++```bash+npm run lint```-You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:--```js-// eslint.config.js-import reactDom from 'eslint-plugin-react-dom';-import reactX from 'eslint-plugin-react-x';--export default tseslint.config({- plugins: {- // Add the react-x and react-dom plugins- 'react-x': reactX,- 'react-dom': reactDom,- },- rules: {- // other rules...- // Enable its recommended typescript rules- ...reactX.configs['recommended-typescript'].rules,- ...reactDom.configs.recommended.rules,- },-});+### Formatting++To format code using Prettier:++```bash+npm run format```++This will automatically format all TypeScript, JavaScript, JSON, CSS, and Markdown files.