Next.jsReact工具站

renter-rights-hub — Next.js 工具站模板

作者 thedalycreative

面向西澳租户的 Next.js 应用,提供基于《1987 年住宅租赁法》的 Gemini 问答、押金计算器和模板信函生成。

看看你的网站会是什么样

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

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

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

全部页面与视图 3

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

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

值得关注的模板亮点

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

01

聊天问答基于《1987 年住宅租赁法》全文,由 Gemini 2.5 Flash 生成回答

02

lib/act.ts 从西澳立法网站实时抓取并服务端缓存法案 HTML

03

押金计算器输出最高押金、押金缴存期限与退款估算

04

模板信函覆盖检查拒绝、维修请求、押金退还三类,支持实时预览与复制

05

使用 Next.js 15 App Router、TypeScript、React 19 与 Tailwind CSS 3

06

提供 Vercel 部署配置与 GEMINI_API_KEY 环境变量设置步骤

模板详细介绍

renter-rights-hub 是一个 Next.js 15(App Router)+ TypeScript + React 19 项目,用平实英文解释西澳(WA)租赁法律。README 说明其数据来源为西澳立法网站上的《1987 年住宅租赁法》(Residential Tenancies Act 1987)全文,问答功能由 Gemini 2.5 Flash 驱动,并在每次请求时注入该法全文作为上下文;lib/act.ts 负责从西澳立法网站抓取并缓存法案 HTML。

应用包含三个页面:首页为聊天问答(ChatPage),带侧边栏导航、顶部栏、欢迎卡片与快捷提问;/bond 为押金计算器(BondCalculator),输入周租金与搬出日期后给出最高押金、押金缴存期限和退款估算;/letters 为模板信函页(LettersPage),提供检查拒绝、维修请求、押金退还三类模板,含表单字段、实时预览与复制按钮。

README 未提供关于用户账户、数据持久化、多语言或测试的说明。项目声明为 MIT 许可,作者 Tim — The Daly Creative,并附有免责声明:该工具不构成法律建议,复杂纠纷应联系 Consumer Protection WA 或社区法律中心。

Next.js工具站

适合你的项目吗?

适用场景

  • 西澳租户想用平实英文快速了解租赁法中的具体条款
  • 租户需要计算押金上限、缴存期限或估算退款金额
  • 租户需要生成引用具体法条的检查拒绝、维修请求或押金退还信函
  • 开发者参考 Next.js App Router 与 Gemini API 结合的问答类应用结构

适合人群

  • 需要了解西澳住宅租赁法律的租户
  • 希望快速生成租赁相关信函模板的用户
  • 想研究 Next.js 15 + Gemini 2.5 Flash 集成方式的开发者

上手与定制指南

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

  1. 1

    运行 npm install 安装依赖

  2. 2

    在项目根目录创建 .env.local 并设置 GEMINI_API_KEY,密钥可从 https://aistudio.google.com/apikey 获取

  3. 3

    运行 npm run dev 后访问 http://localhost:3000

  4. 4

    部署到 Vercel 时先用 vercel env add GEMINI_API_KEY 添加密钥,再执行 vercel --prod

  5. 5

    README 未说明 data/ 目录与 .env.local 之外的其他必需配置

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

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

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
  • 运行问答功能需要自行申请并配置 GEMINI_API_KEY 环境变量,否则无法使用 AI 问答。
  • 需从 Google AI Studio 获取 Gemini API 密钥,属于外部服务账号要求。
  • 部署到 Vercel 时需将 GEMINI_API_KEY 添加为项目密钥,依赖外部平台账号。
  • 法案全文需从西澳立法网站实时抓取,依赖该外部站点的可访问性。
  • 该工具仅以平实英文解释西澳法律,不构成法律建议,复杂纠纷需另行咨询。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

GEMINI_API_KEY=your-gemini-api-key-here

README 原文

Get a Gemini API key from: https://aistudio.google.com/apikey

README 原文

vercel env add GEMINI_API_KEY

README 原文

│ ├── act.ts # Fetches + caches full Act text from WA legislation site

README 原文

This tool explains WA law in plain English and is not legal advice.

README 原文
https://github.com/thedalycreative/renter-rights-hub/blob/main/LICENSEhttps://github.com/thedalycreative/renter-rights-hub/blob/main/README.md

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

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 80 / 100
技术栈
Next.js · React
网站类型
工具站
这个分数如何计算

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

这个项目需要核对什么

记录的仓库更新时间
2026-04-26
截图检查日期
2026-10-14

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

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

查看具体选型方法 →

介绍的制作与核对状态

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

审核声明: codex-user-requested-batch-review-20261015 · 2026-10-15

查看当时使用的来源资料

SHA-256: bbafd9978a0e5faccedfa76a16034cb7afde2f1b6c61bf00a2c9a15c5cfc5e5a

2026-10-14T18:41:25.828Z

来源文件 / 仓库
# Perth Renter Rights Hub

Plain-English WA tenancy law, powered by Gemini 2.5 Flash + the full Residential Tenancies Act 1987.

## Project Structure

