Adapters
chemistry
biology
finance
legal
art
climate
agent
Merge

Commit History

Create load_adapter()
ea9a302
verified

BACCHUS45 commited on

Create adapters
3886bac
verified

BACCHUS45 commited on

Upload integral-micro.zip
723757a
verified

BACCHUS45 commited on

Create docker compose logs -f verification docker compose logs -f billing docker compose logs -f apollo
e80aa1b
verified

BACCHUS45 commited on

Create curl -X POST http://localhost:3001/detect -H "Content-Type: application/json" -d '{"namespace":"satellite","type":"pothole-detection","location":{"lat":-29.12,"lon":26.22},"severity":2,"images":[],"provenance":{"source":"test"}}'
978c3e1
verified

BACCHUS45 commited on

Create docker exec -i $(docker ps -q -f ancestor=postgres:15) psql -U integral -d integral -f postgres/migrations/01_schema.sql
cfcdb09
verified

BACCHUS45 commited on

Create docker compose up --build -d
59b8e1c
verified

BACCHUS45 commited on

Create Readme.md
48c2b45
verified

BACCHUS45 commited on

Create README.md
504c5da
verified

BACCHUS45 commited on

Create services/dashboard/package.json
e587d54
verified

BACCHUS45 commited on

Create services/dashboard/Dockerfile
cf6b929
verified

BACCHUS45 commited on

Create services/billing-worker/package.json
0fc5487
verified

BACCHUS45 commited on

Create services/billing-worker/Dockerfile
f4205e6
verified

BACCHUS45 commited on

Create services/verification-worker/index.js
d9399ed
verified

BACCHUS45 commited on

Create services/verification-worker/package.json
6b9a90d
verified

BACCHUS45 commited on

Create services/verification-worker/Dockerfile
4b8e806
verified

BACCHUS45 commited on

Create services/detection-service/main.py
9901342
verified

BACCHUS45 commited on

Create services/detection-service/requirements.txt
777a515
verified

BACCHUS45 commited on

Create services/detection-service/Dockerfile
76bc2b2
verified

BACCHUS45 commited on

Update services/apollo-server/package.json
986ff7f
verified

BACCHUS45 commited on

Create services/apollo-server/package.json
390e407
verified

BACCHUS45 commited on

Create services/apollo-server/Dockerfile
5c5fce1
verified

BACCHUS45 commited on

Update const express = require('express'); const bodyParser = require('body-parser'); const { Pool } = require('pg'); const Redis = require('ioredis'); const fetch = require('node-fetch'); const pool = new Pool({ connectionString: process.env.DATABASE_URL || 'postgresql:/localhost/integral' }); const redis = new Redis(process.env.REDIS_URL || 'redis:/localhost:6379'); const app = express(); app.use(bodyParser.json()); redis.subscribe('payouts:created', () => console.log('listening for payouts')); redis.on('message', async (channel, msg) => { if (channel !== 'payouts:created') return; const { payoutId } = JSON.parse(msg); console.log('handle payout', payoutId); / naive: call settle endpoint try { await settlePayout(payoutId); } catch (err) { console.error(err); } }); async function settlePayout(payoutId) { / fetch payout const r = await pool.query('SELECT * FROM payouts WHERE id=$1 FOR UPDATE', [payoutId]); if (r.rowCount === 0) throw new Error('payout not found'); const payout = r.rows[0]; if (payout.status !== 'created') return; / mark queued await pool.query('UPDATE payouts SET status=$1 WHERE id=$2', ['processing', payoutId]); / Example: call external TMS / Accounting system / Payment Gateway / This is a stub — replace with real API call (e.g. TMS settlement API, or bank transfer). const remote = await fakePaymentGateway(payout); if (remote.success) { const txRef = remote.txRef; await pool.query('UPDATE payouts SET status=$1, tx_ref=$2, settled_at=now() WHERE id=$3', ['settled', txRef, payoutId]); await redis.publish('payouts:settled', JSON.stringify({ payoutId, txRef })); } else { await pool.query('UPDATE payouts SET status=$1 WHERE id=$2', ['failed', payoutId]); await redis.publish('payouts:failed', JSON.stringify({ payoutId })); } } async function fakePaymentGateway(payout) { / fake delay await new Promise(r => setTimeout(r, 600)); return { success: true, txRef: `TX-${Date.now()}-${Math.floor(Math.random()*1000)}` }; } app.post('/settle/:payoutId', async (req, res) => { try { const { payoutId } = req.params; await settlePayout(payoutId); res.json({ success: true }); } catch (err) { console.error(err); res.status(500).json({ success: false, error: err.message }); } }); app.listen(process.env.PORT || 3010, () => console.log('billing-service listening 3010'));
ab370fc
verified

