Blame
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 1 | # π Employee Hour Tracker |
| 2 | ||||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 3 | > A badass web app to monitor employees entering their time, serve up real-time analytics, and automate your backups β so you can stop worrying and focus on getting sh*t done. |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 4 | |
| 5 |  |
|||
| 6 |  |
|||
| 7 |  |
|||
| 8 |  |
|||
| 442327 | Tebby Dog | 2025-08-08 20:15:49 | 9 |  |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 10 | |
| f29811 | Tebby Dog | 2025-08-08 20:07:53 | 11 | --- |
| 12 | ||||
| 6f2711 | Tebby Dog | 2025-08-09 20:08:31 | 13 | <details> |
| 14 | <summary><i>Click to show screenshots</i></summary> |
|||
| 15 | ||||
| f29811 | Tebby Dog | 2025-08-08 20:07:53 | 16 | ## Screenshots |
| 17 |  |
|||
| 18 | [](./Screenshot_2025-08-08_at_4.03.27_PM.png) |
|||
| 19 | [](./Screenshot_2025-08-08_at_4.03.54_PM.png) |
|||
| 20 | [](./Screenshot_2025-08-08_at_4.05.46_PM.png) |
|||
| 21 | ||||
| 6f2711 | Tebby Dog | 2025-08-09 20:08:31 | 22 | </details> |
| f29811 | Tebby Dog | 2025-08-08 20:07:53 | 23 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 24 | --- |
| 25 | ||||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 26 | ## β¨ Features |
| 27 | ||||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 28 | ### π
**Time Tracking (A.K.A. Keeping Tabs on Your Squad)** |
| 29 | ||||
| 30 | - Weekly grid interface sharp enough to make spreadsheets cry |
|||
| 31 | - Click once? Log it. Twice? Flag it. Thrice? Fix-it mode, baby |
|||
| 32 | - Built-in calendar picker so you don't fat-finger the wrong week |
|||
| 33 | - Default week your way β past, present, or hell, even the future |
|||
| 34 | - No βSaveβ button needed β everything saves itself like grown-up software |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 35 | |
| 36 | ### π **Analytics Dashboard** |
|||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 37 | |
| 38 | - Sexy-ass charts courtesy of Chart.js |
|||
| 39 | - Date ranges? Yep. Choose from Last Week, Month, 90 Days, or freestyle |
|||
| 40 | - Pie charts of shame: See who's not entered a damn thing |
|||
| 41 | - Employee comparisons so you know whoβs crushing it |
|||
| 42 | - Summary stats that slap you with truths at a glance |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 43 | |
| 44 | ### π₯ **Employee Management** |
|||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 45 | |
| 46 | - Add, edit, and yeet employees in or out with full control |
|||
| 47 | - Inline editing β because popups can get bent |
|||
| 48 | - Confirmation dialogs keep you from rage-deleting poor Jim by mistake |
|||
| 49 | - Secure, session-based login β no freeloaders allowed |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 50 | |
| 51 | ### πΎ **Data Export & Backup** |
|||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 52 | |
| 53 | - Export in: |
|||
| 54 | - Colored Excel (preserves all that green/yellow/red goodness) |
|||
| 55 | - JSON (for the nerds and the APIs) |
|||
| 56 | - CSV (because boring as hell = universal) |
|||
| 57 | - Auto-backups so you can sleep like a baby β configurable too |
|||
| 58 | ||||
| 59 | ### π¨ **Beautiful AF UI** |
|||
| 60 | ||||
| 61 | - Responsive as heck β use it on a tablet, a phone, or a potato |
|||
| 62 | - A glorious purple gradient worth showing off to design nerds |
|||
| 63 | - Smooth transitions that donβt make you nauseous |
|||
| 64 | - Touch support that'll make any mobile user say βdamn thatβs cleanβ |
|||
| 65 | - You might actually enjoy navigating this one |
|||
| 66 | ||||
| 67 | --- |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 68 | |
| 69 | ## π Quick Start |
|||
| 70 | ||||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 71 | ### Prerequisites (Donβt Skip This, Ya Animal) |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 72 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 73 | - Node.js 18+ |
| 74 | - OR Docker & Docker Compose (weβre fancy) |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 75 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 76 | --- |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 77 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 78 | ### π§ͺ Option 1: Raw Node.js |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 79 | ```bash |
| 80 | git clone https://github.com/tebwritescode/employee-hour-tracker.git |
|||
| 81 | cd employee-hour-tracker |
|||
| 82 | npm install |
|||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 83 | npm start # Start like a regular ol' app |
| 84 | npm run dev # If you want auto-reload magic |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 85 | ``` |
| 86 | ||||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 87 | --- |
| 88 | ||||
| 89 | ### π³ Option 2: Docker Compose (Recommended as Hell) |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 90 | |
| 91 | ```bash |
|||
| 92 | git clone https://github.com/tebwritescode/employee-hour-tracker.git |
|||
| 93 | cd employee-hour-tracker |
|||
| 94 | docker-compose up -d |
|||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 95 | docker-compose logs -f # Because watching logs is oddly satisfying |
| 96 | docker-compose down # When itβs time to kill it |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 97 | ``` |
| 98 | ||||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 99 | --- |
| 100 | ||||
| 101 | ### π¨ Option 3: Docker CLI (For Hardcore Terminal Nerds) |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 102 | |
| 103 | ```bash |
|||
| 104 | docker build -t employee-hour-tracker . |
|||
| 105 | docker run -d \ |
|||
| 106 | --name employee-tracker \ |
|||
| 107 | -p 3000:3000 \ |
|||
| 108 | -v employee-tracker-data:/app/data \ |
|||
| 109 | employee-hour-tracker |
|||
| 110 | ``` |
|||
| 111 | ||||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 112 | App launches at `http://localhost:3000` |
| 113 | Go ahead, open it. We dare you. |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 114 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 115 | --- |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 116 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 117 | ## π§ Configuration (Don't Screw These Up) |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 118 | |
| 119 | | Variable | Default | Description | |
|||
| 120 | |----------|---------|-------------| |
|||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 121 | | `PORT` | `3000` | Where the hell the server listens | |
| 122 | | `NODE_ENV` | `development` | Pick your poison: `development` vs `production` | |
|||
| 123 | | `DB_PATH` | `./employee_tracker.db` | Where your crucial time data lives | |
|||
| 124 | | `SESSION_SECRET` | `employee-tracker-secret-key` | Hide this like itβs your banking password | |
|||
| 125 | | `DEFAULT_ADMIN_USERNAME` | `admin` | The overlordβs default login | |
|||
| 126 | | `DEFAULT_ADMIN_PASSWORD` | `admin123` | CHANGE THIS ASAP π₯ | |
|||
| 127 | | `BACKUP_ENABLED` | `true` | Yeah, you want this on | |
|||
| 128 | | `BACKUP_INTERVAL` | `86400000` | How often to save your backside (MS) | |
|||
| 129 | | `BACKUP_RETENTION_DAYS` | `30` | How long to keep your safety net | |
|||
| 130 | ||||
| 131 | --- |
|||
| 132 | ||||
| 133 | ### π Docker Compose Config |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 134 | |
| 135 | ```yaml |
|||
| 136 | version: '3.8' |
|||
| 137 | services: |
|||
| 138 | app: |
|||
| 139 | image: employee-hour-tracker |
|||
| 140 | environment: |
|||
| 141 | - NODE_ENV=production |
|||
| 142 | - SESSION_SECRET=your-secure-secret-here |
|||
| 143 | - DEFAULT_ADMIN_USERNAME=admin |
|||
| 144 | - DEFAULT_ADMIN_PASSWORD=change-this-password |
|||
| 145 | ports: |
|||
| 146 | - "3000:3000" |
|||
| 147 | volumes: |
|||
| 148 | - ./data:/app/data |
|||
| 149 | - ./backups:/app/backups |
|||
| 150 | ``` |
|||
| 151 | ||||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 152 | --- |
| 153 | ||||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 154 | ## π Usage Guide |
| 155 | ||||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 156 | ### β±οΈ Time Tracking `/tracking` |
| 157 | ||||
| 158 | 1. Pick your week and start clicking grid cells like a god |
|||
| 159 | 2. Cycle statuses like a boss |
|||
| 160 | 3. Sit back β auto-saveβs doing the work for you |
|||
| 161 | 4. Use arrows & selectors if you like jumping through time |
|||
| 162 | ||||
| 163 | ### π Analytics `/analytics` |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 164 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 165 | 1. Choose your dates |
| 166 | 2. Interpret shame-slices in the pie chart |
|||
| 167 | 3. Compare your teamβs hustle in bar form |
|||
| 168 | 4. Click Export and flex on your boss with pretty data |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 169 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 170 | ### π¨βπΌ Admin Stuff `/management` |
| 171 | ||||
| 172 | 1. Log in as admin (`admin` / `admin123`) β seriously, change that |
|||
| 173 | 2. Add new employees like itβs HR day |
|||
| 174 | 3. Click to edit names (typos wonβt fix themselves) |
|||
| 175 | 4. Boot off old names thoughtfully (confirmation included) |
|||
| 176 | 5. Global settings & data export tools right at your manicured fingertips |
|||
| 177 | ||||
| 178 | --- |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 179 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 180 | ## ποΈ Project Architecture |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 181 | |
| 182 | ``` |
|||
| 183 | employee-hour-tracker/ |
|||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 184 | βββ π server.js # RESTful backend engine of doom |
| 185 | βββ π backup.js # Makes sure your data doesnβt go *poof* |
|||
| 186 | βββ π package.json # Clearly youβve heard of this |
|||
| 187 | βββ π docker-compose.yml # Container boyband orchestration |
|||
| 188 | βββ π Dockerfile # Turns your app into deployable magic |
|||
| 189 | βββ π public/ # Frontend good stuff |
|||
| 190 | β βββ index.html # Your glorious entry point |
|||
| 191 | β βββ style.css # Sharp purple swagger |
|||
| 192 | β βββ script.js # Grid logic + admin finesse |
|||
| 193 | β βββ chart.js # Analytics eye-candy |
|||
| 194 | βββ π backups/ # This folder saves asses |
|||
| 195 | βββ π employee_tracker.db # Don't delete this... seriously |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 196 | ``` |
| 197 | ||||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 198 | --- |
| 199 | ||||
| 200 | ### βοΈ Tech Stack |
|||
| 201 | ||||
| 202 | - **Backend**: Node.js + Express |
|||
| 203 | - **Database**: SQLite3 + better-sqlite3 (the better part matters) |
|||
| 204 | - **Frontend**: Raw Vanilla JS (no extra calories) + Chart.js |
|||
| 205 | - **Auth**: express-session + bcryptjs (like a bouncer for your admin area) |
|||
| 206 | - **Containerization**: Docker & Docker Compose |
|||
| 207 | ||||
| 208 | --- |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 209 | |
| 210 | ## π Security |
|||
| 211 | ||||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 212 | - Hashed passwords (get rekt plain text) |
| 213 | - Session-based login β no silly tokens |
|||
| 214 | - CORS-tight so outsiders canβt jack your data |
|||
| 215 | - SQL injection-proof β parameterized 'cause weβre not amateurs |
|||
| 216 | - Secrets optional but highly encouraged (youβve been warned) |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 217 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 218 | --- |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 219 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 220 | ## π§ Dev Life |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 221 | |
| 222 | ```bash |
|||
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 223 | npm run dev # Hot reload fixups |
| 224 | npm start # Serious prod mode |
|||
| 225 | npm run install-deps # Just in case you skipped setup like a rebel |
|||
| 226 | ``` |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 227 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 228 | --- |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 229 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 230 | ### π API Endpoints |
| 231 | ||||
| 232 | | Method | URL | What-It-Does | Auth | |
|||
| 233 | |--------|-----|--------------|------| |
|||
| 234 | | GET | `/api/employees` | Fetch worker list | β | |
|||
| 235 | | POST | `/api/employees` | Add a badass | β
| |
|||
| 236 | | PUT | `/api/employees/:id` | Update someoneβs stuff | β
| |
|||
| 237 | | DELETE | `/api/employees/:id`| Boot 'em | β
| |
|||
| 238 | | GET | `/api/time-entries` | Fetch time logs | β | |
|||
| 239 | | POST | `/api/time-entries` | Save/correct logs | β | |
|||
| 240 | | GET | `/api/analytics` | Data candy | β | |
|||
| 241 | | POST | `/api/login` | Get in | β | |
|||
| 242 | | POST | `/api/logout` | Peace out | β
| |
|||
| 243 | | GET | `/api/export/:format` | Download your victory proof | β
| |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 244 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 245 | --- |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 246 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 247 | ## π Known WTFs |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 248 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 249 | - Week nav is a little moody if you click like a caffeinated squirrel |
| 250 | - In rare cases, the status markerβs a lazy bastard and doesnβt update instantly |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 251 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 252 | (Fix coming soon. Or yell at us, that works too.) |
| 253 | ||||
| 09c337 | Tebby Dog | 2025-08-08 20:28:23 | 254 | ## Support |
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 255 | |
| 09c337 | Tebby Dog | 2025-08-08 20:28:23 | 256 | Issues? Questions? Praise-singing? |
| 257 | File an issue on GitHub or yell at [teb](https://github.com/tebwritescode). |
|||
| 28a846 | Tebby Dog | 2025-08-08 19:55:24 | 258 | |
| ccec28 | Tebby Dog | 2025-08-08 20:00:53 | 259 | --- |
| 09c337 | Tebby Dog | 2025-08-08 20:28:23 | 260 | π Created by: [tebbydog0605](https://github.com/tebwritescode) |
| 261 | π Docker Hub: [tebwritescode](https://hub.docker.com/u/tebwritescode) |
|||
| 262 | π» Website: [teb.codes](https://teb.codes) |