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
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

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

jobs:
lint-and-test:
name: Lint & Test
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run linter
run: bun run lint

- name: Run tests
run: bun run test

# Note: Production build is handled by Vercel deployment
# Build step requires valid Clerk keys and database connection

93 changes: 55 additions & 38 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,57 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.10/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "off"
},
"correctness": {
"noUnusedVariables": "warn"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
},
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
}
"$schema": "https://biomejs.dev/schemas/2.3.10/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"includes": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.json"]
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "off",
"noTemplateCurlyInString": "off",
"noArrayIndexKey": "off"
},
"correctness": {
"noUnusedVariables": "warn",
"noUnusedImports": "warn",
"useExhaustiveDependencies": "warn"
},
"style": {
"noNonNullAssertion": "off",
"useTemplate": "off"
},
"a11y": {
"noSvgWithoutTitle": "off",
"noStaticElementInteractions": "off",
"useKeyWithClickEvents": "off"
},
"complexity": {
"noUselessFragments": "warn"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
},
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
155 changes: 152 additions & 3 deletions bun.lock

Large diffs are not rendered by default.

19 changes: 9 additions & 10 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { defineConfig } from 'drizzle-kit'
import 'dotenv/config'
import { config } from 'dotenv'
import { defineConfig } from "drizzle-kit";
import "dotenv/config";
import { config } from "dotenv";

config({ path: '.env.local' })
config({ path: ".env.local" });

export default defineConfig({
schema: './src/lib/db/schema.ts',
out: './drizzle',
dialect: 'postgresql',
schema: "./src/lib/db/schema.ts",
out: "./drizzle",
dialect: "postgresql",
dbCredentials: {
url: process.env.DATABASE_URL!,
url: process.env.DATABASE_URL ?? "",
},
})

});
10 changes: 3 additions & 7 deletions drizzle/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,8 @@
"name": "submissions_exercise_id_exercises_id_fk",
"tableFrom": "submissions",
"tableTo": "exercises",
"columnsFrom": [
"exercise_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["exercise_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
Expand All @@ -190,4 +186,4 @@
"schemas": {},
"tables": {}
}
}
}
2 changes: 1 addition & 1 deletion drizzle/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"breakpoints": true
}
]
}
}
34 changes: 17 additions & 17 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'www.google.com',
pathname: '/**',
protocol: "https",
hostname: "www.google.com",
pathname: "/**",
},
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
pathname: '/**',
protocol: "https",
hostname: "lh3.googleusercontent.com",
pathname: "/**",
},
{
protocol: 'https',
hostname: 'pglite.dev',
pathname: '/**',
protocol: "https",
hostname: "pglite.dev",
pathname: "/**",
},
{
protocol: 'https',
hostname: 'img.clerk.com',
pathname: '/**',
protocol: "https",
hostname: "img.clerk.com",
pathname: "/**",
},
{
protocol: 'https',
hostname: '*.clerk.com',
pathname: '/**',
protocol: "https",
hostname: "*.clerk.com",
pathname: "/**",
},
],
},
}
};

module.exports = nextConfig
module.exports = nextConfig;
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"lint": "biome check .",
"lint:fix": "biome check --write .",
"format": "biome format --write .",
"test": "vitest run",
"test:watch": "vitest",
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
Expand Down Expand Up @@ -77,7 +79,8 @@
"satori": "^0.18.3",
"tailwindcss": "^3.4.1",
"tsx": "^4.21.0",
"typescript": "^5.6.3"
"typescript": "^5.6.3",
"vitest": "^4.0.16"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
Loading