https://github.com/rakibulmehedi/afie
Autonomous Founder Identity Engine — AI-powered multi-tenant SaaS that synthesizes, approves, and distributes founder content at institutional-grade quality.
https://github.com/rakibulmehedi/afie
ai-content-generation autonomous-agents content-automation fastapi founder-identity human-in-the-loop llm multi-tenant-saas nextjs postgresql python railway saga-pattern typescript vercel
Last synced: about 8 hours ago
JSON representation
Autonomous Founder Identity Engine — AI-powered multi-tenant SaaS that synthesizes, approves, and distributes founder content at institutional-grade quality.
- Host: GitHub
- URL: https://github.com/rakibulmehedi/afie
- Owner: rakibulmehedi
- License: mit
- Created: 2026-06-24T20:06:12.000Z (7 days ago)
- Default Branch: main
- Last Pushed: 2026-06-24T21:13:01.000Z (7 days ago)
- Last Synced: 2026-06-24T23:06:16.179Z (7 days ago)
- Topics: ai-content-generation, autonomous-agents, content-automation, fastapi, founder-identity, human-in-the-loop, llm, multi-tenant-saas, nextjs, postgresql, python, railway, saga-pattern, typescript, vercel
- Language: Python
- Homepage: https://github.com/rakibulmehedi/afie
- Size: 395 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Codeowners: CODEOWNERS
- Security: SECURITY.md
- Support: .github/SUPPORT.md
Awesome Lists containing this project
README
# Autonomous Founder Identity Engine (AFIE)
[](https://github.com/rakibulmehedi/afie/actions/workflows/ci.yml)
[](LICENSE)
[](https://github.com/rakibulmehedi/afie/releases)
[](https://www.python.org/downloads/)
[](https://nodejs.org/)
> AI-powered multi-tenant SaaS that operates founder identities in public, autonomously, at institutional-grade quality.
AFIE ingests real engineering signal (GitHub commits, Telegram notes), synthesizes persona-true content drafts via LLM, gates every draft behind **human approval**, then distributes approved content across platforms — with full saga auditability and at-least-once durability.
## Table of Contents
- [Architecture](#architecture)
- [Getting Started](#getting-started)
- [Project Structure](#project-structure)
- [Development](#development)
- [Contributing](#contributing)
- [License](#license)
## Architecture
Two runtimes, **never merged**, sharing a directory tree but not a dependency graph:
| Layer | Runtime | Host | Responsibility |
|-------|---------|------|----------------|
| **Edge / API** | Next.js (TypeScript) `apps/web` | Vercel | Webhook ingress, tenant resolution, approval dashboard |
| **AI Worker** | FastAPI (Python) `apps/ai-worker` | Railway | Saga orchestration, LLM synthesis, DB writes (tenant-scoped) |
```
GitHub commits / Telegram notes
↓
apps/web (Next.js) ← webhook ingress, 202 immediately
↓ enqueue
apps/ai-worker (FastAPI) ← saga: synthesize → gate → distribute
↓ LLM
Human Approval Dashboard ← every draft reviewed before publish
↓ approved
Content Platforms ← distributed with at-least-once durability
```
**Key design invariants:**
- `apps/web` never writes to Postgres and never holds LLM keys
- `apps/ai-worker` is the sole Postgres writer; all reads are tenant-scoped via RLS (`SET LOCAL app.current_tenant`)
- Every content draft requires explicit human approval before distribution
## Getting Started
**Prerequisites:** Python 3.11+, Node.js 20+, pnpm 9+, Docker (for Postgres)
```bash
git clone https://github.com/rakibulmehedi/afie.git
cd afie
pnpm install
```
**AI Worker:**
```bash
cd apps/ai-worker
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
```
**Web App:**
```bash
cd apps/web
pnpm dev
```
## Project Structure
```
afie/
├── apps/
│ ├── ai-worker/ # FastAPI — saga orchestration, LLM, DB
│ │ ├── domain/ # Models, port protocols
│ │ ├── infrastructure/ # DB repos, LLM adapters
│ │ └── application/ # Use-case classes
│ └── web/ # Next.js — webhooks, approval dashboard
│ ├── db/ # Database access layer
│ ├── messaging/ # Queue integration
│ └── webhooks/ # Ingress handlers
├── .github/
│ ├── workflows/ci.yml # CI: Python lint/test + Node build
│ └── ISSUE_TEMPLATE/ # Bug reports, feature requests
├── docs/ # Architecture blueprints, API contracts
├── CHANGELOG.md
├── CONTRIBUTING.md (in .github/)
└── LICENSE # MIT
```
## Development
```bash
# Python (ai-worker)
cd apps/ai-worker && pytest
# Node (web)
pnpm --filter web build
```
Commits follow `type: description` (feat/fix/chore/refactor/docs/test).
See [CONTRIBUTING.md](.github/CONTRIBUTING.md) for full setup and PR process.
## Contributing
Bug reports → [GitHub Issues](https://github.com/rakibulmehedi/afie/issues)
Questions → [GitHub Discussions](https://github.com/rakibulmehedi/afie/discussions)
Security vulnerabilities → [SECURITY.md](SECURITY.md) (email only, do not open public issues)
## License
MIT © 2026 [Rakibul Islam Mehedi](https://github.com/rakibulmehedi)