How koushik-1230/leave-tracker works
This repository implements a Slack-based employee leave-management bot, backed by Supabase and accompanied by Flask health/readiness endpoints. The main workflow accepts a leave request, stores it as pending, asks an administrator to approve or reject it, then updates the request and notifies the employee. Other documented-in-code capabilities include leave history and balances, admin balance updates, and scheduled daily leave announcements. The sampled code shows the main handlers and storage methods; some wiring for unsampled handlers is therefore omitted or marked unverified.
Main entry points: supabase_client.py Supabase data access · app.py Leave commands
Components 14
Slack workflows
- Leave commands
app/app.py - Request creation
app/app.py - Approval handling
app/app.py - Slack notifications
app/app.py - Balance workflows
app/app.py - Leave history
app/app.py
Leave data
- Supabase data access
app/supabase_client.py - Supabase
Background operations
- Daily scheduler
app/app.py - Daily announcements
app/app.py
Service health
- Health endpoints
app/app.py
Other components
- Employee
- Administrator
- Slack
Connections 21
- Employee → Slack: submits requests
- Administrator → Slack: reviews requests
- Slack → Leave commands: dispatches commands
app/app.py - Leave commands → Request creation: creates request
app/app.py - Request creation → Supabase data access: stores pending
app/app.py - Request creation → Slack notifications: requests approval
app/app.py - Approval handling → Supabase data access: updates status
app/app.py - Approval handling → Slack notifications: sends outcome
app/app.py - Leave commands → Approval handling: handles decisions
app/app.py - Leave commands → Leave history: loads history
app/app.py - Leave history → Supabase data access: reads requests
app/app.py - Balance workflows → Supabase data access: reads and updates
app/app.py - Supabase data access → Supabase: queries tables
app/supabase_client.py - Daily scheduler → Daily announcements: runs daily
app/app.py - Daily announcements → Supabase data access: loads today's leave
app/app.py - Daily announcements → Slack notifications: posts announcement
app/app.py - Slack notifications → Slack: sends messages
app/app.py - Slack → Balance workflows: dispatches commands
- Slack → Approval handling: dispatches actions
app/app.py - Employee → Health endpoints: checks service
- Health endpoints → Supabase data access: probes database
app/app.py