Skip to content

madetech/the-wolves

Repository files navigation

CircleCI


Logo

The Wolves

A timesheet reminder system.

Report Bug · Request Feature

Table of Contents

About The Project

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.

Logo

Built With

Technical Architecture

The Wolves is a C# application that follows the principles of Clean Architecture (CA). It is deployed to Heroku and utilises Docker.

Logo

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.

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Installation

  1. Clone the repo
git clone https://github.com/madetech/the-wolves.git
  1. Within the-wolves directory, restore the dependencies for the application
dotnet restore

Usage

Running the application

To locally run the application, there is a set of environment variables that need to be set, see CryptoTechReminderSystem.Main/.env-default.

  1. Create a .env file within CryptoTechReminderSystem.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]"

  1. Run the application using:
dotnet run

Running the tests

The application has two namespaced set of tests:

  • CryptoTechReminderSystem.AcceptanceTest for acceptance tests
  • CryptoTechReminderSystem.Test for unit tests

To run all tests:

dotnet test

Deployment

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.

Deploying to Heroku with Git

You must have Heroku CLI installed.

  1. Login into Heroku
heroku login
  1. 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 -v

The 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)
  1. Ensuring master is up-to-date, deploy the local repository's master 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.

About

A timesheet reminder system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published