Skip to content

Commit 4a48770

Browse files
authored
Merge branch 'main' into dependabot/go_modules/apiserver/go_modules-0636b2e980
2 parents 1036f2b + a775cfc commit 4a48770

File tree

126 files changed

+28574
-78
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+28574
-78
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "Tasks",
2+
"name": "Task Wizard",
33
"image": "mcr.microsoft.com/devcontainers/go:1-1.23-bookworm",
44
"features": {
55
"ghcr.io/devcontainers/features/github-cli:1": {
@@ -26,12 +26,6 @@
2626
},
2727
"codespaces": {
2828
"repositories": {
29-
"dkhalife/tasks-frontend": {
30-
"permissions": {
31-
"contents": "write",
32-
"pullRequests": "write"
33-
}
34-
},
3529
"dkhalife/task-wizard": {
3630
"permissions": {
3731
"contents": "write",
@@ -41,13 +35,7 @@
4135
}
4236
}
4337
},
44-
"mounts": [
45-
{
46-
"source": "${localWorkspaceFolder}/../tasks-frontend",
47-
"target": "/workspaces/tasks-frontend",
48-
"type": "bind"
49-
}
50-
],
38+
"mounts": [],
5139
"workspaceFolder": "/workspaces",
5240
"runArgs": [
5341
"--cpus=4",
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
# This workflow will build a golang project
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3-
4-
name: Build
1+
name: API Build
52

63
permissions:
74
contents: read
85

96
on:
107
push:
118
branches: [ "main" ]
9+
paths:
10+
- 'apiserver/**'
1211
pull_request:
1312
branches: [ "main" ]
13+
paths:
14+
- 'apiserver/**'
1415

1516
jobs:
1617

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Cut Release
22

33
on:
44
workflow_dispatch:
@@ -14,12 +14,15 @@ jobs:
1414
- uses: actions/checkout@v4
1515
with:
1616
token: ${{ secrets.WORKFLOW_TOKEN }}
17+
- name: Bump frontend version
18+
run: |
19+
cd frontend
20+
yarn version --new-version-patch --no-git-tag-version
1721
- name: Get the latest tag
1822
id: get_latest_tag
1923
env:
2024
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
2125
run: |
22-
gh repo set-default dkhalife/task-wizard
2326
latest_tag=$(gh release list --limit 1 --json tagName -q '.[0].tagName')
2427
echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT
2528
- name: Bump version
@@ -39,4 +42,4 @@ jobs:
3942
git config user.name "github-actions"
4043
git config user.email "[email protected]"
4144
git tag $new_tag
42-
git push origin $new_tag
45+
git push origin $new_tag

.github/workflows/dotnet-build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: .NET Build
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
paths:
10+
- 'mcpserver/**'
11+
pull_request:
12+
branches: [ "main" ]
13+
paths:
14+
- 'mcpserver/**'
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup .NET
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
dotnet-version: '9.0.x'
27+
28+
- name: Restore dependencies
29+
run: |
30+
cd mcpserver
31+
dotnet restore
32+
33+
- name: Build
34+
run: |
35+
cd mcpserver
36+
dotnet build --no-restore --configuration Release
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Frontend Build
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths:
7+
- 'frontend/**'
8+
pull_request:
9+
branches: [ "main" ]
10+
paths:
11+
- 'frontend/**'
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
node-version: [20.x, 22.x]
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: 'yarn'
31+
cache-dependency-path: frontend/yarn.lock
32+
- name: Install dependencies
33+
run: yarn install --frozen-lockfile
34+
working-directory: frontend
35+
- name: Install Playwright Browsers
36+
run: npx playwright install --with-deps chromium
37+
working-directory: frontend
38+
- name: Lint
39+
run: yarn lint
40+
working-directory: frontend
41+
- name: Build (TSC)
42+
run: yarn tsc
43+
working-directory: frontend
44+
- name: Build (Vite)
45+
run: yarn build
46+
working-directory: frontend
47+
- name: Run Playwright tests
48+
run: yarn test:e2e
49+
working-directory: frontend
50+
- uses: actions/upload-artifact@v4
51+
if: always()
52+
with:
53+
name: playwright-report
54+
path: playwright-report/
55+
retention-days: 30
Lines changed: 29 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Go Release
1+
name: Full Release
22

33
permissions:
44
contents: write
@@ -19,34 +19,25 @@ jobs:
1919
with:
2020
fetch-depth: 0
2121
fetch-tags: true
22-
- name: Checkout Frontend
23-
uses: actions/checkout@v4
24-
with:
25-
repository: '${{ vars.FRONTEND_REPO }}'
26-
token: ${{ secrets.GITHUB_TOKEN }}
27-
ref: ${{ vars.FRONTEND_REF }}
28-
path: 'frontend-code'
29-
fetch-depth: 0
30-
fetch-tags: true
3122
# build frontend
3223
- name: Use Node.js 22.x
3324
uses: actions/setup-node@v4
3425
with:
3526
node-version: 22.x
3627
- name: Install Dependencies
3728
run: |
38-
cd frontend-code
29+
cd frontend
3930
yarn install
4031
- name: Build Frontend
4132
run: |
4233
export VITE_BACKEND_VERSION=$(git tag --sort=-creatordate | sed -n '1p' | sed 's/^v//')
43-
cd frontend-code
34+
cd frontend
4435
yarn build
4536
4637
- name: Copy Frontend
4738
run: |
48-
rm -rf ./frontend/dist
49-
cp -r frontend-code/dist ./frontend/dist
39+
rm -rf apiserver/frontend/dist
40+
cp -r frontend/dist apiserver/frontend/dist
5041
5142
- name: Set up Go
5243
uses: actions/setup-go@v5
@@ -85,16 +76,6 @@ jobs:
8576
fetch-depth: 0
8677
fetch-tags: true
8778

88-
- name: Checkout Frontend
89-
uses: actions/checkout@v4
90-
with:
91-
repository: '${{ vars.FRONTEND_REPO }}'
92-
token: ${{ secrets.GITHUB_TOKEN }}
93-
ref: ${{ vars.FRONTEND_REF }}
94-
path: 'frontend-code'
95-
fetch-depth: 0
96-
fetch-tags: true
97-
9879
- name: Download Build Artifacts
9980
uses: actions/download-artifact@v4
10081
with:
@@ -121,18 +102,7 @@ jobs:
121102
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
122103
run: |
123104
changelog=$(echo -e "## Changelog\n")
124-
125-
pushd frontend-code
126-
latestTag=$(git tag --sort=-creatordate | sed -n '1p')
127-
previousTag=$(git tag --sort=-creatordate | sed -n '2p')
128-
echo "Evaluating frontend repo:"
129-
echo "Latest tag: $latestTag"
130-
echo "Previous tag: $previousTag"
131-
132-
url="https://github.com/${{ vars.FRONTEND_REPO }}/compare/$previousTag...$latestTag"
133-
changelog+=$(echo -e "\n### Changes in [frontend]($url)\n\n$(git log --no-merges --pretty=format:"* %s" $previousTag...$latestTag)")
134-
popd
135-
105+
136106
latestTag=$(git tag --sort=-creatordate | sed -n '1p')
137107
previousTag=$(git tag --sort=-creatordate | sed -n '2p')
138108
echo "Evaluating backend repo:"
@@ -161,16 +131,26 @@ jobs:
161131
- name: Log in to Azure Container Registry
162132
run: az acr login --name ${{ secrets.ACR_NAME }}
163133

164-
- name: Build and push tags
134+
- name: Build and push API image
165135
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 #v6.13.0
166136
with:
167-
context: .
137+
context: ./apiserver
138+
file: ./apiserver/Dockerfile
168139
push: true
169-
tags: ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard:canary, ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard:${{ github.ref_name }}
140+
tags: ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-api:canary, ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-api:${{ github.ref_name }}
170141
platforms: linux/amd64,linux/arm64,linux/arm/v7
171142
build-args: |
172143
RELEASE_TAG=${{github.ref_name}}
173144
145+
- name: Build and push MCP image
146+
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 #v6.13.0
147+
with:
148+
context: ./mcpserver
149+
file: ./mcpserver/Dockerfile
150+
push: true
151+
tags: ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-mcp:canary, ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-mcp:${{ github.ref_name }}
152+
platforms: linux/amd64,linux/arm64,linux/arm/v7
153+
174154
release-production:
175155
runs-on: ubuntu-latest
176156
environment: stable
@@ -212,9 +192,16 @@ jobs:
212192
- name: Log in to ACR
213193
run: az acr login --name ${{ secrets.ACR_NAME }}
214194

215-
- name: Push tags
195+
- name: Push API image tags
196+
run: |
197+
# Promote multi-platform image manifest from canary to production tags
198+
docker buildx imagetools create \
199+
--tag ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-api:release \
200+
${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-api:${{ github.ref_name }}
201+
202+
- name: Push MCP image tags
216203
run: |
217204
# Promote multi-platform image manifest from canary to production tags
218205
docker buildx imagetools create \
219-
--tag ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard:release \
220-
${{ secrets.ACR_NAME }}.azurecr.io/task-wizard:${{ github.ref_name }}
206+
--tag ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-mcp:release \
207+
${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-mcp:${{ github.ref_name }}

.goreleaser.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ version: 2
33
project_name: task-wizard
44

55
builds:
6-
- env:
6+
- dir: apiserver
7+
env:
78
- CGO_ENABLED=0
89
goos:
910
- linux
@@ -30,7 +31,7 @@ archives:
3031
- goos: windows
3132
format: zip
3233
files:
33-
- src: "config/config.yaml"
34+
- src: "apiserver/config/config.yaml"
3435
dst: "config/config.yaml"
3536

3637
release:

README.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
[![Build](https://github.com/dkhalife/task-wizard/actions/workflows/go-build.yml/badge.svg)](https://github.com/dkhalife/task-wizard/actions/workflows/go-build.yml) [![codecov](https://codecov.io/gh/dkhalife/task-wizard/graph/badge.svg?token=UQ4DTE3WI1)](https://codecov.io/gh/dkhalife/task-wizard) [![CodeQL](https://github.com/dkhalife/task-wizard/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/dkhalife/task-wizard/actions/workflows/github-code-scanning/codeql) [![Dependabot Updates](https://github.com/dkhalife/task-wizard/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/dkhalife/task-wizard/actions/workflows/dependabot/dependabot-updates)
1+
[![api build](https://github.com/dkhalife/task-wizard/actions/workflows/api-build.yml/badge.svg)](https://github.com/dkhalife/task-wizard/actions/workflows/api-build.yml) [![api codecov](https://codecov.io/gh/dkhalife/task-wizard/graph/badge.svg?token=UQ4DTE3WI1)](https://codecov.io/gh/dkhalife/task-wizard) [![frontend build](https://github.com/dkhalife/task-wizard/actions/workflows/frontend-build.yml/badge.svg)](https://github.com/dkhalife/task-wizard/actions/workflows/frontend-build.yml) [![CodeQL](https://github.com/dkhalife/task-wizard/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/dkhalife/task-wizard/actions/workflows/github-code-scanning/codeql) [![Dependabot Updates](https://github.com/dkhalife/task-wizard/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/dkhalife/task-wizard/actions/workflows/dependabot/dependabot-updates)
22

33
# Task Wizard
44

55
**Privacy First, Productivity Always!**
66

77
Task Wizard is a free and open-source app designed to help manage tasks effectively. Its primary focus is to give users control over data and allow them to build integrations around it however they choose to.
88

9-
This repo contains the backend logic for the app. You can find the default frontend implementation that is released with it in the [tasks-frontend](https://github.com/dkhalife/tasks-frontend) repo. This repo started as a fork of [DoneTick](https://github.com/donetick/donetick) but has since diverged from the original source code in order to accomplish different goals. Kudos to the contributors of [DoneTick](https://github.com/donetick/donetick) for helping kickstart this project.
9+
This repo started as a fork of [DoneTick](https://github.com/donetick/donetick) but has since diverged from the original source code in order to accomplish different goals. Kudos to the contributors of [DoneTick](https://github.com/donetick/donetick) for helping kickstart this project.
1010

1111
## 🎯 Goals and principles
1212

@@ -118,22 +118,14 @@ The configuration files are yaml mappings with the following values:
118118

119119
## 🛠️ Development
120120

121-
### 🖥️ Devcontainer
122-
123121
A [devcontainer](./.devcontainer/devcontainer.json) configuration is set up in this repo to help jumpstart development with all the required dependencies available for both the frontend and backend. You can use this configuration alongside
124122
GitHub codespaces to jump into a remote development environment without installing anything on your local machine. For the best experience make sure your codespace has both repos cloned in it. Ports can be forwarded from within the container so that you are able to test changes locally through the VS Code tunnel.
125123

126124
### 📃 Requirements
127125

128-
* GoLang
129-
130-
### 🔁 Inner loop
131-
132-
1. Navigate to the root of the repo
133-
1. Ensure you have the latest packages installed with `go mod download`
134-
1. Run the app `go run .`
135-
1. (optional) For live reload, install air with
136-
`go install github.com/cosmtrek/air@latest` then to run the app use `air`
126+
* [GoLang](https://go.dev)
127+
* [NodeJS](https://nodejs.org) 20+
128+
* [yarn](https://yarnpkg.com)
137129

138130
## 🤝 Contributing
139131

apiserver/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# 📡 API Server
2+
3+
## 🔁 Inner loop
4+
5+
1. Navigate to the root of the repo
6+
1. Ensure you have the latest packages installed with `go mod download`
7+
1. Run the app `go run .`
8+
1. (optional) For live reload, install air with
9+
`go install github.com/cosmtrek/air@latest` then to run the app use `air`
10+
11+
## 🧹 Lint
12+
13+
Code must pass linting rules before it is merged into main.
14+
15+
1. Install `golangci-lint` if you don't have it: `go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest`
16+
1. Run `go lint`
17+
18+
## 🧪 Testing
19+
20+
### 📃 Unit testing
21+
22+
1. Run `go test`

frontend/.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
VITE_APP_API_URL=http://localhost:2021
2+
VITE_BACKEND_VERSION=0.0.0 # To be set during packaging step

0 commit comments

Comments
 (0)