Skip to content

Commit beaa62f

Browse files
committed
feat: comprehensive UI/UX improvements and testing infrastructure
- Enhanced component library with improved styling and animations - Added comprehensive testing setup with Jest and Cypress - Implemented ESLint and Prettier for code quality - Added developer documentation and guides - Improved wallet integration and Web3 onboarding - Enhanced demo components with better user experience - Added new utility functions and hooks - Updated configuration files and dependencies
1 parent d9d87ef commit beaa62f

File tree

116 files changed

+29887
-13249
lines changed

Some content is hidden

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

116 files changed

+29887
-13249
lines changed

.eslintignore

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Dependencies
2+
node_modules/
3+
.pnp
4+
.pnp.js
5+
6+
# Production builds
7+
.next/
8+
out/
9+
build/
10+
dist/
11+
12+
# Environment files
13+
.env
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
# Logs
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
23+
24+
# Runtime data
25+
pids
26+
*.pid
27+
*.seed
28+
*.pid.lock
29+
30+
# Coverage directory used by tools like istanbul
31+
coverage/
32+
*.lcov
33+
34+
# nyc test coverage
35+
.nyc_output
36+
37+
# Dependency directories
38+
jspm_packages/
39+
40+
# Optional npm cache directory
41+
.npm
42+
43+
# Optional eslint cache
44+
.eslintcache
45+
46+
# Microbundle cache
47+
.rpt2_cache/
48+
.rts2_cache_cjs/
49+
.rts2_cache_es/
50+
.rts2_cache_umd/
51+
52+
# Optional REPL history
53+
.node_repl_history
54+
55+
# Output of 'npm pack'
56+
*.tgz
57+
58+
# Yarn Integrity file
59+
.yarn-integrity
60+
61+
# parcel-bundler cache (https://parceljs.org/)
62+
.cache
63+
.parcel-cache
64+
65+
# Next.js build output
66+
.next
67+
68+
# Nuxt.js build / generate output
69+
.nuxt
70+
dist
71+
72+
# Gatsby files
73+
.cache/
74+
public
75+
76+
# Storybook build outputs
77+
.out
78+
.storybook-out
79+
80+
# Temporary folders
81+
tmp/
82+
temp/
83+
84+
# Editor directories and files
85+
.vscode/
86+
.idea/
87+
*.swp
88+
*.swo
89+
*~
90+
91+
# OS generated files
92+
.DS_Store
93+
.DS_Store?
94+
._*
95+
.Spotlight-V100
96+
.Trashes
97+
ehthumbs.db
98+
Thumbs.db
99+
100+
# Package files
101+
package-lock.json
102+
yarn.lock
103+
104+
# Config files
105+
*.config.js
106+
*.config.ts
107+
tailwind.config.js
108+
postcss.config.js
109+
110+
# Generated files
111+
next-env.d.ts
112+

.eslintrc.js

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
es2021: true,
6+
node: true,
7+
jest: true,
8+
},
9+
extends: [
10+
'eslint:recommended',
11+
'plugin:react/recommended',
12+
'plugin:react-hooks/recommended',
13+
'prettier',
14+
],
15+
parser: '@typescript-eslint/parser',
16+
parserOptions: {
17+
ecmaFeatures: {
18+
jsx: true,
19+
},
20+
ecmaVersion: 'latest',
21+
sourceType: 'module',
22+
},
23+
plugins: ['react', '@typescript-eslint', 'prettier'],
24+
rules: {
25+
// Prettier
26+
'prettier/prettier': 'error',
27+
28+
// React
29+
'react/react-in-jsx-scope': 'off', // Not needed in Next.js
30+
'react/prop-types': 'off', // We use TypeScript
31+
32+
// TypeScript
33+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
34+
'@typescript-eslint/no-explicit-any': 'warn',
35+
36+
// General
37+
'no-console': 'warn',
38+
'no-debugger': 'error',
39+
'no-var': 'error',
40+
'prefer-const': 'error',
41+
semi: ['error', 'always'],
42+
quotes: ['error', 'single', { avoidEscape: true }],
43+
},
44+
settings: {
45+
react: {
46+
version: 'detect',
47+
},
48+
},
49+
ignorePatterns: [
50+
'node_modules/',
51+
'.next/',
52+
'out/',
53+
'build/',
54+
'dist/',
55+
'*.config.js',
56+
'*.config.ts',
57+
'cypress/',
58+
'__tests__/',
59+
'coverage/',
60+
],
61+
};

