Skip to content

Commit fda4912

Browse files
apply prettier formatting to all files
Auto-formatted by Prettier v3 during ESLint migration
1 parent dcfa4d0 commit fda4912

41 files changed

Lines changed: 378 additions & 306 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.serena/memories/architecture_patterns.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,48 @@
33
## Browser Extension Architecture
44

55
### Multi-Context Design
6+
67
The extension operates in multiple browser contexts:
8+
79
1. **DevTools Panel** (`src/Pages/Panel`) - Main UI for DDP tracking and Minimongo inspection
810
2. **Options Page** (`src/Pages/Options`) - Extension settings and configuration
911
3. **Browser Action Popup** (`src/Pages/Popup`) - Quick access popup from toolbar
1012
4. **Background Scripts** - Browser extension background processes (in `src/Browser/`)
1113
5. **Content Scripts** - Injected into Meteor app pages (in `src/Injectors/`)
1214

1315
### Communication Bridge
16+
1417
- `src/Bridge.ts` handles inter-context communication
1518
- Uses browser extension messaging APIs
1619
- Coordinates between DevTools panel, content scripts, and page context
1720

1821
## State Management with MobX
1922

2023
### Store Pattern
24+
2125
- MobX 6 with `mobx-react-lite` for React integration
2226
- Stores located in `src/Stores/`
2327
- Likely uses observable state with computed values and actions
2428
- React components observe stores using hooks
2529

2630
### State Persistence
31+
2732
- **Dexie (IndexedDB)** for persistent storage (bookmarks)
2833
- Located in `src/Database/`
2934
- Allows saving DDP messages across sessions and browser restarts
3035

3136
## Component Architecture
3237

3338
### UI Framework Hierarchy
39+
3440
1. **Blueprint** - Primary component library (buttons, dialogs, forms, etc.)
3541
2. **Custom Components** - Project-specific components in `src/Components/`
3642
3. **Styled Components** - CSS-in-JS for component-specific styling
3743
4. **SCSS** - Global styles and theming
3844
5. **Tailwind CSS + DaisyUI** - Utility classes for rapid styling
3945

4046
### Component Patterns
47+
4148
- Functional components with React Hooks (React 17)
4249
- MobX observer components using `observer()` HOC or hooks
4350
- Likely uses `react-singleton-hook` for global singletons
@@ -46,7 +53,9 @@ The extension operates in multiple browser contexts:
4653
## Data Visualization
4754

4855
### D3.js Integration
56+
4957
Used for visualizing Meteor/DDP data structures:
58+
5059
- **d3-hierarchy** - Tree structures for Minimongo documents
5160
- **d3-shape** - Shapes for data visualization
5261
- **d3-selection** - DOM manipulation for charts
@@ -57,17 +66,20 @@ Custom "Object Treerinator" for document visualization (mentioned in README)
5766
## Performance Optimizations
5867

5968
### Virtualization
69+
6070
- `react-window` + `react-window-infinite-loader` for handling thousands of DDP messages
6171
- Virtual scrolling prevents DOM bloat with large datasets
6272

6373
### Memoization & Throttling
74+
6475
- `lodash.memoize` - Cache expensive computations
6576
- `lodash.debounce` - Debounce user input
6677
- `lodash.throttle` - Throttle high-frequency events (DDP message processing)
6778

6879
## Build System
6980

7081
### Webpack Configuration
82+
7183
- **Base config** - Shared settings
7284
- **Dev builds** - Watch mode, source maps, faster builds
7385
- **Prod builds** - Minification, optimization
@@ -76,6 +88,7 @@ Custom "Object Treerinator" for document visualization (mentioned in README)
7688
- Firefox may use Manifest V2 or adapted V3
7789

7890
### Asset Handling
91+
7992
- `file-loader` - Images and static assets
8093
- `css-loader` + `style-loader` - CSS module handling
8194
- `sass-loader` - SCSS compilation
@@ -84,39 +97,46 @@ Custom "Object Treerinator" for document visualization (mentioned in README)
8497
- `babel-loader` - JavaScript transpilation
8598

8699
### Code Splitting
100+
87101
Likely splits code by extension context (panel, popup, options, background)
88102

89103
## Extension-Specific Patterns
90104

91105
### Webextension Polyfill
106+
92107
- `webextension-polyfill` provides cross-browser compatibility
93108
- Converts callback-based APIs to Promises
94109
- Allows same code to work on Chrome and Firefox
95110

