-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
143 changed files
with
317 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"stackspulse": minor | ||
--- | ||
|
||
Move stackspulse to a monorepo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,2 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn/install-state.gz | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
.env.keys | ||
!.env.production.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# Local Database | ||
sqlite.db | ||
sqlite.db-* | ||
|
||
# Chainhooks | ||
chainhooks.production.json | ||
|
||
# Sentry Config File | ||
.env.sentry-build-plugin | ||
node_modules | ||
.turbo |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn/install-state.gz | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
.env.keys | ||
!.env.production.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# Local Database | ||
sqlite.db | ||
sqlite.db-* | ||
|
||
# Chainhooks | ||
chainhooks.production.json | ||
|
||
# Sentry Config File | ||
.env.sentry-build-plugin |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
ARG NODE_VERSION=20 | ||
FROM node:${NODE_VERSION}-alpine as base | ||
|
||
WORKDIR /app | ||
|
||
# Set production environment | ||
ENV NODE_ENV="production" | ||
ENV APP_NAME="stackspulse" | ||
|
||
# Install pnpm | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
COPY --link ./package.json ./ | ||
RUN corepack enable && corepack install | ||
RUN pnpm install turbo@^2 --global | ||
|
||
# --- Turbo stage --- | ||
|
||
FROM base AS builder | ||
WORKDIR /app | ||
RUN apk update && \ | ||
apk add --no-cache libc6-compat | ||
COPY . . | ||
RUN turbo prune $APP_NAME --docker | ||
|
||
# --- Prod deps stage --- | ||
|
||
# Optimize the node_modules production folder | ||
FROM base AS prod-deps | ||
COPY --link . . | ||
# RUN node scripts/docker-runtime-deps.mjs | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod | ||
|
||
# --- Build stage --- | ||
|
||
FROM base as installer | ||
WORKDIR /app | ||
|
||
RUN apk update && \ | ||
apk add --no-cache libc6-compat build-base gyp pkgconfig python3 | ||
|
||
# First install the dependencies (as they change less often) | ||
COPY .gitignore .gitignore | ||
COPY --from=builder /app/out/json/ . | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --prod=false | ||
|
||
COPY --from=builder /app/out/full/ . | ||
|
||
WORKDIR /app/apps/web | ||
|
||
# Add fake environment file for build to succeed | ||
COPY ./apps/web/.env.production.build .env.production.local | ||
RUN pnpm db:push | ||
|
||
# Build application | ||
RUN pnpm turbo run build --filter=$APP_NAME... | ||
|
||
# --- Runner stage --- | ||
|
||
FROM base AS runner | ||
WORKDIR /app | ||
|
||
# Copy built application | ||
COPY --from=prod-deps /app/apps/web/node_modules ./node_modules | ||
COPY --from=installer /app/apps/web/package.json ./package.json | ||
COPY --from=installer /app/apps/web/scripts ./scripts | ||
COPY --from=installer /app/apps/web/drizzle.config.ts ./drizzle.config.ts | ||
COPY --from=installer /app/apps/web/drizzle ./drizzle | ||
COPY --from=prod-deps /app/apps/web/.env.production.local ./.env.production.local | ||
|
||
COPY --from=installer /app/apps/web/.next/standalone ./ | ||
COPY --from=installer /app/apps/web/.next/static ./.next/static | ||
COPY --from=installer /app/apps/web/public ./public | ||
|
||
# Setup sqlite on a separate volume | ||
RUN mkdir -p /data | ||
VOLUME /data | ||
ENV DATABASE_PATH="file:/data/sqlite.db" | ||
|
||
# Start the server by default, this can be overwritten at runtime | ||
EXPOSE 3000 | ||
CMD pnpm dotenvx run -- node server.js |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"name": "stackspulse", | ||
"version": "0.5.2", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint", | ||
"chainhooks:generate": "dotenvx run --env-file=.env.production.local --env-file=.env.production -- node ./scripts/generate-chainhooks.mjs", | ||
"db:generate": "drizzle-kit generate", | ||
"db:push": "drizzle-kit push", | ||
"db:migrate": "node ./scripts/drizzle-migrate.mjs", | ||
"stacks-node:db:pull": "dotenvx run --env-file=.env.production.local --env-file=.env.production -- prisma db pull", | ||
"deploy": "fly deploy --remote-only" | ||
}, | ||
"dependencies": { | ||
"@dotenvx/dotenvx": "1.6.1", | ||
"@libsql/client": "0.4.3", | ||
"@radix-ui/themes": "3.0.5", | ||
"@sentry/nextjs": "8.17.0", | ||
"@stacks/transactions": "6.16.1", | ||
"@t3-oss/env-core": "0.10.1", | ||
"@t3-oss/env-nextjs": "0.10.1", | ||
"@tabler/icons-react": "3.10.0", | ||
"@tanstack/react-query": "5.51.1", | ||
"class-variance-authority": "0.7.0", | ||
"clsx": "2.1.1", | ||
"date-fns": "3.6.0", | ||
"drizzle-orm": "0.32.0", | ||
"fathom-client": "3.7.2", | ||
"javascript-time-ago": "2.5.10", | ||
"next": "14.2.5", | ||
"postgres": "3.4.4", | ||
"react": "18.3.1", | ||
"react-dom": "18.3.1", | ||
"recharts": "2.13.0-alpha.4", | ||
"sharp": "0.33.4", | ||
"tailwind-merge": "2.4.0", | ||
"tailwindcss-animate": "1.0.7", | ||
"twitter-api-v2": "1.17.1", | ||
"unstorage": "1.10.2", | ||
"zod": "3.23.8" | ||
}, | ||
"devDependencies": { | ||
"@flydotio/dockerfile": "0.5.8", | ||
"@types/node": "20.14.10", | ||
"@types/react": "18.3.3", | ||
"@types/react-dom": "18.3.0", | ||
"autoprefixer": "10.4.19", | ||
"drizzle-kit": "0.23.0", | ||
"eslint": "8.57.0", | ||
"eslint-config-next": "14.2.5", | ||
"eslint-plugin-tailwindcss": "3.17.4", | ||
"postcss": "8.4.39", | ||
"prisma": "5.16.2", | ||
"radix-themes-tw": "0.2.3", | ||
"tailwindcss": "3.4.4", | ||
"typescript": "5.5.3" | ||
}, | ||
"dockerfile": { | ||
"alpine": true, | ||
"secrets": ["CHAINHOOKS_API_TOKEN"] | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.