Skip to content

Commit 4ee4401

Browse files
authored
Merge pull request #121 from Avelero/feature/provisioning
Feature/provisioning
2 parents 1008e27 + 18f6606 commit 4ee4401

File tree

216 files changed

+59061
-1052
lines changed

Some content is hidden

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

216 files changed

+59061
-1052
lines changed

.github/workflows/preview.yaml

Lines changed: 234 additions & 18 deletions
Large diffs are not rendered by default.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Production Admin Deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- apps/admin/**
8+
- packages/**
9+
10+
permissions:
11+
contents: read
12+
13+
env:
14+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
15+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_ADMIN }}
16+
TURBO_TOKEN: ${{ secrets.VERCEL_TOKEN }}
17+
TURBO_TEAM: ${{ secrets.VERCEL_ORG_ID }}
18+
19+
jobs:
20+
deploy:
21+
name: 🚀 Deploy to Production
22+
runs-on: blacksmith-4vcpu-ubuntu-2404
23+
concurrency: production-admin
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: oven-sh/setup-bun@v1
27+
with:
28+
bun-version: "1.2.21"
29+
- name: Install dependencies
30+
run: bun install
31+
- name: 🔦 Run linter
32+
run: bun run lint
33+
working-directory: ./apps/admin
34+
- name: 🪐 Check TypeScript
35+
run: bun run typecheck
36+
working-directory: ./apps/admin
37+
- name: 📤 Pull Vercel Environment Information
38+
run: bunx vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
39+
- name: 🏗 Build Project Artifacts
40+
run: bunx vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
41+
- name: 📤 Pull Environment Variables to .env
42+
run: bunx vercel env pull .env --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
43+
- name: 🚀 Deploy to Vercel
44+
run: |
45+
bunx vercel deploy --prebuilt --prod --archive=tgz --token=${{ secrets.VERCEL_TOKEN }} > domain.txt
46+
bunx vercel alias --scope=${{ secrets.VERCEL_ORG_ID }} --token=${{ secrets.VERCEL_TOKEN }} set `cat domain.txt` admin.avelero.com

apps/admin/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vercel

apps/admin/complete.env.example

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# API
2+
NEXT_PUBLIC_API_URL=http://localhost:4000
3+
4+
# Supabase
5+
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
6+
NEXT_PUBLIC_SUPABASE_ANON_KEY=
7+
8+
# Google OAuth (for Google sign-in button)
9+
NEXT_PUBLIC_GOOGLE_CLIENT_ID=
10+
11+
# Customer app URL (used for "Open in App" links)
12+
NEXT_PUBLIC_APP_URL=http://localhost:3000
13+
14+
# Runtime
15+
PORT=3003
16+
VERCEL_URL=

apps/admin/next.config.mjs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import "./src/env.mjs";
2+
3+
/** @type {import('next').NextConfig} */
4+
const supabaseUrl = new URL(process.env.NEXT_PUBLIC_SUPABASE_URL);
5+
6+
const isLocal =
7+
supabaseUrl.hostname === "127.0.0.1" || supabaseUrl.hostname === "localhost";
8+
9+
/** @type {import('next').NextConfig} */
10+
const nextConfig = {
11+
transpilePackages: ["@v1/supabase", "@v1/ui"],
12+
cacheComponents: true,
13+
images: {
14+
unoptimized: isLocal,
15+
remotePatterns: [
16+
{
17+
protocol: supabaseUrl.protocol.replace(":", ""),
18+
hostname: supabaseUrl.hostname,
19+
port: supabaseUrl.port,
20+
pathname: "/storage/**",
21+
},
22+
{
23+
protocol: "https",
24+
hostname: "res.cloudinary.com",
25+
},
26+
],
27+
},
28+
};
29+
30+
export default nextConfig;

apps/admin/package.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "@v1/admin",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev -p 3003",
7+
"build": "next build",
8+
"clean": "git clean -xdf .next .turbo node_modules",
9+
"lint": "biome lint",
10+
"format": "biome format --write .",
11+
"start": "next start",
12+
"typecheck": "tsc --noEmit"
13+
},
14+
"dependencies": {
15+
"@supabase/supabase-js": "^2.57.2",
16+
"@t3-oss/env-nextjs": "^0.13.8",
17+
"@tanstack/react-query": "^5.84.1",
18+
"@trpc/client": "^11.4.3",
19+
"@trpc/tanstack-react-query": "^11.4.3",
20+
"@v1/api": "workspace:*",
21+
"@v1/selections": "workspace:*",
22+
"@v1/supabase": "workspace:*",
23+
"@v1/ui": "workspace:*",
24+
"geist": "^1.5.1",
25+
"next": "16.0.10",
26+
"next-safe-action": "^8.0.8",
27+
"next-themes": "^0.4.6",
28+
"react": "19.2.1",
29+
"react-dom": "19.2.1",
30+
"superjson": "^2.2.1",
31+
"zod": "3.25.64"
32+
},
33+
"devDependencies": {
34+
"@types/node": "^24.0.1",
35+
"@types/react": "19.2.6",
36+
"@types/react-dom": "19.2.3",
37+
"tailwindcss": "^3.4.10",
38+
"typescript": "^5.9.2"
39+
},
40+
"overrides": {
41+
"@types/react": "19.2.6",
42+
"@types/react-dom": "19.2.3"
43+
}
44+
}

apps/admin/postcss.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/** @type {import('postcss-load-config').Config} */
2+
const config = {
3+
plugins: {
4+
tailwindcss: {},
5+
},
6+
};
7+
8+
export default config;

apps/admin/public/LogoIcon256.svg

Lines changed: 11 additions & 0 deletions
Loading

apps/admin/public/LogoText256.svg

Lines changed: 11 additions & 0 deletions
Loading

apps/admin/public/favicon.ico

401 KB
Binary file not shown.

0 commit comments

Comments
 (0)