Skip to content

Commit 23193c7

Browse files
authored
Merge pull request #45 from TheDeveloperDen/feature/add-legacy-support
feature/add legacy support
2 parents 0eddf3c + c2c8637 commit 23193c7

23 files changed

Lines changed: 2127 additions & 736 deletions

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@ APP_SAVE_IP_ADDRESS=false
101101
# Frontend configurations
102102
API_BASE_URL=http://devbin:8000
103103
PORT=3000
104-
ORIGIN=http://localhost:3000
104+
ORIGIN=http://localhost:3000 # prevent cross-site post req forbidden from frontend because node can't resolve it's origin

backend/app/services/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
__all__ = [
2+
"containers",
3+
]

frontend/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Backend API config
22
API_URL=http://localhost:8000
3+
ORIGIN=http://localhost:3000 # prevent cross-site post req forbidden from frontend because node can't resolve it's origin

frontend/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ node_modules
1212
# OS
1313
.DS_Store
1414
Thumbs.db
15+
*.log
1516

1617
# Env
1718
.env
@@ -21,4 +22,4 @@ Thumbs.db
2122

2223
# Vite
2324
vite.config.js.timestamp-*
24-
vite.config.ts.timestamp-*
25+
vite.config.ts.timestamp-*

frontend/openapi-ts.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import "dotenv/config";
2+
import { defineConfig } from "@hey-api/openapi-ts";
3+
4+
if (!process.env.API_URL) {
5+
throw new Error("Please define API_URL in your .env");
6+
}
7+
8+
export default defineConfig({
9+
input: `${process.env.API_URL}/openapi.json`,
10+
output: "src/client",
11+
});

frontend/package.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,44 @@
1212
"start": "node dist/index.js",
1313
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
1414
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
15-
"update:api-client": "npx @hey-api/openapi-ts -i http://localhost:8000/openapi.json -o src/client"
15+
"update:api-client": "pnpm openapi-ts"
1616
},
1717
"devDependencies": {
1818
"@sveltejs/adapter-auto": "^7.0.0",
1919
"@sveltejs/adapter-node": "^5.4.0",
2020
"@sveltejs/kit": "^2.48.5",
2121
"@sveltejs/vite-plugin-svelte": "^6.2.1",
2222
"@tailwindcss/vite": "^4.1.17",
23+
"@types/node": "^25.0.3",
2324
"svelte": "^5.43.8",
2425
"svelte-check": "^4.3.4",
2526
"tailwindcss": "^4.1.17",
2627
"typescript": "^5.9.3",
2728
"vite": "^7.2.2"
2829
},
2930
"dependencies": {
31+
"@babel/runtime": "^7.28.4",
32+
"@codemirror/lang-cpp": "^6.0.3",
33+
"@codemirror/lang-css": "^6.3.1",
34+
"@codemirror/lang-html": "^6.4.11",
35+
"@codemirror/lang-java": "^6.0.2",
3036
"@codemirror/lang-javascript": "^6.2.4",
37+
"@codemirror/lang-json": "^6.0.2",
38+
"@codemirror/lang-markdown": "^6.5.0",
39+
"@codemirror/lang-python": "^6.2.1",
40+
"@codemirror/lang-sql": "^6.10.0",
41+
"@codemirror/lang-yaml": "^6.1.2",
42+
"@codemirror/language": "^6.12.1",
43+
"@codemirror/state": "^6.5.3",
44+
"@codemirror/view": "^6.39.8",
3145
"@ethercorps/sveltekit-og": "^4.2.1",
46+
"@hey-api/openapi-ts": "^0.89.1",
47+
"@lezer/highlight": "^1.2.3",
48+
"@uiw/codemirror-theme-basic": "^4.25.4",
49+
"axios": "^1.13.2",
50+
"codemirror": "^6.0.2",
3251
"date-fns": "^4.1.0",
33-
"svelte-codemirror-editor": "^2.1.0"
52+
"dotenv": "^17.2.3",
53+
"thememirror": "^2.0.1"
3454
}
3555
}

0 commit comments

Comments
 (0)