Skip to content

Commit 9653fc9

Browse files
Varshith DupatiVarshith Dupati
authored andcommitted
updated to terminal portfolio
1 parent c92d94d commit 9653fc9

File tree

17 files changed

+17675
-370
lines changed

17 files changed

+17675
-370
lines changed

.gitignore

Lines changed: 135 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,142 @@
1+
# Dependencies
2+
node_modules/
3+
.pnp
4+
.pnp.js
5+
6+
# Testing
7+
/coverage
8+
9+
# Production builds
10+
/build
11+
/dist
12+
/out
13+
14+
# Runtime data
15+
pids
16+
*.pid
17+
*.seed
18+
*.pid.lock
19+
20+
# Directory for instrumented libs generated by jscoverage/JSCover
21+
lib-cov
22+
23+
# Coverage directory used by tools like istanbul
24+
coverage/
25+
*.lcov
26+
27+
# nyc test coverage
28+
.nyc_output
29+
30+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
31+
.grunt
32+
33+
# Bower dependency directory (https://bower.io/)
34+
bower_components
35+
36+
# node-waf configuration
37+
.lock-wscript
38+
39+
# Compiled binary addons (https://nodejs.org/api/addons.html)
40+
build/Release
41+
42+
# Dependency directories
43+
jspm_packages/
44+
45+
# TypeScript v1 declaration files
46+
typings/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Microbundle cache
58+
.rpt2_cache/
59+
.rts2_cache_cjs/
60+
.rts2_cache_es/
61+
.rts2_cache_umd/
62+
63+
# Optional REPL history
64+
.node_repl_history
65+
66+
# Output of 'npm pack'
67+
*.tgz
68+
69+
# Yarn Integrity file
70+
.yarn-integrity
71+
72+
# dotenv environment variables file
73+
.env
74+
.env.local
75+
.env.development.local
76+
.env.test.local
77+
.env.production.local
78+
79+
# parcel-bundler cache (https://parceljs.org/)
80+
.cache
81+
.parcel-cache
82+
83+
# Next.js build output
84+
.next
85+
86+
# Nuxt.js build / generate output
87+
.nuxt
88+
dist
89+
90+
# Gatsby files
91+
.cache/
92+
public
93+
94+
# Storybook build outputs
95+
.out
96+
.storybook-out
97+
98+
# Temporary folders
99+
tmp/
100+
temp/
101+
102+
# Logs
103+
logs
104+
*.log
105+
npm-debug.log*
106+
yarn-debug.log*
107+
yarn-error.log*
108+
lerna-debug.log*
109+
1110
# OS generated files
2111
.DS_Store
112+
.DS_Store?
113+
._*
114+
.Spotlight-V100
115+
.Trashes
116+
ehthumbs.db
3117
Thumbs.db
4118