96111
### Injectors Pattern
112+
97113
- Content scripts in `src/Injectors/` inject code into Meteor app pages
98114
- Intercepts DDP messages by hooking into Meteor's DDP client
99115
- Sends captured data to DevTools panel via messaging bridge
100116

101117
### Analytics
118+
102119
- `src/Analytics.ts` likely tracks usage (opt-in)
103120
- Helps understand feature usage and bugs
104121

105122
## Development Workflow
106123

107124
### Hot Module Replacement
125+
108126
- Webpack dev builds watch for changes
109127
- Browser extension reloads on rebuild
110128
- Devapp runs concurrently on port 3000
111129

112130
### Concurrent Development
131+
113132
- `npm-run-all` / `concurrently` - Run multiple processes
114133
- `wait-on` - Synchronize startup (wait for builds and devapp)
115134
- `web-ext run` - Launches browser with extension loaded
116135

117136
## Styling Strategy
118137

119138
### Layered Approach
139+
120140
1. **Normalize.css** - Base reset
121141
2. **Tailwind base** - Utility-first foundation
122142
3. **DaisyUI** - Component classes on top of Tailwind

.serena/memories/code_style_and_conventions.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
# Code Style and Conventions
22

33
## ESLint Configuration
4+
45
The project extends `@tstt/eslint-config` with custom overrides:
6+
57
- **global-require**: Disabled (allows require() anywhere)
68
- **@typescript-eslint/no-var-requires**: Disabled (allows const x = require())
79
- **@typescript-eslint/no-inferrable-types**: Error with ignoreParameters and ignoreProperties
810
- **Global variables**: `Meteor` and `i18n` are defined as readonly
911

1012
## Prettier Configuration
13+
1114
Inherits from `@tstt/eslint-config/.prettierrc.js` (exact settings not visible but standard Prettier defaults)
1215

