Skip to content
Open
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
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Example environment variables for Supabase Edge Function
# Copy this to `.env` for local testing or set secrets in Supabase for production
SUPABASE_URL=https://your-project-ref.supabase.co
SUPABASE_SERVICE_KEY=your_service_role_key
10 changes: 10 additions & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "althea-backend-helper",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "powershell -NoProfile -Command \"Write-Host 'This is a Django backend. Run: python manage.py runserver from the backend folder'\""
},
"description": "Small helper so `npm run dev` doesn't error in the backend folder. Backend is Django (manage.py).",
"license": "MIT"
}
166 changes: 164 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{
"type": "module",
"dependencies": {
"@supabase/supabase-js": "^2.47.2",
"dotenv": "^16.4.5"
}
}

{
"name": "frontend",
"private": true,
Expand All @@ -10,7 +18,9 @@
"preview": "vite preview"
},
"dependencies": {
"@supabase/supabase-js": "^2.74.0",
"@tailwindcss/vite": "^4.1.13",
"dotenv": "^17.2.3",
"lucide-react": "^0.544.0",
"react": "^19.1.1",
"react-dom": "^19.1.1",
Expand All @@ -26,5 +36,10 @@
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.4.0",
"vite": "^7.1.7"
}
},
"description": "This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.",
"main": "eslint.config.js",
"keywords": [],
"author": "",
"license": "ISC"
}
1 change: 1 addition & 0 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
//import { supabase } from './lib/supabaseClient'

// Auth Context
import { AuthProvider, useAuth } from './context/AuthContext';
Expand Down
26 changes: 26 additions & 0 deletions frontend/testSupabase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import * as dotenv from 'dotenv'
import { createClient } from '@supabase/supabase-js'

dotenv.config({ path: './.env' })

const supabase = createClient(
process.env.VITE_SUPABASE_URL,
process.env.VITE_SUPABASE_ANON_KEY
)

async function testConnection() {
if (!process.env.VITE_SUPABASE_URL || !process.env.VITE_SUPABASE_ANON_KEY) {
console.log('Skipping test: URL or key missing')
return
}

const { data, error } = await supabase
.from('users')
.insert([{ name: 'AjayS', email: 'ajay.surti2@gmail.com' }])
.select()

if (error) console.error('❌ Supabase insert error:', error.message)
else console.log('✅ Data inserted:', data)
}

testConnection()
14 changes: 14 additions & 0 deletions mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// ...existing code...
{
"mcpServers": [
{
"name": "supabase-mcp",
"type": "supabase",
"url": "https://your-project-ref.supabase.co",
"serviceKeyEnv": "SUPABASE_SERVICE_KEY",
"edgeFunction": "mcp-server",
"timeoutMs": 30000
}
]
}
// ...existing code...
Loading