mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 21:39:40 +02:00
## New Features ### Network Graph Visualization (Contacts, Calendar, Todo) - D3.js force simulation for physics-based layout - Zoom & pan with mouse/touchpad - Keyboard shortcuts: +/- zoom, 0 reset, Esc deselect, / search, F focus - Filtering by tags, company/location/project, connection strength - Shared components in @manacore/shared-ui ### Central Tags API (mana-core-auth) - CRUD endpoints for tags - Schema: tags table with userId, name, color, app - Shared tag components in @manacore/shared-ui ### Custom Themes System - Theme editor with live preview and color picker - Community theme gallery - Theme sharing (public, unlisted, private) - Backend API in mana-core-auth ### Todo App Extensions - Glass-pill design for task input and items - Settings page with 20+ preferences - Task edit modal with inline editing - Statistics page with visualizations - PWA support with offline capabilities - Multiple kanban boards ### Contacts App Features - Duplicate detection - Photo upload - Batch operations - Enhanced favorites page with multiple view modes - Alphabet view improvements - Search modal ### Help System - @manacore/shared-help-content - @manacore/shared-help-ui - @manacore/shared-help-types ### Other Features - Themes page for all apps - Referral system frontend - CommandBar (global search) - Skeleton loaders - Settings page improvements ## Bug Fixes - Network graph simulation initialization - Database schema TEXT for user_id columns (Better Auth compatibility) - Various styling fixes ## Documentation - Daily report for 2025-12-10 - CI/CD deployment guide 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| .env.example | ||
| docker-compose.yml | ||
| Dockerfile | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Memoro Admin API
Backend API service for Memoro Admin with AI image generation via Replicate.
🚀 Quick Start
Prerequisites
- Node.js 20+
- Replicate API Token (get it from https://replicate.com/account/api-tokens)
Installation
- Install dependencies:
cd services/admin-api
npm install
- Configure environment:
cp .env.example .env
# Edit .env and add your REPLICATE_API_TOKEN
- Run in development:
npm run dev
The API will be available at http://localhost:3001
📝 API Endpoints
Health Check
GET /health
# No auth required
Test Replicate Configuration
GET /api/personas/test?apiKey=your-api-key
Generate Persona Images
POST /api/personas/generate-images
Headers:
X-API-Key: your-api-key
Body:
{
"personaData": {
"name": "Thomas Bauer",
"appearance": {
"prompt": "45 year old German craftsman...",
"description": "..."
}
},
"style": "portrait", // portrait | professional | casual | lifestyle
"count": 4 // 1-4 images
}
Get Available Styles
GET /api/personas/styles?apiKey=your-api-key
🐳 Docker Deployment
Using Docker Compose:
# Build and run
docker-compose up -d
# View logs
docker-compose logs -f admin-api
Using Docker directly:
# Build image
docker build -t memoro-admin-api .
# Run container
docker run -d \
-p 3001:3001 \
-e REPLICATE_API_TOKEN=your_token \
-e API_KEY=your_api_key \
-v $(pwd)/storage:/app/storage \
memoro-admin-api
🔧 Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
PORT |
API server port | 3001 |
REPLICATE_API_TOKEN |
Your Replicate API token | Required |
API_KEY |
API authentication key | memoro-admin-api-key-2025 |
CORS_ORIGIN |
Allowed CORS origin | http://localhost:4321 |
STORAGE_PATH |
Local image storage path | ./storage/images |
LOG_LEVEL |
Logging level | debug |
💰 Cost Estimation
- SDXL Model: ~$0.0023 per image
- 4 images per persona: ~$0.01
- 100 personas: ~$1.00
📁 Project Structure
admin-api/
├── src/
│ ├── index.ts # Main server file
│ ├── routes/
│ │ └── personas.route.ts # Personas endpoints
│ ├── services/
│ │ └── replicate.service.ts # Replicate integration
│ └── types/
│ └── persona.types.ts # TypeScript types
├── storage/ # Generated images storage
├── docker-compose.yml # Docker orchestration
├── Dockerfile # Container definition
└── package.json # Dependencies
🧪 Testing
Test API locally:
# 1. Check health
curl http://localhost:3001/health
# 2. Test Replicate configuration
curl "http://localhost:3001/api/personas/test?apiKey=memoro-admin-api-key-2025"
# 3. Generate test image
curl -X POST http://localhost:3001/api/personas/generate-images \
-H "X-API-Key: memoro-admin-api-key-2025" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Professional portrait of a 45 year old German craftsman",
"style": "portrait",
"count": 1
}'
🚢 Production Deployment (Hetzner + Coolify)
- Push to GitHub
- Connect repository in Coolify
- Set environment variables
- Deploy as Docker Compose stack
- Configure custom domain & SSL
📄 License
Private - Memoro Internal Use Only