{"id":27979350,"url":"https://github.com/teamuplabs/team-up-server","last_synced_at":"2025-07-26T17:09:33.141Z","repository":{"id":291898385,"uuid":"979146833","full_name":"TeamUpLabs/team-up-server","owner":"TeamUpLabs","description":"비대면 협업 플랫폼인 TeamUp의 서버","archived":false,"fork":false,"pushed_at":"2025-05-08T02:20:48.000Z","size":85,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-08T02:52:19.418Z","etag":null,"topics":["fastapi","jwt-authentication","python","server"],"latest_commit_sha":null,"homepage":"","language":"Python","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/TeamUpLabs.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,"zenodo":null}},"created_at":"2025-05-07T04:22:01.000Z","updated_at":"2025-05-08T01:33:53.000Z","dependencies_parsed_at":"2025-05-07T05:34:27.799Z","dependency_job_id":null,"html_url":"https://github.com/TeamUpLabs/team-up-server","commit_stats":null,"previous_names":["teamuplabs/team-up-server","lee-seokmin/team-up-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeamUpLabs%2Fteam-up-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeamUpLabs%2Fteam-up-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeamUpLabs%2Fteam-up-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeamUpLabs%2Fteam-up-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TeamUpLabs","download_url":"https://codeload.github.com/TeamUpLabs/team-up-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252989943,"owners_count":21836667,"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":["fastapi","jwt-authentication","python","server"],"created_at":"2025-05-08T02:52:22.282Z","updated_at":"2025-07-26T17:09:33.134Z","avatar_url":"https://github.com/TeamUpLabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Team-Up Server\n\n팀 프로젝트 관리를 위한 백엔드 서버입니다.\n\n## 목차\n- [설치](#설치)\n- [환경 변수 설정](#환경-변수-설정)\n- [Supabase 설정](#supabase-설정)\n- [개발 환경](#개발-환경)\n- [프로덕션 환경](#프로덕션-환경)\n- [API 문서](#api-문서)\n- [외부 접속 설정](#외부-접속-설정)\n\n## 설치\n\n### 요구사항\n- Python 3.8 이상\n- pip\n\n### 패키지 설치\n\n```bash\npip install -r requirements.txt\n```\n\n## 환경 변수 설정\n\n프로젝트 루트에 `.env` 파일을 생성하고 다음과 같이 설정합니다:\n\n```\nSECRET_KEY=your_secure_random_string_here\nACCESS_TOKEN_EXPIRE_MINUTES=30\n\n# Supabase 설정\nSUPABASE_URL=your_supabase_url\nSUPABASE_KEY=your_supabase_anon_key\nSUPABASE_SERVICE_KEY=your_supabase_service_role_key\n```\n\n### SECRET_KEY 생성 방법\n\n보안을 위해 안전한 랜덤 문자열을 SECRET_KEY로 사용해야 합니다. Python을 사용하여 안전한 키를 생성할 수 있습니다:\n\n```bash\npython -c \"import secrets; print(secrets.token_hex(32))\"\n```\n\n생성된 키를 복사하여 `.env` 파일의 SECRET_KEY 값으로 사용하세요.\n\n## Supabase 설정\n\n### Supabase란?\n\nSupabase는 Firebase의 오픈 소스 대안으로, PostgreSQL 데이터베이스를 기반으로 하는 백엔드 서비스입니다. 인증, 실시간 구독, 스토리지 등 다양한 기능을 제공합니다.\n\n### Supabase 프로젝트 생성 방법\n\n1. [Supabase 웹사이트](https://supabase.com/)에서 계정을 생성합니다.\n2. 새 프로젝트를 생성합니다.\n3. 프로젝트가 준비되면 설정에서 프로젝트 URL과 API 키를 확인할 수 있습니다.\n\n### 필요한 환경 변수\n\n`.env` 파일에 다음 Supabase 관련 변수를 추가하세요:\n\n- `SUPABASE_URL`: Supabase 프로젝트 URL (예: `https://xxxxxxxxxxxx.supabase.co`)\n- `SUPABASE_KEY`: Anon 키 (공개 키)\n- `SUPABASE_SERVICE_KEY`: Service Role 키 (비공개 키, 서버 측 작업용)\n- `POSTGRES_URL`: Supabase의 PostgreSQL 데이터베이스 URL (예: `postgresql://\u003cusername\u003e:\u003cpassword\u003e@\u003chost\u003e:\u003cport\u003e/\u003cdatabase\u003e`)\n\n### 데이터베이스 마이그레이션\n\n기존 데이터를 Supabase로 마이그레이션하려면:\n\n```bash\n# SQL 덤프 파일 생성 (기존 DB에서)\npg_dump -U username -d database_name \u003e dump.sql\n\n# SQL 파일 편집 (필요한 경우)\n# Supabase SQL 편집기에서 실행하거나 아래 명령어로 복원\npsql -h database.supabase.co -U postgres -d postgres -f dump.sql\n```\n\n### Supabase 클라이언트 사용 예시\n\n```python\nfrom supabase import create_client, Client\nimport os\nfrom dotenv import load_dotenv\n\nload_dotenv()\n\nsupabase: Client = create_client(\n    os.environ.get(\"SUPABASE_URL\"),\n    os.environ.get(\"SUPABASE_KEY\")\n)\n\n# 데이터 조회 예시\nresponse = supabase.table('projects').select('*').execute()\nprojects = response.data\n```\n\n## 개발 환경\n\n개발 환경에서 서버를 실행하는 방법:\n\n```bash\n# 데이터베이스 마이그레이션 (새로운 채널/채팅 기능 사용 시)\npython new_scripts/migrate_channel_chat.py\n\n# Uvicorn을 사용한 직접 실행 (자동 리로드)\nuvicorn new_main:app --reload --host 0.0.0.0 --port 8000\n\n# 또는 wsgi.py 사용\npython wsgi.py\n```\n\n## 프로덕션 환경\n\n프로덕션 환경에서 서버를 실행하는 방법:\n\n```bash\n# Gunicorn을 사용하여 WSGI 방식으로 실행\ngunicorn -c gunicorn_config.py wsgi:application\n```\n\n## API 문서\n\n서버 실행 후 다음 URL에서 API 문서를 확인할 수 있습니다:\n\n- Swagger UI: `http://서버주소:8000/docs`\n- ReDoc: `http://서버주소:8000/redoc`\n\n### 주요 API 엔드포인트\n\n#### 채널 관리\n- `POST /channels/` - 새 채널 생성\n- `GET /channels/{channel_id}` - 채널 정보 조회\n- `GET /channels/{channel_id}/with-members` - 채널 정보와 멤버 목록 조회\n- `GET /channels/project/{project_id}` - 프로젝트의 채널 목록 조회\n- `GET /channels/user/{user_id}` - 사용자가 참여 중인 채널 목록 조회\n- `PUT /channels/{channel_id}` - 채널 정보 업데이트\n- `POST /channels/{channel_id}/members` - 채널에 멤버 추가\n- `DELETE /channels/{channel_id}/members/{user_id}` - 채널에서 멤버 제거\n- `GET /channels/{channel_id}/members` - 채널의 멤버 목록 조회\n- `DELETE /channels/{channel_id}` - 채널 삭제\n\n#### 채팅 관리\n- `POST /chats/` - 새 채팅 메시지 생성\n- `GET /chats/{chat_id}` - 채팅 메시지 조회\n- `GET /chats/channel/{channel_id}` - 채널의 채팅 메시지 조회\n- `GET /chats/project/{project_id}` - 프로젝트의 모든 채팅 메시지 조회\n- `GET /chats/user/{user_id}` - 사용자가 작성한 채팅 메시지 조회\n- `POST /chats/channel/{channel_id}/search` - 채널에서 메시지 검색\n- `POST /chats/channel/{channel_id}/date-range` - 특정 기간의 채팅 메시지 조회\n- `PUT /chats/{chat_id}` - 채팅 메시지 수정\n- `DELETE /chats/{chat_id}` - 채팅 메시지 삭제\n\n## 외부 접속 설정\n\n### 방화벽 설정\n- 사용 중인 포트(기본: 8000)를 외부에서 접근 가능하도록 설정\n\n### 프록시 서버 설정 (권장)\n보안 및 성능 향상을 위해 Nginx와 같은 웹 서버를 프록시로 사용하는 것을 권장합니다.\n\n#### Nginx 설정 예시\n\n```nginx\nserver {\n    listen 80;\n    server_name your_domain.com;\n\n    location / {\n        proxy_pass http://localhost:8000;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n    }\n}\n```\n\n## 기여 방법\n\n1. 이 저장소를 포크합니다\n2. 새 기능 브랜치를 생성합니다 (`git checkout -b feature/amazing-feature`)\n3. 변경사항을 커밋합니다 (`git commit -m 'Add some amazing feature'`)\n4. 브랜치에 푸시합니다 (`git push origin feature/amazing-feature`)\n5. Pull Request를 생성합니다 \n\n## 📄 라이선스\n\n[MIT License](./LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteamuplabs%2Fteam-up-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteamuplabs%2Fteam-up-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteamuplabs%2Fteam-up-server/lists"}