1316
## EditorConfig Settings
17+
1418
- **Indentation**: 2 spaces (for .js, .jsx, .ts, .tsx, .groovy)
1519
- **Line endings**: LF (Unix-style)
1620
- **Charset**: UTF-8
@@ -19,6 +23,7 @@ Inherits from `@tstt/eslint-config/.prettierrc.js` (exact settings not visible b
1923
- **Visual guides**: 80 characters
2024

2125
## TypeScript Configuration
26+
2227
- **Strict mode**: Disabled (`strict: false`)
2328
- **noImplicitAny**: Disabled
2429
- **Target**: ES6
@@ -31,27 +36,33 @@ Inherits from `@tstt/eslint-config/.prettierrc.js` (exact settings not visible b
3136
- **Path mapping**: `@/*``src/*`
3237

3338
## Naming Conventions
39+
3440
Based on code inspection:
41+
3542
- **Components**: PascalCase (e.g., `Panel`, `Options`, `Popup`)
3643
- **Files**: Match component names for React components
3744
- **Constants**: Likely UPPER_SNAKE_CASE (based on Constants.ts)
3845
- **Utilities**: camelCase functions
3946

4047
## Code Organization Patterns
48+
4149
- **React**: Functional components with hooks (React 17)
4250
- **State Management**: MobX stores for global state
4351
- **Styling**: Mix of styled-components, SCSS modules, and Tailwind utilities
4452
- **Type Definitions**: Global types in `src/index.d.ts`
4553
- **Imports**: Use path alias `@/` for src directory imports
4654

4755
## Component Structure
56+
4857
Based on `App.tsx`:
58+
4959
- Import external libraries first (React, Blueprint, etc.)
5060
- Then internal components/pages
5161
- Finally styles (CSS/SCSS)
5262
- Component logic and rendering
5363

5464
## Best Practices (from CONTRIBUTING.md)
65+
5566
1. Code must be linted and properly formatted
5667
2. Features should benefit the Meteor community as a whole
5768
3. Be friendly and supportive in contributions

.serena/memories/codebase_structure.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Codebase Structure
22

33
## Root Directory
4+
45
```
56
meteor-devtools-evolved/
67
├── src/ # Main source code
@@ -14,6 +15,7 @@ meteor-devtools-evolved/
1415
```
1516

1617
## Source Directory (`src/`)
18+
1719
```
1820
src/
1921
├── Assets/ # Static assets (images, icons, etc.)
@@ -36,19 +38,23 @@ src/
3638
```
3739

3840
## Webpack Configuration (`webpack/`)
41+
3942
- `base.js` - Base configuration shared by all builds
4043
- `chrome.dev.js` / `chrome.prod.js` - Chrome-specific builds
4144
- `firefox.dev.js` / `firefox.prod.js` - Firefox-specific builds
4245
- `utils.js` - Webpack utility functions
4346

4447
## Development App (`devapp/`)
48+
4549
A minimal Meteor application used for testing the extension during development:
50+
4651
- Runs on port 3000
4752
- Standard Meteor project structure
4853
- Uses Meteor's module system
4954
- Includes basic client and server code
5055

5156
## Key Entry Points
57+
5258
- `src/App.tsx` - Renders Panel, Options, or Popup based on context
5359
- Extension manifests generated by webpack for Chrome/Firefox
5460
- Path alias: `@/*` maps to `src/*` for imports
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
# Meteor DevTools Evolved - Project Overview
22

33
## Purpose
4+
45
Meteor DevTools Evolved is a browser extension for Google Chrome and Mozilla Firefox that helps developers monitor, debug, and optimize their Meteor.js applications. It provides:
56

67
- **DDP (Distributed Data Protocol) Tracking**: Filter and search through thousands of DDP messages to understand what's happening under the hood
78
- **Bookmarks**: Save DDP messages for later search and retrieval (stored in IndexedDB)
89
- **Minimongo Inspection**: Search and visualize documents in Minimongo with a custom Object Tree viewer
910

1011
## Project Context
12+
1113
This project is based on the original Meteor DevTools extension by The Bakery (no longer maintained), hence the "evolved" in the name. It was completely rewritten with modern tooling and technologies.
1214

1315
## Distribution
16+
1417
- Chrome Web Store: https://chrome.google.com/webstore/detail/meteor-devtools-evolved/ibniinmoafhgbifjojidlagmggecmpgf
1518
- Firefox Add-ons: https://addons.mozilla.org/en-US/firefox/addon/meteor-devtools-evolved/
1619

1720
## Repository
21+
1822
GitHub: https://github.com/leonardoventurini/meteor-devtools-evolved

.serena/memories/suggested_commands.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Suggested Commands
22

33
## Initial Setup
4+
45
```bash
56
# Install dependencies for both root and devapp
67
yarn setup
78
```
89

910
## Development
11+
1012
```bash
1113
# Start development mode for Chrome (default)
1214
yarn dev
@@ -22,12 +24,14 @@ yarn devapp
2224
```
2325

2426
**Note**: The `yarn dev` commands will:
27+
2528
1. Build and watch the extension
2629
2. Run the devapp in parallel
2730
3. Launch a browser instance with the extension installed
2831
4. Auto-reload on code changes
2932

3033
## Building
34+
3135
```bash
3236
# Build Chrome extension for production
3337
yarn build:chrome
@@ -40,6 +44,7 @@ yarn clean
4044
```
4145

4246
## Linting & Formatting
47+
4348
```bash
4449
# Run ESLint on all source files
4550
yarn lint
@@ -49,6 +54,7 @@ yarn lint
4954
```
5055

5156
## Security Auditing
57+
5258
```bash
5359
# Check for high and critical security vulnerabilities
5460
yarn run audit
@@ -57,6 +63,7 @@ yarn run audit
5763
```
5864

5965
## Git Operations
66+
6067
```bash
6168
# Standard git commands work normally
6269
git status
@@ -66,6 +73,7 @@ git push
6673
```
6774

6875
## Useful System Commands (macOS/Darwin)
76+
6977
```bash
7078
# List files
7179
ls -la
@@ -87,16 +95,20 @@ pwd
8795
```
8896

8997
## Testing Extension Manually
98+
9099
After running `yarn dev:chrome` or `yarn dev:firefox`, the extension will be loaded in a browser instance. Navigate to `http://localhost:2100` to see the devapp and test the extension's DevTools panel.
91100

92101
## Node/Yarn Version Management
102+
93103
The project uses Volta to manage Node and Yarn versions:
104+
94105
- Node.js: 14.19.3
95106
- Yarn: 1.22.18
96107

97108
Volta will automatically use the correct versions if installed.
98109

99110
## Troubleshooting
111+
100112
```bash
101113
# If dependencies are out of sync, reinstall
102114
rm -rf node_modules yarn.lock

0 commit comments

Comments
 (0)