Skip to content

Instantly share code, notes, and snippets.

View adejorosam's full-sized avatar
🏠
Working from home

Samson Adejoro adejorosam

🏠
Working from home
View GitHub Profile
<?php
use CardinalstoneRestServer\services\JWTToken;
use Respect\Validation\Validator as V;
use Psr\Container\ContainerInterface;
use function GuzzleHttp\json_decode;
use CardinalstoneRestServer\models\MutualFundModel as mutualFundModel;
use CardinalstoneRestServer\models\CustomerModel as customerModel;
$app->post('/api/authenticate', function ($request, $response) {
$payload = $request->getParsedBody();
@adejorosam
adejorosam / techspec.txt
Last active May 27, 2026 16:13
Tech Spec: Notification System for 1M+ Users
Tech Spec: Notification System for 1M+ Users
Author: Samson Adejoro
Date: May 2026
1. Problem Statement
We need a notification system that can reliably deliver push, SMS, and email notifications to 1M+ users. The system must guarantee:
No duplicate sends for the same event
No missed sends even under provider outages
Graceful degradation when one or more providers are unavailable

NITECH (InterfaceX) Endpoint Integration - Documentation

Date: January 22, 2026 Version: 1.0


Overview

This document outlines the changes made to integrate new and updated NITECH (InterfaceX) endpoints into the Cardinalstone Registrars backend system.

import {
WebSocketGateway,
WebSocketServer,
OnGatewayConnection,
OnGatewayDisconnect,
} from '@nestjs/websockets';
import { Server, Socket } from 'socket.io';
import * as WebSocket from 'ws';
import { Injectable, Logger } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
@adejorosam
adejorosam / gist:49982abd57676b19a40c9e99d33bb01f
Created December 2, 2024 08:22
wallet transaction notification
<!-- / Full width container -->
<!DOCTYPE html>
<?php
use Carbon\Carbon;
use CardinalstoneRestServer\services\mail\Mailer;
?>
<htmL>
<head>
</head>
<body>
<!-- / Full width container -->
<!DOCTYPE html>
<?php
use Carbon\Carbon;
use CardinalstoneRestServer\services\mail\Mailer;
?>
<htmL>
<head>
</head>
<body>
@adejorosam
adejorosam / gist:2bf3fafc2dce91ab2f16942f8d341e23
Created December 2, 2024 08:19
failed wallet transaction
<!-- / Full width container -->
<!DOCTYPE html>
<?php
use Carbon\Carbon;
use CardinalstoneRestServer\services\mail\Mailer;
?>
<htmL>
<head>
</head>
<body>
<?php
namespace CardinalstoneRestServer\services;
use CardinalstoneRestServer\models\WebServiceModel;
use function GuzzleHttp\json_decode;
/*
* This Class handles the API calls to paystack
* @author devteam@cardinalstone.com
<?php
namespace CardinalstoneRestServer\models;
use CardinalstoneRestServer\models\Model;
use CardinalstoneRestServer\models\MutualFundModel as mutualFundModel;
use CardinalstoneRestServer\models\ForeignEquityModel;
use CardinalstoneRestServer\services\JWTToken;
use CardinalstoneRestServer\services\mail\Mailer;
use CardinalstoneRestServer\middleware\Uploader;
@adejorosam
adejorosam / gist:9ef26da63fc47c69f6444964c5908cc0
Created November 28, 2024 08:56
withdrawal notification template
<htmL>
<head>
</head>
<body>
<table class="full-width-container" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" bgcolor="#eeeeee" style="width: 100%; height: 100%; padding: 30px 0 30px 0; font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif">
<tr>
<td align="center" valign="top">
<!-- / 700px container -->
<table class="container" border="0" cellpadding="0" cellspacing="0" width="720" bgcolor="#ffffff" style="width: 720px;">
<tr>