Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
**/node_modules
**/dist
**/.next
**/next-env.d.ts
**/coverage
**/*.tsbuildinfo
**/test
Expand Down
14 changes: 0 additions & 14 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,13 @@ DISCORD_BOT_TOKEN=
DISCORD_GUILD_ID=
# (required by docker compose) web app origin used for "vote on the web" and docs links
WEB_APP_URL=https://app.example.com
# (optional) storage/CDN origins the web app may load media from and upload to, comma separated
WEB_STORAGE_ORIGINS=https://media.example.com,https://bucket.s3.example.com
# (optional) public Discord invite shown in the web app sidebar
DISCORD_INVITE_URL=

# ---- role assignment on login: comma separated Discord user ids ---------------------------
# at most two users; cannot be granted or revoked from the app
SUPER_ADMIN_DISCORD_IDS=
ADMIN_DISCORD_IDS=
SUPERVISOR_DISCORD_IDS=
MODERATOR_DISCORD_IDS=
SENIOR_DISCORD_IDS=

# ---- member verification -----------------------------------------------------------------
# (required in production) Resend API key and a sender on a domain verified in Resend
RESEND_API_KEY=
EMAIL_FROM=Stairway <verify@example.com>
# (required in production) Cloudflare Turnstile keys; hostname must match a CORS origin
TURNSTILE_SECRET_KEY=
TURNSTILE_SITE_KEY=

# ---- object storage (S3 / R2), optional ----------------------------------------------------
S3_ENDPOINT=
S3_REGION=auto
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [master]
branches: [main]
pull_request:
branches: [master]
branches: [main]
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -33,9 +33,6 @@ jobs:
- run: npm run lint
- run: npm run typecheck
- run: npm test
- run: npm run build:web
env:
NEXT_TELEMETRY_DISABLED: "1"

- name: Migrations are in sync with the schema
run: |
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ npm-debug.log*
.vscode/
.fleet/
.DS_Store
.next/
next-env.d.ts
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ coverage
apps/api/drizzle
package-lock.json
LICENSE
.next
next-env.d.ts
1 change: 0 additions & 1 deletion AGENTS.md

This file was deleted.

1 change: 0 additions & 1 deletion CLAUDE.md

This file was deleted.

23 changes: 0 additions & 23 deletions CONTRIBUTING.md

This file was deleted.

22 changes: 3 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ COPY packages/scoring/package.json packages/scoring/
COPY packages/contracts/package.json packages/contracts/
COPY apps/api/package.json apps/api/
COPY apps/discord/package.json apps/discord/
COPY apps/web/package.json apps/web/

FROM base AS build
RUN npm ci --ignore-scripts
RUN --mount=type=cache,target=/root/.npm npm ci --ignore-scripts
COPY tsconfig.base.json tsconfig.json ./
COPY packages/scoring/tsconfig.json packages/scoring/
COPY packages/scoring/src packages/scoring/src
Expand All @@ -28,16 +27,11 @@ COPY apps/discord/tsconfig.json apps/discord/
COPY apps/discord/src apps/discord/src
RUN npx tsc -b

FROM build AS web-build
ENV NEXT_TELEMETRY_DISABLED=1
COPY apps/web apps/web
RUN npm run build -w @platform/web

FROM base AS api-dependencies
RUN npm ci --omit=dev --ignore-scripts --workspace @platform/api
RUN --mount=type=cache,target=/root/.npm npm ci --omit=dev --ignore-scripts --workspace @platform/api

FROM base AS discord-dependencies
RUN npm ci --omit=dev --ignore-scripts --workspace @platform/discord
RUN --mount=type=cache,target=/root/.npm npm ci --omit=dev --ignore-scripts --workspace @platform/discord

FROM ${NODE_IMAGE} AS runtime
RUN apk upgrade --no-cache \
Expand Down Expand Up @@ -75,13 +69,3 @@ EXPOSE 3333
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --start-interval=2s --retries=3 \
CMD ["node", "-e", "fetch(`http://127.0.0.1:${process.env.PORT}/health/ready`).then((r) => process.exit(r.ok ? 0 : 1), () => process.exit(1))"]
CMD ["node", "apps/api/dist/Main.js"]

FROM runtime AS web
ENV HOSTNAME=0.0.0.0 PORT=3000 NEXT_TELEMETRY_DISABLED=1
COPY --from=web-build /app/apps/web/.next/standalone ./
COPY --from=web-build /app/apps/web/public apps/web/public
COPY --from=web-build /app/apps/web/.next/static apps/web/.next/static
USER node
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --start-interval=2s --retries=3 CMD ["node", "-e", "fetch(`http://127.0.0.1:${process.env.PORT}/docs`).then((r) => process.exit(r.ok ? 0 : 1), () => process.exit(1))"]
CMD ["node", "apps/web/server.js"]
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Platform Backend

Community voting rounds, raid telemetry, the shot grab-box production pipeline, the studio Discord bot and the web app.
Backend for community voting rounds, raid telemetry, the shot grab-box production pipeline and the studio Discord bot.

## Getting started

Expand All @@ -10,7 +10,6 @@ cp .env.example .env
npm run db:migrate
npm run dev # set LOG_FORMAT=pretty for readable logs
npm run dev:discord # the Discord bot
npm run dev:web # the web app
```

## Docker
Expand All @@ -19,12 +18,6 @@ npm run dev:web # the web app
docker compose -f docker-compose.yml -f docker-compose.local.yml up --build
```

## Contributing

We're happy to receive help and contributions! Please read the [contribution policy](/CONTRIBUTING.md).

Please note that while you are allowed to use AI agents in your workflow, it is strictly not allowed to push unreviewed code.

## License

AGPL-3.0-only. See [LICENSE](LICENSE).
33 changes: 0 additions & 33 deletions apps/api/drizzle/0001_pipeline_progress_and_specialties.sql

This file was deleted.

1 change: 0 additions & 1 deletion apps/api/drizzle/0002_super_admin_role.sql

This file was deleted.

2 changes: 0 additions & 2 deletions apps/api/drizzle/0003_user_onboarding.sql

This file was deleted.

7 changes: 0 additions & 7 deletions apps/api/drizzle/0004_member_terms_verification.sql

This file was deleted.

27 changes: 0 additions & 27 deletions apps/api/drizzle/0005_documents.sql

This file was deleted.

2 changes: 0 additions & 2 deletions apps/api/drizzle/0006_shot_image_keys.sql

This file was deleted.

2 changes: 0 additions & 2 deletions apps/api/drizzle/0007_ai_flags.sql

This file was deleted.

1 change: 0 additions & 1 deletion apps/api/drizzle/0008_round_voting_status.sql

This file was deleted.

1 change: 0 additions & 1 deletion apps/api/drizzle/0009_migrate_closed_rounds.sql

This file was deleted.

3 changes: 0 additions & 3 deletions apps/api/drizzle/0010_add_media_team_specialty.sql

This file was deleted.

Loading