back to home

socialincome-san / public

Fighting global poverty with the help of everyday people and your coding skills. Public repository of the NGO and global initiative Social Income.

136 stars
38 forks
100 issues
TypeScriptHTMLDart

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing socialincome-san/public in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/socialincome-san/public)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

  #Tech4Good   #OpenSource   #Solidarity https://user-images.githubusercontent.com/6095849/191377786-10cdb4a1-5b25-4512-ade9-2cc0e153d947.mp4 Social Income is a radically simple solution in the fight against poverty. The global open-source initiative converts donations into an unconditional basic income, which is sent directly to the mobile phones of people living in poverty in the Global South. SDG 1    SDG 10 Social Income – Monorepo Overview Welcome to the **Social Income monorepo**. --- 📁 Repository Structure --- 📱 recipients_app Mobile app where recipients can: • Log in • View payment history • Complete surveys See for platform‑specific setup. --- 🎲 recipients_selection Implements the **cryptographically verifiable and bias‑proof recipient draw**: • Raw recipient lists → salted → hashed → committed to • GitHub Action triggers • Draw randomness comes from **drand** → https://drand.love • Results written to • Draws are reproducible using **dchoose** → https://github.com/drand/dchoose • Full transparency explanation: https://socialincome.org/transparency/recipient-selection --- 🌱 seed Contains seed data for the local development environment: **Firebase authentication seeds** Automatically imported when running: **PostgreSQL database seeds** Local development DB can be filled with sample data via: This populates the local PostgreSQL instance with representative example data. --- 🎨 ui (Storybook Components) Legacy UI component package using: • Tailwind CSS • shadcn/ui 📘 Storybook preview: **http://design.socialincome.org** The long‑term plan is to phase this out and maintain all components inside . --- 🌐 website (Main Next.js Application) A Next.js project containing: **1. Public Website** • Currently partly hardcoded • Migration underway → **Storyblok CMS** • Journal already uses Storyblok Docs: https://www.storyblok.com/docs --- **2. Portal** Internal operations tool: • Program management • Payments & transfers • Recipients & contributor tools • Admin functions --- **3. Dashboard** Contributor self‑service area: • View payments • Manage subscriptions • Update personal details --- **4. Partner Space** Local Partner self‑service area: • View own recipients / candidates • Update personal details --- **5. Authentication Roles & Test Accounts (Local Dev)** During development, three login roles can be tested directly from the login page: | Role | Login Email | Route | | ------------------ | -------------------- | -------------------------- | | Contributor | | | | User | | | | Local Partner | | | | User + Contributor | | and | These are created automatically via seed data. --- **6. Mobile API Used by Recipients App** The communicates with Next.js API routes via OpenAPI‑documented endpoints: 📘 API docs: https://socialincome.org/v1/api-docs --- **7. Infrastructure ( )** Infrastructure-as-code via **Terraform**: • GCP Cloud Run • GCP Cloud SQL (PostgreSQL) • Networks, service accounts, secrets, etc. Docs: https://developer.hashicorp.com/terraform/docs --- **8. Backend Services ( )** Shared backend modules using: • **Prisma ORM** → https://www.prisma.io • **PostgreSQL** • **Firebase Storage** • Misc. utilities and API integrations --- **9. E2E Testing** We use **Playwright** for end‑to‑end testing of the website. **Key principles** • Tests run against the real app in CI • Visual regression screenshots are automatically updated in the pipeline and committed into the PR • External Storyblok requests are mocked using a mockserver **Mock recording system** We use a record/replay mechanism for deterministic tests. **Record mode** • Set STORYBLOK_MOCK_MODE in .env.development to 'record' • Restart dev server • run tests: This: • starts the mockserver as proxy • records all outgoing Storyblok API requests • stores them as JSON fixtures inside the repo These recordings should be committed. **Replay mode (CI default)** In CI the environment runs in replay mode: • mockserver serves recorded responses • no external API calls are made • tests are fully deterministic and fast --- 🛠 Local Development Setup (Simple & Minimal) We use: • **mise-en-place** → https://mise.jdx.dev • **Docker** (for PostgreSQL) • **Firebase Emulators** • **Node.js + npm** • **Terraform** (infra work only) --- • Install mise --- • Install all required tool versions --- • Prepare environment variables Inside , copy the sample file: Edit values as necessary. --- • Start the complete local dev environment This starts: • **Local PostgreSQL** via Docker Compose • **Firebase Emulators** (Auth + Firestore + Storage) • **Next.js website** (public site, portal, dashboard) --- 🧪 pg_dump / pg_restore Useful commands for copying local DB → staging (or vice versa). Dump your local database: Restore into staging: --- 🧩 Storyblok Development • Read the Storyblok docs → https://www.storyblok.com/docs • Set env vars in : • - • Optional: run SSL proxy for live preview --- Storyblok Type Generation We use the **Storyblok CLI** to generate TypeScript types from the CMS schema. If you have made changes to the Storyblok schema, you can regenerate the types: • Set these env vars in : • - • Run: This command: • Logs into Storyblok using your personal access token • Pulls component schemas from the space • Generates TypeScript types to Usage in components: --- 🙋 Troubleshooting Translations not updating? Firebase seed not updating? --- Financial Contributions Donate 1 Percent of Your Income Become a contributor of Social Income (tax-deductible in Switzerland). Sponsor Dev Community Become a sponsor and help ensure the development of open source software for more equality and less poverty. Donations through the GitHub Sponsor program are used for building a strong developer community. Social Income (NGO) Non-Profit Organization Social Income is a non-profit association (CHE-289.611.695) based in Zurich,…