Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
c67a39a
fix(?): Fixed a typo in "/join" ( Fixes #29)
OmgRod Apr 19, 2025
0f482be
ci(dash/src): :construction_worker: Update base image to node:22-alpi…
Nudelsuppe42 Apr 20, 2025
eee07a9
fix(dash/src): :construction_worker: Enable corepack for yarn 4
Nudelsuppe42 Apr 20, 2025
3ed419e
fix(frontend/gallery): :bug: Working blurDataURL / hashes of images o…
Nudelsuppe42 Apr 20, 2025
7517103
fix(dash/src): :bug: Set remotePatterns for remote images
Nudelsuppe42 Apr 20, 2025
cb91a26
feat(dash/me): :sparkles: Add pagination and search to application list
Nudelsuppe42 Apr 20, 2025
731907c
refactor(dash/src): :truck: Rename BuildTeam to Build Region
Nudelsuppe42 Apr 20, 2025
4dceabc
feat(dash/me): :sparkles: Add more info to participating build region…
Nudelsuppe42 Apr 20, 2025
8021f60
feat(dash/me): :sparkles: Edit own user settings, add keycloak admin …
Nudelsuppe42 Apr 20, 2025
7d615dd
ci(dash/src): :memo: Update env, example env and readme
Nudelsuppe42 Apr 20, 2025
fe6da77
feat(dash/me): :sparkles: Add loading state to application route
Nudelsuppe42 Apr 23, 2025
edae1d3
feat(dash/src): :pencil2: Move around staff nav links, add scrollable…
Nudelsuppe42 Apr 23, 2025
407966f
fix(dash/admin): :bug: Add key to fragment of mapped user permissions
Nudelsuppe42 Apr 23, 2025
791dfa6
refactor(dash/src): :truck: Move pages into page group for pages with…
Nudelsuppe42 May 4, 2025
b1a5e73
feat(dash/src): :sparkles: Add view transitions
Nudelsuppe42 May 4, 2025
a86ca8c
feat(dash/editor): :construction: First layout of claim editor on mybte
Nudelsuppe42 May 29, 2025
b0753aa
feat(claimEditor): :sparkles: Move constructClaimGeoJSONQuery to a se…
Nudelsuppe42 May 31, 2025
8080835
feat(dash/editor): :sparkles: Direct link to selected claim on editor…
Nudelsuppe42 Jun 10, 2025
ed01390
feat(dash/editor): :construction: WIP: Add advanced claim editor
Nudelsuppe42 Jun 11, 2025
4586ef3
fix(dash/editor): :bug: Assign new UUID to claims on create instead o…
Nudelsuppe42 Jun 11, 2025
867f7ed
feat(dash/editor): :sparkles: Advanced editor, only missing: image up…
Nudelsuppe42 Jun 11, 2025
5317769
fix(dash/editor): :ambulance: Include user verification in advanced e…
Nudelsuppe42 Jun 11, 2025
b41e14c
ci(dash/src): :heavy_plus_sign: Add mapboxgl types for build process
Nudelsuppe42 Jun 12, 2025
0c51574
ci(dash/src): :green_heart: Add openssl
Nudelsuppe42 Jun 12, 2025
99e4eae
feat(dash/src): :mag: Add meta tags to all routes
Nudelsuppe42 Jun 12, 2025
f46b52c
ci(dash/src): :green_heart: Use openssl instead of openssl-compat
Nudelsuppe42 Jun 12, 2025
6dac960
ci(dash/src): :green_heart: Try to fix prisma client erros because wr…
Nudelsuppe42 Jun 13, 2025
a38fdc5
ci(dash/src): :green_heart: Try different openssl version
Nudelsuppe42 Jun 13, 2025
f820aeb
ci(dash/src): :green_heart: Try node slim instead of alpine
Nudelsuppe42 Jun 13, 2025
cb7a795
ci(dash/src): :green_heart: Try symlink...
Nudelsuppe42 Jun 13, 2025
245008d
fix(dash/src): :green_heart: remove duplicated symlink
Nudelsuppe42 Jun 13, 2025
cd6d396
feat(db): :arrow_up: Update to prisma v6
Nudelsuppe42 Jun 13, 2025
376b6f8
ci(dash/src): :green_heart: Try to revert binary targets
Nudelsuppe42 Jun 13, 2025
c023aaa
ci(dash/src): :green_heart: Add DATABASE_URL to Build contect and log…
Nudelsuppe42 Jun 14, 2025
1e33f31
fix(dash/src): :mag: Add metadataBase for og images
Nudelsuppe42 Jun 14, 2025
5a75a2a
feat(dash/admin): :sparkles: Add link to application list for users
Nudelsuppe42 Jun 27, 2025
fbc4ea3
fix(dash/src): :bug: Use og image from cdn
Nudelsuppe42 Jun 27, 2025
cd75fd3
fix(dash/src): :bug: Add theme color to metadata [skip ci]
Nudelsuppe42 Jun 27, 2025
ef1b1f3
fix(dash/src): :bug: remove themecolor from metadata and change viewp…
Nudelsuppe42 Jun 27, 2025
bbb1704
chore(dash/src): :arrow_up: Update to mantine v8; fix avatar in header
Nudelsuppe42 Jun 27, 2025
caa9f60
feat(dash/responsive): :iphone: Responsive Header and Nav link drawer
Nudelsuppe42 Jun 27, 2025
605eaf0
perf(dash/responsive): :zap: Remove unstable view transitions
Nudelsuppe42 Jun 27, 2025
4a7c29f
feat(dash/responsive): :iphone: Make all pages mobile-ready
Nudelsuppe42 Jun 27, 2025
8b76ffe
fix(dash/src): :bug: Fix types...
Nudelsuppe42 Jun 27, 2025
473e8cf
chore(dash/src): :art: Prettier
Nudelsuppe42 Jun 27, 2025
7b7051d
chore(api/src): :art: Prettier & Force rebuild
Nudelsuppe42 Jun 30, 2025
4579725
ci(mono): :construction_worker: Use node 22 for api
Nudelsuppe42 Jun 30, 2025
7521a51
ci(mono): :hammer: Force build on gh
Nudelsuppe42 Jun 30, 2025
4c6d2b9
ci(mono): :green_heart: Fix api ci
Nudelsuppe42 Jun 30, 2025
0cbd319
fix(mono): :green_heart: Fix ci....
Nudelsuppe42 Jun 30, 2025
e5307f6
chore(api/Dockerfile): Enable corepack and prepare Yarn 4.9.1
Nudelsuppe42 Jun 30, 2025
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
9 changes: 6 additions & 3 deletions .github/workflows/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
outputs:
has_changes: ${{ steps.check_for_changes.outputs.has_changes }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 3
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '22.14.0'
node-version: 22
- name: Install turbo
run: npm install -g turbo@2.4.4 && npm install -g turbo-ignore
- name: Check for changes
Expand All @@ -29,6 +29,9 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 3
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install turbo
run: npm install -g turbo@2.4.4
- name: Login to Docker
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
echo NEXT_PUBLIC_API_URL="https://api.buildtheearth.net/api/v1" >> apps/dashboard/.env
echo NEXT_PUBLIC_SMYLER_API_URL="https://smybteapi.buildtheearth.net" >> apps/dashboard/.env
echo NEXT_PUBLIC_FRONTEND_URL="https://buildtheearth.net" >> apps/dashboard/.env
# echo DATABASE_URL="${{ secrets.DATABASE_URL }}" >> apps/dashboard/.env
- name: Build the Docker image
run: docker build . --file apps/dashboard/Dockerfile --tag ghcr.io/buildtheearth/dashboard-website:$(git rev-parse --short HEAD) --tag ghcr.io/buildtheearth/dashboard-website:latest
- name: Docker push tag
Expand Down
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
"frontend/seo",
"api/applications",
"api/claims",
"frontend/legal"
"frontend/legal",
"frontend/gallery",
"dash/editor",
"db",
"dash/responsive"
]
}
5 changes: 4 additions & 1 deletion apps/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:21-alpine AS base
FROM node:22-alpine AS base

