neruwake
A comprehensive VSCode extension that tracks daily coding activity, including wake-up time, time spent coding, programming languages used, and displays this data with daily updates on GitHub profile README.
NeruWake - VSCode Time Tracker Extension
A comprehensive VSCode extension that tracks daily coding activity, including wake-up time, time spent coding, programming languages used, and displays this data with daily updates on GitHub profile README.
#Features
- Session Tracking: Automatically record wake-up time and total active coding time
- Language Detection: Track programming languages based on active file types
- Database Storage: Store data securely in Supabase (free tier)
- GitHub Profile Integration: Daily automatic updates of coding statistics
- Customizable Themes: Multiple visual themes for GitHub display
- Clean Architecture: Built with OOP principles, DRY, and KISS methodologies
#Installation
##From VSCode Marketplace
- Open VSCode
- Go to Extensions (Ctrl+Shift+X)
- Search for "NeruWake"
- Click Install
##Manual Installation
- Clone this repository
- Install dependencies:
npm install
- Compile TypeScript:
npm run compile
- Package extension:
npm run package
- Install the .vsix file in VSCode
#Configuration
##Initial Setup
-
Supabase Setup:
- Create a free Supabase account at supabase.com
- Create a new project
- Copy your project URL and anon key
- Create a
.env
file from.env.example
- Add your Supabase credentials
-
GitHub Integration (Optional):
- Generate a GitHub Personal Access Token
- Add it to your
.env
file - Configure your GitHub username in extension settings
##Extension Settings
Access settings via Command Palette:
NeruWake: Open Settings
- Auto Start: Automatically start tracking when VSCode opens
- GitHub Integration: Enable/disable GitHub profile updates
- Theme: Choose from 5 available themes
- Update Time: Set daily GitHub update time
- Timezone: Configure your timezone
#Usage
##Basic Commands
Open Command Palette (Ctrl+Shift+P) and use:
NeruWake: Start Tracking Session
- Begin tracking coding activityNeruWake: Stop Tracking Session
- End current sessionNeruWake: Show Daily Statistics
- View current session statsNeruWake: Sync to GitHub Profile
- Manually sync to GitHubNeruWake: Open Settings
- Configure extension
##Automatic Tracking
The extension automatically tracks:
- Session start/end times
- File editing activity
- Programming languages used
- Idle detection (pauses after 5 minutes of inactivity)
##GitHub Profile Integration
When enabled, the extension will:
- Update your GitHub profile README daily
- Display coding statistics with your chosen theme
- Show programming language breakdown
- Track coding streaks and active hours
#Themes
Choose from 5 professionally designed themes:
- Minimal: Clean, simple statistics display
- Dark: Modern dark theme with subtle accents
- Gradient: Colorful gradient backgrounds
- Professional: Corporate-friendly design
- Animated: Smooth animations and transitions
#Architecture
##Project Structure
src/
├── core/ # Core business logic
│ ├── ConfigurationManager.ts
│ └── SessionManager.ts
├── models/ # Data models and types
│ ├── types.ts
│ ├── SessionModel.ts
│ └── LanguageUsageModel.ts
├── services/ # External service integrations
├── repositories/ # Data access layer
├── utils/ # Utility functions
│ ├── helpers.ts
│ └── Logger.ts
├── ui/ # User interface components
└── extension.ts # Main extension entry point
##Design Principles
- Single Responsibility: Each class has one clear purpose
- DRY (Don't Repeat Yourself): Common functionality extracted to utilities
- KISS (Keep It Simple, Stupid): Simple, readable implementations
- OOP: Object-oriented design with proper encapsulation
- Clean Architecture: Separation of concerns and dependency injection
#Database Schema
##Supabase Tables
-- User sessions
sessions (
id: uuid PRIMARY KEY,
user_id: uuid REFERENCES auth.users(id),
date: date NOT NULL,
wake_up_time: timestamp,
total_active_time: integer,
created_at: timestamp DEFAULT now()
)
-- Language usage
language_usage (
id: uuid PRIMARY KEY,
session_id: uuid REFERENCES sessions(id),
language: varchar(50) NOT NULL,
time_spent: integer,
file_count: integer,
created_at: timestamp DEFAULT now()
)
-- User preferences
user_preferences (
user_id: uuid PRIMARY KEY REFERENCES auth.users(id),
github_username: varchar(100),
github_token: text,
selected_theme: varchar(50) DEFAULT 'minimal',
daily_update_time: time DEFAULT '23:59:00',
timezone: varchar(50) DEFAULT 'UTC',
auto_update_enabled: boolean DEFAULT true,
created_at: timestamp DEFAULT now(),
updated_at: timestamp DEFAULT now()
)
#Development
##Prerequisites
- Node.js 18+
- TypeScript 4.9+
- VSCode Extension Development Environment
##Setup
# Clone repository
git clone https://github.com/nerufuyo/neruwake.git
cd neruwake
# Install dependencies
npm install
# Copy environment configuration
cp .env.example .env
# Compile TypeScript
npm run compile
# Run in watch mode for development
npm run watch
##Testing
# Run linting
npm run lint
# Run tests
npm test
# Run extension in development mode
F5 (in VSCode)
##Building
# Compile for production
npm run vscode:prepublish
# Package extension
npm run package
#Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Add your feature"
- Push to the branch:
git push origin feature/your-feature-name
- Submit a pull request
##Commit Message Convention
Use conventional commit messages:
feat: add new feature
fix: resolve bug in session tracking
docs: update README documentation
style: format code with prettier
refactor: improve session manager architecture
test: add unit tests for configuration manager
chore: update dependencies
#Security & Privacy
- All sensitive data is encrypted
- Minimal data collection principle
- User control over all data
- HTTPS-only connections
- Easy data deletion options
#Support
- Issues: GitHub Issues
- Documentation: Wiki
- Discussions: GitHub Discussions
#License
MIT License - see LICENSE file for details.
#Roadmap
##Version 1.0
- Core session tracking
- Language detection
- Supabase integration
- GitHub profile updates
- Theme system
##Version 2.0
- Multi-editor support
- Team analytics
- Advanced themes
- Mobile companion app
- AI insights
#Acknowledgments
- VSCode Extension API team
- Supabase for excellent backend services
- GitHub for profile integration capabilities
- Open source community for inspiration
Built with ❤️ for developers who love tracking their coding journey