Skip to content

feat: Complete Django-to-Kotlin port of BrightBean Studio#63

Open
rygel wants to merge 98 commits into
brightbeanxyz:mainfrom
rygel:feat/django-to-kotlin-port
Open

feat: Complete Django-to-Kotlin port of BrightBean Studio#63
rygel wants to merge 98 commits into
brightbeanxyz:mainfrom
rygel:feat/django-to-kotlin-port

Conversation

@rygel

@rygel rygel commented Jun 9, 2026

Copy link
Copy Markdown

Full port of BrightBean Studio Django app to Kotlin. 416 files, 342 tests, 13 phases. See commit history for details.

Alexander Brandt added 30 commits April 14, 2026 13:31
- Add outerstellar-bom to root POM dependencyManagement
- Add outerstellar-framework to studio-infrastructure
- Add outerstellar-platform to studio-domain
- Add outerstellar-platform-private to studio-application
- Add fragments4k to studio-web
- Add PostgreSQL driver (runtime scope) to studio-infrastructure
- Add GitHub packages repository for Outerstellar artifacts
- Add Workspace and WorkspaceSettings data classes
- Add Organization data class
- Add MemberRole enum and Member data class
- Add WorkspaceTest verifying default workspace settings
- Fix Maven configuration for Kotlin source directories
- Add PlatformType enum with all supported social platforms
- Add Credential data class for OAuth tokens storage
- Add SocialAccount data class for connected platform accounts
- Add CredentialTest with encrypted token verification
- NotificationType enum with 8 notification types
- Notification data class with id, workspaceId, userId, type, title, message, metadata, isRead, createdAt
- InboxItemType enum: COMMENT, MESSAGE, MENTION, SHARE
- Sentiment enum: POSITIVE, NEUTRAL, NEGATIVE
- InboxItem data class with full domain model
- InboxItemTest with tests for platform and read status filtering
- Add JDBI 3 dependencies (core, postgres, sqlobject, kotlin, kotlin-sqlobject)
- Create WorkspaceDao, OrganizationDao, MemberDao, CredentialDao, SocialAccountDao, PostDao
- Create WorkspaceRepository interface in domain module
- Create JDBIWorkspaceRepository implementation with Kotlin mapper support
- Add WorkspaceRepositoryTest with H2 in-memory database
- Add jackson-module-kotlin for JSON serialization of WorkspaceSettings
…lMediaStorage, S3MediaStorage stubs, MediaItemDao, and tests
…tests

- Create MemberRepository interface in studio-domain
- Create CreateWorkspaceUseCase that creates Workspace with default settings and owner Member
- Create InviteMemberUseCase that creates Member and sends notification
- Create NotificationService stub interface
- Add JUnit 5 test dependencies and build configuration to studio-application
- Add WorkspaceUseCasesTest with in-memory repository implementations
- Comment out outerstellar dependency for testing (matching studio-infrastructure)
- Create PostRepository, ApprovalRequestRepository, PublishingQueueRepository,
  SocialAccountRepository, CredentialRepository, PlatformPostRepository interfaces
- Create CreatePostUseCase: creates Post with DRAFT, SCHEDULED, or PENDING_APPROVAL status
- Create PublishPostUseCase: orchestrates publishing via provider registry
- Create SchedulePostUseCase: creates PublishingQueue entry for scheduled posts
- Create ApprovePostUseCase: handles approval/rejection of posts
- Add studio-infrastructure dependency to studio-application pom
- Write PublishPostUseCaseTest with 4 tests
- Add BrightBeanServer with ServerConfig (host, port, corsOrigins)
- Add HealthRoutes with /health endpoint returning status UP
- Add Middleware object with defaultCorsOrigins()
- Add ServerTest with tests for config and health handler
- Use Java's built-in HttpServer to avoid dependency issues
- Comment out fragments4k dependency (Outerstellar unavailable)
…accounts

- Add DTOs for API requests and responses (CreatePostRequest, SchedulePostRequest, PostResponse, etc.)
- Implement PostApi with endpoints:
  - GET /api/workspaces/{workspaceId}/posts - list posts with pagination and status filter
  - POST /api/workspaces/{workspaceId}/posts - create new post
  - POST /api/posts/{postId}/publish - publish a post
  - POST /api/posts/{postId}/schedule - schedule a post
- Add WorkspaceApi stub with GET /api/workspaces/{workspaceId}
- Add SocialAccountApi stub with connect/disconnect functionality
- Add Gson dependency for JSON serialization
- Add mockito dependencies for testing
- Create PostApiTest with tests for list posts and unknown path
- Add InboxRepository interface in studio-domain
- Add InboxSyncWorker with syncAllAccounts and syncAccount methods
- Add InboxSyncWorkerTest with tests for syncing all accounts and individual account sync
- Worker fetches inbox items via ProviderRegistry and saves to InboxRepository
- Updates lastSyncAt on social accounts after sync
rygel added 29 commits June 9, 2026 08:53
Phases 9B-9E of Django-to-Kotlin port:

9B - Inbox Enhancement:
- Replace InboxItem with InboxMessage (richer domain model)
- Add InboxReply, InternalNote, SavedReply, InboxSLAConfig
- New repositories, DAOs, JDBI implementations
- InboxUseCases with full CRUD + bulk operations
- InboxApi with REST endpoints under /api/workspaces/{id}/inbox/
- Update InboxSyncWorker to map InboxItem -> InboxMessage

9C - Approvals Enhancement:
- Add ApprovalAction, PostComment, ApprovalReminder models
- ApprovalUseCases with submit/approve/reject/resubmit/bulk ops
- CommentUseCases for post comments
- ApprovalApi with REST endpoints

9D - Notifications Engine:
- Replace Notification/NotificationType with new models
- Add EventType enum (17 event types), NotificationChannel, DeliveryStatus
- Add NotificationPreference, NotificationDelivery, QuietHours
- NotificationEngine creates notifications + resolves channels + deliveries
- NotificationUseCases for reading/marking/preferences/quiet hours
- NotificationApi under /api/notifications/

9E - Settings Manager:
- Add OrgSetting, WorkspaceSetting models
- SettingsUseCases with get/set for org and workspace settings
- SettingsApi under /api/orgs/{id}/settings/ and /api/workspaces/{id}/settings/

Infrastructure:
- Flyway V7 migration for all new tables
- Delete old InboxItemDao, JDBIInboxRepository, NotificationService
- Update DI modules (InfrastructureModule, ApplicationModule, WebModule)
- Update ApiDispatcher and BrightBeanServer

Tests: 316 passing (32 new), 0 failures
@rygel rygel requested a review from JanSchm as a code owner June 9, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant