snagtime README

The project's README from github.com/nateherkai/snagtime. As one markdown file: README.md.

SnagTime

Snag a time. Get booked.

A free, self-hostable scheduling app for availability, booking links, calendar sync, email notifications, and test payments.

What SnagTime does

SnagTime gives you the source code for your own scheduling system. You can run it locally for free, customize it, and host it on infrastructure you control.

Set it up with Codex or Claude Code

You can give an AI coding assistant this repository URL and have it handle the local installation while it pauses for the account steps only you can complete.

Open AI-assisted setup, copy the student prompt, and paste it into Codex or Claude Code with this repository link:

https://github.com/nateherkai/snagtime

The guide separates the credential-free local demo, optional integrations, and advanced public deployment so the assistant does not pull you into infrastructure work before the app runs locally.

Five-minute local setup

Requirements

1. Clone and enter the repository

git clone https://github.com/nateherkai/snagtime.git
cd snagtime

2. Generate your local configuration

npm run setup

The setup command creates an ignored .env.local, generates independent cryptographic secrets, and prints the local demo login once. You can provide your own organizer login instead:

npm run setup -- --email [email protected] --password "YourStrong!Password7"

3. Install, prepare the database, and start SnagTime

npm run demo:free

Open http://localhost:3000 and use the login printed by the setup command.

The credential-free local mode uses SQLite, a local calendar adapter, a local email inbox, and stub payments. It does not call Google or Stripe.

Connect your services

Copying the repository gives you all of the software. External integrations still belong to you and must be configured with your own accounts.

Capability What you provide Required for local demo?
Database Nothing for SQLite, PostgreSQL for production No
Public hosting HTTPS domain plus a long-running Node web service and worker No
Google Calendar OAuth client ID and client secret No
Transactional email SMTP host, user, password, and verified sender domain No
Stripe payments Stripe test secret, publishable key, and webhook secret No

See Integration setup for exact callback URLs, environment variables, and verification steps.

Put it on the internet

SnagTime is a dynamic application, not a static website. It needs server-side Node.js execution, a persistent database, webhook endpoints, and a continuously running background worker.

The full production architecture is intentionally strict. It uses PostgreSQL 18, forced row-level security, separate app and worker credentials, verified database TLS, and authenticated proxy ingress. Read Deployment guide before choosing a host.

What is actually free?

The SnagTime source code is free under the MIT License. Running it locally can also cost nothing.

A public deployment can still create third-party costs:

Google OAuth credentials can be created without paying SnagTime. Stripe test mode is free for testing. This release deliberately rejects Stripe live-mode keys, so do not advertise it as a live payment processor without implementing and auditing live-mode support.

Useful commands

npm run setup          # Create .env.local and local credentials
npm run setup:check    # Validate the credential-free local configuration
npm run demo:free      # Install, migrate, seed, and run the free local demo
npm run dev            # Run the configured local development server
npm run test           # Run the unit and contract test suite
npm run typecheck      # Check TypeScript
npm run lint           # Run ESLint
npm run build          # Create the Next.js production build
npm run ci:secret-scan # Scan public source files for credential patterns

Database commands:

npm run db:generate
npm run db:migrate
npm run db:seed

npm run db:reset destroys the local SQLite database. Use it only when you intentionally want a clean demo.

Project structure

apps/web/             Next.js application and API routes
apps/web/public/      SnagTime logo and icon
prisma/               SQLite schema, PostgreSQL schema, and migrations
scripts/              Setup, database, worker, security, and verification tools
infrastructure/       PostgreSQL container hardening
tests/                Browser and end-to-end tests
docs/                 Setup, deployment, and brand documentation

Project status

The local SQLite experience and integration test paths are designed for demos, development, and personal experimentation. The production architecture is an advanced self-hosting path, not a one-click managed service. You are responsible for infrastructure security, backups, provider configuration, deliverability, compliance, and ongoing operations.

Please read Security before exposing a deployment publicly.

Contributing

Issues and pull requests are welcome. See CONTRIBUTING.md.

License

SnagTime is available under the MIT License.

snagtime (nateherkai/snagtime)

Searching Database…

这是什么?SnagTime 是一款免费、可自托管的预约排期应用:它给你完整源码,涵盖预约链接、空闲时间管理、Google 日历同步、SMTP 邮件通知以及 Stripe 测试模式支付。
它是像 Calendly 那样的托管服务,还是我自己运行的东西?它是自托管的:你拿到完整源码,可以在本地运行、定制,并部署到自己掌控的基础设施上,不是注册即用的 SaaS。
怎么让它跑起来?克隆仓库,运行 `npm run setup` 生成含加密密钥的本地 .env.local,然后安装依赖并启动——整个无需任何凭据的本地演示用 SQLite 即可,大约五分钟就能搞定。
试用之前需要装什么?只需要 Node.js 20.9+(Node 24 是经过验证的运行时)、npm 和 Git——本地演示不需要 Google 或 Stripe 账户。
可以部署到 Vercel 吗?不行——Vercel 开箱不支持,因为生产环境需要一个长时间运行的后台工作进程外加 PostgreSQL 运行时角色;你需要改用 Linux VPS 或容器平台。
它会通过 Stripe 处理真实付款吗?不会——这个版本刻意拒绝 Stripe 的 live 模式密钥,所以只有 Stripe 测试模式支付可用;正式收款支持得靠你自己实现并审计。
可以不手动操作、让 AI 编程助手来搞定安装吗?可以——你可以把仓库 URL 和提供的 student 提示词交给 Codex 或 Claude Code,它会处理本地安装,只在只有你才能完成的账户步骤处暂停等待。
生产环境用的数据库和本地演示有什么不同?本地演示跑在 SQLite 上,不需要任何外部账户;生产环境则使用 PostgreSQL 18,带强制的行级安全、独立的 app/worker 凭据、经验证的 TLS 以及经过认证的代理入口。
预约页面上可以定制什么?工作区品牌外观、强调色、头像和上传的徽标,还有带多种时长的活动类型、自定义预约问题,以及按时区感知的空闲时间。
Creator
nateherkai
Size
0.5 MB
Stars
387
Updated
CommitAug 28
Age
1mo
Commits · 90 Days