Skip to content

Commit 725b013

Browse files
Initial setup av prosjekt
1 parent b586a1d commit 725b013

File tree

18 files changed

+373
-590
lines changed

18 files changed

+373
-590
lines changed

.github/dependabot.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
version: 2
2+
3+
registries:
4+
npm-github:
5+
type: npm-registry
6+
url: https://npm.pkg.github.com
7+
token: ${{ secrets.READER_TOKEN }}
8+
updates:
9+
- package-ecosystem: npm
10+
directory: "/"
11+
schedule:
12+
interval: weekly
13+
day: "sunday"
14+
time: "04:00"
15+
open-pull-requests-limit: 30
16+
registries: "*"
17+
versioning-strategy: increase
18+
groups:
19+
minor-and-patch-dependencies:
20+
patterns:
21+
- "*"
22+
update-types:
23+
- "minor"
24+
- "patch"
25+
major-dependencies:
26+
patterns:
27+
- "*"
28+
update-types:
29+
- "major"
30+
31+
- package-ecosystem: github-actions
32+
directory: "/"
33+
schedule:
34+
interval: weekly
35+
day: "sunday"
36+
time: "04:00"
37+
groups:
38+
github-actions-minor-patches:
39+
patterns:
40+
- "*"
41+
update-types:
42+
- "minor"
43+
- "patch"
44+
github-actions-major:
45+
patterns:
46+
- "*"
47+
update-types:
48+
- "major"

.github/workflows/deploy-dev.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build and deploy
2+
on: [workflow_dispatch]
3+
jobs:
4+
build_and_deploy:
5+
name: Build, push and deploy
6+
runs-on: ubuntu-latest
7+
permissions:
8+
contents: read
9+
id-token: write
10+
actions: read
11+
steps:
12+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # ratchet:actions/checkout@v4
13+
with:
14+
fetch-depth: 0 # Fetch all history for what-changed action
15+
- name: Determine what to do
16+
id: changed-files
17+
uses: "nais/what-changed@bc3dad0463b36ad29044134bba5898f0af73c34c" # ratchet:nais/what-changed@main
18+
with:
19+
files: .nais/dev.yaml
20+
- name: Build and push image and SBOM to OCI registry
21+
if: steps.changed-files.outputs.changed != 'only-inputs'
22+
uses: nais/docker-build-push@791ebb6f74b82849c742a9bc9c97abe44c6c111f # ratchet:nais/docker-build-push@v0
23+
id: docker-build-push
24+
with:
25+
team: etterlatte
26+
- name: Deploy to Nais
27+
uses: nais/deploy/actions/deploy@961addd1e4d4211f1a7333ada5fde85f7c9aa5b7 # ratchet:nais/deploy/actions/deploy@v2
28+
env:
29+
CLUSTER: dev.gcp
30+
RESOURCE: .nais/dev.yaml
31+
WORKLOAD_IMAGE: ${{ steps.docker-build-push.outputs.image }}
32+
TELEMETRY: ${{ steps.docker-build-push.outputs.telemetry }}

.nais/dev.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: nais.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: gjenlevende-bs-sak-frontend
5+
namespace: etterlatte
6+
spec:
7+
ingresses:
8+
- https://gjenlevende-bs.intern.dev.nav.no
9+
- https://gjenlevende-bs.ansatt.dev.nav.no
10+
image: {{image}}
11+
port: 8080
12+
replicas:
13+
max: 1
14+
min: 1
15+
liveness:
16+
path: /isAlive
17+
initialDelay: 5
18+
readiness:
19+
path: /isReady
20+
initialDelay: 5
21+
resources:
22+
limits:
23+
cpu: 500m
24+
memory: 512Mi
25+
requests:
26+
cpu: 200m
27+
memory: 256Mi
28+
azure:
29+
application:
30+
enabled: true
31+
allowAllUsers: true
32+
sidecar:
33+
autoLogin: true

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"overrides": [
3+
{
4+
"files": ["*.yaml", "*.yml"],
5+
"options": {
6+
"bracketSpacing": false
7+
}
8+
}
9+
]
10+
}

README.md

Lines changed: 4 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1-
# Welcome to React Router!
1+
# Gjenlevende BS Sak
22

