Skip to content

Pastefy V8: Migrate to Kotlin+Spring Boot backend with improvements and fixes#125

Draft
JulianFun123 wants to merge 23 commits into
masterfrom
spring-boot-kotlin
Draft

Pastefy V8: Migrate to Kotlin+Spring Boot backend with improvements and fixes#125
JulianFun123 wants to merge 23 commits into
masterfrom
spring-boot-kotlin

Conversation

@JulianFun123

Copy link
Copy Markdown
Member

Pastefy V8 - Kotlin & Spring Boot

This pull request introduces several improvements to the development workflow and project structure, particularly for the backend written in Kotlin. The main changes include enhanced documentation for backend development, the addition of IDE and build tool configuration files, and improved .gitignore management. These updates make it easier for developers to set up, develop, and maintain the backend, especially when using IntelliJ IDEA and Gradle.

Development workflow and documentation:

  • The README.md has been updated to clarify backend development steps, including instructions for running the backend with IntelliJ, updated port references, and improved frontend/backend integration guidance. The outdated "Container-Less" section was removed, and tool recommendations were updated to IntelliJ IDEA and WebStorm. [1] [2]
  • A new backend-kt/README.md was added with instructions for accessing the local Starquery instance, including login credentials.

IDE and build tool configuration:

  • Added IntelliJ IDEA project configuration files, including Gradle, Kotlin, and VCS settings, to streamline project setup and ensure consistent development environments. [1] [2] [3] [4]
  • Added .gitignore files tailored for IntelliJ, Gradle, and other common tools, reducing the risk of committing IDE or build artifacts. [1] [2]

Database configuration and history:

  • Introduced IntelliJ database connection configurations for MySQL, Redis, and ClickHouse, along with their associated metadata and history files, to simplify database access during development. [1] [2] [3] [4] [5] [6] [7] [8]

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR advances Pastefy V8 by introducing a new Kotlin + Spring Boot backend (backend-kt) with supporting infrastructure (auth, SEO SSR, analytics, caching, migrations) and updates the Vue frontend + documentation to align with the new backend layout and endpoints.

Changes:

  • Add a Kotlin/Spring Boot backend with new controllers, services, entities, repositories, and configuration for OAuth2, SEO SSR, caching, analytics (ClickHouse), S3, Redis, and background jobs.
  • Update the frontend build output path and various UI/components to support new explore layouts, paste metrics, formatting helpers, and smaller highlighted previews.
  • Improve developer workflow/docs and add IDE/Gradle-related configuration and gitignore updates.

Reviewed changes

