SolidJSVite启动器

ktor-solidjs-template — SolidJS 启动器模板

作者 SakuraSedaia

Ktor/Kotlin 后端与 SolidJS 前端组合的全栈启动模板,由 Gradle 统一管理构建、测试与前端工具链。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

3 个预览视图
桌面端首页1 / 3
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 3

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-02查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

Ktor/Kotlin 后端提供 JSON API、集中异常处理与健康/就绪端点

02

SolidJS 单页应用带客户端路由,由 Vite 构建

03

Gradle 统一构建前后端,并将前端产物作为 Ktor 静态资源同源提供

04

Gradle 管理固定版本的 Node.js 与 pnpm,减少全局环境依赖

05

集成后端测试、前端测试、Oxlint 检查与 TypeScript 类型检查命令

模板详细介绍

这是一个可复用的全栈应用启动模板,后端使用 Ktor/Kotlin 提供 JSON API,前端使用 SolidJS 单页应用并带客户端路由。Gradle 同时构建两个模块,并把前端构建产物打包为 Ktor 的静态资源,使前端与 API 同源部署。仓库说明中标注该 GitHub 仓库为镜像,主要开发与发布流程托管在 GitLab。

后端包含静态内容、Status Pages 异常处理、KHealth 健康与就绪端点、Content Negotiation 以及 kotlinx.serialization JSON 序列化。前端使用 Vite 开发服务器,并把 /api 请求代理到本地 Ktor。Gradle 会下载固定版本的 Node.js 与 pnpm,因此合并构建不依赖全局安装。

项目要求 JDK 21,提供 Kotlin 集成测试、前端测试、Oxlint 检查与 TypeScript 类型检查等命令。模板本身不包含业务领域代码,使用前需要按 USAGE_INSTRUCTIONS 替换或调整前端框架与项目内容。

SolidJSVite启动器

适合你的项目吗?

适用场景

  • 需要 Kotlin 后端与 SolidJS 前端同源部署的全栈项目起步
  • 希望用 Gradle 统一驱动前后端构建、测试与依赖安装的团队
  • 需要健康检查与就绪端点作为部署基础设施的项目
  • 在本地开发时希望前端热更新并通过代理访问后端 API

适合人群

  • 熟悉 Kotlin 与 Gradle 的后端开发者
  • 使用 SolidJS 或愿意按模板说明替换前端框架的开发者
  • 需要可复现工具链版本的全栈项目
  • 以 MIT 许可使用并自行核对第三方素材的项目

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    需要 JDK 21,并在仓库根目录使用自带的 Gradle wrapper 执行命令

  2. 2

    运行 ./gradlew run 后访问 http://localhost:8080 查看打包后的应用

  3. 3

    前端热更新需分别启动 Ktor 与 Vite:在 src/main/solidjs 下执行 pnpm dev,访问 http://localhost:3000

  4. 4

    Vite 开发服务器将 /api 请求代理到 http://localhost:8080

  5. 5

    该 GitHub 仓库为镜像,主要仓库、发布与开发历史在 GitLab

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 85 / 100
技术栈
SolidJS · Vite
网站类型
启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-10-01
截图检查日期
2026-10-02

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 SolidJS。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: e58794e77fdb2a40e694194013cd2d6f8e5040f733412b4c27d0fd006e3109d9

2026-10-02T11:32:44.592Z

来源文件 / 仓库
# Ktor + SolidJS Template

> [!IMPORTANT]
> This repository is a GitHub mirror. The primary repository, release
> automation, and development history are hosted on
> [GitLab](https://gitlab.com/sedaia-designs/ktor-and-solidjs-template).

A reusable full-stack application starter with a Ktor/Kotlin backend and a
SolidJS 2 frontend. Gradle builds both modules and packages the frontend as
static resources served by Ktor.

To create a project from this template or replace the frontend framework, see
the [usage instructions](../USAGE_INSTRUCTIONS.md).

## Project Links

- [Source repository](https://gitlab.com/sedaia-designs/ktor-and-solidjs-template)
- [Work items](https://gitlab.com/sedaia-designs/ktor-and-solidjs-template/-/issues)
- [Releases](https://gitlab.com/sedaia-designs/ktor-and-solidjs-template/-/releases)

## Features

- Ktor Web API with JSON serialization and centralized error handling
- SolidJS 2 single-page application with client-side routing
- Same-origin API and frontend deployment
- Vite development server with an API proxy to Ktor
- Gradle-managed Node.js and pnpm versions
- Integrated backend tests, frontend tests, linting, and type checking
- Health and readiness endpoints

The backend includes these Ktor components:

| Component | Purpose |
| --- | --- |
| [Static Content](https://start.ktor.io/p/io.ktor/server-static-content) | Serves the built frontend |
| [Status Pages](https://start.ktor.io/p/io.ktor/server-status-pages) | Handles application exceptions |
| [KHealth](https://start.ktor.io/p/dev.hayden/server-khealth) | Provides health and readiness endpoints |
| [Content Negotiation](https://start.ktor.io/p/io.ktor/server-content-negotiation) | Converts request and response content |
| [kotlinx.serialization](https://start.ktor.io/p/io.ktor/server-kotlinx-serialization) | Serializes Kotlin objects as JSON |

## Requirements

- JDK 21

Use the included Gradle wrapper for all root project commands. Gradle downloads
the pinned Node.js and pnpm versions, so separate global installations are not
required for the combined build.

## Quick Start

Build and run the application from the repository root:

```shell
./gradlew run
```

Open <http://localhost:8080>.

## Development

For frontend hot reloading, run the backend and Vite development server in
separate terminals.

Start Ktor from the repository root:

```shell
./gradlew run
```

Start Vite from the frontend module:

```shell
cd src/main/solidjs
pnpm dev
```

Open <http://localhost:3000>. Vite proxies `/api` requests to Ktor at
<http://localhost:8080>.

## Common Commands

Run Gradle commands from the repository root:

| Command | Purpose |
| --- | --- |
| `./gradlew test` | Run Kotlin tests and all frontend verification checks |
| `./gradlew build` | Build the frontend and Ktor application |
| `./gradlew run` | Build the frontend and start Ktor |
| `./gradlew pnpmInstall` | Restore frontend dependencies from the lockfile |
| `./gradlew buildFrontend` | Build only the frontend |
| `./gradlew checkFrontend` | Run frontend tests, linting, and type checking |

Frontend commands can also be run directly from `src/main/solidjs`:

| Command | Purpose |
| --- | --- |
| `pnpm dev` | Start the Vite development server |
| `pnpm build` | Create the production frontend build |
| `pnpm test --run` | Run the frontend tests once |
| `pnpm lint` | Check the frontend with Oxlint |
| `pnpm exec tsc --noEmit` | Check TypeScript types |

## Project Layout

| Path | Purpose |
| --- | --- |
| `src/main/kotlin` | Ktor application, plugins, and API routes |
| `src/main/resources` | Ktor and logging configuration |
| `src/main/solidjs` | SolidJS frontend module |
| `src/main/solidjs/dist/client` | Generated production frontend files |
| `src/test/kotlin` | Ktor integration tests |

During the Gradle build, the generated files from `dist/client` are copied into
the Ktor resources. The packaged application therefore serves the frontend and
API from the same origin.

## Documentation

- [Template usage and customization](../USAGE_INSTRUCTIONS.md)
- [Ktor documentation](https://ktor.io/docs/home.html)
- [SolidJS 2 documentation](https://v2.solidjs.com/)
- [Kotlin community Slack](https://surveys.jetbrains.com/s3/kotlin-slack-sign-up)

## License

This project is available under the [MIT License](../LICENSE).
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。