-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from electron2302/develop
Release 1.0.0
- Loading branch information
Showing
152 changed files
with
10,751 additions
and
991 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
kind: pipeline | ||
type: docker | ||
name: ci | ||
|
||
steps: | ||
- name: "Install dependencies" | ||
image: node:14 | ||
commands: | ||
- cd ctt-frontend | ||
- npm ci | ||
|
||
- name: "Lint" | ||
image: node:14 | ||
commands: | ||
- cd ctt-frontend | ||
- "npx ng lint" | ||
depends_on: ["Install dependencies"] | ||
|
||
- name: "Prettier" | ||
image: node:14 | ||
commands: | ||
- cd ctt-frontend | ||
- "npx prettier --check ." | ||
depends_on: ["Install dependencies"] | ||
|
||
- name: "Test & Coverage" | ||
image: buildkite/puppeteer | ||
commands: | ||
- cd ctt-frontend | ||
- "npx ng test --browsers ChromeHeadlessNoSandbox --watch false --progress false --codeCoverage" | ||
depends_on: ["Install dependencies"] | ||
|
||
- name: "Docker tags" | ||
image: alpine | ||
commands: | ||
- echo -n "c-${DRONE_COMMIT_SHA}," > .tags | ||
- echo -n "${DRONE_BRANCH}" >> .tags | ||
- echo -n "tags are "; cat .tags ; echo | ||
when: | ||
branch: | ||
- main | ||
- develop | ||
event: | ||
- push | ||
depends_on: ["Test & Coverage", "Lint"] | ||
|
||
###### | ||
# CD for develop branch | ||
##### | ||
- name: "Amplify develop" | ||
image: node:14 | ||
commands: | ||
- cd ctt-frontend | ||
- npm install -g @aws-amplify/cli | ||
- mkdir ~/.aws | ||
- echo "[default]" > ~/.aws/credentials | ||
- echo "aws_access_key_id=$KEYID" >> ~/.aws/credentials | ||
- echo "aws_secret_access_key=$KEYSECRET" >> ~/.aws/credentials | ||
- echo "[default]" > ~/.aws/config | ||
- echo "region=us-east-1" >> ~/.aws/config | ||
- npx amplify init --envName dev --yes | ||
- npx amplify push --yes | ||
environment: | ||
KEYID: | ||
from_secret: aws_access_key_id | ||
KEYSECRET: | ||
from_secret: aws_secret_access_key | ||
when: | ||
branch: | ||
- develop | ||
event: | ||
- push | ||
depends_on: ["Test & Coverage", "Lint"] | ||
|
||
- name: "Build develop" | ||
image: node:14 | ||
commands: | ||
- cd ctt-frontend | ||
- npm run build:prod | ||
when: | ||
branch: | ||
- develop | ||
event: | ||
- push | ||
depends_on: ["Amplify develop"] | ||
|
||
- name: "Push develop" | ||
image: plugins/docker | ||
settings: | ||
repo: electron2302/ctt | ||
username: electron2302 | ||
password: | ||
from_secret: dockerhub_secret | ||
dockerfile: ctt-frontend/Dockerfile | ||
when: | ||
branch: | ||
- develop | ||
event: | ||
- push | ||
depends_on: ["Build develop"] | ||
|
||
- name: "Publish develop" | ||
image: quay.io/honestbee/drone-kubernetes | ||
settings: | ||
namespace: web | ||
deployment: ctt-dev-deployment | ||
container: ctt-dev | ||
repo: electron2302/ctt | ||
tag: develop | ||
kubernetes_server: | ||
from_secret: kubernetes_server | ||
kubernetes_token: | ||
from_secret: kubernetes_token | ||
when: | ||
branch: | ||
- develop | ||
event: | ||
- push | ||
depends_on: ["Push develop"] | ||
|
||
###### | ||
# CD for main branch | ||
##### | ||
- name: "Amplify main" | ||
image: node:14 | ||
commands: | ||
- cd ctt-frontend | ||
- npm install -g @aws-amplify/cli | ||
- mkdir ~/.aws | ||
- echo "[default]" > ~/.aws/credentials | ||
- echo "aws_access_key_id=$KEYID" >> ~/.aws/credentials | ||
- echo "aws_secret_access_key=$KEYSECRET" >> ~/.aws/credentials | ||
- echo "[default]" > ~/.aws/config | ||
- echo "region=us-east-1" >> ~/.aws/config | ||
- npx amplify init --envName main --yes | ||
- npx amplify push --yes | ||
environment: | ||
KEYID: | ||
from_secret: aws_access_key_id | ||
KEYSECRET: | ||
from_secret: aws_secret_access_key | ||
when: | ||
branch: | ||
- main | ||
event: | ||
- push | ||
depends_on: ["Test & Coverage", "Lint"] | ||
|
||
- name: "Build main" | ||
image: node:14 | ||
commands: | ||
- cd ctt-frontend | ||
- npm run build:prod | ||
when: | ||
branch: | ||
- main | ||
event: | ||
- push | ||
depends_on: ["Amplify main"] | ||
|
||
- name: "Push main" | ||
image: plugins/docker | ||
settings: | ||
repo: electron2302/ctt | ||
username: electron2302 | ||
password: | ||
from_secret: dockerhub_secret | ||
dockerfile: ctt-frontend/Dockerfile | ||
when: | ||
branch: | ||
- main | ||
event: | ||
- push | ||
depends_on: ["Build main"] | ||
|
||
- name: "Publish main" | ||
image: quay.io/honestbee/drone-kubernetes | ||
settings: | ||
namespace: web | ||
deployment: ctt-prod-deployment | ||
container: ctt-prod | ||
repo: electron2302/ctt | ||
tag: main | ||
kubernetes_server: | ||
from_secret: kubernetes_server | ||
kubernetes_token: | ||
from_secret: kubernetes_token | ||
when: | ||
branch: | ||
- main | ||
event: | ||
- push | ||
depends_on: ["Push main"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.vscode/launch.json | ||
ctt-frontend/.vscode/launch.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"files.exclude": { | ||
"ctt-frontend/amplify/.config": true, | ||
"ctt-frontend/amplify/**/*-parameters.json": true, | ||
"ctt-frontend/amplify/**/amplify.state": true, | ||
"ctt-frontend/amplify/**/transform.conf.json": true, | ||
"ctt-frontend/amplify/#current-cloud-backend": true, | ||
"ctt-frontend/amplify/backend/amplify-meta.json": true, | ||
"ctt-frontend/amplify/backend/awscloudformation": true | ||
}, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSaveMode": "file", | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"eslint.workingDirectories": ["ctt-frontend"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,160 @@ | ||
# continuous-time-tracking | ||
# ![Image](./docs/cttIcon.svg) Continuous Time Tracking (CTT) | ||
|
||
[![Build Status](https://drone.dev.sart.solutions/api/badges/electron2302/continuous-time-tracking/status.svg?ref=refs/heads/develop)](https://drone.dev.sart.solutions/electron2302/continuous-time-tracking) | ||
|
||
> If you can’t measure it, you can’t improve it. | ||
Peter Drucker | ||
|
||
Following this principle we wanted to implement a time tracking app that forces the users to continuously track their activities throughout their day. An activity cannot be ended and therefore switching activities only works by starting a new one. This ensures that the user's activities during a day are measured without breaks which should lead to better coverage and therefore more capabilities to improve time spending. | ||
|
||
This project was developed by four students at Munich University of Applied Science during a two weeks time frame in their fifth semester's PBLV (Praxisbegleitende Lehrveranstaltung). | ||
|
||
By providing this application as open source, we want to enable others to use this app for themselves in order to improve their time spending. | ||
|
||
## Content | ||
|
||
1. [Content](#Content) | ||
2. [Usage](#Usage) | ||
3. [Development Setup](#Development-Setup) | ||
3.1. [Code style](#Code-style) | ||
3.2. [Integration into Visual Studio Code](#Integration-into-Visual-Studio-Code) | ||
3.3. [Build and serve](#Build-and-serve) | ||
3.4. [Run tests](#Run-tests) | ||
4. [Contributors](#Contributors) | ||
5. [References](#References) | ||
|
||
## Usage | ||
|
||
The app is available at: [https://ctt.sart.solutions/](https://ctt.sart.solutions/). | ||
|
||
The Entrypoint of the CTT is the login screen: | ||
|
||
![LoginScreen](./docs/LoginScreen.png) | ||
|
||
If you have no account, you can create an account on the create account screen: | ||
|
||
![SignupScreen](./docs/SignupScreen.png) | ||
|
||
Once you signed up, you will receive a verification email. | ||
|
||
Type this verification code in the relating input box on the confirmation screen: | ||
|
||
![ConfirmationScreen](./docs/ConfirmationScreen.png) | ||
|
||
After you signed in, you will land at the home screen: | ||
|
||
![HomeScreen](./docs/HomeScreen.png) | ||
|
||
At this screen you are prompted to start a new activity. | ||
|
||
By clicking on the hamburger menu on the left of the "Continuous Time Tracking" label you can toggle the side navigation bar: | ||
|
||
![SideNavScreen](./docs/SideNavScreen.png) | ||
|
||
By clicking on "Categories" you can edit all categories or create a new one. | ||
|
||
![EditCategoriesScreen](./docs/EditCategoriesScreen.png) | ||
|
||
On the edit categories screen you can edit a certain category by clicking on the pen-icon: | ||
|
||
![EditCategoryScreen](./docs/EditCategoryScreen.png) | ||
|
||
On the edit categories screen you can add a category py clicking on the "+": | ||
|
||
![AddCategoryScreen](./docs/AddCategoryScreen.png) | ||
|
||
By switching to the "History"-Tab you can view the history of the current day and step trough the days: | ||
|
||
![HistoryScreen](./docs/HistoryScreen.png) | ||
|
||
By clicking on your account name you can see your account details: | ||
|
||
![AccountScreen](./docs/AccountScreen.png) | ||
|
||
## Development Setup | ||
|
||
Prerequisites: | ||
|
||
- Node.js v10.x or later | ||
- npm v5.x or later | ||
- git v2.14.1 or later | ||
|
||
Install the aws-amplify cli with (you might need <code>sudo</code>): | ||
|
||
- <code>npm install -g @aws-amplify/cli</code> | ||
|
||
Configure Amplify with: | ||
|
||
- <code>amplify configure</code> | ||
- region: us-east-1 | ||
|
||
Install Amplify libraries: | ||
|
||
- <code>npm install --save aws-amplify @aws-amplify/ui-angular</code> | ||
|
||
Get implemented api, database and authentication with: | ||
|
||
- <code>amplify pull</code> | ||
|
||
Check your Amplify status with: | ||
|
||
- <code>amplify status</code> | ||
|
||
### Code style | ||
|
||
We use the default ESLint angular configuration for static code analysis. | ||
Furthermore we use the default prettier configuration to ensure a consistent code formatting within the project. | ||
|
||
### Integration into Visual Studio Code | ||
|
||
Plugins: | ||
|
||
- Name: ESLint \ | ||
Id: dbaeumer.vscode-eslint \ | ||
Description: Integrates ESLint JavaScript into VS Code. \ | ||
Version: 2.1.14 \ | ||
Publisher: Dirk Baeumer \ | ||
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint | ||
- Name: Prettier - Code formatter \ | ||
Id: esbenp.prettier-vscode \ | ||
Description: Code formatter using prettier \ | ||
Version: 5.9.1 \ | ||
Publisher: Prettier \ | ||
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode | ||
|
||
### Build and serve | ||
|
||
You can build and serve your local changes locally by running: | ||
|
||
- <code>npm install</code> | ||
- <code>ng serve</code> | ||
|
||
in the ./ctt-frontend directory. | ||
|
||
### Run tests | ||
|
||
You can run the tests by running: | ||
|
||
- <code>ng test</code> | ||
|
||
in the ./ctt-frontend directory. | ||
|
||
## Contributors | ||
|
||
The following authors have contributed to this project (in alphabetical order): | ||
|
||
- [AndHager](https://github.com/AndHager) | ||
- [electron2302](https://github.com/electron2302) | ||
- [sschoetz](https://github.com/sschoetz) | ||
- [walli545](https://github.com/walli545) | ||
|
||
## References | ||
|
||
Useful references and and documentations we used in our project: | ||
|
||
- [AWS Amplify](https://aws.amazon.com/de/amplify/) | ||
- [AWS Amplify Documentation](https://docs.aws.amazon.com/amplify/) | ||
- [Amplify Framework Documentation](https://docs.amplify.aws/) | ||
- [Angular](https://angular.io/) | ||
- [Angular Material](https://material.angular.io/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
src/models | ||
src/models | ||
src/polyfills.ts | ||
coverage/ | ||
src/models |
Oops, something went wrong.