FROM base AS builder
RUN apk update
Expand All @@ -18,6 +18,9 @@ WORKDIR /app

# Install dependencies
COPY --from=builder /app/out/json/ .
# Enable corepack to use the correct Yarn version
RUN corepack enable
RUN corepack prepare yarn@4.9.1 --activate
RUN yarn install

# Build the project
Expand Down
3 changes: 2 additions & 1 deletion apps/api/src/util/package.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const LIB_VERSION = "1.1.0";export const LIB_LICENSE = undefined;
export const LIB_VERSION = '1.1.0';
export const LIB_LICENSE = undefined;
44 changes: 31 additions & 13 deletions apps/dashboard/.env.example
Original file line number Diff line number Diff line change
@@ -1,26 +1,44 @@
#
# Keycloak
#
NEXT_PUBLIC_KEYCLOAK_URL="https://yourkeycloak.net/realms/yourrealm"
NEXT_PUBLIC_KEYCLOAK_ID="yourclient"
KEYCLOAK_SECRET="topsecret"
NEXT_PUBLIC_KEYCLOAK_URL="https://.../realms/..."
NEXT_PUBLIC_KEYCLOAK_ID="..."
KEYCLOAK_SECRET="..."
KEYCLOAK_ADMIN_CLIENT_ID="..."
KEYCLOAK_ADMIN_CLIENT_SECRET="..."