Copilot reviewed 188 out of 210 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
README.md Updates development instructions (ports, tooling, frontend workflow).
frontend/vite.config.ts Redirects Vite build output to the Kotlin backend static resources dir.
frontend/src/views/PublicUserView.vue Adjusts page size for public user pastes listing.
frontend/src/views/ExploreView.vue Tweaks explore page sections and increases list limits.
frontend/src/utils/format.ts Adds date/number formatting helpers for UI display.
frontend/src/types/paste.ts Extends paste type with view/comment/star counters.
frontend/src/stores/tags-store.ts Adds tag-fetch de-duping + bulk fetching helper.
frontend/src/components/SmallCardTag.vue New compact tag/pill component for small stats/labels.
frontend/src/components/paste/PasteCommentLinePreview.vue Uses smaller highlighted preview + copy button in comment preview.
frontend/src/components/lists/PasteList.vue Switches to a grid-based explore card layout.
frontend/src/components/Highlighted.vue Adds small prop and guards line counting for empty contents.
frontend/src/components/analytics/AnalyticsBreakdownCard.vue Minor formatting cleanup + adjusts flag icon sizing.
frontend/index.html Adds favicon/apple-touch/manifest links.
backend/src/main/java/de/interaapps/pastefy/model/database/Paste.java Minor whitespace change.
backend-kt/src/test/kotlin/de/interaapps/pastefy/service/SeoRendererTest.kt Adds unit test coverage for SEO renderer escaping/canonical URLs.
backend-kt/src/test/kotlin/de/interaapps/pastefy/service/query/LegacyPasteQueryParserTest.kt Adds tests for legacy query parsing behavior.
backend-kt/src/test/kotlin/de/interaapps/pastefy/service/PasteThumbnailServiceTest.kt Adds test ensuring thumbnail rendering handles XML-sensitive content.
backend-kt/src/test/kotlin/de/interaapps/pastefy/service/PasteCommentServiceTest.kt Adds validation tests for paste comments.
backend-kt/src/test/kotlin/de/interaapps/pastefy/service/InteraAppsExternalAccessServiceTest.kt Adds test for issuing external access tokens/scopes.
backend-kt/src/test/kotlin/de/interaapps/pastefy/service/FolderServiceTest.kt Adds test for folder listing access restrictions.
backend-kt/src/test/http/controller-parity.http Adds HTTP request collection for API parity checks.
backend-kt/src/main/resources/static/index.html Adds a packaged frontend index for serving/SSR integration.
backend-kt/src/main/resources/META-INF/spring.factories Registers an EnvironmentPostProcessor for AI env compatibility.
backend-kt/src/main/resources/db/README.md Documents migration ownership (Liquibase vs Flyway) and toggles.
backend-kt/src/main/resources/db/migration/clickhouse/V1__create_analytics_visits.sql Adds initial ClickHouse analytics visits table migration.
backend-kt/src/main/resources/db/changelog/db.changelog-master.yaml Adds Liquibase master changelog includes.
backend-kt/src/main/resources/db/changelog/002-json-transformations.yaml Adds Liquibase change for JSON column type conversion with precheck.
backend-kt/src/main/resources/application-local.properties Adds local profile defaults for docker-compose/dev services.
backend-kt/src/main/kotlin/de/interaapps/pastefy/util/StringUtil.kt Adds string shortening helper for previews.
backend-kt/src/main/kotlin/de/interaapps/pastefy/util/RandomStrings.kt Adds SecureRandom-based alphanumeric generator.
backend-kt/src/main/kotlin/de/interaapps/pastefy/service/TagListingService.kt Tag listing create/update + paste count refresh service.
backend-kt/src/main/kotlin/de/interaapps/pastefy/service/StatsService.kt Implements stats aggregation endpoint backing logic.
backend-kt/src/main/kotlin/de/interaapps/pastefy/service/SeoPasteListService.kt Provides curated public paste lists for SEO SSR pages.
backend-kt/src/main/kotlin/de/interaapps/pastefy/service/SeoPageCacheService.kt Adds bounded executor + caching + timeout budget for SSR.
backend-kt/src/main/kotlin/de/interaapps/pastefy/service/SeoHtmlCacheService.kt Adds cacheable SSR rendering helper.
backend-kt/src/main/kotlin/de/interaapps/pastefy/service/query/LegacyPasteQuery.kt Defines legacy query/filter/sort model types.
backend-kt/src/main/kotlin/de/interaapps/pastefy/service/PublicPasteEngagementService.kt Adds async engagement score updates + elastic updates.
backend-kt/src/main/kotlin/de/interaapps/pastefy/service/PasteThumbnailService.kt Adds SVG->PNG thumbnail rendering with escaping + font registration.
backend-kt/src/main/kotlin/de/interaapps/pastefy/service/PasteResponseMapper.kt Maps Paste entities to API responses incl. metrics/AI info.
backend-kt/src/main/kotlin/de/interaapps/pastefy/service/NotificationService.kt Adds notification list/read-all operations.
backend-kt/src/main/kotlin/de/interaapps/pastefy/service/InteraAppsExternalAccessService.kt Issues access tokens for InteraApps external access flow.
backend-kt/src/main/kotlin/de/interaapps/pastefy/service/FrontendIndexService.kt Loads/serves static frontend index with header/body injection.
backend-kt/src/main/kotlin/de/interaapps/pastefy/service/ExpiredPasteCleanupService.kt Adds scheduled cleanup for expired pastes.
backend-kt/src/main/kotlin/de/interaapps/pastefy/repositories/UserRepository.kt Adds JPA repository for users + auth lookup helpers.
backend-kt/src/main/kotlin/de/interaapps/pastefy/repositories/TagListingRepository.kt Adds JPA repository for tag listing queries.
backend-kt/src/main/kotlin/de/interaapps/pastefy/repositories/SharedPasteRepository.kt Adds repository for shared pastes.
backend-kt/src/main/kotlin/de/interaapps/pastefy/repositories/PublicPasteEngagementRepository.kt Adds engagement repo + native score increment query.
backend-kt/src/main/kotlin/de/interaapps/pastefy/repositories/PasteTagRepository.kt Adds paste-tag association repository.
backend-kt/src/main/kotlin/de/interaapps/pastefy/repositories/PasteStarRepository.kt Adds paste star repository + grouped counts projection.
backend-kt/src/main/kotlin/de/interaapps/pastefy/repositories/PasteRepository.kt Adds paste repo queries incl trending + elastic indexed flag update.
backend-kt/src/main/kotlin/de/interaapps/pastefy/repositories/PasteCommentRepository.kt Adds paste comment queries + grouped counts projection.
backend-kt/src/main/kotlin/de/interaapps/pastefy/repositories/PasteAIInfoRepository.kt Adds repository for AI metadata entity.
backend-kt/src/main/kotlin/de/interaapps/pastefy/repositories/NotificationRepository.kt Adds repository for notifications and filtered queries.
backend-kt/src/main/kotlin/de/interaapps/pastefy/repositories/FolderRepository.kt Adds folder repository queries.
backend-kt/src/main/kotlin/de/interaapps/pastefy/repositories/BackgroundJobRepository.kt Adds repo for leasing/claiming background jobs via skip locked.
backend-kt/src/main/kotlin/de/interaapps/pastefy/repositories/AuthKeyRepository.kt Adds auth key repository lookups/deletes.
backend-kt/src/main/kotlin/de/interaapps/pastefy/Main.kt Spring Boot application entrypoint + caching/scheduling/async enabled.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/s3/S3PasteService.kt Adds S3/minio storage for paste contents with reference encoding.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/s3/S3Configuration.kt Adds Minio client configuration + optional bucket creation.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/redis/PasteRedisCacheService.kt Adds Redis content cache and access-count tracking.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/jobs/BackgroundJobHandler.kt Defines background job handler interface.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/jobs/BackgroundJobConfiguration.kt Configures background job executor under AI-enabled condition.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/elastic/migrations/ElasticV1PasteIndexMigration.kt Adds Elasticsearch mapping/index migration v1.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/elastic/migrations/ElasticMigrationRunner.kt Runs elastic migrations on startup when enabled.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/elastic/migrations/ElasticMigration.kt Defines elastic migration API + elastic-safe name validation.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/elastic/ElasticsearchConfiguration.kt Adds API key header customizer for ES client.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/elastic/ElasticPasteDocument.kt Defines Elasticsearch paste/user documents + mapping hints.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/analytics/ClickHouseJdbcUrls.kt Normalizes clickhouse URLs into JDBC form.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/analytics/ClickHouseFlywayConfiguration.kt Adds Flyway migrations for ClickHouse with placeholders and validation.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/analytics/AnalyticsConfiguration.kt Adds ClickHouse JDBC template when analytics enabled.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/ai/PasteAI.kt Adds Spring AI integration for metadata extraction.
backend-kt/src/main/kotlin/de/interaapps/pastefy/infrastructure/ai/AiEnabledCondition.kt Adds condition to enable AI based on config/env.
backend-kt/src/main/kotlin/de/interaapps/pastefy/exceptions/HttpException.kt Adds typed HTTP exceptions with status codes.
backend-kt/src/main/kotlin/de/interaapps/pastefy/exceptions/ApiExceptionHandler.kt Adds global exception-to-response mapping.
backend-kt/src/main/kotlin/de/interaapps/pastefy/enums/StorageType.kt Defines storage types enum for Kotlin backend.
backend-kt/src/main/kotlin/de/interaapps/pastefy/enums/PasteVisibility.kt Defines paste visibility enum for Kotlin backend.
backend-kt/src/main/kotlin/de/interaapps/pastefy/enums/PasteType.kt Defines paste type enum for Kotlin backend.
backend-kt/src/main/kotlin/de/interaapps/pastefy/entities/User.kt Adds User JPA entity + provider/type enums.
backend-kt/src/main/kotlin/de/interaapps/pastefy/entities/TagListing.kt Adds tag listing entity + tag truncation hooks.
backend-kt/src/main/kotlin/de/interaapps/pastefy/entities/SharedPaste.kt Adds shared paste entity with indexes + timestamps.
backend-kt/src/main/kotlin/de/interaapps/pastefy/entities/PublicPasteEngagement.kt Adds engagement entity with score + timestamps.
backend-kt/src/main/kotlin/de/interaapps/pastefy/entities/PasteTag.kt Adds paste tag entity and indexes.
backend-kt/src/main/kotlin/de/interaapps/pastefy/entities/PasteStar.kt Adds paste star entity and indexes.
backend-kt/src/main/kotlin/de/interaapps/pastefy/entities/PasteComment.kt Adds paste comment entity incl. line ranges + indexes.
backend-kt/src/main/kotlin/de/interaapps/pastefy/entities/PasteAIInfo.kt Adds AI info entity + JSON converters for tags/warnings.
backend-kt/src/main/kotlin/de/interaapps/pastefy/entities/Notification.kt Adds notification entity with received/read state.
backend-kt/src/main/kotlin/de/interaapps/pastefy/entities/Folder.kt Adds folder entity with key + timestamps + indexes.
backend-kt/src/main/kotlin/de/interaapps/pastefy/entities/BackgroundJob.kt Adds background job entity for AI job queueing/leasing.
backend-kt/src/main/kotlin/de/interaapps/pastefy/entities/AuthKey.kt Adds auth key entity with scopes JSON converter + helpers.
backend-kt/src/main/kotlin/de/interaapps/pastefy/dto/user/UserDtos.kt Adds user/admin DTOs and edit request validation.
backend-kt/src/main/kotlin/de/interaapps/pastefy/dto/user/PublicUserDto.kt Adds public user DTO.
backend-kt/src/main/kotlin/de/interaapps/pastefy/dto/pastes/PasteResponse.kt Adds paste response DTO incl metrics + AI info.
backend-kt/src/main/kotlin/de/interaapps/pastefy/dto/pastes/PasteCommentDtos.kt Adds paste comment DTOs, markers, and AI response type.
backend-kt/src/main/kotlin/de/interaapps/pastefy/dto/pastes/EditPasteRequest.kt Adds paste edit request DTO.
backend-kt/src/main/kotlin/de/interaapps/pastefy/dto/pastes/CreatePasteResponse.kt Adds paste create response DTO.
backend-kt/src/main/kotlin/de/interaapps/pastefy/dto/pastes/CreatePasteRequest.kt Adds paste create request DTO with validation.
backend-kt/src/main/kotlin/de/interaapps/pastefy/dto/folder/FolderDtos.kt Adds folder DTOs and create request validation.
backend-kt/src/main/kotlin/de/interaapps/pastefy/dto/ExceptionResponse.kt Adds standard exception response payload.
backend-kt/src/main/kotlin/de/interaapps/pastefy/dto/auth/InteraAppsExternalAccessRequest.kt Adds request payload for external access issuance.
backend-kt/src/main/kotlin/de/interaapps/pastefy/dto/app/AppDtos.kt Adds app info + stats DTOs.
backend-kt/src/main/kotlin/de/interaapps/pastefy/dto/analytics/AnalyticsDtos.kt Adds analytics query/response DTOs and request parsing.
backend-kt/src/main/kotlin/de/interaapps/pastefy/dto/ActionResponse.kt Adds generic success response DTO.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/user/NotificationController.kt Adds notification endpoints (list/readall/add stub).
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/user/ApiKeyController.kt Adds API key create/list/delete endpoints.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/stats/StatsController.kt Adds stats endpoint with public/permission gating.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/seo/UserMetaSSRController.kt Adds SSR for user profile pages.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/seo/TagMetaSSRController.kt Adds SSR for tag pages.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/seo/HomeMetaSSRController.kt Adds SSR for home page with optional stats.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/seo/ExploreMetaSSRController.kt Adds SSR for explore page with tags + paste lists.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/public/TagsController.kt Adds public tag list/detail API with caching and filtering.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/public/PublicUserController.kt Adds public user lookup API.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/public/PublicPastesController.kt Adds public pastes endpoints (latest/trending/list).
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/pastes/PasteThumbnailController.kt Adds paste thumbnail PNG endpoint with rate limiting.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/pastes/PasteRawController.kt Adds raw paste endpoint + multi-paste part support + analytics/engagement.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/pastes/PasteCommentsController.kt Adds paste comments CRUD and marker endpoints.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/FrontendController.kt Adds fallback frontend serving on 404 for non-API routes.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/FormDataPasteController.kt Adds multipart upload endpoint for pastes/asciicasts.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/FolderController.kt Adds folder CRUD/list/detail endpoints.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/auth/OAuth2Controller.kt Adds OAuth2 redirect + callback handling with state cookie.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/auth/InteraAppsExternalAccessController.kt Adds InteraApps external access token issuance endpoint.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/AppController.kt Adds app info endpoint and caching.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/analytics/AnalyticsController.kt Adds analytics endpoints with permission gating.
backend-kt/src/main/kotlin/de/interaapps/pastefy/controller/admin/AdminController.kt Adds admin user listing/detail/edit/delete endpoints.
backend-kt/src/main/kotlin/de/interaapps/pastefy/config/WebConfiguration.kt Adds interceptor/arg resolver/CORS/static resource caching config.
backend-kt/src/main/kotlin/de/interaapps/pastefy/config/OpenApiConfiguration.kt Adds OpenAPI model resolver bean.
backend-kt/src/main/kotlin/de/interaapps/pastefy/config/HttpClientConfiguration.kt Adds OkHttp client bean with timeouts.
backend-kt/src/main/kotlin/de/interaapps/pastefy/config/CacheConfiguration.kt Adds Redis-or-Caffeine cache manager setup.
backend-kt/src/main/kotlin/de/interaapps/pastefy/config/AiEnvironmentPostProcessor.kt Adds env var compatibility for Spring AI model selection.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/RequestAuthAttributes.kt Defines request attribute keys for auth context.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/RequestAuth.kt Defines auth context payload (authKey + user).
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/ratelimit/InMemoryRateLimiter.kt Adds in-memory rate limiter with scheduled cleanup.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/oauth/providers/TwitchOAuth2Provider.kt Adds Twitch OAuth2 provider implementation.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/oauth/providers/OAuthProviderSupport.kt Adds shared OAuth2 URL/profile parsing helpers.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/oauth/providers/InteraAppsOAuth2Provider.kt Adds InteraApps OAuth2 provider implementation.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/oauth/providers/GoogleOAuth2Provider.kt Adds Google OAuth2 provider implementation.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/oauth/providers/GitHubOAuth2Provider.kt Adds GitHub OAuth2 provider implementation.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/oauth/providers/DiscordOAuth2Provider.kt Adds Discord OAuth2 provider implementation.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/oauth/providers/CustomOAuth2Provider.kt Adds generic OIDC OAuth2 provider implementation.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/oauth/OAuthStateService.kt Adds signed state creation/validation for OAuth2.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/oauth/OAuthHttpClient.kt Adds OkHttp-based OAuth2 HTTP client wrapper.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/oauth/OAuth2ProviderRegistry.kt Registers enabled OAuth2 providers based on configuration.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/oauth/OAuth2Provider.kt Defines OAuth2 provider interface.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/oauth/OAuth2Profile.kt Defines OAuth2 profile/token DTOs.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/oauth/OAuth2LoginService.kt Implements OAuth2 login -> user + auth key creation.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/AuthInterceptor.kt Adds annotation-driven auth/permission/rate-limit enforcement.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/AuthFilter.kt Adds header/basic/bearer auth key extraction and request auth wiring.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/AuthArgumentResolver.kt Resolves @CurrentUser/@CurrentAuthKey parameters from request context.
backend-kt/src/main/kotlin/de/interaapps/pastefy/auth/annotations/RouteAnnotations.kt Defines route/auth/permission/rate-limit annotations.
backend-kt/settings.gradle.kts Gradle settings + plugin management for Kotlin versioning.
backend-kt/README.md Adds backend-kt development notes (StarQuery access).
backend-kt/gradlew.bat Adds Windows Gradle wrapper script.
backend-kt/gradle/wrapper/gradle-wrapper.properties Adds Gradle wrapper distribution configuration.
backend-kt/gradle.properties Sets Kotlin code style to official.
backend-kt/development/starquery/starquery-meta.sqlite-wal Adds StarQuery local sqlite WAL artifact (dev metadata).
backend-kt/development/starquery/.gitignore Ignores StarQuery sqlite WAL/SHM artifacts.
backend-kt/build.gradle.kts Adds Kotlin/Spring Boot Gradle build with dependencies.
backend-kt/.idea/vcs.xml IntelliJ VCS mapping config.
backend-kt/.idea/misc.xml IntelliJ JDK/project settings.
backend-kt/.idea/kotlinc.xml IntelliJ Kotlin compiler version config.
backend-kt/.idea/gradle.xml IntelliJ Gradle project linkage config.
backend-kt/.idea/db-forest-config.xml IntelliJ DB tooling config.
backend-kt/.idea/dataSources/f90989bf-a7eb-4fb1-90d3-4e8a669d378d/storage_v2/src/schema/performance_schema.kIw0nw.meta IntelliJ datasource schema metadata.
backend-kt/.idea/dataSources/f90989bf-a7eb-4fb1-90d3-4e8a669d378d/storage_v2/src/schema/information_schema.FNRwLQ.meta IntelliJ datasource schema metadata.
backend-kt/.idea/dataSources/data_sources_history.xml IntelliJ datasource history metadata.
backend-kt/.idea/dataSources/c563d18b-01ac-45cd-aec1-2e7fe7a80fb9/storage_v2/src/schema/system.L3Icyw.meta IntelliJ datasource schema metadata.
backend-kt/.idea/dataSources/b37783b9-20c2-452a-8fe1-13f1a147f7ca.xml IntelliJ Redis datasource config metadata.
backend-kt/.idea/dataSources.xml IntelliJ datasource configuration.
backend-kt/.idea/dataSources.local.xml IntelliJ local datasource configuration metadata.
backend-kt/.idea/.gitignore IntelliJ project-local ignore list.
backend-kt/.gitignore Adds backend-kt-specific ignores for Gradle/IDE/build artifacts.
Files not reviewed (14)
  • backend-kt/.idea/.gitignore: Language not supported
  • backend-kt/.idea/dataSources.local.xml: Language not supported
  • backend-kt/.idea/dataSources.xml: Language not supported
  • backend-kt/.idea/dataSources/b37783b9-20c2-452a-8fe1-13f1a147f7ca.xml: Language not supported
  • backend-kt/.idea/dataSources/c563d18b-01ac-45cd-aec1-2e7fe7a80fb9/storage_v2/src/schema/system.L3Icyw.meta: Language not supported
  • backend-kt/.idea/dataSources/data_sources_history.xml: Language not supported
  • backend-kt/.idea/dataSources/f90989bf-a7eb-4fb1-90d3-4e8a669d378d.xml: Language not supported
  • backend-kt/.idea/dataSources/f90989bf-a7eb-4fb1-90d3-4e8a669d378d/storage_v2/src/schema/information_schema.FNRwLQ.meta: Language not supported
  • backend-kt/.idea/dataSources/f90989bf-a7eb-4fb1-90d3-4e8a669d378d/storage_v2/src/schema/performance_schema.kIw0nw.meta: Language not supported
  • backend-kt/.idea/db-forest-config.xml: Language not supported
  • backend-kt/.idea/gradle.xml: Language not supported
  • backend-kt/.idea/kotlinc.xml: Language not supported
  • backend-kt/.idea/misc.xml: Language not supported
  • backend-kt/.idea/vcs.xml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
