Adapters
chemistry
biology
finance
legal
art
climate
agent
Merge

Commit History

  1. Create docker compose logs -f verification docker compose logs -f billing docker compose logs -f apollo

    Verified signature
    e80aa1b
  2. 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"}}'

    Verified signature
    978c3e1
  3. Create docker exec -i $(docker ps -q -f ancestor=postgres:15) psql -U integral -d integral -f postgres/migrations/01_schema.sql

    Verified signature
    cfcdb09
  4. Create docker compose up --build -d

    Verified signature
    59b8e1c
  5. Create Readme.md

    Verified signature
    48c2b45
  6. Create README.md

    Verified signature
    504c5da

  1. Create services/dashboard/package.json

    Verified signature
    e587d54
  2. Create services/dashboard/Dockerfile

    Verified signature
    cf6b929
  3. Create services/billing-worker/package.json

    Verified signature
    0fc5487
  4. Create services/billing-worker/Dockerfile

    Verified signature
    f4205e6
  5. Create services/verification-worker/index.js

    Verified signature
    d9399ed
  6. Create services/verification-worker/package.json

    Verified signature
    6b9a90d
  7. Create services/verification-worker/Dockerfile

    Verified signature
    4b8e806
  8. Create services/detection-service/main.py

    Verified signature
    9901342
  9. Create services/detection-service/requirements.txt

    Verified signature
    777a515
  10. Create services/detection-service/Dockerfile

    Verified signature
    76bc2b2
  11. Update services/apollo-server/package.json

    Verified signature
    986ff7f
  12. Create services/apollo-server/package.json

    Verified signature
    390e407
  13. Create services/apollo-server/Dockerfile

    Verified signature
    5c5fce1
  14. 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'));

    Verified signature
    ab370fc
  15. Update migrations/01_schema.sql

    Verified signature
    44fe6ac
  16. Create ini

    Verified signature
    f36003a
  17. Create docker-compose.yml

    Verified signature
    4bf6114
  18. Create lue

    Verified signature
    29154c6
  19. Upload synthetic_pothole_dataset.zip

    Verified signature
    0bf3ad6
  20. Upload integral_ml_and_dashboard.md

    Verified signature
    546a3df
  21. Upload integral_react_dashboard.jsx

    Verified signature
    2c6638a
  22. Upload integral_apollo_server.js

    Verified signature
    aa67905
  23. Create Bash

    Verified signature
    86eab3d
  24. Create Bash

    Verified signature
    7482b36
  25. Create billing-service/index.js

    Verified signature
    b38ce6c
  26. 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'));

    Verified signature
    e7f2fbf
  27. Create verification-service/index.js

    Verified signature
    fb14b4c
  28. Create detection-service/index.js

    Verified signature
    12ba915
  29. Create migrations/01_schema.sql

    Verified signature
    ac179f4
  30. Create schema-potholes.graphql

    Verified signature
    a295b09
  31. initial commit

    Verified signature
    9abc8f4