Initial commit: Flow Funding project setup

- Next.js 14 with TypeScript and Tailwind CSS
- React Flow / D3.js for flow visualizations
- Docker + Traefik labels for deployment at flowidity.io/tbff
- Basic project structure and placeholder page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-01-29 17:56:07 +00:00
commit eefe4dfcc2
12 changed files with 288 additions and 0 deletions

36
.gitignore vendored Normal file
View File

@ -0,0 +1,36 @@
# Dependencies
node_modules/
.pnpm-store/
# Next.js
.next/
out/
# Build
dist/
build/
# Environment
.env
.env.local
.env.*.local
# IDE
.vscode/
.idea/
*.swp
*.swo
# OS
.DS_Store
Thumbs.db
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# TypeScript
*.tsbuildinfo
next-env.d.ts

36
Dockerfile Normal file
View File

@ -0,0 +1,36 @@
FROM node:20-alpine AS base
# Install pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
# Dependencies stage
FROM base AS deps
WORKDIR /app
COPY package.json pnpm-lock.yaml* ./
RUN pnpm install --frozen-lockfile || pnpm install
# Build stage
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN pnpm build
# Production stage
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
EXPOSE 3000
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
CMD ["node", "server.js"]

45
README.md Normal file
View File

@ -0,0 +1,45 @@
# Flow Funding
Visual interactive interface for threshold-based flow funding mechanisms.
## Concept
Flow funding enables continuous, threshold-based resource allocation where:
- Funds flow continuously rather than in discrete grants
- Thresholds determine when funding activates/deactivates
- Visual interfaces make the system intuitive and transparent
## Features (Planned)
- **Interactive Flow Visualization**: Real-time display of funding flows between sources and recipients
- **Threshold Configuration**: Visual tools to set and adjust funding thresholds
- **Flow Dynamics**: Animate how funds move when thresholds are met
- **Dashboard**: Overview of all active flows, thresholds, and balances
## Tech Stack
- Next.js 14 (App Router)
- React Flow / D3.js for flow visualizations
- Tailwind CSS for styling
- TypeScript
## Development
```bash
pnpm install
pnpm dev
```
## Deployment
Dockerized for deployment on Netcup RS 8000 via Traefik.
**URL**: `https://flowidity.io/tbff`
```bash
docker compose up -d --build
```
## License
MIT

20
app/globals.css Normal file
View File

@ -0,0 +1,20 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--foreground-rgb: 0, 0, 0;
--background-rgb: 255, 255, 255;
}
@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-rgb: 10, 10, 10;
}
}
body {
color: rgb(var(--foreground-rgb));
background: rgb(var(--background-rgb));
}

21
app/layout.tsx Normal file
View File

@ -0,0 +1,21 @@
import type { Metadata } from 'next'
import './globals.css'
export const metadata: Metadata = {
title: 'Flow Funding',
description: 'Visual interactive interface for threshold-based flow funding',
}
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body className="min-h-screen bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900">
{children}
</body>
</html>
)
}

21
app/page.tsx Normal file
View File

@ -0,0 +1,21 @@
'use client'
export default function Home() {
return (
<main className="flex min-h-screen flex-col items-center justify-center p-8">
<div className="text-center space-y-6">
<h1 className="text-5xl font-bold bg-gradient-to-r from-blue-400 via-purple-500 to-emerald-400 bg-clip-text text-transparent">
Flow Funding
</h1>
<p className="text-xl text-slate-300 max-w-2xl">
Visual interactive interface for threshold-based flow funding mechanisms
</p>
<div className="mt-8 p-8 rounded-2xl border border-slate-700 bg-slate-800/50 backdrop-blur">
<p className="text-slate-400">
Interactive visualization coming soon...
</p>
</div>
</div>
</main>
)
}

18
docker-compose.yml Normal file
View File

@ -0,0 +1,18 @@
services:
flow-funding:
build: .
restart: unless-stopped
environment:
- NEXT_PUBLIC_BASE_PATH=/tbff
labels:
- "traefik.enable=true"
- "traefik.http.routers.flow-funding.rule=Host(`flowidity.io`) && PathPrefix(`/tbff`)"
- "traefik.http.routers.flow-funding.middlewares=flow-funding-stripprefix"
- "traefik.http.middlewares.flow-funding-stripprefix.stripprefix.prefixes=/tbff"
- "traefik.http.services.flow-funding.loadbalancer.server.port=3000"
networks:
- traefik-public
networks:
traefik-public:
external: true

8
next.config.js Normal file
View File

@ -0,0 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
basePath: process.env.NEXT_PUBLIC_BASE_PATH || '',
assetPrefix: process.env.NEXT_PUBLIC_BASE_PATH || '',
}
module.exports = nextConfig

28
package.json Normal file
View File

@ -0,0 +1,28 @@
{
"name": "flow-funding",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"next": "^14.2.0",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"@xyflow/react": "^12.0.0",
"d3": "^7.9.0"
},
"devDependencies": {
"@types/d3": "^7.4.0",
"@types/node": "^20.0.0",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.0",
"postcss": "^8.4.0",
"tailwindcss": "^3.4.0",
"typescript": "^5.0.0"
}
}

6
postcss.config.js Normal file
View File

@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

23
tailwind.config.ts Normal file
View File

@ -0,0 +1,23 @@
import type { Config } from 'tailwindcss'
const config: Config = {
content: [
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {
colors: {
flow: {
primary: '#3B82F6',
secondary: '#10B981',
accent: '#8B5CF6',
threshold: '#F59E0B',
},
},
},
},
plugins: [],
}
export default config

26
tsconfig.json Normal file
View File

@ -0,0 +1,26 @@
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}