Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Commit ec73a36

Browse files
committed
chore: adds tips ui
We move the tips ui from the base/tips repo to base/infra.
1 parent f7a27a8 commit ec73a36

22 files changed

Lines changed: 4307 additions & 0 deletions

File tree

‎.github/workflows/ui.yml‎

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: UI
2+
permissions:
3+
contents: read
4+
5+
on:
6+
push:
7+
branches: [ master ]
8+
paths: ['ui/**']
9+
pull_request:
10+
paths: ['ui/**']
11+
12+
jobs:
13+
changes:
14+
name: Detect Changes
15+
runs-on: ubuntu-latest
16+
outputs:
17+
projects: ${{ steps.filter.outputs.projects }}
18+
steps:
19+
- name: Harden the runner (Audit all outbound calls)
20+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
21+
with:
22+
egress-policy: audit
23+
24+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
25+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
26+
id: paths
27+
with:
28+
filters: |
29+
tips:
30+
- 'ui/tips/**'
31+
- id: filter
32+
run: |
33+
projects='[]'
34+
if [ "${{ steps.paths.outputs.tips }}" == "true" ]; then
35+
projects=$(echo "$projects" | jq -c '. + ["tips"]')
36+
fi
37+
echo "projects=$projects" >> $GITHUB_OUTPUT
38+
39+
lint:
40+
name: Lint (${{ matrix.project }})
41+
needs: changes
42+
if: ${{ needs.changes.outputs.projects != '[]' }}
43+
runs-on: ubuntu-latest
44+
strategy:
45+
matrix:
46+
project: ${{ fromJson(needs.changes.outputs.projects) }}
47+
steps:
48+
- name: Harden the runner (Audit all outbound calls)
49+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
50+
with:
51+
egress-policy: audit
52+
53+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
54+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
55+
with:
56+
node-version: '20'
57+
cache: 'yarn'
58+
cache-dependency-path: ui/${{ matrix.project }}/yarn.lock
59+
- run: cp .env.example ui/${{ matrix.project }}/.env
60+
- run: cd ui/${{ matrix.project }} && yarn install
61+
- run: cd ui/${{ matrix.project }} && yarn lint
62+
63+
type-check:
64+
name: Type Check (${{ matrix.project }})
65+
needs: changes
66+
if: ${{ needs.changes.outputs.projects != '[]' }}
67+
runs-on: ubuntu-latest
68+
strategy:
69+
matrix:
70+
project: ${{ fromJson(needs.changes.outputs.projects) }}
71+
steps:
72+
- name: Harden the runner (Audit all outbound calls)
73+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
74+
with:
75+
egress-policy: audit
76+
77+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
78+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
79+
with:
80+
node-version: '20'
81+
cache: 'yarn'
82+
cache-dependency-path: ui/${{ matrix.project }}/yarn.lock
83+
- run: cp .env.example ui/${{ matrix.project }}/.env
84+
- run: cd ui/${{ matrix.project }} && yarn install
85+
- run: cd ui/${{ matrix.project }} && npx tsc --noEmit
86+
87+
build:
88+
name: Build (${{ matrix.project }})
89+
needs: changes
90+
if: ${{ needs.changes.outputs.projects != '[]' }}
91+
runs-on: ubuntu-latest
92+
strategy:
93+
matrix:
94+
project: ${{ fromJson(needs.changes.outputs.projects) }}
95+
steps:
96+
- name: Harden the runner (Audit all outbound calls)
97+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
98+
with:
99+
egress-policy: audit
100+
101+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
102+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
103+
with:
104+
node-version: '20'
105+
cache: 'yarn'
106+
cache-dependency-path: ui/${{ matrix.project }}/yarn.lock
107+
- run: cp .env.example ui/${{ matrix.project }}/.env
108+
- run: cd ui/${{ matrix.project }} && yarn install
109+
- run: cd ui/${{ matrix.project }} && yarn build

‎ui/tips/.gitignore‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts

‎ui/tips/Dockerfile‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM node:20-alpine AS deps
2+
WORKDIR /app
3+
COPY ui/package.json ui/yarn.lock ./
4+
RUN --mount=type=cache,target=/root/.yarn \
5+
yarn install --frozen-lockfile
6+
7+
FROM node:20-alpine AS builder
8+
WORKDIR /app
9+
COPY --from=deps /app/node_modules ./node_modules
10+
COPY ./ui .
11+
12+
ENV NEXT_TELEMETRY_DISABLED=1
13+
14+
RUN --mount=type=cache,target=/app/.next/cache \
15+
yarn build
16+
17+
FROM node:20-alpine AS runner
18+
WORKDIR /app
19+
20+
ENV NODE_ENV=production
21+
ENV NEXT_TELEMETRY_DISABLED=1
22+
23+
RUN addgroup --system --gid 1001 nodejs
24+
RUN adduser --system --uid 1001 nextjs
25+
26+
RUN mkdir .next
27+
RUN chown nextjs:nodejs .next
28+
29+
COPY --from=builder /app/public ./public
30+
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
31+
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
32+
33+
USER nextjs
34+
35+
EXPOSE 3000
36+
37+
ENV PORT=3000
38+
ENV HOSTNAME="0.0.0.0"
39+
40+
CMD ["node", "server.js"]

‎ui/tips/biome.json‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": true,
10+
"includes": ["**", "!node_modules", "!.next", "!dist", "!build"]
11+
},
12+
"css": {
13+
"parser": {
14+
"cssModules": true,
15+
"tailwindDirectives": true
16+
}
17+
},
18+
"formatter": {
19+
"enabled": true,
20+
"indentStyle": "space",
21+
"indentWidth": 2
22+
},
23+
"linter": {
24+
"enabled": true,
25+
"rules": {
26+
"recommended": true,
27+
"suspicious": {
28+
"noUnknownAtRules": "off"
29+
}
30+
},
31+
"domains": {
32+
"next": "recommended",
33+
"react": "recommended"
34+
}
35+
},
36+
"assist": {
37+
"actions": {
38+
"source": {
39+
"organizeImports": "on"
40+
}
41+
}
42+
}
43+
}

‎ui/tips/next.config.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { NextConfig } from "next";
2+
3+
const nextConfig: NextConfig = {
4+
output: "standalone",
5+
};
6+
7+
export default nextConfig;

‎ui/tips/package.json‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "ui",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev --turbopack",
7+
"build": "next build --turbopack",
8+
"start": "next start",
9+
"lint": "biome check",
10+
"format": "biome format --write"
11+
},
12+
"dependencies": {
13+
"@aws-sdk/client-s3": "3.940.0",
14+
"next": "16.0.7",
15+
"react": "19.2.1",
16+
"react-dom": "19.2.1",
17+
"viem": "2.40.3"
18+
},
19+
"devDependencies": {
20+
"@biomejs/biome": "2.3.8",
21+
"@tailwindcss/postcss": "4.1.17",
22+
"@types/node": "20.19.25",
23+
"@types/react": "19.2.7",
24+
"@types/react-dom": "19.2.3",
25+
"tailwindcss": "4.1.17",
26+
"typescript": "5.9.3"
27+
}
28+
}

‎ui/tips/postcss.config.mjs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const config = {
2+
plugins: ["@tailwindcss/postcss"],
3+
};
4+
5+
export default config;

‎ui/tips/public/logo.svg‎

Lines changed: 12 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)