refactor: consolidate environment config and API handling

- Update database paths and port configuration
- Remove backend config.ts and sessions route
- Add mobile file preview and files API
- Clean up shared constants and provider hooks
This commit is contained in:
Chris Scott committed 2025-11-25 09:39:56 -05:00
1 parent 0db354048d
commit 8a56bc208d
32 files changed
+301 -512

No files matched your search

+6 -3
View File
@@ -3,15 +3,18 @@
import { writeFile } from 'fs/promises'
import { join, dirname } from 'path'
import { fileURLToPath } from 'url'
import {ENV} from '../backend/src/config'
const __dirname = dirname(fileURLToPath(import.meta.url))
const OPENCODE_SERVER_URL = process.env.OPENCODE_SERVER_URL || 'http://localhost:5561'
const OPENCODE_URL = ENV.VITE_API_URL + '/api/opencode'
async function generateOpenAPISpec() {
console.log(`📥 Fetching OpenAPI spec from ${OPENCODE_SERVER_URL}/doc...`)
console.log(`📥 Fetching OpenAPI spec from ${OPENCODE_URL}/doc`)
try {
const response = await fetch(`${OPENCODE_SERVER_URL}/doc`, {
const response = await fetch(`${OPENCODE_URL }/doc`, {
headers: {
'Accept': 'application/json'
}