Skip to content

Commit

Permalink
chore: maintenance updates (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayllyz authored May 2, 2024
1 parent ed89f9b commit 9f9100b
Show file tree
Hide file tree
Showing 17 changed files with 603 additions and 866 deletions.
32 changes: 9 additions & 23 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
open-pull-requests-limit: 10
versioning-strategy: 'increase'
- package-ecosystem: 'docker'
directory: '/apps/client'
schedule:
interval: 'monthly'
- package-ecosystem: 'docker'
directory: '/apps/admin'
schedule:
interval: 'monthly'
- package-ecosystem: 'docker'
directory: '/apps/api'
schedule:
interval: 'monthly'
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
groups:
github-actions:
patterns:
- "*"
open-pull-requests-limit: 5
27 changes: 9 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Athlonix Turborepo

[![API Test](https://github.com/Athlonix/athlonix/actions/workflows/api-test.yml/badge.svg?branch=main)](https://github.com/Athlonix/athlonix/actions/workflows/api-test.yml)
[![Continuous Integration](https://github.com/Athlonix/athlonix/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Athlonix/athlonix/actions/workflows/ci.yml)
[![CD api](https://github.com/Athlonix/athlonix/actions/workflows/cd-api.yml/badge.svg?branch=main)](https://github.com/Athlonix/athlonix/actions/workflows/cd-api.yml)
[![CD admin](https://github.com/Athlonix/athlonix/actions/workflows/cd-admin.yml/badge.svg?branch=main)](https://github.com/Athlonix/athlonix/actions/workflows/cd-admin.yml)
[![CD client](https://github.com/Athlonix/athlonix/actions/workflows/cd-client.yml/badge.svg?branch=main)](https://github.com/Athlonix/athlonix/actions/workflows/cd-client.yml)

## What's inside?

This Turborepo includes the following packages/apps:
Expand All @@ -12,6 +18,7 @@ This Turborepo includes the following packages/apps:
- `@repo/ui`: a stub React component library shared by both `admin` and `client` applications
- `@repo/biome-config`: Fast linting and formatting configurations for the monorepo
- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo
- `@repo/types`: shared TypeScript supabase types

Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).

Expand All @@ -21,6 +28,7 @@ This Turborepo has some additional tools already setup for you:

- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [Biome](https://biome.dev) for linting and formatting
- [Supabase](https://supabase.io) for the database

### Build

Expand All @@ -40,25 +48,8 @@ pnpm dev

### Format and Lint

To format all apps and packages, run the following command:

```sh
pnpm format
```

To lint all apps and packages, run the following command:
To lint & format all apps and packages, run the following command:

```sh
pnpm lint
```

## Useful Links

Learn more about the power of Turborepo:

- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
5 changes: 2 additions & 3 deletions apps/admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG PORT
ENV PORT ${PORT}
EXPOSE ${PORT}

# hadolint ignore=DL3018
# hadolint ignore=DL3018,DL3016
RUN apk add --no-cache gcompat && \
npm install -g turbo && \
npm cache clean -f && \
Expand Down Expand Up @@ -46,14 +46,13 @@ COPY --from=pruner --chown=node:node /app/out/full/ ./
COPY --from=deps --chown=node:node /app/ ./

USER node
CMD ["node" "--run", "dev"]
CMD ["node", "--run", "dev"]


FROM base AS prod
WORKDIR /app

ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1

COPY --from=builder --chown=node:node /app/apps/admin/next.config.js .
COPY --from=builder --chown=node:node /app/apps/admin/package.json .
Expand Down
8 changes: 4 additions & 4 deletions apps/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
"dependencies": {
"@hookform/resolvers": "^3.3.4",
"@repo/ui": "workspace:*",
"lucide-react": "^0.376.0",
"lucide-react": "^0.377.0",
"next": "^14.2.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.51.3",
"sharp": "^0.33.3",
"zod": "^3.23.4"
"zod": "^3.23.5"
},
"devDependencies": {
"@repo/biome-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/node": "^20.12.7",
"@types/react": "^18.3.0",
"@types/node": "^20.12.8",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
Expand Down
8 changes: 4 additions & 4 deletions apps/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM node:22-alpine AS base
WORKDIR /app

ARG ${PORT}
ARG PORT
ENV PORT ${PORT}
EXPOSE ${PORT}

# hadolint ignore=DL3018
RUN apk add --no-cache gcompat && \
# hadolint ignore=DL3018,DL3016
RUN apk add --no-cache gcompat && \
npm install -g turbo && \
npm cache clean -f && \
corepack enable pnpm
Expand Down Expand Up @@ -48,7 +48,7 @@ COPY --from=pruner --chown=node:node /app/out/full/ ./
COPY --from=deps --chown=node:node /app/ ./

USER node
CMD ["node" "--run", "dev"]
CMD ["node", "--run", "dev"]


FROM base AS prod
Expand Down
16 changes: 8 additions & 8 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
},
"dependencies": {
"@hono/node-server": "^1.11.1",
"@hono/swagger-ui": "^0.2.1",
"@hono/swagger-ui": "^0.2.2",
"@hono/zod-openapi": "^0.11.0",
"@hono/zod-validator": "^0.2.1",
"@repo/types": "workspace:*",
"@supabase/supabase-js": "^2.42.7",
"hono": "^4.2.8",
"zod": "^3.23.4",
"@supabase/supabase-js": "^2.43.0",
"hono": "^4.2.9",
"zod": "^3.23.5",
"zod-validation-error": "^3.2.0"
},
"devDependencies": {
"@repo/biome-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/node": "^20.12.7",
"@types/node": "^20.12.8",
"@types/swagger-ui-dist": "^3.30.4",
"supabase": "^1.163.6",
"tsx": "^4.7.3",
"supabase": "^1.165.0",
"tsx": "^4.8.2",
"typescript": "^5.4.5",
"vitest": "^1.5.2"
"vitest": "^1.5.3"
}
}
7 changes: 3 additions & 4 deletions apps/client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM node:22-alpine AS base
WORKDIR /app

ARG ${PORT}
ARG PORT
ENV PORT ${PORT}
EXPOSE ${PORT}

# hadolint ignore=DL3018
# hadolint ignore=DL3018,DL3016
RUN apk add --no-cache gcompat && \
npm install -g turbo && \
npm cache clean -f && \
Expand Down Expand Up @@ -46,14 +46,13 @@ COPY --from=pruner --chown=node:node /app/out/full/ ./
COPY --from=deps --chown=node:node /app/ ./

USER node
CMD ["node" "--run", "dev"]
CMD ["node", "--run", "dev"]


FROM base AS prod
WORKDIR /app

ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1

COPY --from=builder --chown=node:node /app/apps/client/next.config.js .
COPY --from=builder --chown=node:node /app/apps/client/package.json .
Expand Down
6 changes: 3 additions & 3 deletions apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
"react-dom": "^18.3.1",
"react-hook-form": "^7.51.3",
"sharp": "^0.33.3",
"zod": "^3.23.4"
"zod": "^3.23.5"
},
"devDependencies": {
"@repo/biome-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/node": "^20.12.7",
"@types/react": "^18.3.0",
"@types/node": "^20.12.8",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ services:
context: .
dockerfile: ./apps/api/Dockerfile
target: prod
tty: true
stdin_open: true
env_file:
- .env
restart: unless-stopped
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"pre-commit": "pnpm run lint:check && pnpm run types:check"
},
"devDependencies": {
"@biomejs/biome": "1.7.1",
"@biomejs/biome": "1.7.2",
"@repo/biome-config": "workspace:*",
"@repo/supabase": "workspace:*",
"@repo/typescript-config": "workspace:*",
Expand Down
5 changes: 4 additions & 1 deletion packages/biome-config/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"linter": {
"enabled": true,
"rules": {
"recommended": true
"recommended": true,
"suspicious": {
"noRedeclare": "off"
}
}
},
"files": {
Expand Down
2 changes: 1 addition & 1 deletion packages/biome-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"./biome": "./biome.json"
},
"devDependencies": {
"@biomejs/biome": "1.7.1"
"@biomejs/biome": "1.7.2"
},
"scripts": {
"clean": "rm -rf node_modules"
Expand Down
1 change: 1 addition & 0 deletions packages/typescript-config/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"noImplicitOverride": true,
"target": "ES2022"
}
}
8 changes: 3 additions & 5 deletions packages/typescript-config/hono.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
"display": "hono",
"extends": "./base.json",
"compilerOptions": {
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "Bundler",
"strict": true,
"outDir": "dist",
"types": ["node", "vitest/globals"],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx",
"outDir": "dist"
"isolatedModules": true,
"forceConsistentCasingInFileNames": true
}
}
8 changes: 4 additions & 4 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"@repo/biome-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@turbo/gen": "^1.13.3",
"@types/node": "^20.12.7",
"@types/react": "^18.3.0",
"@types/node": "^20.12.8",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
Expand All @@ -42,10 +42,10 @@
"@radix-ui/react-toast": "^1.1.5",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lucide-react": "^0.376.0",
"lucide-react": "^0.377.0",
"react-hook-form": "^7.51.3",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.23.4"
"zod": "^3.23.5"
}
}
Loading

0 comments on commit 9f9100b

Please sign in to comment.