#
# NextAuth
# Auth
#
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="secondtopsecret"
NEXTAUTH_URL="http://localhost:3001"
NEXTAUTH_SECRET="..."
INTERNAL_API_KEY="..."

#
# BuildTheEarth
# APIs
#
NEXT_PUBLIC_API_URL="https://api.yourserver.net/api/v1"
NEXT_PUBLIC_SMYLER_API_URL="https://smybteapi.yourserver.net"
NEXT_PUBLIC_FRONTEND_URL="https://yourserver.net"
FRONTEND_KEY="thirdtopsecret"
NEXT_PUBLIC_API_URL="https://.../api/v1"
NEXT_PUBLIC_SMYLER_API_URL="https://..."

#
# Main Website
#
# Other Confirguration
NEXT_PUBLIC_FRONTEND_URL="https://..."
FRONTEND_KEY="..."

#
# Mapbox
#
NEXT_PUBLIC_MAPBOX_TOKEN="..."

#
# Database
#
DATABASE_URL="postgresql://user:password@server:5432/database?pool_timeout=0"

#
# DISCORD
#
REPORTS_WEBHOOK="https://discord.com/api/webhooks/..."
NEXT_PUBLIC_MAPBOX_TOKEN="fourthtopsecret"
DISCORD_BOT_URL="https://..."
DISCORD_BOT_SECRET="..."
17 changes: 9 additions & 8 deletions apps/dashboard/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM node:21-alpine AS base
FROM node:22-alpine AS base
RUN corepack enable

FROM base AS builder
RUN apk update
RUN apk add --no-cache libc6-compat
RUN apk update && apk add --no-cache libc6-compat openssl
WORKDIR /app

# Run turbo (will prune the lockfile to only include target dependencies)
Expand All @@ -12,20 +12,21 @@ RUN turbo prune dashboard --docker

# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer
RUN apk update
RUN apk add --no-cache libc6-compat
RUN apk update && apk add --no-cache libc6-compat openssl
# This is only for prisma v5 because it only looks in /lib for openssl libaries
RUN ln -s /usr/lib/libssl.so.3 /lib/libssl.so.3
WORKDIR /app

# First install the dependencies (as they change less often)
COPY --from=builder /app/out/json/ .
# RUN ln -s /usr/lib/libssl.so.3 /lib/libssl.so.3
RUN yarn install

