{"id":49740290,"url":"https://github.com/beeefriends/beefriends-shared-kernel","last_synced_at":"2026-05-09T18:02:28.363Z","repository":{"id":353159169,"uuid":"1175893805","full_name":"BeeeFriends/BeeFriends-Shared-Kernel","owner":"BeeeFriends","description":"Shared Kernel Libary BeeFriends 📝","archived":false,"fork":false,"pushed_at":"2026-05-06T16:01:14.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-06T16:04:38.228Z","etag":null,"topics":["shared-kernel"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/BeeeFriends.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-08T10:26:53.000Z","updated_at":"2026-05-06T16:00:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/BeeeFriends/BeeFriends-Shared-Kernel","commit_stats":null,"previous_names":["beeefriends/beefriends-shared-kernel"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/BeeeFriends/BeeFriends-Shared-Kernel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeeeFriends%2FBeeFriends-Shared-Kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeeeFriends%2FBeeFriends-Shared-Kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeeeFriends%2FBeeFriends-Shared-Kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeeeFriends%2FBeeFriends-Shared-Kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BeeeFriends","download_url":"https://codeload.github.com/BeeeFriends/BeeFriends-Shared-Kernel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeeeFriends%2FBeeFriends-Shared-Kernel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32829581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["shared-kernel"],"created_at":"2026-05-09T18:02:27.231Z","updated_at":"2026-05-09T18:02:28.355Z","avatar_url":"https://github.com/BeeeFriends.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @beefriends/shared-kernel\n\nShared TypeScript types and endpoint constants for BeeFriends. The frontend should import API contracts from this package instead of copying backend DTO shapes by hand.\n\n## Installation\n\n```bash\nnpm install @beefriends/shared-kernel\n```\n\n## Usage\n\n```typescript\nimport {\n  AUTH_ENDPOINTS,\n  CAMPUS_ENDPOINTS,\n  HOBBY_ENDPOINTS,\n  MAJOR_ENDPOINTS,\n  USER_ENDPOINTS,\n} from '@beefriends/shared-kernel';\n\nimport type {\n  AuthResponseDto,\n  LoginDto,\n  RegisterDto,\n  UpdateUserDto,\n  UserProfileDto,\n} from '@beefriends/shared-kernel';\n\n// Backend Nest apps should import validation DTO classes from:\n// import { RegisterDto } from \"@beefriends/shared-kernel/dto\";\n\nconst registerPayload: RegisterDto = {\n  binusianEmail: 'adrian001@binus.ac.id',\n  password: 'password123',\n  phoneNumber: '+6281234567890',\n  displayName: 'Adrian',\n  binusianYear: 2024,\n  majorId: 1,\n  campusId: 1,\n  hobbyIds: [1, 2, 3],\n  description: 'Computer Science student who loves coffee.',\n};\n\nconst formData = new FormData();\nObject.entries(registerPayload).forEach(([key, value]) =\u003e {\n  formData.append(\n    key,\n    Array.isArray(value) ? JSON.stringify(value) : String(value),\n  );\n});\nformData.append('profilePhoto', profilePhotoFile);\ngalleryPhotoFiles.forEach((file) =\u003e formData.append('photos', file));\n\nawait fetch(AUTH_ENDPOINTS.REGISTER, { method: 'POST', body: formData });\n\nconst loginPayload: LoginDto = { idToken: 'firebase-id-token' };\nconst loginResponse: AuthResponseDto = await fetch(AUTH_ENDPOINTS.LOGIN, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify(loginPayload),\n}).then((response) =\u003e response.json());\n\nconst me: UserProfileDto = loginResponse.user;\n```\n\n## Endpoints\n\n| Constant           | Endpoints                                              |\n| ------------------ | ------------------------------------------------------ |\n| `AUTH_ENDPOINTS`   | `REGISTER`, `LOGIN`                                    |\n| `USER_ENDPOINTS`   | `ME`, `BY_ID(id)`                                      |\n| `CAMPUS_ENDPOINTS` | `LIST` (`/api/v1/user/campus`), `BY_ID(id)`, `CREATE`  |\n| `MAJOR_ENDPOINTS`  | `LIST` (`/api/v1/user/majors`), `BY_ID(id)`, `CREATE`  |\n| `HOBBY_ENDPOINTS`  | `LIST` (`/api/v1/user/hobbies`), `BY_ID(id)`, `CREATE` |\n\n## Types\n\n| Type              | Description                                                                                                                   |\n| ----------------- | ----------------------------------------------------------------------------------------------------------------------------- |\n| `RegisterDto`     | Text fields for multipart `POST /api/v1/auth/register`; attach `profilePhoto` and optional repeated `photos` files separately |\n| `LoginDto`        | `{ idToken }` from Firebase client sign-in                                                                                    |\n| `AuthResponseDto` | BeeFriends JWT and normalized user profile                                                                                    |\n| `UserProfileDto`  | Public user profile shape returned by auth/user endpoints                                                                     |\n| `UpdateUserDto`   | Partial profile fields for `PATCH /api/v1/users/me`                                                                           |\n| `CampusDto`       | Normalized campus shape inside profile responses                                                                              |\n| `MajorDto`        | Normalized major shape inside profile responses                                                                               |\n| `HobbyDto`        | Normalized hobby shape inside profile responses                                                                               |\n| `CreateCampusDto` | Payload for creating campus master data                                                                                       |\n| `CreateMajorDto`  | Payload for creating major master data                                                                                        |\n| `CreateHobbyDto`  | Payload for creating hobby master data                                                                                        |\n\n`DEPARTMENT_ENDPOINTS`, `DepartmentDto`, and `CreateDepartmentDto` are kept as compatibility aliases for older frontend code. Prefer the `Major` names for new code.\n\n## Nest DTO Classes\n\nBackend services can import decorator-backed DTO classes from the `dto` subpath:\n\n```typescript\nimport { LoginDto, RegisterDto } from '@beefriends/shared-kernel/dto';\n```\n\nThe root package stays frontend-safe and only exports plain types plus endpoint constants.\n\n## Versioning\n\n```bash\nnpm run release:patch\nnpm run release:minor\nnpm run release:major\n```\n\nPushing a tag triggers GitHub Actions to build and publish to npm automatically.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeefriends%2Fbeefriends-shared-kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeeefriends%2Fbeefriends-shared-kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeefriends%2Fbeefriends-shared-kernel/lists"}