{"id":28664148,"url":"https://github.com/eehwan/company-metadata-api","last_synced_at":"2025-07-29T12:12:24.623Z","repository":{"id":297289333,"uuid":"995915948","full_name":"eehwan/company-metadata-api","owner":"eehwan","description":"FastAPI-based rest API for multilingual company and tag search with PostgreSQL and Docker support","archived":false,"fork":false,"pushed_at":"2025-06-12T17:49:32.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-13T12:11:09.215Z","etag":null,"topics":["backend","docker","fastapi","multilingual-websites","postgresql","python","rest-api","sqlalchemy"],"latest_commit_sha":null,"homepage":"http://company.eehwan.duckdns.org/docs","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eehwan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-06-04T07:34:13.000Z","updated_at":"2025-06-12T17:49:36.000Z","dependencies_parsed_at":"2025-06-05T00:05:53.041Z","dependency_job_id":"40521bbf-3b06-4b3c-8616-78e5fe8893c1","html_url":"https://github.com/eehwan/company-metadata-api","commit_stats":null,"previous_names":["eehwan/company-metadata-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eehwan/company-metadata-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eehwan%2Fcompany-metadata-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eehwan%2Fcompany-metadata-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eehwan%2Fcompany-metadata-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eehwan%2Fcompany-metadata-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eehwan","download_url":"https://codeload.github.com/eehwan/company-metadata-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eehwan%2Fcompany-metadata-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267685052,"owners_count":24127704,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"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":["backend","docker","fastapi","multilingual-websites","postgresql","python","rest-api","sqlalchemy"],"created_at":"2025-06-13T12:10:00.949Z","updated_at":"2025-07-29T12:12:24.615Z","avatar_url":"https://github.com/eehwan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# company-metadata-api\n\n회사 메타데이터 관리 API 서버\n\n- [Git Repo](https://github.com/eehwan/company-metadata-api)\n- [Swagger UI](http://company.eehwan.duckdns.org/docs)\n- [ReDoc 문서](http://company.eehwan.duckdns.org/redoc)\n\n## 작업 요약\n요구사항을 기반으로 기업, 태그, 언어별 번역 정보를 분리하여 1차, 2차 정규화된 구조로 테이블을 설계했습니다.\n테이블 간 관계를 적절하게 설정하여 다국어 확장이 가능하도록 구성했습니다.\n\n검색 API에서는 회사 정보와 태그가 언어 우선순위로 정렬하여 사용자 언어에 맞는 결과가 노출되도록 처리했습니다.\n\n마이그레이션 및 더미 데이터 입력은 app/scripts/ 디렉토리 스크립트로 자동화하였고,\ntest_senior_app.py 기준으로 모든 테스트가 정상적으로 통과됩니다.\n\n\n## 1. 프로젝트 클론\n```bash\ngit clone https://github.com/eehwan/company-metadata-api.git\ncd company-metadata-api\n```\n\n## 2. .env 파일 생성 (필수)\n```bash\ncat \u003c\u003cEOF \u003e .env\nPOSTGRES_DB=your_db\nPOSTGRES_USER=your_user\nPOSTGRES_PASSWORD=your_password\nPOSTGRES_HOST=db\nPOSTGRES_PORT=5432\nEOF\n```\n\n## 3. Docker 커테이너 빌드 및 실행\n```bash\ndocker-compose build\ndocker-compose up -d\n```\n\n## 4. DB 초기화 및 데이터 삽입\n```bash\ndocker exec -it company_api bash\npython app/scripts/init_db.py\npython app/scripts/generate_seed_data.py\n```\n\n## [추가] 검색 성능 최적화 (자동완성 검색)\n\n회사명 자동완성 검색(`ILIKE '%query%'`)의 성능을 위해 PostgreSQL `pg_trgm` 확장과 GIN 인덱스를 추가\n\n```bash\ndocker exec -it company_postgress psql -U $POSTGRES_USER -d $POSTGRES_DB\n```\n\n```sql\nCREATE EXTENSION IF NOT EXISTS pg_trgm;\nCREATE INDEX idx_company_name_trgm ON company_names USING gin (name gin_trgm_ops);\n```\n\n## [테스트 방법]\n\n```bash\ndocker exec -it company_web bash\n\n# 디비가 세팅되어있지 않다면 테스트 전, 아래의 작업 필요!\npython app/scripts/init_db.py\npython app/scripts/generate_seed_data.py\n\n# pytest\npytest app/scripts/test_senior_app.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feehwan%2Fcompany-metadata-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feehwan%2Fcompany-metadata-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feehwan%2Fcompany-metadata-api/lists"}