Skip to content

Commit 23a1f32

Browse files
authored
Merge pull request #148 from Andrelux0Z/feat--Integrate-Supabase-into-the-Backend
feat: integrate supabase into the backend
2 parents e233477 + 083cba6 commit 23a1f32

6 files changed

Lines changed: 167 additions & 1 deletion

File tree

.env.example

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,8 @@ AWS_SECRET_ACCESS_KEY=your-secret-access-key
4949
AWS_REGION=eu-north-1
5050
S3_BUCKET_NAME=volunchain-certificates-test
5151
SOROBAN_RPC_URL=your_rpc_url
52-
SOROBAN_SERVER_SECRET=your_server_secret
52+
SOROBAN_SERVER_SECRET=your_server_secret
53+
54+
# Supabase
55+
SUPABASE_URL=https://your-project.supabase.co
56+
SUPABASE_ANON_KEY=your-anon-key

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@aws-sdk/s3-request-presigner": "^3.798.0",
2727
"@prisma/client": "^6.4.1",
2828
"@stellar/stellar-sdk": "^13.3.0",
29+
"@supabase/supabase-js": "^2.54.0",
2930
"@types/multer": "^1.4.12",
3031
"@types/swagger-jsdoc": "^6.0.4",
3132
"@types/swagger-ui-express": "^4.1.7",

readme.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,19 @@ npm run db:seed
236236

237237
---
238238

239+
## 🔌 Supabase Integration
240+
241+
This project uses Supabase for external data access and future integrations.
242+
243+
Update your `.env` file with:
244+
245+
```bash
246+
SUPABASE_URL=...
247+
SUPABASE_ANON_KEY=...
248+
```
249+
250+
---
251+
239252
## 📁 Module Overview
240253

241254
### Core Modules

scripts/validate-supabase.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { supabase } from '../src/config/supabase';
2+
3+
async function test() {
4+
const { data, error } = await supabase.from('test').select('*');
5+
if (error) throw error;
6+
console.log(data);
7+
}
8+
9+
test();

src/config/supabase.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { createClient } from '@supabase/supabase-js';
2+
3+
const supabaseUrl = process.env.SUPABASE_URL!;
4+
const supabaseKey = process.env.SUPABASE_ANON_KEY!;
5+
6+
export const supabase = createClient(supabaseUrl, supabaseKey);

0 commit comments

Comments
 (0)