# Build the project
COPY --from=builder /app/out/full/ .
COPY --from=builder /app/apps/dashboard/.env ./apps/dashboard/.env

ENV NEXT_TELEMETRY_DISABLED 1

RUN yarn turbo run build --filter=dashboard...

FROM base AS runner
Expand All @@ -35,8 +36,8 @@ ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1

# Create a runner user
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs
USER nextjs

# Reduce image size
Expand Down
32 changes: 19 additions & 13 deletions apps/dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,22 @@ See the global Readme file.

# Envoriment Variables

| Variable | Example Value | Description |
| -------------------------- | ----------------------------------------- | ----------------------------------------------------------------- |
| NEXT_PUBLIC_KEYCLOAK_URL | https://yourkeycloak.net/realms/yourrealm | The Keycloak SSO URL, including the realm |
| NEXT_PUBLIC_KEYCLOAK_ID | yourclient | A client ID for your Keycloak Installation |
| KEYCLOAK_SECRET | topsecret | The client secret of your client |
| NEXTAUTH_URL | http://localhost:3000 | The URL NextAuth should use for redirections back to your website |
| NEXTAUTH_SECRET | secondtopsecret | A secret used by NextAuth to encrypt session information |
| NEXT_PUBLIC_API_URL | https://api.yourserver.net/api/v1 | The URL of your deployed or local BuildTheEarth API |
| NEXT_PUBLIC_SMYLER_API_URL | https://smybteapi.yourserver.net | The URL of your deployed or local SmyBTE API |
| NEXT_PUBLIC_MAPBOX_TOKEN | fourthtopsecret | Your personal mapbox studio token |
| NEXT_PUBLIC_FRONTEND_URL | https://yourserver.net | The URL to your local or deployed BuildTheEarth Website |
| FRONTEND_KEY | thirdtopsecret | The Key used to Authenticate against the BuildTheEarth Website |
| REPORTS_WEBHOOK | https://discord.com/api/webhooks/... | A discord webhook to send reports to |
| Variable | Example Value | Description |
| ---------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------ |
| NEXT_PUBLIC_KEYCLOAK_URL | https://yourkeycloak.net/realms/yourrealm | The Keycloak SSO URL, including the realm |
| NEXT_PUBLIC_KEYCLOAK_ID | yourclient | A client ID for your Keycloak Installation |
| KEYCLOAK_SECRET | topsecret | The client secret of your client |
| KEYCLOAK_ADMIN_CLIENT_ID | yourclient | A client ID for your Keycloak Installation (Admin users client) |
| KEYCLOAK_ADMIN_CLIENT_SECRET | topsecret | The client secret of your admin client |
| NEXTAUTH_URL | http://localhost:3000 | The URL NextAuth should use for redirections back to your website |
| NEXTAUTH_SECRET | secondtopsecret | A secret used by NextAuth to encrypt session information |
| INTERNAL_API_KEY | internalsecret | A secret used by the website to send custom api requests to itself |
| NEXT_PUBLIC_API_URL | https://api.yourserver.net/api/v1 | The URL of your deployed or local BuildTheEarth API |
| NEXT_PUBLIC_SMYLER_API_URL | https://smybteapi.yourserver.net | The URL of your deployed or local SmyBTE API |
| NEXT_PUBLIC_FRONTEND_URL | https://yourserver.net | The URL to your local or deployed BuildTheEarth Website |
| FRONTEND_KEY | thirdtopsecret | The Key used to Authenticate against the BuildTheEarth Website |
| NEXT_PUBLIC_MAPBOX_TOKEN | fourthtopsecret | Your personal mapbox studio token |
| DATABASE_URL | postgresql://user:password@server:5432/database?pool_timeout=0 | Your Database connection string |
| REPORTS_WEBHOOK | https://discord.com/api/webhooks/... | A discord webhook to send reports to |
| DISCORD_BOT_URL | https://bot.yourserver.net/... | The URL to your local or delpolyed BuildTheEarth Main Bot |
| DISCORD_BOT_SECRET | fifthtopsecret | The secret key to your Main Bot instance |
15 changes: 14 additions & 1 deletion apps/dashboard/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,20 @@ const nextConfig: NextConfig = {
poweredByHeader: false,
outputFileTracingRoot: path.join(__dirname, '../../'),
images: {
domains: ['cdn.buildtheearth.net'],
remotePatterns: [
{
protocol: 'https',
hostname: 'cdn.buildtheearth.net',
port: '',
pathname: '/uploads/**',
},
{
protocol: 'https',
hostname: 'cdn.buildtheearth.net',
port: '',
pathname: '/static/**',
},
],
},
};

