{"id":25480068,"url":"https://github.com/mathis-lambert/personal_website","last_synced_at":"2026-04-11T03:06:16.762Z","repository":{"id":278150871,"uuid":"934678077","full_name":"mathis-lambert/personal_website","owner":"mathis-lambert","description":"This repository hosts my personal website project, launched in February 2025. It features LLM Chat, RAG, a RESTful API with FastAPI, and a React frontend using ViteJS, Redux, and Chakra UI. Data is managed with MongoDB. Explore and contribute!","archived":false,"fork":false,"pushed_at":"2025-02-18T08:57:56.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T09:31:49.665Z","etag":null,"topics":["llm","mongodb","rag","react"],"latest_commit_sha":null,"homepage":"https://mathislambert.fr","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathis-lambert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-18T08:25:22.000Z","updated_at":"2025-02-18T08:57:59.000Z","dependencies_parsed_at":"2025-02-18T09:32:15.075Z","dependency_job_id":"a1d9e60f-e547-4e32-8b41-2b41bd3b34ba","html_url":"https://github.com/mathis-lambert/personal_website","commit_stats":null,"previous_names":["mathis-lambert/personal_website"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathis-lambert%2Fpersonal_website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathis-lambert%2Fpersonal_website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathis-lambert%2Fpersonal_website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathis-lambert%2Fpersonal_website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathis-lambert","download_url":"https://codeload.github.com/mathis-lambert/personal_website/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239495767,"owners_count":19648371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["llm","mongodb","rag","react"],"created_at":"2025-02-18T15:27:16.156Z","updated_at":"2026-04-11T03:06:16.751Z","avatar_url":"https://github.com/mathis-lambert.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Personal Website\n\nNext.js (App Router) app that powers mathislambert.fr. The site, API routes (chat proxy, resume export, admin analytics), and Mongo-backed content all live in this single service, packaged for Docker and deployed behind Traefik.\n\n## Features\n\n- Public pages for projects, articles, experiences, studies, and a downloadable resume.\n- Chat assistant UI that calls `/api/agent`, proxying to `ML_API_BASE_URL` with SSE.\n- Mandatory API analytics wrapper (`withApiAnalytics`) on all API routes except `/api/health` and NextAuth, with redacted structured logs in MongoDB.\n- Dedicated chat transcript observability for `/api/agent` with a turns-only source (`chat_conversation_turns`) and conversation summaries aggregated at read time (redacted input/output).\n- Credentials-protected admin area at `/admin` with granular observability (overview, timeseries, endpoint latency, error stream, activity feed).\n- Discussion explorer at `/admin/discussions` for transcript-level inspection and moderation.\n- UI analytics ingestion endpoint at `/api/analytics/track` (page views + key interactions).\n- Resume export at `/api/resume/export`; `/api/health` pings Mongo connectivity.\n- Tailwind v4 + Radix UI + framer-motion components, with Google Maps embed gated by `NEXT_PUBLIC_MAPS_PUBLIC_KEY`.\n\n## Stack and layout\n\n- Next.js 16 / React 19 / TypeScript with standalone output.\n- MongoDB for content, analytics logs (`api_request_logs`, `ui_events`), and chat transcript monitoring (`chat_conversation_turns`).\n- Docker multi-stage build (`Dockerfile`) producing a single runtime image.\n- Compose files: `development/docker-compose.yml` (local dev with Mongo), `compose.dev.yaml` (local prod build), `compose.prod.yaml` (server deploy with Traefik labels).\n- GitHub Actions `.github/workflows/cd.yaml` builds/pushes `ghcr.io/\u003cowner\u003e/personal-website` on tags and redeploys to the Raspberry Pi host.\n\n## Environment\n\n- Copy `.env.example` to `.env` for local/dev/prod compose and local Node runs.\n- Set `NEXT_PUBLIC_MAPS_PUBLIC_KEY`, `NEXT_PUBLIC_APP_VERSION`, and `NEXT_PUBLIC_MAINTENANCE_MODE` before building images (they are baked into the client).\n- Provide runtime secrets: `PUBLIC_BASE_URL`, `ML_API_BASE_URL`, `ML_API_KEY`, `LLM_MODEL_NAME`, `ML_API_VECTOR_STORE_ID`, `NEXTAUTH_SECRET`, `ADMIN_USERNAME`/`ADMIN_PASSWORD` (or `INTERNAL_API_*`), `MONGODB_URI`/`MONGODB_DB`, and `ANALYTICS_HASH_SALT`.\n- Optional retention tuning: `ANALYTICS_LOG_RETENTION_DAYS`, `CHAT_LOG_RETENTION_DAYS`.\n- Optional transcript truncation tuning: `CHAT_LOG_MAX_TEXT_CHARS`.\n- `NEXTAUTH_URL` should point at the external URL in production when using NextAuth callbacks.\n\n## Run locally\n\n- Node: `cd src \u0026\u0026 npm ci \u0026\u0026 npm run dev` (expects Mongo reachable at `MONGODB_URI`, defaults to `mongodb://localhost:27017/personal_website`).\n- Route instrumentation check: `cd src \u0026\u0026 npm run check:api-analytics`.\n- Docker with live reload + Mongo: `docker compose -f development/docker-compose.yml up --build` (bind-mounts `src/` into the dev container).\n- Prod-like image locally: `docker compose -f compose.dev.yaml up --build` (reads build args from `.env`).\n\n## Deploy\n\n- Runtime container listens on `3000`; Traefik labels and external networks are defined in `compose.prod.yaml`.\n- Tag a commit (`v*`) → GitHub Actions builds the arm64 image, pushes to GHCR, then SSH deploys via `docker compose -f compose.prod.yaml up -d` on the server with secrets/vars for all env values.\n- Manual deploy: set `OWNER` and `IMAGE_TAG`, export the needed env vars, then run `docker compose -f compose.prod.yaml up -d` on the host.\n\n## API surface\n\n- `GET /api/health` — database health check.\n- `POST /api/agent` — agentic Responses API proxy (SSE supported).\n- `GET /api/resume/export` — latest resume PDF export.\n- `POST /api/analytics/track` — ingest UI analytics events.\n- `/api/auth/[...nextauth]` — credentials login for `/admin`.\n- `/api/admin/*` — protected CRUD + analytics endpoints:\n- `/api/admin/analytics/overview`\n- `/api/admin/analytics/timeseries`\n- `/api/admin/analytics/endpoints`\n- `/api/admin/analytics/errors`\n- `/api/admin/analytics/activity`\n- `/api/admin/analytics/conversations`\n- `/api/admin/analytics/conversations/:conversationId`\n- `/api/admin/analytics/conversations/:conversationId/turns`\n\n## License\n\nMIT — see `LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathis-lambert%2Fpersonal_website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathis-lambert%2Fpersonal_website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathis-lambert%2Fpersonal_website/lists"}