Blame

92a6e9 Tebby Dog 2025-08-08 19:40:57
init
1
# Sales Tracker
2
e1358d Tebby Dog 2025-08-08 19:56:47
formatting
3
> A modern-as-hell, playful web application for tracking sales and wrangling analytics — with an interactive login that's almost too clever for its own good.
92a6e9 Tebby Dog 2025-08-08 19:40:57
init
4
5b38af Tebby Dog 2025-08-08 19:55:53
added badges
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
92a6e9 Tebby Dog 2025-08-08 19:40:57
init
10
## Screenshots
9f0431 Tebby Dog 2025-08-08 19:47:57
modify screens
11
![](./Screenshot_2025-08-08_at_3.35.43_PM.png)
76cb58 Tebby Dog 2025-08-08 19:46:58
added screens
12
[![](./Screenshot_2025-08-08_at_3.36.48_PM.png?thumbnail)](./Screenshot_2025-08-08_at_3.36.48_PM.png)
13
[![](./Screenshot_2025-08-08_at_3.36.41_PM.png?thumbnail)](./Screenshot_2025-08-08_at_3.36.41_PM.png)
14
[![](./Screenshot_2025-08-08_at_3.36.30_PM.png?thumbnail)](./Screenshot_2025-08-08_at_3.36.30_PM.png)
15
[![](./Screenshot_2025-08-08_at_3.36.21_PM.png?thumbnail)](./Screenshot_2025-08-08_at_3.36.21_PM.png)
16
[![](./Screenshot_2025-08-08_at_3.35.43_PM.png?thumbnail)](./Screenshot_2025-08-08_at_3.35.43_PM.png)
92a6e9 Tebby Dog 2025-08-08 19:40:57
init
17
18
19
## Features
20
21
- 📊 **Sales Analytics Dashboard** – Visualize sales like a data-driven badass
22
- 👥 **User Management** – Multi-level permissions so your team doesn’t accidentally break stuff
23
- 📈 **Data Entry & Export** – Input sales quickly and shoot that crap into Excel
24
- 🎮 **Interactive Login** – Cursor-evasive Sign In button just to mess with people
25
- 🔒 **Secure Authentication** – Password hashing that even your nosy-ass sysadmin can’t break
26
- 📱 **Responsive Design** – Runs smooth on desktop, tablet, or that old phone you still won’t upgrade
27
28
### Core Functionality
29
30
- **Employee Management** – Add/edit employees, their commissions, draws — the whole damn deal
31
- **Sales Data Entry** – Do it by hand or slam in a CSV like a pro
32
- **Analytics Dashboard** – Filter and graph until the numbers make sense or you rage-quit
33
- **Admin Panel** – Wrapped in password protection, because duh
34
35
### Database Schema
36
37
Your data’s not just dumped — we gave it structure like responsible grownups:
38
39
- **Employee Table**: Tracks the who, what, and when of your sales crew
40
- **Sales Table**: Logs every dollar that rolls in
41
- **Settings Table**: Keeps track of your system’s default working setup and toggles
42
- **Goals Table**: Measure who's slaying and who's slacking
43
44
### Three Main Pages
45
46
#### 1. Management Tab (Locked Behind a Password Wall)
47
48
- Admin login with proper credentials (no password123 crap)
49
- Employee configuration panel
50
- Settings for system behavior and admin updates
51
- Switch how commissions & draws are shown — % or actual bucks
52
- **Epic theme picker with 8 presets for maximum visual hell yeah**
53
54
#### 2. Analytics Page (Wide Frickin’ Open)
55
56
- Tracks Year-to-Date stats, or whatever time range floats your fancy
57
- Uses Chart.js because facts deserve pretty pictures
58
- Bar, pie, line charts — you name it
59
- Filter time ranges and export data like an absolute legend
60
- Adaptive UI responds to theme like a mood ring for business
61
62
#### 3. Data Entry Page (Wide Open Like Your Inbox)
63
64
- Manual sales input
65
- Commissions calculated automatically (no more math headaches)
66
- Draw payment tracking — keep it drama-free
67
- Upload CSVs and watch it handle bulk data like a champ
68
- Validates your entries because your future self will thank you
69
- Keeps the recent entries right where you can see them
70
71
## Technical Stack
72
73
Because building badass tools needs solid tech:
74
75
- 🧠 **Backend**: Flask + SQLAlchemy
76
- 🐘 **Database**: SQLite, cause it just works
77
- 🖋️ **Forms**: Flask-WTF with CSRF defense
78
- 🔐 **Security**: Werk-f’ing-Zeug password hashing for locked-tight sessions
79
- 💅 **Frontend**: Bootstrap 5, sexy in all screen sizes
80
- 📊 **Charts**: Chart.js — clean, crisp, and fast AF
81
- 🐳 **Deployment**: Dockerized and ready to ship
82
83
## Installation & Setup
84
85
### Quick Start with Docker (The Way Developers Actually Do It)
86
87
1. Clone this bad boy:
88
```bash
89
git clone <repository-url>
90
cd sales-tracker
91
chmod +x setup.sh
92
./setup.sh
93
```
94
95
2. Manual Docker Compose (for control freaks):
96
```bash
97
docker-compose up --build
98
```
99
100
3. Launch that sucker:
101
- Visit http://localhost:5000
102
- Admin credentials: `admin` / `admin` (you’ll wanna change that ASAP)
103
104
### Setup Options
105
106
**Dev Mode** — a no-pressure playground:
107
```bash
108
./setup.sh --dev
109
```
110
111
**Production Mode** — the serious stuff:
112
```bash
113
./setup.sh --production
114
```
115
116
**Persistent Mode** — the one that doesn’t forget your data:
117
```bash
118
./setup.sh --persistent
119
```
120
121
Gives access at http://localhost:5001 if you're following recipes correctly.
122
123
### Got Database Problems? Let’s Kick Their Ass
124
125
1. Use in-container magic:
126
```bash
127
docker run -p 5000:5000 -e DATABASE_URL=sqlite:///sales_tracker.db sales-tracker
128
```
129
130
2. Fix crappy host permissions:
131
```bash
132
mkdir -p data uploads
133
chmod 755 data uploads
134
```
135
136
3. Or go full persistent mode:
137
```bash
138
./setup.sh --persistent
139
```
140
141
### Local Dev Setup
142
143
1. Get your damn Python set up:
144
```bash
145
python3 -m venv venv
146
source venv/bin/activate
147
pip install -r requirements.txt
148
```
149
150
2. Fire up the beast:
151
```bash
152
python app.py
153
```
154
155
3. Open browser → http://localhost:5000
156
(Or don’t. Be a rebel.)
157
158
## Configuration
159
160
### Environment Sh*t You Shouldn’t Forget
161
162
- `SECRET_KEY` — don’t check this into Git, ya dingus
163
- `FLASK_ENV` — development or production
164
- `DATABASE_URL` — override the default if you like pain
165
166
### Defaults
167
168
- Admin: `admin`
169
- Password: `admin` (again, change it dammit)
170
- Database: `sales_tracker.db`
171
172
## Usage Guide
173
174
### First-Time Dance
175
176
1. Load up http://localhost:5000
177
2. Smash that “Admin Login” button
178
3. Change the password — your organization’s honor depends on it
179
4. Add employees like a benevolent god
180
181
### Logging Sales (a.k.a. The Reason This Sh*t Exists)
182
183
1. Go to Data Entry
184
2. Type in details
185
3. Let auto-commission math do its thing
186
4. Or bulk upload a fancy-ass CSV
187
188
### Viewing Analytics
189
190
1. Hit Analytics
191
2. Filter stuff until it tells you something useful
192
3. Export if your boss wants proof
193
194
### Managing the Team
195
196
1. Admin login
197
2. Edit employees or set their goals
198
3. Toggle display settings — % or flat amounts
199
4. Yell at slackers (optional)
200
201
### Theme Customization (Because Vibes Matter)
202
203
1. Hit the palette icon in the navbar
204
2. Choose one of the 8 eye-popping themes
205
3. Watch the app change outfits instantly
206
207
Themes include:
208
209
- Default Blue
210
- Dark Theme (work in the shadows, baby)
211
- Nature Green (for tree-huggin’ teams)
212
- Royal Purple (His Royal Freshness would approve)
213
- Sunset Orange
214
- Ocean Teal
215
- Corporate Red (power tie vibes)
216
- Modern Pink
217
218
Settings persist for admin; guests get localStorage (so they don’t ruin your vibe).
219
220
## File Structure
221
222
```
223
sales-tracker/
224
├── app.py # Main Flask beast
225
├── requirements.txt # Python goodies
226
├── Dockerfile # So your app works on my damn machine too
227
├── docker-compose.yml # Stack orchestration magic
228
…
229
```
230
231
## API Endpoints
232
233
- `GET /api/sales_data?period=YTD` — give us that chart data
234
- `GET /api/trends_data` — how the bloody hell are we doing?
235
- `POST /bulk_upload` — shove an entire CSV down its throat
236
237
## Security Features
238
239
- Password hashing (locked tighter than grandma’s cookie jar)
240
- CSRF protection — no cross-site BS allowed
241
- Session-based ownership
242
- Input validation so you don’t feed it junk
243
- SQLAlchemy ORM to dodge SQL injection like Neo
244
245
## Performance
246
247
Fast as hell. Optimized frontend, backend, and everything in between. Ready to scale... maybe.
248
249
## Maintenance
250
251
### Backup the Damn DB
252
253
```bash
254
docker exec sales-tracker-app sqlite3 /app/sales_tracker.db ".backup /app/data/backup.db"
255
```
256
257
### Update This Beautiful Bastard
258
259
```bash
260
docker-compose down
261
docker-compose up --build
262
```
263
264
### Check Logs Like a Debugging Ninja
265
266
```bash
267
docker-compose logs -f sales-tracker
268
```
269
270
## Contributing
271
272
1. Fork it
273
2. Branch it
274
3. Make it better
275
4. Pull request and bask in glory
276
277
## License
278
279
Built with Flask, Bootstrap, and several shots of espresso. Have fun breaking it.
280
281
## Support
282
283
Issues? Questions? Praise-singing?
284
File an issue on GitHub or yell at [tebbydog0605](https://github.com/tebbydog0605).
285
286
---
287
👑 Created by: [tebbydog0605](https://github.com/tebbydog0605)
288
🐋 Docker Hub: [tebwritescode](https://hub.docker.com/u/tebwritescode)
289
💻 Website: [tebwrites.code](https://tebwrites.code)
290
291
---
292
293
Let me know if you want toggles for “Cuss-Free Mode” 😈 — or would you like an even spicier edit?