A timesheet reminder system.
Report Bug
·
Request Feature
The Wolves is a project developed by the Made Tech Academy of Winter/Spring 2019. It set out to solve the problem of billable people not filling in their timesheets on time and the need for the Operations team to manually send reminders.
This application solves this problem by automatically reminding billable people that have not submitted their timesheets through a Slack direct message and publicly listing all those yet to do so by the deadline.
The Wolves is a C# application that follows the principles of Clean Architecture (CA). It is deployed to Heroku and utilises Docker.
Following CA, we have three sea-level use cases:
Each of which have use case dependencies on:
- GetBillablePeople which calls the Slack API to get a list of people. Exclusions can be added to the NON_BILLABLE_PEOPLE environment variable to stop those people being messaged.
- SendReminder which calls the Slack API to send out reminders.
We then have CryptoTechReminderSystem.Main/Program.cs
, which schedules when the
above use cases should be called. The Wolves have two jobs:
RemindBillablePeopleJob
which sends a Slack direct message to billable people to fill in their timesheets. It runs once at 10am on a Friday or the last day of the month.
To get a local copy up and running follow these simple steps.
- Clone the repo
git clone https://github.com/madetech/the-wolves.git
- Within
the-wolves
directory, restore the dependencies for the application
dotnet restore
To locally run the application, there is a set of environment variables that need to be set, see CryptoTechReminderSystem.Main/.env-default
.
- Create a
.env
file withinCryptoTechReminderSystem.Main
and set the following environment variables:
SLACK_TOKEN=
SLACK_CHANNEL_ID=
SLACK_REMINDER_MESSAGE=
SLACK_PM_REMINDER_MESSAGE=
SLACK_BILLABLE_PEOPLE_MESSAGE=
NON_BILLABLE_PEOPLE=
The NON_BILLABLE_PEOPLE should be in the format "[email protected],[email protected]"
- Run the application using:
dotnet run
The application has two namespaced set of tests:
CryptoTechReminderSystem.AcceptanceTest
for acceptance testsCryptoTechReminderSystem.Test
for unit tests
To run all tests:
dotnet test
We use Heroku to host our application as a Heroku Dyno and automatic deployment is configured. This means whenever master
is updated, a deployment will be triggered.
It is still possible to manually deploy using Heroku CLI and Git.
You must have Heroku CLI installed.
- Login into Heroku
heroku login
- Add the remote for the Heroku Git repository for
cryptotech-reminders
heroku git:remote -a cryptotech-reminders
You can then confirm that a remote for
Heroku
has been added by running:git remote -vThe output should then be the following:
heroku https://git.heroku.com/cryptotech-reminders.git (fetch) heroku https://git.heroku.com/cryptotech-reminders.git (push) origin [email protected]:madetech/the-wolves.git (fetch) origin [email protected]:madetech/the-wolves.git (push)
- Ensuring
master
is up-to-date, deploy the local repository'smaster
branch, to Heroku remote
git push heroku master
For more information about deploying to Heroku, see Heroku's guide - Deploying with Git.
[0] "Project managers" is used to refer to the people identified as having management responsibility for a project in Harvest. At Made Tech, this is generally the Delivery Manager.