-
-
Notifications
You must be signed in to change notification settings - Fork 18
secret storage #1447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
secret storage #1447
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
0ed44cb
secret storage
gugu a516bc4
Merge branch 'main' into secrets
gugu cf9822c
secret encryption
gugu 6a2d675
Merge branch 'secrets' of github.com:rocket-admin/rocketadmin into se…
gugu 8ec1593
remove unused decorator, fix migration and tests
gugu 27c3809
improve architecture
gugu 068392d
Merge branch 'main' into secrets
gugu 8109d6c
fix test runner
gugu 2031729
Merge branch 'secrets' of github.com:rocket-admin/rocketadmin into se…
gugu 55589aa
errors to constants
gugu 7a6c45f
Merge branch 'main' into secrets
gugu 93c15f3
wait for health checks
gugu 2894d85
Merge branch 'secrets' of github.com:rocket-admin/rocketadmin into se…
gugu 9f3b1d4
fix redis tests
gugu b40d3d6
fix cassandra and redis tests
gugu 63b2db5
bigger instance
gugu 4be6e2e
fix tests to handle readonly file system
gugu eb311da
fix flaky test
gugu 9e1ff27
fix flaky tests
gugu c9f9185
fix flaky tests
gugu ab4a5b3
swagger, correct response type
gugu e207ba5
reverse relations
gugu 42fb55e
missing file
gugu afad533
proper types for this, coding conventions
gugu 21dca8b
audit dto fix
gugu 84cb484
apibody guards, pagination dto
gugu 864f47c
missing isArray
gugu 2128908
pagination fix
gugu fd85299
pagination test fix
gugu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| CLAUDE.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,132 @@ | ||
| # Claude Code Configuration | ||
| # CLAUDE.md | ||
|
|
||
| ## Frontend Tests | ||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| RocketAdmin is a database administration panel that allows users to manage database connections, tables, and data. It consists of multiple components in a monorepo structure: | ||
|
|
||
| - **backend/** - NestJS API server (TypeScript, ES modules) | ||
| - **frontend/** - Angular 19 web application (standalone components) | ||
| - **rocketadmin-agent/** - NestJS agent for connecting to databases behind firewalls | ||
| - **autoadmin-ws-server/** - WebSocket server for agent communication | ||
| - **shared-code/** - Shared data access layer and utilities used by backend and agent | ||
|
|
||
| ## Development Commands | ||
|
|
||
| ### Backend | ||
|
|
||
| ```bash | ||
| cd backend | ||
| yarn start:dev # Start dev server with hot reload | ||
| yarn build # Build for production | ||
| yarn lint # ESLint with auto-fix | ||
| yarn test # Run non-saas AVA tests (serial) | ||
| yarn test-all # Run all AVA tests (5min timeout, serial) | ||
| yarn test-saas # Run SaaS-specific tests | ||
| ``` | ||
|
|
||
| ### Frontend | ||
|
|
||
| ```bash | ||
| cd frontend | ||
| yarn start # Start Angular dev server | ||
| yarn build # Production build | ||
| yarn test:ci # Run tests headlessly (CI mode) | ||
| yarn test --browsers=ChromeHeadlessCustom --no-watch --no-progress # Headless tests | ||
| yarn lint # TSLint (deprecated, needs ESLint migration) | ||
| ``` | ||
|
|
||
| ### Running Backend Tests with Docker | ||
|
|
||
| The project uses `just` for test orchestration: | ||
|
|
||
| To run frontend tests: | ||
| ```bash | ||
| cd frontend && yarn test --browsers=ChromeHeadlessCustom --no-watch --no-progress | ||
| ``` | ||
| just test # Run all backend tests with Docker Compose | ||
| just test "path/to/test.ts" # Run specific test file | ||
| ``` | ||
|
|
||
| This spins up test databases (MySQL, PostgreSQL, MSSQL, Oracle, IBM DB2, MongoDB, DynamoDB) via `docker-compose.tst.yml`. | ||
|
|
||
| ### Migrations | ||
|
|
||
| ```bash | ||
| cd backend | ||
| yarn build # Must build first | ||
| yarn migration:generate src/migrations/MigrationName # Generate migration | ||
| yarn migration:run # Run pending migrations | ||
| yarn migration:revert # Revert last migration | ||
| ``` | ||
|
|
||
| ## Architecture | ||
|
|
||
| ### Monorepo Structure | ||
|
|
||
| - Uses Yarn workspaces with packages: `backend`, `rocketadmin-agent`, `shared-code` | ||
| - `shared-code` is imported as `@rocketadmin/shared-code` workspace dependency | ||
| - Frontend is a separate Angular project (not a workspace member) | ||
|
|
||
| ### Backend (NestJS) | ||
|
|
||
| - **Entities pattern**: Each entity has its own directory under `src/entities/` containing: | ||
| - `*.entity.ts` - TypeORM entity | ||
| - `*.module.ts` - NestJS module | ||
| - `*.controller.ts` - REST endpoints | ||
| - `*.service.ts` - Business logic (use cases) | ||
| - `dto/` - Request/response DTOs with class-validator decorators | ||
| - `*.controller.ee.ts` - Enterprise edition controllers (SaaS features) | ||
| - **Guards**: Authentication and authorization in `src/guards/` | ||
| - **Data access**: Uses `shared-code` for database operations via Knex | ||
| - **Testing**: AVA test framework with tests in `test/ava-tests/` | ||
| - `non-saas-tests/` - Core functionality tests | ||
| - `saas-tests/` - SaaS-specific feature tests | ||
| - `complex-table-tests/` - Complex table operation tests | ||
|
|
||
| ### Frontend (Angular 19) | ||
|
|
||
| See `frontend/CLAUDE.md` for detailed frontend architecture. | ||
|
|
||
| Key points: | ||
| - Standalone components (no NgModules) | ||
| - BehaviorSubject-based state management (no NgRx) | ||
| - Multi-environment builds (development, production, saas, saas-production) | ||
| - Jasmine/Karma testing with ChromeHeadless | ||
|
|
||
| ### Shared Code | ||
|
|
||
| Located in `shared-code/src/`: | ||
| - `data-access-layer/` - Database abstraction supporting MySQL, PostgreSQL, MSSQL, Oracle, MongoDB, DynamoDB, IBM DB2, Cassandra, Elasticsearch | ||
| - `knex-manager/` - Knex connection management | ||
| - `caching/` - LRU cache utilities | ||
| - `helpers/` - Shared utilities | ||
|
|
||
| ### Agent Architecture | ||
|
|
||
| The rocketadmin-agent connects to databases in private networks: | ||
| 1. Agent runs inside customer's network | ||
| 2. Connects to `autoadmin-ws-server` via WebSocket | ||
| 3. Backend communicates with agent through WebSocket server | ||
| 4. Agent executes database queries and returns results | ||
|
|
||
| ## Database Support | ||
|
|
||
| The application supports: MySQL, PostgreSQL, MongoDB, DynamoDB, Cassandra, OracleDB, MSSQL, IBM DB2, Elasticsearch, Redis | ||
|
|
||
| Database-specific DAOs are in `shared-code/src/data-access-layer/`. | ||
|
|
||
| ## Testing Database Connections | ||
|
|
||
| Test databases are defined in `docker-compose.tst.yml`: | ||
| - MySQL: `testMySQL-e2e-testing:3306` | ||
| - PostgreSQL: `testPg-e2e-testing:5432` | ||
| - MSSQL: `mssql-e2e-testing:1433` | ||
| - Oracle: `test-oracle-e2e-testing:1521` | ||
| - IBM DB2: `test-ibm-db2-e2e-testing:50000` | ||
| - MongoDB: `test-mongo-e2e-testing:27017` | ||
| - DynamoDB: `test-dynamodb-e2e-testing:8000` | ||
|
|
||
| ## Coding Conventions | ||
|
|
||
| ### Class Member Ordering | ||
|
|
||
| - Private methods must be placed at the end of the class, after all public methods |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.