```
renter-rights-hub/
├── app/
│   ├── globals.css            # Tailwind base + custom component styles + animations
│   ├── layout.tsx             # Root HTML layout + meta tags + font preloading
│   ├── page.tsx               # Chat (home)
│   ├── bond/page.tsx          # Bond calculator page
│   ├── letters/page.tsx       # Template letters page
│   └── api/
│       ├── ask/route.ts       # Gemini 2.5 Flash + full Act context endpoint
│       └── bond/route.ts      # Bond calculation endpoint
├── components/
│   ├── Sidebar.tsx            # App-wide sidebar nav with active indicators
│   ├── BondCalculator.tsx     # Bond calc form + results cards
│   ├── LettersPage.tsx        # Letter templates + live preview + copy
│   └── chat/
│       ├── ChatPage.tsx       # Chat container + state management
│       ├── MessageBubble.tsx  # User/assistant message rendering + follow-ups
│       ├── ChatInput.tsx      # Textarea + hint chips + send button
│       ├── Topbar.tsx         # Chat header bar with Act badge
│       └── WelcomeCard.tsx    # Intro card + stat cards + quick-start prompts
├── lib/
│   ├── act.ts                 # Fetches + caches full Act text from WA legislation site
│   └── types.ts               # Shared TypeScript interfaces
├── data/                      # (local only — not committed)
├── .env.local                 # API keys (not committed)
├── next.config.js
├── tailwind.config.ts
├── tsconfig.json
├── postcss.config.js
├── vercel.json
└── package.json
```

## Table of Contents

| Page | Section | Content |
|---|---|---|
| `/` (Home) | `<Sidebar>` | Logo + amber glow, nav links (Tools/Topics/Resources), legal disclaimer |
| `/` (Home) | `<Topbar>` | Page title, live Act badge with pulse, template letter link |
| `/` (Home) | `<WelcomeCard>` | Intro text, stat cards (7-day notice, 4× inspections, 28-day bond), quick-start chips |
| `/` (Home) | `<ChatPage>` | Conversation thread, `<MessageBubble>` with citations + follow-ups, `<ChatInput>` |
| `/bond` | `<BondCalculator>` | Weekly rent input, vacate date, max bond result card, key date cards, info box |
| `/letters` | `<LettersPage>` | Template picker (inspection/repairs/bond), form fields, live letter preview, copy button |
| External | WA Tenancy Act 1987 | https://www.legislation.wa.gov.au |
| External | Consumer Protection WA | https://www.commerce.wa.gov.au/consumer-protection |

## Features

| Tool | Description |
|---|---|
| Rights assistant | AI Q&A grounded in the full *Residential Tenancies Act 1987 (WA)* via Gemini 2.5 Flash |
| Bond calculator | Max bond, lodgement deadline, refund estimate |
| Template letters | Inspection decline, repairs request, bond refund — cite real sections |

## Stack

- **Next.js 15** (App Router) + TypeScript + React 19
- **Tailwind CSS 3** — custom sand/teal/amber palette with animations
- **Google Gemini 2.5 Flash** — 1M token context, full Act ingestion per request
- **WA Legislation website** — live fetch + server-side cache of the full Act HTML
- **Vercel** — deployment + serverless functions

## Packages Required

```bash
# Install all dependencies
npm install

# Key packages (auto-installed by above):
# next ^15.3.0       — React framework (App Router)
# react ^19.0.0      — UI library
# tailwindcss ^3.4.3 — Utility-first CSS
# typescript ^5      — Type safety
```

## Setup

### 1. Install dependencies

```bash
npm install
```

### 2. Configure environment variables

Create `.env.local` in the project root:

```
GEMINI_API_KEY=your-gemini-api-key-here
```

Get a Gemini API key from: https://aistudio.google.com/apikey

### 3. Run locally

```bash
npm run dev
```

Open [http://localhost:3000](http://localhost:3000).

## Deploy to Vercel

```bash
# Add your Gemini key to Vercel project secrets
vercel env add GEMINI_API_KEY

# Deploy
vercel --prod
```

## Git Deployments

```bash
git reset --hard 1~InitialSetup
git reset --hard 2~APIRoutes+RAG
git reset --hard 3~UIComponents
git reset --hard 4~EnvLocal+SDKUpdate
git reset --hard 5~GeminiMigration+StylingUpgrade
```

## Repo & Links

- **Repo URL:** https://github.com/thedalycreative/renter-rights-hub
- **GitHub Pages:** https://thedalycreative.github.io/renter-rights-hub/
- **Live Site:** (Vercel deployment URL — add after first deploy)

```bash
# Clone into VS Code
git clone https://github.com/thedalycreative/renter-rights-hub.git
cd renter-rights-hub
code .
```

## Package / Framework Links

- Next.js 15: https://nextjs.org
- React 19: https://react.dev
- Tailwind CSS 3: https://tailwindcss.com
- Google Gemini API: https://ai.google.dev
- Vercel: https://vercel.com

## Author & License

- **Author:** Tim — The Daly Creative
- **License:** MIT

## Disclaimer

This tool explains WA law in plain English and is not legal advice.
For complex disputes, contact [Consumer Protection WA](https://www.commerce.wa.gov.au/consumer-protection)
or a community legal centre.
反馈内容错误

看看同类模板

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