From de85a2855870c94ccc44fe9745a6d5f2ea48a386 Mon Sep 17 00:00:00 2001 From: Hinton Date: Tue, 22 Jul 2025 13:26:57 +0200 Subject: [PATCH] Explore kiro --- .kiro/steering/product.md | 24 ++++++++++ .kiro/steering/structure.md | 87 +++++++++++++++++++++++++++++++++++++ .kiro/steering/tech.md | 55 +++++++++++++++++++++++ 3 files changed, 166 insertions(+) create mode 100644 .kiro/steering/product.md create mode 100644 .kiro/steering/structure.md create mode 100644 .kiro/steering/tech.md diff --git a/.kiro/steering/product.md b/.kiro/steering/product.md new file mode 100644 index 00000000000..7995e93c892 --- /dev/null +++ b/.kiro/steering/product.md @@ -0,0 +1,24 @@ +# Product Overview + +Bitwarden is an open-source password manager and secure digital vault. This repository contains all Bitwarden client applications except mobile apps (iOS and Android are separate repositories). + +## Client Applications + +- **Browser Extension**: Cross-browser password manager extension (Chrome, Firefox, Edge, Opera, Safari) +- **Desktop Application**: Native desktop app built with Electron for Windows, macOS, and Linux +- **Web Vault**: Web-based application for managing passwords and secure data +- **CLI Tool**: Command-line interface for managing your vault and organization data + +## Core Features + +- Password generation and storage +- Secure sharing and organization +- Two-factor authentication +- Biometric unlock +- Auto-fill capabilities +- Cross-platform synchronization +- Enterprise and organization management + +## License + +The project uses GPL-3.0 license with additional Bitwarden-specific licensing for enterprise features located in the `bitwarden_license/` directory. diff --git a/.kiro/steering/structure.md b/.kiro/steering/structure.md new file mode 100644 index 00000000000..27dd4b16fdd --- /dev/null +++ b/.kiro/steering/structure.md @@ -0,0 +1,87 @@ +# Project Structure + +## Root Organization + +This is an Nx monorepo with a clear separation between applications and shared libraries. + +``` +├── apps/ # Client applications +├── libs/ # Shared libraries and components +├── bitwarden_license/ # Enterprise/licensed features +├── scripts/ # Build and utility scripts +└── coverage/ # Test coverage reports +``` + +## Applications (`apps/` & `bitwarden_license/`) + +- **`browser/`**: Browser extension (Chrome, Firefox, Edge, Opera, Safari) +- **`web/`**: Web vault application +- **`bit-web/`**: Bitwarden licensed portions of the web vault +- **`desktop/`**: Electron-based desktop application +- **`cli/`**: Command-line interface tool + +Each app has its own: + +- `src/` - Source code +- `package.json` - App-specific dependencies +- `tsconfig.json` - TypeScript configuration +- `jest.config.js` - Test configuration +- `webpack.config.js` - Build configuration (where applicable) + +## Shared Libraries (`libs/`) + +### Core Libraries + +- **`common/`**: Core business logic and models +- **`platform/`**: Platform abstractions and services +- **`components/`**: Reusable UI components +- **`angular/`**: Angular-specific utilities and services + +### Domain Libraries + +- **`auth/`**: Authentication and identity management +- **`vault/`**: Password vault functionality +- **`admin-console/`**: Organization and admin features +- **`billing/`**: Payment and subscription management +- **`key-management/`**: Cryptographic key handling +- **`tools/`**: Generator, import/export, and other tools + +### Infrastructure Libraries + +- **`node/`**: Node.js specific implementations +- **`importer/`**: Data import functionality +- **`eslint/`**: Custom ESLint rules and configurations + +## Licensed Features (`bitwarden_license/`) + +Enterprise and business features with separate licensing: + +- **`bit-common/`**: Licensed common functionality +- **`bit-web/`**: Licensed web features +- **`bit-cli/`**: Licensed CLI features + +## Import Restrictions + +The project enforces strict import boundaries: + +- Apps cannot import from other apps +- `libs/common/` is the base layer - minimal external dependencies +- Domain libraries have controlled dependencies on each other +- Licensed code is isolated from open-source code + +## Path Aliases + +TypeScript path mapping is configured in `tsconfig.base.json`: + +- `@bitwarden/common/*` → `libs/common/src/*` +- `@bitwarden/auth/common` → `libs/auth/src/common` +- `@bitwarden/components` → `libs/components/src` +- And many more for clean imports across the monorepo + +## Configuration Files + +- **`nx.json`**: Nx workspace configuration +- **`angular.json`**: Angular CLI project definitions +- **`tsconfig.base.json`**: Base TypeScript configuration +- **`jest.config.js`**: Root Jest configuration with project references +- **`eslint.config.mjs`**: ESLint configuration with import restrictions diff --git a/.kiro/steering/tech.md b/.kiro/steering/tech.md new file mode 100644 index 00000000000..0b9f0d1769b --- /dev/null +++ b/.kiro/steering/tech.md @@ -0,0 +1,55 @@ +# Technology Stack + +## Build System & Tooling + +- **Webpack**: Module bundler for browser extension and desktop apps +- **TypeScript**: Primary language (ES2016 target, ES2020 modules) +- **Node.js**: Runtime requirement (~22) with npm (~10) + +## Frontend Frameworks + +- **Angular 19**: Primary framework for web, desktop, and browser popup +- **Lit**: Web components library for some UI elements +- **Tailwind CSS**: Utility-first CSS framework + +## Testing & Quality + +- **Jest**: Testing framework with coverage reporting +- **ESLint**: Code linting with TypeScript and Angular rules +- **Prettier**: Code formatting +- **Husky**: Git hooks for pre-commit checks +- **Storybook**: Component development and documentation + +## Key Dependencies + +- **Electron**: Desktop app framework +- **RxJS**: Reactive programming + +## Common Commands + +```bash +# Install dependencies +npm install + +# Linting and formatting +npm run lint +npm run lint:fix +npm run prettier + +# Testing +npm run test +npm run test:watch + +# Storybook +npm run storybook + +# Type checking +npm run test:types +``` + +## Development Requirements + +- Node.js ~22 +- npm ~10 +- Angular CLI 19 +- TypeScript 5.5+