Skip to content

Commit 72a8e94

Browse files
committed
feat: implement authentication flow and app feed UI
- Configure Better Auth with Drizzle and SQLite - Add Login and Register pages with Qwik components - Implement Feed UI with Meta-style design - Fix PostContent code highlighting for Solidity and Mermaid - Optimize Service Worker cleanup and caching strategy - Update project configuration and dependencies
1 parent 98a27c2 commit 72a8e94

22 files changed

Lines changed: 3847 additions & 625 deletions

.env.example

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# -----------------------------------------------------------------------------
2+
# KonXC Portfolio - Environment Variables Template
3+
# -----------------------------------------------------------------------------
4+
# Copy this file to .env and fill in the values.
5+
# DO NOT commit the actual .env file to version control.
6+
7+
# --- App Configuration ---
8+
# The base URL of your application
9+
BETTER_AUTH_BASE_URL=http://localhost:4321
10+
# A random secret string for session encryption
11+
BETTER_AUTH_SECRET=your_secret_here
12+
13+
# --- Database (Turso / LibSQL) ---
14+
# For Local: file:local.db
15+
# For Production: libsql://your-db-name.turso.io
16+
TURSO_DATABASE_URL=file:local.db
17+
TURSO_AUTH_TOKEN=
18+
19+
# --- Authentication (OAuth) ---
20+
# GitHub OAuth Credentials
21+
GITHUB_CLIENT_ID=
22+
GITHUB_CLIENT_SECRET=
23+
24+
# Google OAuth Credentials
25+
GOOGLE_CLIENT_ID=
26+
GOOGLE_CLIENT_SECRET=
27+
28+
# --- Monitoring & Analytics (Optional) ---
29+
# Public Google Analytics ID
30+
PUBLIC_GA_ID=

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ pnpm-debug.log*
1515

1616
# environment variables
1717
.env
18+
.env*.local
1819
.env.production
20+
.env.development
21+
22+
# local database
23+
*.db
24+
*.db-journal
25+
*.db-shm
26+
*.db-wal
1927

2028
# macOS-specific files
2129
.DS_Store

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,8 @@
3333
"[javascript]": {
3434
"editor.defaultFormatter": "esbenp.prettier-vscode"
3535
},
36-
"typescript.tsdk": "node_modules/typescript/lib"
36+
"typescript.tsdk": "node_modules/typescript/lib",
37+
"[json]": {
38+
"editor.defaultFormatter": "vscode.json-language-features"
39+
}
3740
}

bun.lock

Lines changed: 2733 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

drizzle.config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import { defineConfig } from "drizzle-kit";
22
import * as dotenv from "dotenv";
33

4+
// Load .env and .env.local for Drizzle CLI tools
45
dotenv.config();
6+
dotenv.config({ path: ".env.local", override: true });
57

68
export default defineConfig({
79
schema: "./src/db/schema.ts",
810
out: "./migrations",
9-
dialect: "turso",
11+
dialect: "sqlite",
1012
dbCredentials: {
11-
url: process.env.TURSO_DATABASE_URL!,
12-
authToken: process.env.TURSO_AUTH_TOKEN,
13+
url: process.env.TURSO_DATABASE_URL || "file:local.db",
1314
},
1415
});

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@
4444
"test:smart-header:quick": "node scripts/quick-smart-header-test.js",
4545
"test:smart-header:html": "node scripts/test-smart-header-html.js",
4646
"test:ecosystem": "node scripts/test-ecosystem-ui.js",
47-
"prepare": "husky"
47+
"prepare": "husky",
48+
"db": "drizzle-kit",
49+
"db:generate": "drizzle-kit generate",
50+
"db:push": "drizzle-kit push",
51+
"db:migrate": "drizzle-kit migrate",
52+
"db:studio": "drizzle-kit studio"
4853
},
4954
"dependencies": {
5055
"@astrojs/check": "^0.9.5",
@@ -64,6 +69,7 @@
6469
"drizzle-orm": "^0.45.1",
6570
"fuse.js": "^7.1.0",
6671
"highlight.js": "^11.11.1",
72+
"highlightjs-solidity": "^2.0.6",
6773
"katex": "^0.16.28",
6874
"marked": "^17.0.3",
6975
"marked-highlight": "^2.2.3",
@@ -86,6 +92,7 @@
8692
"@typescript-eslint/eslint-plugin": "^8.46.2",
8793
"@typescript-eslint/parser": "^8.46.2",
8894
"astro-eslint-parser": "^1.2.2",
95+
"drizzle-kit": "^0.31.9",
8996
"eslint": "^9.38.0",
9097
"eslint-config-prettier": "^10.1.8",
9198
"eslint-plugin-astro": "^1.3.1",

0 commit comments

Comments
 (0)