A robust, self-hosted Slack App for managing Leave and WFH requests. Built with Python, Slack Bolt, and DynamoDB.
- Interactive Requests: Create requests via
/dayoffcommand or Modal. - Approval Workflow: Managers approve/reject requests directly from Slack.
- In-place Updates: Messages update instantly (e.g., "Pending" -> "Approved").
- Google Sheets Sync: Approved requests are automatically synced to a Google Sheet.
- Business Logic: Automated duration calculation, conflict checking, and history tracking.
This project follows GitOps principles for deployment, separating application code from environment configuration.
- Repos:
dayoffy(This Repo): Application source code, tests, and CI/CD for building images.dayoffy-config: Environment-specific configurations (Staging, Production) and deployment workflows.
- Backend: Python 3.13, FastAPI, Slack Bolt.
- Database: AWS DynamoDB.
- Infrastructure: Managed via Terraform (housed in
dayoffy-config).
Every push to the main branch triggers the following GitOps flow:
- Build & Push: GitHub Actions runs tests, builds a Docker image, and pushes it to Amazon ECR.
- Promote: The workflow automatically creates a Pull Request in the
dayoffy-configrepository with the new image tag. - Deploy:
- Staging: Merging the PR in the config repo triggers an automatic deployment to AWS App Runner.
- Production: Promotion to production is handled via a script in the config repo and requires manual approval.
- Prerequisites: Docker, Docker Compose, Slack App credentials (App Token, Bot Token).
- Environment Setup: Copy
.env.exampleto.env(create one if not exists) and fill in your Slack credentials:SLACK_BOT_TOKEN=xoxb-... SLACK_APP_TOKEN=xapp-... SLACK_SIGNING_SECRET=... GOOGLE_SHEET_ID=... GOOGLE_SHEETS_CREDENTIALS_JSON='{...}'
- Run Application:
docker-compose up --build
- Access:
- API: http://localhost:3000
- DynamoDB Admin: http://localhost:8001
This project uses uv for dependency management.
# Install dependencies
uv sync
# Run Unit & Integration Tests
uv run pytest tests/dayoff: Open the Request Modal./dayoff leave tomorrow visiting doctor: Quick create a request.
.
├── app/ # Application Source (Python, Bolt)
├── docs/ # Documentation
├── .github/workflows/ # CI/CD Workflows (GitOps Build & Promote)
├── tests/ # Unit and Integration Tests
└── scripts/ # Utility Scripts