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