Skip to content

Commit 0e57ff9

Browse files
committed
refactor: improve project structure - Move all source files to src/ directory (industry standard)- Extract MissionBrief and CitationButton to separate components- Separate CITATIONS data from types into src/data/citations.ts- Add ESLint and Prettier configurations- Add Vitest with 5 passing smoke tests for recommendation engine- Update tsconfig.json and index.html for new structure- Add npm scripts for linting, formatting, and testing- Clean up unused imports
1 parent 082d74c commit 0e57ff9

24 files changed

Lines changed: 9391 additions & 1699 deletions

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100
7+
}

eslint.config.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import js from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import reactPlugin from 'eslint-plugin-react';
4+
import reactHooksPlugin from 'eslint-plugin-react-hooks';
5+
6+
export default tseslint.config(
7+
js.configs.recommended,
8+
...tseslint.configs.recommended,
9+
{
10+
files: ['src/**/*.{ts,tsx}'],
11+
plugins: {
12+
react: reactPlugin,
13+
'react-hooks': reactHooksPlugin,
14+
},
15+
languageOptions: {
16+
parserOptions: {
17+
ecmaFeatures: {
18+
jsx: true,
19+
},
20+
},
21+
},
22+
settings: {
23+
react: {
24+
version: 'detect',
25+
},
26+
},
27+
rules: {
28+
// React rules
29+
'react/jsx-uses-react': 'off', // Not needed with React 17+
30+
'react/react-in-jsx-scope': 'off', // Not needed with React 17+
31+
'react-hooks/rules-of-hooks': 'error',
32+
'react-hooks/exhaustive-deps': 'warn',
33+
// TypeScript rules
34+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
35+
'@typescript-eslint/explicit-function-return-type': 'off',
36+
'@typescript-eslint/no-explicit-any': 'warn',
37+
},
38+
},
39+
{
40+
ignores: ['dist/', 'node_modules/', '*.config.ts', '*.config.js'],
41+
}
42+
);

index.html

Lines changed: 65 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,71 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Resample Lab</title>
7-
<script src="https://cdn.tailwindcss.com"></script>
8-
<style>
9-
/* Custom Scrollbar for aesthetic continuity */
10-
::-webkit-scrollbar {
11-
width: 8px;
12-
}
13-
::-webkit-scrollbar-track {
14-
background: #18181b;
15-
}
16-
::-webkit-scrollbar-thumb {
17-
background: #3f3f46;
18-
border-radius: 4px;
19-
}
20-
::-webkit-scrollbar-thumb:hover {
21-
background: #52525b;
22-
}
23-
body {
24-
background-color: #09090b;
25-
color: #e4e4e7;
26-
}
27-
28-
/* Invalid Zone Pattern - Hazard Style */
29-
.pattern-striped {
30-
background-color: rgba(20, 0, 0, 0.3);
31-
background-image: repeating-linear-gradient(
32-
-45deg,
3+
4+
<head>
5+
<meta charset="UTF-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Resample Lab | Class Imbalance Heuristics</title>
8+
<meta name="description"
9+
content="Interactive visualization and heuristic engine for determining optimal resampling strategies in machine learning. Analyze minority class density, feature dimensionality, and stability." />
10+
<meta name="keywords"
11+
content="machine learning, class imbalance, smote, resampling, data science, visualization, heuristics" />
12+
<link rel="canonical" href="https://mr-september.github.io/Resample-Lab/" />
13+
14+
<!-- Open Graph / Facebook -->
15+
<meta property="og:type" content="website" />
16+
<meta property="og:url" content="https://mr-september.github.io/Resample-Lab/" />
17+
<meta property="og:title" content="Resample Lab | Advanced Class Imbalance Heuristics" />
18+
<meta property="og:description"
19+
content="Discover the best resampling strategy for your dataset. Interactive phase-space visualization for Machine Learning practitioners." />
20+
<meta property="og:image" content="https://mr-september.github.io/Resample-Lab/og-image.png" />
21+
22+
<!-- Twitter -->
23+
<meta property="twitter:card" content="summary_large_image" />
24+
<meta property="twitter:url" content="https://mr-september.github.io/Resample-Lab/" />
25+
<meta property="twitter:title" content="Resample Lab | Advanced Class Imbalance Heuristics" />
26+
<meta property="twitter:description"
27+
content="Discover the best resampling strategy for your dataset. Interactive phase-space visualization for Machine Learning practitioners." />
28+
<meta property="twitter:image" content="https://mr-september.github.io/Resample-Lab/og-image.png" />
29+
<script src="https://cdn.tailwindcss.com"></script>
30+
<style>
31+
/* Custom Scrollbar for aesthetic continuity */
32+
::-webkit-scrollbar {
33+
width: 8px;
34+
}
35+
36+
::-webkit-scrollbar-track {
37+
background: #18181b;
38+
}
39+
40+
::-webkit-scrollbar-thumb {
41+
background: #3f3f46;
42+
border-radius: 4px;
43+
}
44+
45+
::-webkit-scrollbar-thumb:hover {
46+
background: #52525b;
47+
}
48+
49+
body {
50+
background-color: #09090b;
51+
color: #e4e4e7;
52+
}
53+
54+
/* Invalid Zone Pattern - Hazard Style */
55+
.pattern-striped {
56+
background-color: rgba(20, 0, 0, 0.3);
57+
background-image: repeating-linear-gradient(-45deg,
3358
rgba(255, 50, 50, 0.03),
3459
rgba(255, 50, 50, 0.03) 10px,
3560
rgba(0, 0, 0, 0.1) 10px,
36-
rgba(0, 0, 0, 0.1) 20px
37-
);
38-
}
39-
</style>
40-
</head>
41-
<body>
42-
<div id="root"></div>
43-
<script type="module" src="/index.tsx"></script>
44-
</body>
61+
rgba(0, 0, 0, 0.1) 20px);
62+
}
63+
</style>
64+
</head>
65+
66+
<body>
67+
<div id="root"></div>
68+
<script type="module" src="/src/index.tsx"></script>
69+
</body>
70+
4571
</html>

0 commit comments

Comments
 (0)