Skip to content

Commit 488b715

Browse files
committed
feat(launchpad): launchpad webapp
1 parent bfe293b commit 488b715

29 files changed

Lines changed: 4276 additions & 125 deletions

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
**/.env*
22
**/*.js
33
!**/jest.config.js
4-
**/*.d.ts
54
**/*.dbml
65
**/node_modules
76
fly.toml

apps/launchpad/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

apps/launchpad/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps = true

apps/launchpad/Dockerfile

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Prune stage
2+
FROM node:22.14.0-alpine AS pruner
3+
4+
WORKDIR /app
5+
6+
# Install pnpm and turbo
7+
RUN corepack enable && corepack prepare pnpm@latest --activate
8+
9+
# Copy files needed for pruning
10+
COPY . .
11+
12+
# Prune the workspace for the launchpad app
13+
RUN pnpm dlx turbo prune @cartesi/launchpad --docker
14+
15+
# Build stage
16+
FROM node:22.14.0-alpine AS builder
17+
18+
WORKDIR /app
19+
20+
# Install pnpm
21+
RUN corepack enable && corepack prepare pnpm@latest --activate
22+
23+
# Copy the pruned workspace
24+
COPY --from=pruner /app/out/json/ .
25+
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
26+
COPY --from=pruner /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
27+
28+
# Install dependencies
29+
RUN pnpm install --frozen-lockfile
30+
31+
# Copy source code from pruned workspace
32+
COPY --from=pruner /app/out/full/ .
33+
34+
# Build the application
35+
RUN pnpm build --filter=@cartesi/launchpad
36+
37+
# Runtime stage
38+
FROM nginx:alpine
39+
40+
# Copy the built assets from build stage to nginx
41+
COPY --from=builder /app/apps/launchpad/dist /usr/share/nginx/html
42+
43+
# Copy custom nginx config if needed
44+
# COPY nginx.conf /etc/nginx/conf.d/default.conf
45+
46+
# Expose port 80
47+
EXPOSE 80
48+
49+
# Start nginx
50+
CMD ["nginx", "-g", "daemon off;"]

apps/launchpad/docker-bake.hcl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
target "docker-metadata-action" {}
2+
target "docker-platforms" {}
3+
4+
target "default" {
5+
inherits = ["docker-metadata-action", "docker-platforms"]
6+
context = "../.."
7+
dockerfile = "apps/launchpad/Dockerfile"
8+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
target "default" {
2+
tags = ["cartesi/rollups-launchpad:devel"]
3+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
target "docker-platforms" {
2+
platforms = [
3+
"linux/amd64",
4+
"linux/arm64"
5+
]
6+
}

apps/launchpad/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>🚀 Cartesi Rollups Launchpad</title>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script type="module" src="/src/main.tsx"></script>
11+
</body>
12+
</html>

apps/launchpad/package.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "@cartesi/launchpad",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc && vite build",
9+
"build:docker": "docker buildx bake --load",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"@apollo/client": "^3.13.5",
14+
"@mantine/core": "^7.17.2",
15+
"@mantine/hooks": "^7.17.2",
16+
"@tabler/icons-react": "^3.31.0",
17+
"@tanstack/react-query": "5.69.0",
18+
"graphql": "^16.10.0",
19+
"json-rpc-2.0": "^1.7.0",
20+
"react": "^19.0.0",
21+
"react-dom": "^19.0.0",
22+
"viem": "latest",
23+
"wagmi": "latest"
24+
},
25+
"devDependencies": {
26+
"@types/react": "^19.0.12",
27+
"@types/react-dom": "^19.0.4",
28+
"@vitejs/plugin-react": "^4.2.1",
29+
"@wagmi/cli": "latest",
30+
"buffer": "^6.0.3",
31+
"postcss": "^8.5.3",
32+
"postcss-preset-mantine": "^1.17.0",
33+
"postcss-simple-vars": "^7.0.1",
34+
"typescript": "^5.4.5",
35+
"vite": "^6.2.3"
36+
}
37+
}

apps/launchpad/postcss.config.cjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
plugins: {
3+
"postcss-preset-mantine": {},
4+
"postcss-simple-vars": {
5+
variables: {
6+
"mantine-breakpoint-xs": "36em",
7+
"mantine-breakpoint-sm": "48em",
8+
"mantine-breakpoint-md": "62em",
9+
"mantine-breakpoint-lg": "75em",
10+
"mantine-breakpoint-xl": "88em",
11+
},
12+
},
13+
},
14+
};

0 commit comments

Comments
 (0)