{"id":51261622,"url":"https://github.com/europanite/ai-picture-diary","last_synced_at":"2026-06-29T12:32:12.205Z","repository":{"id":352927615,"uuid":"1217219512","full_name":"europanite/ai-picture-diary","owner":"europanite","description":"A picture diary powered by local LLM and VLM.","archived":false,"fork":false,"pushed_at":"2026-06-28T04:24:57.000Z","size":179818,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-28T06:14:37.139Z","etag":null,"topics":["ai-ops","aiops","container","docker","generative-ai","huggingface","image","image-ai","llama","llm","llms","local-llm","local-vlm","natural-language-processing","picture-diary","postgresql","python","react","vlm","vlms"],"latest_commit_sha":null,"homepage":"https://europanite.github.io/ai-picture-diary/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/europanite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-21T17:02:31.000Z","updated_at":"2026-06-28T04:25:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/europanite/ai-picture-diary","commit_stats":null,"previous_names":["europanite/n2","europanite/ai-picture-diary"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/europanite/ai-picture-diary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/europanite%2Fai-picture-diary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/europanite%2Fai-picture-diary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/europanite%2Fai-picture-diary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/europanite%2Fai-picture-diary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/europanite","download_url":"https://codeload.github.com/europanite/ai-picture-diary/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/europanite%2Fai-picture-diary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34927675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-ops","aiops","container","docker","generative-ai","huggingface","image","image-ai","llama","llm","llms","local-llm","local-vlm","natural-language-processing","picture-diary","postgresql","python","react","vlm","vlms"],"created_at":"2026-06-29T12:32:10.526Z","updated_at":"2026-06-29T12:32:12.197Z","avatar_url":"https://github.com/europanite.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [ai-picture-diary](https://github.com/europanite/ai-picture-diary \"ai-picture-diary\")\n\n[![Feed](https://github.com/europanite/ai-picture-diary/actions/workflows/feed.yml/badge.svg)](https://github.com/europanite/ai-picture-diary/actions/workflows/feed.yml)\n\nAn automated picture diary driven by the local LLM and VLM.\n\n---\nThe project combines:\n\n- a FastAPI backend for authentication, RAG, and text generation APIs\n- PostgreSQL for application data\n- ChromaDB-backed retrieval for local JSON documents\n- Ollama or OpenAI-compatible models for generation and embedding\n- an Expo / React Native frontend that can be exported for the web\n- an illustration worker that generates images for feed entries\n- GitHub Actions workflows for feed generation and GitHub Pages deployment\n\n---\n\n## Main services\n\n| Service | Purpose | Default ports |\n| --- | --- | --- |\n| `db` | PostgreSQL 16 database | `5432` |\n| `ollama` | Local LLM / embedding model server | `11434` |\n| `backend` | FastAPI API server | `8000` |\n| `frontend` | Expo development server | `19000`, `19001`, `19002`, `8081` |\n| `illustrate` | One-shot image generation worker | none |\n| `llm_finetune` | Optional LoRA fine-tuning service | none |\n| `ollama_import` | Optional Ollama adapter import service | none |\n\n## Requirements\n\n- Docker\n- Docker Compose v2\n- Git\n- Ollama models\n- ChromaDB\n- Optional: an OpenAI API key when using the OpenAI provider\n- Optional: Hugging Face access/cache settings when using model or LoRA assets that require them\n\n## Local development\n\nStart the main stack:\n\n```bash\ndocker compose --env-file .env up --build db ollama backend frontend\n```\n\nCheck backend health:\n\n```bash\ncurl http://localhost:8000/health\n```\n\nOpen the FastAPI docs:\n\n```text\nhttp://localhost:8000/docs\n```\n\nThe frontend container runs Expo. Use the URL printed in the `frontend` logs. Metro and Expo development ports are exposed by Compose.\n\n```bash\ndocker compose logs -f frontend\n```\n\nStop the stack:\n\n```bash\ndocker compose down\n```\n\nRemove local database and model volumes only when you intentionally want a clean reset:\n\n```bash\ndocker compose down -v\n```\n\n## Backend API\n\nThe FastAPI app mounts three router groups.\n\n### Health\n\n```bash\ncurl http://localhost:8000/health\n```\n\n### Authentication\n\n```text\nPOST /auth/signup\nPOST /auth/signin\nGET  /auth/me\n```\n\n### RAG\n\n```text\nGET  /rag/status\nPOST /rag/reindex\nPOST /rag/ingest\nPOST /rag/query\n```\n\nExample:\n\n```bash\ncurl -X POST http://localhost:8000/rag/query \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"question\": \"What should be introduced today?\",\n    \"top_k\": 5,\n    \"include_debug\": true\n  }'\n```\n\n### Sentence generation\n\n```text\nGET  /diary/health\nPOST /diary/generate\n```\n\nExample:\n\n```bash\ncurl -X POST http://localhost:8000/diary/generate \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"topic\": \"diary\",\n    \"max_retries\": 3,\n    \"temperature\": 0.9\n  }'\n```\n\n## RAG data\n\nThe backend reads JSON documents from `DOCS_DIR`, which is mounted from `./data/json` in Docker Compose.\n\nTo rebuild the ChromaDB index from local JSON files:\n\n```bash\ncurl -X POST http://localhost:8000/rag/reindex\n```\n\nTo check the current index status:\n\n```bash\ncurl http://localhost:8000/rag/status\n```\n\nThe persisted ChromaDB directory is mounted through `./chroma_db` and `CHROMA_DB_DIR`.\n\n## Feed generation\n\nThe feed assets are stored under `frontend/app/public`.\n\nImportant paths:\n\n```text\nfrontend/app/public/latest.json\nfrontend/app/public/feed/\nfrontend/app/public/snapshot/\nfrontend/app/public/posts/\nfrontend/app/public/image/\n```\n\nGenerate a sentence with the local script through the backend environment:\n\n```bash\ndocker compose run --rm backend python /scripts/generate_sentence.py\n```\n\n## Illustration generation\n\nThe `illustrate` service reads the latest feed entry and writes/patches image references.\n\nRun it after `frontend/app/public/latest.json` exists:\n\n```bash\ndocker compose run --rm illustrate\n```\n\nRebuild the feed index and post pages after modifying public feed assets:\n\n```bash\ndocker compose run --rm illustrate \\\n  python scripts/build_feed_pages.py \\\n  --public-dir frontend/app/public \\\n  --base-url .\n```\n\n## GitHub Actions\n\nThe repository includes workflows for automated feed generation and deployment.\n\n| Workflow | Purpose |\n| --- | --- |\n| `feed.yml` | Scheduled/manual entry point for feed generation |\n| `feed_slot_event.yml` | Event feed wrapper |\n| `event_core.yml` | Generates an event payload, fixes it into public feed state, illustrates it, and triggers Pages |\n| `fixed_entry.yml` | Writes a fixed entry JSON into public feed assets |\n| `feed_core.yml` | RAG-driven feed generation pipeline |\n| `ingest.yml` | Restores/builds ChromaDB data from Google Drive, S3, or local source |\n| `pages.yml` | Exports the Expo web app and deploys to GitHub Pages |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuropanite%2Fai-picture-diary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feuropanite%2Fai-picture-diary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuropanite%2Fai-picture-diary/lists"}