Skip to content

Testing & Contribution

How we ensure software quality through automated tests and the contribution process (Pull Request).

Backend Testing

Using Jest for Unit and Integration Tests. All business logic (Use Cases) is covered to prevent regressions.

Frontend Testing

Using Vitest with React Testing Library to verify UI components and state management (Zustand).

Guardrails

Sensitive changes must pass AI tests (ai.service.spec.ts) to ensure the routing engine remains intact.

Backend Testing (NestJS + Jest)

Backend tests are located in `server/src/tests`. We prioritize testing Database Strategies and the AI Service.
Backend test commands

# Run all tests

npm run test

# Run tests in watch mode (for dev)

npm run test:watch

# Run a specific test file

npx jest server/src/tests/ai/ai.service.spec.ts

Frontend Testing (Vite + Vitest)

The frontend uses Vitest for maximum speed in the development environment.
Frontend test commands

# Run frontend tests

cd client && npm run test

Security Audits

Periodically, Data Explorer undergoes in-depth Security Audits (Pentest) to identify risks in authorization logic, SSRF, and Injections.

Logic Hardening

All security patches are based on real-world attack scenarios (like IDOR visibility or SQL bypass).

Manual Validation

Complex logic vulnerabilities are manually validated by the dev team before core integration.

Contribution Flow

We follow the GitHub Flow. Every change starts with a new feature branch.
1

Create Branch

feature/your-feature-name

2

Commit & Push

Tuân thủ Conventional Commits (feat:, fix:, chore:)

3

Open Pull Request

Mô tả rõ ràng các thay đổi và đính kèm video/ảnh minh họa

4

Review & Merge

Ít nhất 1 approval từ maintainers

Coding Standards

To keep the project maintainable, we apply the following rules:
Use ESLint and Prettier for automated formatting.
All new functions must be typed (TypeScript strict mode).
Use Ports & Adapters architecture instead of direct library calls in Services.
Avoid deep nesting and prioritize Early Returns.

Ready to explore data?

Join the community on GitHub to contribute to the smartest local database IDE.

Launch App