{"id":21588795,"url":"https://github.com/jcserv/portfolio-api","last_synced_at":"2026-04-12T22:55:52.456Z","repository":{"id":263734943,"uuid":"883451866","full_name":"jcserv/portfolio-api","owner":"jcserv","description":"portfolio-api is a simple retrieval augmented generation API to allow users to ask questions about the content in a developer portfolio","archived":false,"fork":false,"pushed_at":"2024-11-17T22:06:16.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T16:12:12.382Z","etag":null,"topics":["api","go","openai","rag","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcserv.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":"2024-11-05T01:41:04.000Z","updated_at":"2024-11-17T22:08:06.000Z","dependencies_parsed_at":"2024-11-20T07:14:32.372Z","dependency_job_id":"eb3415e5-9884-44d5-b38e-493da353d5fa","html_url":"https://github.com/jcserv/portfolio-api","commit_stats":null,"previous_names":["jcserv/portfolio-api"],"tags_count":0,"template":false,"template_full_name":"jcserv/go-api-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcserv%2Fportfolio-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcserv%2Fportfolio-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcserv%2Fportfolio-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcserv%2Fportfolio-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcserv","download_url":"https://codeload.github.com/jcserv/portfolio-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244197651,"owners_count":20414437,"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":["api","go","openai","rag","sqlite"],"created_at":"2024-11-24T16:11:13.578Z","updated_at":"2026-04-12T22:55:47.412Z","avatar_url":"https://github.com/jcserv.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# portfolio-api\n\n![visitors](https://img.shields.io/endpoint?url=https://vu-mi.com/api/v1/views?id=jcserv/portfolio-api)\n\n`portfolio-api` is a retrieval augmented generation API to allow users to ask questions about the content in a developer portfolio.\n\nIntended to be integrated into a portfolio website.\n\n## how it works\n1. Opens `experience.json` and `projects.json` files to retrieve experiences and projects.\n2. Generates vector embeddings for each experience and project, stores them in a SQLite database.\n- Duplicates are ignored by checking the content hash\n3. User sends `POST /api/v1/ask` request with a question\n4. Calculates cosine similarity between the question and each embedding in the database\n- This is currently being done in the application layer, but should be done in the database layer if the db has a large amount of embeddings\n5. Top 3 most similar documents are used to generate a prompt for the LLM\n\n## installation\n\n### prerequisites\n- [Go](https://go.dev/doc/install)\n- [Docker](https://docs.docker.com/get-docker/)\n\n### local development\n\n1. Clone the repository\n2. Initialize .env file with the respective variables\n3. Run `source \u003c(make exportenv)`\n4. Run `make run/docker`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcserv%2Fportfolio-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcserv%2Fportfolio-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcserv%2Fportfolio-api/lists"}