.github/workflows/ci.yml

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
quality-check:
11+
name: Code Quality Check
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '18'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Check code formatting
28+
run: npm run format:check
29+
30+
- name: Run ESLint
31+
run: npm run lint:check
32+
33+
- name: Type check
34+
run: npm run type-check
35+
36+
test:
37+
name: Run Tests
38+
runs-on: ubuntu-latest
39+
needs: quality-check
40+
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v4
44+
45+
- name: Setup Node.js
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version: '18'
49+
cache: 'npm'
50+
51+
- name: Install dependencies
52+
run: npm ci
53+
54+
- name: Run unit tests
55+
run: npm run test:coverage
56+
57+
- name: Upload coverage to Codecov
58+
uses: codecov/codecov-action@v3
59+
with:
60+
file: ./coverage/lcov.info
61+
flags: unittests
62+
name: codecov-umbrella
63+
fail_ci_if_error: false
64+
65+
build:
66+
name: Build Application
67+
runs-on: ubuntu-latest
68+
needs: [quality-check, test]
69+
70+
steps:
71+
- name: Checkout code
72+
uses: actions/checkout@v4
73+
74+
- name: Setup Node.js
75+
uses: actions/setup-node@v4
76+
with:
77+
node-version: '18'
78+
cache: 'npm'
79+
80+
- name: Install dependencies
81+
run: npm ci
82+
83+
- name: Build application
84+
run: npm run build
85+
86+
- name: Upload build artifacts
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: build-files
90+
path: .next/
91+
retention-days: 7
92+
93+
e2e-tests:
94+
name: E2E Tests
95+
runs-on: ubuntu-latest
96+
needs: build
97+
98+
steps:
99+
- name: Checkout code
100+
uses: actions/checkout@v4
101+
102+
- name: Setup Node.js
103+
uses: actions/setup-node@v4
104+
with:
105+
node-version: '18'
106+
cache: 'npm'
107+
108+
- name: Install dependencies
109+
run: npm ci
110+
111+
- name: Download build artifacts
112+
uses: actions/download-artifact@v4
113+
with:
114+
name: build-files
115+
path: .next/
116+
117+
- name: Start application
118+
run: npm start &
119+
120+
- name: Wait for application to start
121+
run: |
122+
timeout 30 bash -c 'until curl -f http://localhost:3000; do sleep 1; done'
123+
124+
- name: Run Cypress tests
125+
uses: cypress-io/github-action@v6
126+
with:
127+
start: npm start
128+
wait-on: 'http://localhost:3000'
129+
browser: chrome
130+
record: false
131+
132+
- name: Upload Cypress screenshots
133+
uses: actions/upload-artifact@v4
134+
if: failure()
135+
with:
136+
name: cypress-screenshots
137+
path: cypress/screenshots/
138+
retention-days: 7
139+
140+
- name: Upload Cypress videos
141+
uses: actions/upload-artifact@v4
142+
if: always()
143+
with:
144+
name: cypress-videos
145+
path: cypress/videos/
146+
retention-days: 7
147+

.github/workflows/simple-ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Simple CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
ci:
11+
name: Continuous Integration
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '18'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Check code formatting
28+
run: npm run format:check
29+
30+
- name: Run ESLint
31+
run: npm run lint:check
32+
33+
- name: Type check
34+
run: npm run type-check
35+
36+
- name: Run unit tests
37+
run: npm run test:coverage
38+
39+
- name: Build application
40+
run: npm run build
41+
42+
- name: Upload build artifacts
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: build-files
46+
path: .next/
47+
retention-days: 7
48+

.husky/commit-msg

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
# Conventional commit validation
5+
commit_regex='^(feat|fix|docs|style|refactor|test|chore|perf|ci|build|revert)(\(.+\))?: .{1,50}'
6+
7+
if ! grep -qE "$commit_regex" "$1"; then
8+
echo "❌ Invalid commit message format."
9+
echo "💡 Use conventional commits: <type>(<scope>): <description>"
10+
echo "📝 Examples:"
11+
echo " feat: add new component"
12+
echo " fix(ui): resolve button styling issue"
13+
echo " docs: update README"
14+
echo " test: add unit tests for utils"
15+
exit 1
16+
fi
17+
18+
echo "✅ Valid commit message format"
19+

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

0 commit comments

Comments
 (0)