Expand Down
38 changes: 22 additions & 16 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@
},
"dependencies": {
"@bte-germany/terraconvert": "^1.1.2",
"@mantine/charts": "^7.17.4",
"@mantine/code-highlight": "^7.17.4",
"@mantine/core": "^7.17.4",
"@mantine/dates": "^7.17.4",
"@mantine/form": "^7.17.4",
"@mantine/hooks": "^7.17.4",
"@mantine/modals": "^7.17.4",
"@mantine/notifications": "^7.17.4",
"@mantine/nprogress": "^7.17.4",
"@mantine/spotlight": "^7.17.4",
"@mantine/tiptap": "^7.17.4",
"@mapbox/mapbox-gl-draw": "^1.4.3",
"@keycloak/keycloak-admin-client": "^26.2.0",
"@mantine/charts": "^8.1.2",
"@mantine/code-highlight": "^8.1.2",
"@mantine/core": "^8.1.2",
"@mantine/dates": "^8.1.2",
"@mantine/form": "^8.1.2",
"@mantine/hooks": "^8.1.2",
"@mantine/modals": "^8.1.2",
"@mantine/notifications": "^8.1.2",
"@mantine/nprogress": "^8.1.2",
"@mantine/spotlight": "^8.1.2",
"@mantine/tiptap": "^8.1.2",
"@mapbox/mapbox-gl-draw": "^1.5.0",
"@repo/db": "*",
"@tabler/icons-react": "^3.9.0",
"@tiptap/core": "^2.11.7",
Expand All @@ -39,27 +40,32 @@
"@tiptap/pm": "^2.11.7",
"@tiptap/react": "^2.11.7",
"@tiptap/starter-kit": "^2.11.7",
"@types/mapbox__mapbox-gl-draw": "1.4.4",
"@turf/helpers": "^7.2.0",
"@turf/turf": "^7.2.0",
"axios": "^1.9.0",
"clsx": "^2.1.1",
"dayjs": "^1.11.11",
"mantine-contextmenu": "^7.11.0",
"mantine-datatable": "^7.12.4",
"mapbox-gl": "2.13.0",
"mapbox-gl-draw-snap-mode": "^0.2.0",
"mapbox-gl-draw-snap-mode": "^0.4.0",
"mapbox-gl-style-switcher": "^1.0.11",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
"next": "15.3.0",
"next": "^15.3.4",
"next-auth": "^4.24.7",
"next-transpile-modules": "^10.0.1",
"react": "19.1.0",
"react-dom": "19.1.0",
"recharts": "^2.13.3",
"swr": "^2.2.5"
"swr": "^2.2.5",
"zustand": "^5.0.4"
},
"devDependencies": {
"@repo/prettier-config": "*",
"@repo/typescript-config": "*",
"@types/mapbox-gl": "^3.4.1",
"@types/mapbox__mapbox-gl-draw": "^1.4.8",
"@types/node": "^20",
"@types/react": "19.1.1",
"@types/react-dom": "19.1.2",
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/actions/buildTeams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const adminTransferTeam = async (
select: { id: true },
});
const transaction = await prisma.$transaction(
members.map((m) =>
members.map((m: { id: any }) =>
prisma.user.update({ where: { id: m.id }, data: { joinedBuildTeams: { connect: { id: destinationId } } } }),
),
);
Expand Down
Loading