5-
# Node.js
6-
node_modules/
7-
npm-debug.log
8-
yarn-debug.log
9-
yarn-error.log
10-
package-lock.json
11-
yarn.lock
12-
13-
# Python
14-
__pycache__/
15-
*.py[cod]
16-
*.pyo
17-
*.pyd
18-
.Python
19-
env/
20-
venv/
21-
ENV/
119+
# Editor directories and files
120+
.vscode/*
121+
!.vscode/extensions.json
122+
.idea
123+
*.suo
124+
*.ntvs*
125+
*.njsproj
126+
*.sln
127+
*.sw?
128+
129+
# Backup files
130+
*~
131+
*.swp
132+
*.swo
133+
*.bak
134+
*.tmp
135+
136+
# Misc
137+
.idea/
138+
*.sublime-workspace
139+
*.sublime-project
22140

23141
# macOS
24142
.AppleDouble
@@ -27,10 +145,6 @@ ENV/
27145
# VSCode
28146
.vscode/
29147

30-
# Logs
31-
logs/
32-
*.log
33-
34148
# Compiled source #
35149
*.com
36150
*.class
@@ -39,13 +153,6 @@ logs/
39153
*.o
40154
*.so
41155

42-
# Backup files
43-
*~
44-
*.swp
45-
*.swo
46-
*.bak
47-
*.tmp
48-
49156
# Test coverage
50157
coverage/
51158
*.lcov

DEVELOPMENT.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Development Guide
2+
3+
## Project Structure
4+
5+
```
6+
portfolio/
7+
├── public/ # Static assets
8+
│ ├── favicon files # Various favicon formats
9+
│ ├── manifest.json # PWA manifest
10+
│ └── robots.txt # SEO robots file
11+
├── src/
12+
│ ├── components/ # React components
13+
│ │ ├── Terminal.jsx # Main terminal interface
14+
│ │ └── MatrixRain.jsx # Background animation
15+
│ ├── styles/ # CSS stylesheets
16+
│ │ ├── index.css # Global styles
17+
│ │ └── terminal.css # Terminal-specific styles
18+
│ ├── utils/ # Utility functions and constants
19+
│ │ ├── constants.js # Application constants
20+
│ │ └── typewriter.js # Typewriter effect utility
21+
│ ├── App.jsx # Root component
22+
│ └── index.js # Application entry point
23+
├── package.json # Dependencies and scripts
24+
├── .gitignore # Git ignore rules
25+
├── README.md # Project documentation
26+
├── DEVELOPMENT.md # This file
27+
└── LICENSE # MIT License
28+
```
29+
30+
## Recent Improvements
31+
32+
### Code Organization
33+
- **Separated Concerns**: Moved components to `src/components/` and styles to `src/styles/`
34+
- **Extracted Constants**: Created `src/utils/constants.js` for all hardcoded values
35+
- **Utility Functions**: Isolated typewriter effect into reusable utility
36+
- **Modular Structure**: Better separation of functionality for maintainability
37+
38+
### Code Quality
39+
- **Cleaner Components**: Reduced Terminal.jsx from 544 lines to more manageable chunks
40+
- **Consistent Naming**: Used consistent variable naming conventions
41+
- **Better State Management**: Improved React hooks usage and effect cleanup
42+
- **Type Safety**: Better parameter handling and validation
43+
44+
### Performance
45+
- **Optimized Rendering**: Improved command history rendering logic
46+
- **Memory Management**: Better cleanup of timers and event listeners
47+
- **Efficient Updates**: Reduced unnecessary re-renders
48+
49+
### Maintainability
50+
- **Easy Configuration**: All URLs, quotes, and settings in constants file
51+
- **Reusable Components**: Modular design for easy extension
52+
- **Clear Documentation**: Better code comments and structure
53+
- **Version Control**: Improved .gitignore for React projects
54+
55+
## Development Commands
56+
57+
```bash
58+
# Install dependencies
59+
npm install
60+
61+
# Start development server
62+
npm start
63+
64+
# Build for production
65+
npm run build
66+
67+
# Run tests
68+
npm test
69+
70+
# Deploy to GitHub Pages
71+
npm run deploy
72+
```
73+
74+
## Adding New Features
75+
76+
### Adding a New Command
77+
1. Add command description to `src/utils/constants.js` in `commandDescriptions`
78+
2. Add command logic to `handleCommand` function in `src/components/Terminal.jsx`
79+
3. Update help text if needed
80+
81+
### Adding New Quotes
82+
1. Add quotes to `programmingQuotes` or `matrixQuotes` in `src/utils/constants.js`
83+
84+
### Modifying Animations
85+
1. Adjust timing constants in `src/utils/constants.js` under `animationTimings`
86+
2. Modify `src/utils/typewriter.js` for typewriter behavior changes
87+
3. Update `src/components/MatrixRain.jsx` for background effects
88+
89+
### Styling Changes
90+
1. Global styles: `src/styles/index.css`
91+
2. Terminal styles: `src/styles/terminal.css`
92+
3. Use CSS variables for consistent theming
93+
94+
## Code Style Guidelines
95+
96+
- Use functional components with hooks
97+
- Keep components under 200 lines when possible
98+
- Extract constants to the constants file
99+
- Use descriptive variable names
100+
- Add comments for complex logic
101+
- Clean up effects and event listeners properly
102+
103+
## Deployment
104+
105+
The project is configured for GitHub Pages deployment:
106+
1. Build creates optimized static files
107+
2. `gh-pages` package handles deployment
108+
3. GitHub Actions can be added for automatic deployment
109+
110+
## Future Improvements
111+
112+
- Add TypeScript for better type safety
113+
- Implement React Testing Library tests
114+
- Add Progressive Web App features
115+
- Optimize bundle size with code splitting
116+
- Add accessibility improvements (ARIA labels, keyboard navigation)
117+
- Implement dark/light theme toggle
118+
- Add more interactive commands and games

0 commit comments

Comments
 (0)