3-
A modern, production-ready template for building full-stack React applications using React Router.
3+
Saksbehandlingsløsning for gjenlevende barnetilsyn og skolepenger
44

5-
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router-templates/tree/main/default)
5+
## Kom i gang
66

7-
## Features
8-
9-
- 🚀 Server-side rendering
10-
- ⚡️ Hot Module Replacement (HMR)
11-
- 📦 Asset bundling and optimization
12-
- 🔄 Data loading and mutations
13-
- 🔒 TypeScript by default
14-
- 🎉 TailwindCSS for styling
15-
- 📖 [React Router docs](https://reactrouter.com/)
16-
17-
## Getting Started
18-
19-
### Installation
7+
### Installasjon
208

219
Install the dependencies:
2210

@@ -33,55 +21,3 @@ npm run dev
3321
```
3422

3523
Your application will be available at `http://localhost:5173`.
36-
37-
## Building for Production
38-
39-
Create a production build:
40-
41-
```bash
42-
npm run build
43-
```
44-
45-
## Deployment
46-
47-
### Docker Deployment
48-
49-
To build and run using Docker:
50-
51-
```bash
52-
docker build -t my-app .
53-
54-
# Run the container
55-
docker run -p 3000:3000 my-app
56-
```
57-
58-
The containerized application can be deployed to any platform that supports Docker, including:
59-
60-
- AWS ECS
61-
- Google Cloud Run
62-
- Azure Container Apps
63-
- Digital Ocean App Platform
64-
- Fly.io
65-
- Railway
66-
67-
### DIY Deployment
68-
69-
If you're familiar with deploying Node applications, the built-in app server is production-ready.
70-
71-
Make sure to deploy the output of `npm run build`
72-
73-
```
74-
├── package.json
75-
├── package-lock.json (or pnpm-lock.yaml, or bun.lockb)
76-
├── build/
77-
│ ├── client/ # Static assets
78-
│ └── server/ # Server-side code
79-
```
80-
81-
## Styling
82-
83-
This template comes with [Tailwind CSS](https://tailwindcss.com/) already configured for a simple default starting experience. You can use whatever CSS framework you prefer.
84-
85-
---
86-
87-
Built with ❤️ using React Router.

app/app.css

Lines changed: 0 additions & 15 deletions
This file was deleted.

app/root.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {
88
} from "react-router";
99

1010
import type { Route } from "./+types/root";
11-
import "./app.css";
11+
import Header from "komponenter/header/Header";
12+
import "@navikt/ds-css";
1213

1314
export const links: Route.LinksFunction = () => [
1415
{ rel: "preconnect", href: "https://fonts.googleapis.com" },
@@ -33,6 +34,7 @@ export function Layout({ children }: { children: React.ReactNode }) {
3334
<Links />
3435
</head>
3536
<body>
37+
<Header />
3638
{children}
3739
<ScrollRestoration />
3840
<Scripts />
@@ -62,11 +64,11 @@ export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
6264
}
6365

6466
return (
65-
<main className="pt-16 p-4 container mx-auto">
67+
<main>
6668
<h1>{message}</h1>
6769
<p>{details}</p>
6870
{stack && (
69-
<pre className="w-full p-4 overflow-x-auto">
71+
<pre>
7072
<code>{stack}</code>
7173
</pre>
7274
)}

app/routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { type RouteConfig, index } from "@react-router/dev/routes";
22

3-
export default [index("routes/home.tsx")] satisfies RouteConfig;
3+
export default [index("routes/landingsside.tsx")] satisfies RouteConfig;

app/routes/home.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

app/routes/landingsside.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { Heading } from "@navikt/ds-react";
2+
import type { Route } from "./+types/landingsside";
3+
4+
export function meta({}: Route.MetaArgs) {
5+
return [
6+
{ title: "Landingsside" },
7+
{
8+
name: "description",
9+
content:
10+
"Landingsside for saksbehandling av gjenlevende barnetilsyn og skolepenger",
11+
},
12+
];
13+
}
14+
15+
export default function Landingsside() {
16+
return (
17+
<Heading level="1" size="large">
18+
Gjenlevende barnetilsyn og skolepenger
19+
</Heading>
20+
);
21+
}

0 commit comments

Comments
 (0)