# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Timeful
spec:
    description: Self-hosted Timeful — a free group scheduling platform with availability polls and calendar integration.
    coverImage: https://raw.githubusercontent.com/schej-it/timeful.app/main/.github/assets/images/hero.jpg
    icon: https://timeful.app/favicon.ico
    variables:
        - key: BASE_DOMAIN
          type: DOMAIN
          name: Domain
          description: The domain to bind to your Timeful instance.
    tags:
        - Tool
        - Scheduling
        - Productivity
        - Collaboration
    readme: |-
        # Timeful

        [Timeful](https://timeful.app) is a free, open-source group scheduling platform that helps you find the best time for a group to meet. It provides an easy-to-use availability poll that integrates with Google Calendar, Outlook, and Apple Calendar.

        ## Features

        - See when everybody's availability overlaps
        - Specify date + time ranges to meet between
        - Google Calendar, Outlook, and Apple Calendar integration (requires Google OAuth, see below)
        - "Available" vs. "If needed" times
        - Determine when a subset of people are available
        - Schedule across different time zones
        - Duplicate polls
        - Availability groups — real-time calendar availability
        - Export availability as CSV
        - Restrict responses to event creator only

        ## What works out of the box

        With only the required variables set, **anyone with a poll link can respond anonymously** — no account or login needed. This is the primary use case for Timeful and works immediately after deploy.

        ## Further Configuration

        For account creation, Google / Microsoft calendar integration, Email OTP login, payments, and other optional configuration, refer to the official deployment guide: [DEPLOYMENT.md](https://github.com/schej-it/timeful.app/blob/main/DEPLOYMENT.md).

        Add any additional environment variables in the Zeabur dashboard under the **Timeful** service.

        ## Links

        - [GitHub](https://github.com/schej-it/timeful.app)
        - [Deployment Guide](https://github.com/schej-it/timeful.app/blob/main/DEPLOYMENT.md)
    services:
        - name: MongoDB
          icon: https://raw.githubusercontent.com/zeabur/service-icons/main/marketplace/mongodb.svg
          template: PREBUILT_V2
          spec:
            id: mongodb
            source:
                image: mongo:7
            ports:
                - id: database
                  port: 27017
                  type: TCP
            volumes:
                - id: data
                  dir: /data/db
            env:
                MONGO_HOST:
                    default: ${CONTAINER_HOSTNAME}
                    expose: true
                MONGO_INITDB_ROOT_PASSWORD:
                    default: ${PASSWORD}
                    expose: true
                MONGO_INITDB_ROOT_USERNAME:
                    default: timeful
                    expose: true
                MONGO_PORT:
                    default: ${DATABASE_PORT}
                    expose: true
            healthCheck:
                type: TCP
                port: database
        - name: Timeful
          icon: https://timeful.app/favicon.ico
          template: GIT
          spec:
            id: timeful
            source:
                source: GITHUB
                repo: 489849974
                branch: main
                dockerfile: |
                    FROM node:18-alpine AS frontend-builder
                    WORKDIR /app
                    COPY frontend/package*.json ./
                    RUN npm ci
                    COPY frontend/ .
                    RUN npm run build

                    FROM golang:1.22-alpine AS server-builder
                    WORKDIR /app
                    COPY server/go.mod server/go.sum ./
                    RUN go mod download
                    COPY server/ .
                    RUN CGO_ENABLED=0 go build -buildvcs=false -o timeful .

                    FROM alpine:3.23
                    RUN apk add --no-cache ca-certificates tzdata
                    RUN addgroup -S appgroup && adduser -S appuser -G appgroup
                    WORKDIR /app
                    COPY --from=server-builder /app/timeful ./timeful
                    COPY --from=frontend-builder /app/dist ./frontend/dist
                    USER appuser
                    EXPOSE 3002
                    CMD ["./timeful", "-release=true"]
            ports:
                - id: web
                  port: 3002
                  type: HTTP
            env:
                CORS_ORIGINS:
                    default: https://${BASE_DOMAIN}
                ENCRYPTION_KEY:
                    default: ${PASSWORD}
                MONGODB_URI:
                    default: mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@${MONGO_HOST}:${MONGO_PORT}
                SESSION_SECRET:
                    default: ${PASSWORD}${PASSWORD}
          domainKey: BASE_DOMAIN
localization:
    zh-CN:
        description: 自托管版 Timeful — 免费的群组时间排程平台，提供可用时间投票与日历集成。
        variables:
            - key: BASE_DOMAIN
              type: DOMAIN
              name: 域名
              description: 想要绑定到 Timeful 的域名。
        readme: |-
            # Timeful

            [Timeful](https://timeful.app) 是一个免费的开源群组时间排程平台，帮助你找到最适合所有人的会面时间。它提供简单易用的可用时间投票，并支持 Google 日历、Outlook 及 Apple 日历集成。

            ## 功能特色

            - 查看所有人的空闲时间交集
            - 指定可选择的日期与时间范围
            - 集成 Google 日历、Outlook 及 Apple 日历（需设置 Google OAuth，见下方）
            - 支持「有空」与「勉强可以」两种状态
            - 筛选特定子群组的可用时间
            - 跨时区排程支持
            - 复制投票功能
            - 可用时间群组 — 实时显示成员日历可用状况
            - 导出 CSV 格式
            - 可限制只有活动创建者才能查看回复

            ## 开箱即用的功能

            只设置必填变量的情况下，**任何人都可以通过投票链接匿名回复**，不需要创建账号或登录。这也是 Timeful 最常见的使用方式，部署完即可使用。

            ## 进阶设置

            若需要创建账号、Google / Microsoft 日历集成、Email OTP 登录、付费功能等其他可选设置，请参考官方部署文档：[DEPLOYMENT.md](https://github.com/schej-it/timeful.app/blob/main/DEPLOYMENT.md)。

            其他环境变量可在 Zeabur 仪表板的 **Timeful** 服务中添加。

            ## 相关链接

            - [GitHub](https://github.com/schej-it/timeful.app)
            - [部署文档](https://github.com/schej-it/timeful.app/blob/main/DEPLOYMENT.md)
    zh-TW:
        description: 自架版 Timeful — 免費的群組時間排程平台，提供可用時間投票與日曆整合。
        variables:
            - key: BASE_DOMAIN
              type: DOMAIN
              name: 網域
              description: 想要綁定在 Timeful 上的網域。
        readme: |-
            # Timeful

            [Timeful](https://timeful.app) 是一個免費的開源群組時間排程平台，幫助你找到最適合所有人的會面時間。它提供簡單易用的可用時間投票，並支援 Google 日曆、Outlook 及 Apple 日曆整合。

            ## 功能特色

            - 查看所有人的空閒時間交集
            - 指定可選擇的日期與時間範圍
            - 整合 Google 日曆、Outlook 及 Apple 日曆（需設定 Google OAuth，見下方）
            - 支援「有空」與「勉強可以」兩種狀態
            - 篩選特定子群組的可用時間
            - 跨時區排程支援
            - 複製投票功能
            - 可用時間群組 — 即時顯示成員日曆可用狀況
            - 匯出 CSV 格式
            - 可限制只有活動建立者才能查看回覆

            ## 開箱即用的功能

            只設定必填變數的情況下，**任何人都可以透過投票連結匿名回覆**，不需要建立帳號或登入。這也是 Timeful 最常見的使用方式，部署完即可使用。

            ## 進階設定

            若需要建立帳號、Google / Microsoft 日曆整合、Email OTP 登入、付費功能等其他選用設定，請參考官方部署文件：[DEPLOYMENT.md](https://github.com/schej-it/timeful.app/blob/main/DEPLOYMENT.md)。

            其他環境變數可在 Zeabur 儀表板的 **Timeful** 服務中加入。

            ## 相關連結

            - [GitHub](https://github.com/schej-it/timeful.app)
            - [部署文件](https://github.com/schej-it/timeful.app/blob/main/DEPLOYMENT.md)
