- create a node boilerplate
- create a data model (sql table or nosql collection)
- create endpoints using koa (POST, PATCH, GET, DELETE)
- expose data model in these endpoints
- dockerfile to create a docker image
- deploy in a vps using docker compose, or using k8s deployment + service
- add integration tests using supertest
- create a basic login/auth using email + pwd bcrypt
Here is a short list of problems to solve in "any" Fintech
- KYC
- Ledger
- Scaling
- Reliability
- Latency
- Security
- Data Consistency
- Integration with many external systems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { transform } from '@swc/core'; | |
import fs from 'fs/promises'; | |
import path from 'path'; | |
import { fileURLToPath } from 'url'; | |
const cwd = process.cwd(); | |
export async function load(url, context, defaultLoad) { | |
if (url.endsWith('.tsx')) { | |
const filePath = fileURLToPath(url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from "fs"; | |
import path from "path"; | |
import forge from "node-forge"; | |
const cwd = process.cwd(); | |
function computeFingerprint(cert: forge.pki.Certificate): string { | |
const asn1Cert = forge.pki.certificateToAsn1(cert); | |
const der = forge.asn1.toDer(asn1Cert).getBytes(); | |
const md = forge.md.sha1.create(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: batch/v1 | |
kind: CronJob | |
metadata: | |
name: mongodb-backup-woovi-dev | |
namespace: mongodb-backup-dev | |
spec: | |
schedule: "0 1 * * *" | |
concurrencyPolicy: Forbid | |
jobTemplate: | |
spec: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
name: mongodb1 | |
name: mongodb1 | |
namespace: woovi-mongo-dev | |
spec: | |
replicas: 1 | |
strategy: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
args="$@" | |
docker-compose up -d $args | |
sleep 5 | |
updateEtcHost() { | |
local content=$1 | |
if grep -q "$content" /etc/hosts; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const signature = ctx.request.headers['x-hub-signature-256']; | |
if ( | |
!signature || | |
typeof signature !== 'string' || | |
!config.WHATSAPP_APP_SECRET | |
) { | |
ctx.status = 403; | |
ctx.body = { | |
message: 'invalid signature', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import legacy from '@vitejs/plugin-legacy' | |
import react from '@vitejs/plugin-react-swc'; | |
import { defineConfig } from 'vite'; | |
import relay from 'vite-plugin-relay'; | |
// import { esbuildCommonjs, viteCommonjs } from '@originjs/vite-plugin-commonjs' | |
// https://vitejs.dev/config/ | |
export default defineConfig({ | |
plugins: [ | |
// commonjs({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const renderToPipeableStreamPromise = async ( | |
tree: ReactElement, | |
ctx: Context, | |
next: Next, | |
) => { | |
const writableStream = new WritableAsPromise(); | |
let didError = false; | |
const { pipe, abort } = renderToPipeableStream(tree, { |
NewerOlder