BACCHUS45 commited on

Update migrations/01_schema.sql
44fe6ac
verified

BACCHUS45 commited on

Create ini
f36003a
verified

BACCHUS45 commited on

Create docker-compose.yml
4bf6114
verified

BACCHUS45 commited on

Create lue
29154c6
verified

BACCHUS45 commited on

Upload synthetic_pothole_dataset.zip
0bf3ad6
verified

BACCHUS45 commited on

Upload integral_ml_and_dashboard.md
546a3df
verified

BACCHUS45 commited on

Upload integral_react_dashboard.jsx
2c6638a
verified

BACCHUS45 commited on

Upload integral_apollo_server.js
aa67905
verified

BACCHUS45 commited on

Create Bash
86eab3d
verified

BACCHUS45 commited on

Create Bash
7482b36
verified

BACCHUS45 commited on

Create billing-service/index.js
b38ce6c
verified

BACCHUS45 commited on

Create const express = require('express'); const bodyParser = require('body-parser'); const { Pool } = require('pg'); const Redis = require('ioredis'); const fetch = require('node-fetch'); const pool = new Pool({ connectionString: process.env.DATABASE_URL || 'postgresql://localhost/integral' }); const redis = new Redis(process.env.REDIS_URL || 'redis://localhost:6379'); const app = express(); app.use(bodyParser.json()); redis.subscribe('payouts:created', () => console.log('listening for payouts')); redis.on('message', async (channel, msg) => { if (channel !== 'payouts:created') return; const { payoutId } = JSON.parse(msg); console.log('handle payout', payoutId); // naive: call settle endpoint try { await settlePayout(payoutId); } catch (err) { console.error(err); } }); async function settlePayout(payoutId) { // fetch payout const r = await pool.query('SELECT * FROM payouts WHERE id=$1 FOR UPDATE', [payoutId]); if (r.rowCount === 0) throw new Error('payout not found'); const payout = r.rows[0]; if (payout.status !== 'created') return; // mark queued await pool.query('UPDATE payouts SET status=$1 WHERE id=$2', ['processing', payoutId]); // Example: call external TMS / Accounting system / Payment Gateway // This is a stub — replace with real API call (e.g. TMS settlement API, or bank transfer). const remote = await fakePaymentGateway(payout); if (remote.success) { const txRef = remote.txRef; await pool.query('UPDATE payouts SET status=$1, tx_ref=$2, settled_at=now() WHERE id=$3', ['settled', txRef, payoutId]); await redis.publish('payouts:settled', JSON.stringify({ payoutId, txRef })); } else { await pool.query('UPDATE payouts SET status=$1 WHERE id=$2', ['failed', payoutId]); await redis.publish('payouts:failed', JSON.stringify({ payoutId })); } } async function fakePaymentGateway(payout) { // fake delay await new Promise(r => setTimeout(r, 600)); return { success: true, txRef: `TX-${Date.now()}-${Math.floor(Math.random()*1000)}` }; } app.post('/settle/:payoutId', async (req, res) => { try { const { payoutId } = req.params; await settlePayout(payoutId); res.json({ success: true }); } catch (err) { console.error(err); res.status(500).json({ success: false, error: err.message }); } }); app.listen(process.env.PORT || 3010, () => console.log('billing-service listening 3010'));
e7f2fbf
verified

BACCHUS45 commited on

Create verification-service/index.js
fb14b4c
verified

BACCHUS45 commited on

Create detection-service/index.js
12ba915
verified

BACCHUS45 commited on

Create migrations/01_schema.sql
ac179f4
verified

BACCHUS45 commited on

Create schema-potholes.graphql
a295b09
verified

BACCHUS45 commited on

initial commit
9abc8f4
verified

BACCHUS45 commited on