Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7a75b86
Update README.md
hasanmo Sep 9, 2026
a335ec4
Create roadmap.md
hasanmo Sep 10, 2026
e010fbd
init
Sep 11, 2026
29f779c
readme.md update
Sep 11, 2026
bb9ad62
feature(weather): add App layout and activity selector
oliveror Sep 11, 2026
dc159e9
feature(weather): add WeatherList and WeatherCard
oliveror Sep 12, 2026
a9f4fdd
feature(weather): add loading, error and empty states
Sep 14, 2026
2c022f6
feature(ui): share query feedback components
Sep 14, 2026
76c16b1
feature(weather): add ranked cards and city details
oliveror Sep 14, 2026
e4f4064
docs(weather): add minor tweaks to architecture and weather cards docs
oliveror Sep 14, 2026
565282f
docs: choose Open-Meteo weather API
Sep 14, 2026
445c718
Merge pull request #21 from IT2810-H26/13-issue-12-lage-loading--erro…
oliverdr Sep 15, 2026
0ac6ed9
Merge pull request #23 from IT2810-H26/issue-4-choose-weather-api
oliverdr Sep 15, 2026
1a6cd2f
fix(e2e): scope weather detail assertion
Sep 15, 2026
2344f5d
feat: implement Open-Meteo weather service (#25)
hasanmo Sep 15, 2026
e77f226
fix(weather): add direct retry action to error cards
oliveror Sep 15, 2026
72f393f
fix(ui): apply app-header styling class
oliveror Sep 15, 2026
129dc26
fix(accessibility): trap focus in weather details dialog
oliveror Sep 15, 2026
82952e6
feat(weather): add empty state for weather list
oliveror Sep 15, 2026
ae0dedf
Merge branch 'dev' into feature/base-app-layout
oliveror Sep 15, 2026
c065cce
Merge pull request #22 from IT2810-H26/feature/base-app-layout
olestan Sep 15, 2026
8832bee
feat: add city weather and activity models (#24)
hasanmo Sep 15, 2026
48ba68f
feat(weather): integrate shared city and activity models
Sep 16, 2026
11985f9
Merge pull request #27 from IT2810-H26/feature/integrate-weather-models
olestan Sep 17, 2026
e57f698
Issue 14: lage responsivt design med plain css (#26)
olestan Sep 17, 2026
3c4699d
feature(ci): sett opp runners og deploy til VM (#28)
oliverdr Sep 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.git
**/node_modules
**/dist
.env
.env.*
coverage
playwright-report
test-results
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Used only by the optional Project 2 API and database commands.
# Create this dedicated native PostgreSQL database and role using README.md.
DATABASE_URL=postgresql://t31_dev:change-me@127.0.0.1:5432/t31_project2_dev
API_HOST=127.0.0.1
API_PORT=3001
CORS_ORIGINS=http://localhost:5173,http://127.0.0.1:5173
NODE_ENV=development
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# DOM snapshots intentionally preserve rendered text-node spaces.
*.snap whitespace=-blank-at-eol
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Development task
about: Plan a small, reviewable course task
title: ''
labels: ''
assignees: ''
---

## Outcome

What should the user be able to do?

## Course requirement

Link the requirement and explain the chosen approach.

## Acceptance checks

- [ ] Functionality and error states verified
- [ ] Relevant tests and documentation updated
- [ ] Teammate review completed
4 changes: 4 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
self-hosted-runner:
labels:
- t31-ci
- t31-deploy
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Change

Explain the user-visible problem and resulting behavior. Link the issue: Closes #...

## Verification

List commands actually run and relevant manual/browser checks.

## Course requirements and AI use

Describe affected requirements, architectural decisions, AI assistance, and how the team verified it.

## Review

Request a teammate review. Record follow-up work; do not self-approve.
120 changes: 120 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: CI

on:
push:
branches: [dev, main]
pull_request:
branches: [dev, main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# la main bli ferdig, også hvis vi må rulle tilbake
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

defaults:
run:
shell: bash

jobs:
quality:
name: Quality checks
runs-on: [self-hosted, linux, x64, t31-ci]
timeout-minutes: 30
env:
CI: 'true'
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version

- name: Use the pinned npm version
run: npm install --global npm@11.11.1

- name: Install dependencies
run: npm ci

- name: Check code, contracts, migration metadata, tests and builds
run: npm run check

- name: Test release switching and rollback
run: bash scripts/test-deploy-project1.sh

- name: Install test browsers
run: npm run test:e2e:install

- name: Run browser checks
run: npm run test:e2e -- --workers=2

- name: Preserve browser failure evidence
if: failure()
# denne node20-versjonen finnes på git.ntnu.no og støtter enterprise
uses: actions/upload-artifact@v3.2.1-node20
with:
name: browser-results-${{ github.run_id }}-${{ github.run_attempt }}
path: test-results/
retention-days: 7

- name: Save the tested production build
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
uses: actions/upload-artifact@v3.2.1-node20
with:
name: project1-${{ github.sha }}-${{ github.run_attempt }}
path: web/dist/
if-no-files-found: error
retention-days: 7

deploy:
name: Deploy Project 1
needs: quality
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
runs-on: [self-hosted, linux, x64, t31-deploy]
timeout-minutes: 10
environment:
name: production
url: http://it2810-31.idi.ntnu.no/project1/
concurrency:
group: project1-production
cancel-in-progress: false
steps:
- name: Check that this commit is still the tip of main
id: latest
uses: actions/github-script@v7
with:
script: |
const { data } = await github.rest.repos.getCommit({
...context.repo,
ref: 'main',
});
core.setOutput('current', data.sha === context.sha);
if (data.sha !== context.sha) {
core.notice('A newer commit is on main; skip this outdated deployment.');
}
- name: Check out the deployment script from the tested commit
if: steps.latest.outputs.current == 'true'
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Download the tested production build
if: steps.latest.outputs.current == 'true'
uses: actions/download-artifact@v3-node20
with:
name: project1-${{ github.sha }}-${{ github.run_attempt }}
path: web/dist/

- name: Publish to Apache and verify the release
if: steps.latest.outputs.current == 'true'
env:
RELEASE_ID: ${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
run: bash scripts/deploy-project1.sh web/dist "$RELEASE_ID"
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
node_modules/
dist/
coverage/
playwright-report/
test-results/
.env
.env.*
!.env.example
*.local
*.tsbuildinfo
bun.lock
bun.lockb
.DS_Store
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.21.0
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
engine-strict=true
save-exact=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.21.0
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
coverage
playwright-report
test-results
package-lock.json
project2/api/migrations/meta
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "singleQuote": true, "trailingComma": "all" }
9 changes: 9 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# T31 development guide

Read README.md and docs/requirements.md before changing architecture. Project 1 is a static React/Vite app with plain CSS, self-authored components, TanStack Query, live REST data, and Web Storage for preferences/favorite IDs only. Do not connect it to the Project 2 database or cache API resources.

Project 2 foundation lives separately in project2/. Its Node/TypeScript GraphQL API and native PostgreSQL database must run directly on the group VM. No Docker backend/database deployment or hosted Supabase. Move this foundation to the assigned Project 2 repository when that work starts.

Use Node 24 and npm 11; package-lock.json is the installation source of truth. Bun may run scripts. Keep strict TypeScript, validate external data with Zod, infer database types from Drizzle, and regenerate GraphQL types with npm run types:api. Never hand-edit generated.ts or generated migration snapshots.

Use issues, feature branches and teammate-reviewed PRs. Preserve existing changes. Never commit .env or personal contribution logs. Document AI assistance and actual checks. Run npm run check for code changes and relevant Playwright checks for UI changes. Never claim grade A, device testing, deployment, review, or remote publication without evidence.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog

## 2026-09-11

- Initial Turvær Norge architecture skeleton with one live weather example.
- Separate native PostgreSQL/Node GraphQL foundation for Project 2.
- Typed contracts, developer scripts, tests, requirement traceability and setup docs.

Record post-delivery improvements and responses to feedback here.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:24.21.0-bookworm-slim
WORKDIR /app
RUN npm install --global npm@11.11.1
COPY package.json package-lock.json ./
COPY web/package.json web/package.json
COPY project2/api/package.json project2/api/package.json
RUN npm ci
COPY . .
EXPOSE 5173
CMD ["npm", "run", "dev", "--workspace", "@t31/web", "--", "--host", "0.0.0.0"]
Loading
Loading