Blame

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