AI-powered creative studio for Touchstone Essentials Digital Partners
Automate your content. Grow your team. Earn more.
Touchstone Affiliate+ is an all-in-one app that automates everything an affiliate ambassador needs:
- 📱 Auto-create content — AI writes säljande posts, videos, bloggar
- 📡 Publish everywhere — Facebook, Instagram, TikTok, YouTube med ett klick
- 👥 Recruit members — Automatiserad värvning med landningssidor och lead-uppföljning
- 🏢 Backoffice access — Kommissioner, rank, team — allt på ett ställe
- 🧠 Self-learning — Appen blir bättre ju mer du använder den
"Gammal som ung" — Enkelt läge med 3 steg: Välj → Godkänn → Publicera. Avancerat läge finns för de som vill ha full kontroll.
┌─────────────────────────────────────────────┐
│ React 19 + Tailwind CSS 4 │
│ Simple Mode (wizard) + Advanced Mode │
├─────────────────────────────────────────────┤
│ Fastify Backend (Node.js) │
│ Auth · AI Proxy · Publishing · Learning │
├──────────┬──────────────────────────────────┤
│ PostgreSQL│ Redis │
│ (data) │ (cache · rate limits · queue)│
└──────────┴──────────────────────────────────┘
| Layer | Technology | Why |
|---|---|---|
| Frontend | React 19 + TypeScript | Best DX, latest features |
| Styling | Tailwind CSS 4 | Fast, consistent, mobile-first |
| State | Zustand | Lightweight, no boilerplate |
| Backend | Fastify | 2x faster than Express |
| Database | PostgreSQL + Prisma | Type-safe, migrations built-in |
| Cache | Redis | Rate limiting, sessions, job queue |
| AI | Gemini 2.5 Pro/Flash | Best quality/speed ratio |
| Auth | JWT + bcrypt + refresh rotation | Security best practices |
| Publishing | Meta/TikTok/YouTube APIs | Direct platform integration |
| Learning | Custom engine | Memento + Hermes patterns |
- 🔐 API keys NEVER leave the server — all AI calls proxied through backend
- 🛡️ JWT + refresh token rotation — short-lived access, secure refresh
- ⚡ Rate limiting — per-IP, per-user, per-endpoint
- 🔒 AES-256-GCM encryption — platform credentials encrypted at rest
- 🧹 Input validation — Zod schemas on ALL endpoints
- 🛡️ Prompt injection defense — sanitization layer on AI inputs
- 📝 Audit logging — every action tracked
- 🔒 Helmet security headers — CSP, HSTS, X-Frame-Options
git clone https://github.com/MVihma/Touchstone-Affiliate-.git
cd Touchstone-Affiliate-
npm install
cd backend && npm installbash generate-secrets.shcd backend
cp .env.example .env # Fill in your values
npx prisma migrate dev
npx prisma db seed# From root directory
npm run devdocker-compose up -d| Role | Password | |
|---|---|---|
| Admin | admin@touchstone.ai | Admin123!@# |
| Demo | demo@touchstone.ai | Demo123!@# |
POST /api/v1/auth/login— LoginPOST /api/v1/auth/register— RegisterPOST /api/v1/auth/refresh— Refresh tokenPOST /api/v1/auth/logout— LogoutGET /api/v1/auth/me— Current user
POST /api/v1/ai/chat— Strategy assistantPOST /api/v1/ai/chat/stream— Streaming chatPOST /api/v1/ai/image/edit— Image editingPOST /api/v1/ai/image/generate— Image generationPOST /api/v1/ai/video/generate— Video generation
GET /api/v1/content— List contentPOST /api/v1/content— Create contentPATCH /api/v1/content/:id— Update contentDELETE /api/v1/content/:id— Delete contentPOST /api/v1/content/:id/score— AI quality scoring
POST /api/v1/publishing/publish-now— Publish immediatelyPOST /api/v1/publishing/schedule— Schedule publishGET /api/v1/publishing/jobs— List publish jobsPOST /api/v1/publishing/connect/:platform— Connect platformGET /api/v1/publishing/connections— List connections
POST /api/v1/recruitment/referral-link— Generate linkPOST /api/v1/recruitment/leads— Register lead (public)GET /api/v1/recruitment/leads— List leadsGET /api/v1/recruitment/stats— Recruitment stats
GET /api/v1/learning/profile— Learning profileGET /api/v1/learning/recommendations— AI recommendationsPOST /api/v1/learning/metrics— Record metricsPOST /api/v1/learning/feedback— Submit feedback
Varje avdelning styrs av specialiserade AI-agenter:
| Avdelning | Ansvar | AI-Mönster |
|---|---|---|
| Content Engine | Allt innehåll | Memento (self-evolving) |
| Publishing | Auto-publicering | DeerFlow (orchestration) |
| Recruitment | Värvning & leads | BettaFish (multi-agent) |
| Backoffice | Touchstone-integration | gstack (sprint cycle) |
| Learning | Självlärande | Hermes (closed loop) |
| Security | Säkerhet | CAI (8 pillars) |
| UX | Användarvänlighet | AgentScope (production) |
Private — Touchstone Affiliate+ by Mickael Vihma