Skip to content

Commit 505a575

Browse files
authored
Merge pull request #29 from openSVM/copilot/fix-28
COMPLETE OVERHAUL: Auto-generate wallet with pin "osvm.ai" for seamless onboarding
2 parents bd028f2 + 0d6050f commit 505a575

File tree

112 files changed

+7683
-10216
lines changed

Some content is hidden

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

112 files changed

+7683
-10216
lines changed

.github/copilot-instructions.md

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# SVMSeek Wallet Development Instructions
2+
3+
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
4+
5+
## Working Effectively
6+
7+
### Bootstrap and Build
8+
- Install dependencies: `yarn install --frozen-lockfile` -- takes 2.5 minutes. NEVER CANCEL. Set timeout to 10+ minutes.
9+
- Build production: `yarn build` -- takes 1.5 minutes. NEVER CANCEL. Set timeout to 10+ minutes.
10+
- Build extensions: `./scripts/build-extensions.sh` -- takes 2 seconds.
11+
- Format code: `yarn fix:prettier` -- takes 1 second.
12+
13+
### Development Workflow
14+
- Start development server: `yarn start` -- may take 2-3 minutes to fully compile. NEVER CANCEL. Set timeout to 10+ minutes.
15+
- Test production build: `yarn global add serve && serve -s build -p 3001`
16+
- Run unit tests: `yarn test --watchAll=false --coverage=false` -- takes 1.2 minutes. NEVER CANCEL. Set timeout to 5+ minutes.
17+
18+
### Browser Extensions
19+
- Build all extensions: `./scripts/build-extensions.sh`
20+
- Produces ZIP files for Chrome (v3), Firefox (v2), Safari (v2), Edge (v3)
21+
- Extensions are ~3.3MB each and ready for store submission
22+
- Extension builds require successful `yarn build` first
23+
24+
### E2E Testing
25+
- Install browsers: `yarn playwright:install` -- takes 15 seconds. May show dependency warnings (normal in CI).
26+
- Run E2E tests: `yarn test:e2e` -- may fail with localStorage issues in headless mode (known limitation)
27+
- Use `yarn test:e2e-headed` for better compatibility
28+
29+
## Validation
30+
31+
- ALWAYS run through at least one complete end-to-end scenario after making changes.
32+
- ALWAYS validate the production build works: `yarn build && serve -s build`
33+
- Test the wallet interface at `/wallet` route to ensure core functionality works
34+
- Browser extension builds should always succeed if main build succeeds
35+
- Always run `yarn fix:prettier` before committing to maintain code style
36+
37+
## Platform Support
38+
39+
### Web Application
40+
- Node.js v20.18.0+ required (check with `node --version`)
41+
- Yarn v1.22.0+ recommended
42+
- Builds successfully in 1.5 minutes
43+
- Serves on localhost:3000 (dev) or any port with `serve -s build`
44+
45+
### Browser Extensions
46+
- Chrome: Manifest V3, 3.3MB
47+
- Firefox: Manifest V2, 3.3MB
48+
- Safari: Manifest V2, 3.3MB
49+
- Edge: Manifest V3, 3.3MB
50+
- Build time: 2 seconds
51+
52+
### Mobile (Android)
53+
- Requires Java 17+ (current system has Java 17)
54+
- Android build FAILS due to Java 21 requirement conflict
55+
- DO NOT attempt Android builds - requires configuration fixes
56+
- Script: `./scripts/build-mobile.sh` (will fail)
57+
58+
## Common Tasks
59+
60+
### Repository Structure
61+
```
62+
svmseek/
63+
├── src/ # React TypeScript source
64+
│ ├── components/ # React components
65+
│ │ ├── Explorer/ # Blockchain explorer components
66+
│ │ ├── ChatInterface.tsx
67+
│ │ └── GlassContainer.tsx
68+
│ ├── pages/ # Page components
69+
│ ├── utils/ # Utility functions
70+
│ └── context/ # React context providers
71+
├── public/ # Static assets
72+
├── docs/ # Documentation
73+
├── extension/ # Browser extension files
74+
├── scripts/ # Build and utility scripts
75+
├── e2e/ # E2E test files
76+
└── build/ # Production build output
77+
```
78+
79+
### Key Technologies
80+
- React 19 with TypeScript
81+
- Material-UI v7 for components
82+
- Solana Web3.js for blockchain
83+
- Styled Components for CSS-in-JS
84+
- Playwright for E2E testing
85+
- Capacitor for mobile (broken)
86+
87+
### File Listings
88+
89+
#### Root Directory
90+
```
91+
.github/ # GitHub Actions workflows
92+
docs/ # Comprehensive documentation
93+
extension/ # Browser extension source
94+
scripts/ # Build automation scripts
95+
src/ # Application source code
96+
package.json # Dependencies and scripts
97+
yarn.lock # Dependency lock file
98+
.nvmrc # Node version requirement (v20.18.0)
99+
```
100+
101+
#### Package.json Scripts (Key Ones)
102+
```json
103+
{
104+
"start": "craco start",
105+
"build": "craco build",
106+
"test": "craco test",
107+
"test:e2e": "npx playwright test --config=playwright.simple.config.ts",
108+
"fix:prettier": "prettier \"src/**/*.js\" \"extension/src/*.js\" --write",
109+
"build:extension-enhanced": "./scripts/build-extensions.sh"
110+
}
111+
```
112+
113+
## Known Issues
114+
115+
### E2E Tests
116+
- May fail with localStorage access errors in headless mode
117+
- Use `--headed` flag for better compatibility
118+
- Advanced performance tests fail due to security restrictions
119+
120+
### Mobile Builds
121+
- Android build fails due to Java version mismatch (requires Java 21, system has Java 17)
122+
- DO NOT attempt mobile builds until configuration is fixed
123+
124+
### Development Server
125+
- May take 2-3 minutes to fully start and serve content
126+
- Wait for "Compiled successfully" message before testing
127+
- Default port is 3000, may conflict with other services
128+
129+
## Build Outputs
130+
131+
### Successful Build Indicators
132+
- Web build: ~3MB total bundle size, multiple chunk files
133+
- Extension build: 4 ZIP files created (~3.3MB each)
134+
- Unit tests: 93 passed, 17 skipped (normal)
135+
136+
### File Sizes (Typical)
137+
- Main application bundle: ~3MB total
138+
- Extension packages: ~3.3MB each
139+
- Individual chunks: 1KB to 1.2MB range
140+
141+
## Debugging
142+
143+
### TypeScript Warnings
144+
- Version warning for @typescript-eslint is normal (uses TS 5.9.2 vs supported 5.2.0)
145+
- Does not affect functionality
146+
147+
### Bundle Size
148+
- Large bundle size warnings are normal for crypto applications
149+
- Consider code splitting if adding significant features
150+
151+
### Browser Compatibility
152+
- Chrome: Full support
153+
- Firefox: Full support
154+
- Safari: Full support
155+
- Edge: Full support
156+
- Mobile browsers: Supported via PWA
157+
158+
## Documentation References
159+
160+
- Main README: `README.md`
161+
- Developer Guide: `docs/developer-guide.md`
162+
- Build System: `docs/BUILD_SYSTEM.md`
163+
- Mobile Building: `docs/MOBILE_BUILD.md`

0 commit comments

Comments
 (0)