main page

This commit is contained in:
2025-12-17 17:55:13 +01:00
commit 7fb446c53a
8943 changed files with 1209030 additions and 0 deletions

25
src/lib/appwrite.js Normal file
View File

@@ -0,0 +1,25 @@
import { Client, Account, Databases, Storage, ID, Query } from 'appwrite'
const client = new Client()
.setEndpoint(import.meta.env.VITE_APPWRITE_ENDPOINT || 'https://cloud.appwrite.io/v1')
.setProject(import.meta.env.VITE_APPWRITE_PROJECT_ID || '')
export const account = new Account(client)
export const databases = new Databases(client)
export const storage = new Storage(client)
export const DATABASE_ID = import.meta.env.VITE_APPWRITE_DATABASE_ID || 'woms-database'
// Collection IDs
export const COLLECTIONS = {
WORKORDERS: 'workorders',
WORKSHEETS: 'worksheets',
CUSTOMERS: 'customers',
USERS: 'users',
ATTACHMENTS: 'attachments'
}
export const BUCKET_ID = 'woms-attachments'
// Helper functions
export { ID, Query }