# You might want to build the frontend
cd frontend
npm build prod
npm build
Comment thread backend-kt/README.md
Comment thread backend-kt/README.md


## Local Starquery
Your can either visit http://localhost:8081/ once the docker-compose is running or add the url as a server in the [StarQuery client](https://starquery.app/).
Comment on lines +1 to +4
pluginManagement {
plugins {
kotlin("jvm") version "2.0.21"
}
Comment on lines 11 to +20
const fetchIfNeeded = async (tag: string) => {
if (!tagsCache.value[tag])
if (fetching.value.includes(tag)) return

fetching.value.push(tag)

if (!tagsCache.value[tag]) {
tagsCache.value[tag] = (await client.get(`/api/v2/public/tags/${tag}`)).data as Tag
}
fetching.value.splice(fetching.value.indexOf(tag), 1)
}
Comment on lines +47 to +54
val host = request.getHeader("Host")
return if (asciicast) {
ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(
objectMapper.writeValueAsString(
mapOf(
"url" to "$host/${paste.key}",
"message" to "Created paste on https://$host/${paste.key}"
)
Comment on lines +18 to +21
@PostMapping
@RequiresPermission("notifications:create")
fun add(@CurrentUser user: User, @CurrentAuthKey authKey: AuthKey): ActionResponse = ActionResponse()

Comment on lines +35 to +37
@GetMapping("/readall")
@RequiresPermission("notifications:edit")
fun readAll(@CurrentUser user: User, @CurrentAuthKey authKey: AuthKey): ActionResponse {
Comment on lines +10 to +12
override fun postProcessEnvironment(environment: ConfigurableEnvironment, application: SpringApplication) {
if (environment.hasText("SPRING_AI_MODEL_CHAT")) return

Comment on lines +16 to +23
val provider = environment.getProperty("pastefy.ai.provider").orEmpty().lowercase()
return when (provider) {
"anthropic" -> environment.hasText("AI_ANTHROPIC_TOKEN") ||
environment.hasText("spring.ai.anthropic.api-key")
"google", "google-genai" -> environment.hasText("AI_GOOGLE_TOKEN") ||
environment.hasText("spring.ai.google.genai.api-key")
else -> environment.hasText("SPRING_AI_MODEL_CHAT")
}
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.

2 participants