Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
# second
# Rollout Radar monorepo

This repository contains the Rollout Radar web application, a Next.js 14 + TypeScript project for tracking feature rollouts across popular consumer apps. All application code lives in the [`rollout-radar/`](./rollout-radar/) directory, while the repository root exposes convenience scripts so you can work with the app without changing directories.

## Getting started locally

1. Install dependencies with pnpm (includes the web app via the workspace configuration):
```bash
pnpm install
```
2. Copy `.env.example` to `.env.local` inside `rollout-radar/` and fill in the required secrets (Supabase/Postgres, OAuth providers, Upstash Redis, etc.).
3. Run the development server:
```bash
pnpm dev
```
The app will be available at http://localhost:3000.

Additional commands are proxied to the web app as well:

```bash
pnpm build # production build
pnpm start # run the compiled app
pnpm lint # ESLint
pnpm test # Vitest suite
pnpm test:e2e # Playwright end-to-end tests
```

## Where you can deploy it

Rollout Radar is a full-stack Next.js application with route handlers, Prisma, and background jobs. It requires a Node.js runtime with serverless/function support:

- **Vercel (recommended):** First-class support for Next.js, built-in cron jobs, environment variable management, and automatic deployments from Git.
- **Netlify:** Supported via the Next.js runtime plugin. You must configure environment variables, Prisma migrations, and any serverless cron triggers manually.
- **Self-hosted Node server (Docker, Railway, Fly.io, Render, etc.):** Build with `pnpm build` and run `pnpm start` on infrastructure that supports persistent environment variables and database connectivity.

Static hosts such as GitHub Pages are not compatible because they do not provide the necessary Node.js server features.

For detailed deployment steps (database provisioning, OAuth configuration, Redis rate limiting, cron setup), see [`rollout-radar/DEPLOY.md`](./rollout-radar/DEPLOY.md).
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "second",
"version": "0.0.0",
"private": true,
"packageManager": "pnpm@9.12.3",
"scripts": {
"install:web": "pnpm install --dir rollout-radar",
"dev": "pnpm --dir rollout-radar dev",
"build": "pnpm --dir rollout-radar build",
"start": "pnpm --dir rollout-radar start",
"lint": "pnpm --dir rollout-radar lint",
"test": "pnpm --dir rollout-radar test",
"test:e2e": "pnpm --dir rollout-radar test:e2e"
}
}
2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages:
- rollout-radar
12 changes: 12 additions & 0 deletions rollout-radar/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
DATABASE_URL=
NEXTAUTH_SECRET=
NEXTAUTH_URL=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GITHUB_ID=
GITHUB_SECRET=
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
PLAUSIBLE_DOMAIN=
ADMIN_EMAILS=
HCAPTCHA_SECRET=
3 changes: 3 additions & 0 deletions rollout-radar/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions rollout-radar/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
3 changes: 3 additions & 0 deletions rollout-radar/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contributor Covenant Code of Conduct

See https://www.contributor-covenant.org/version/2/1/code_of_conduct/.
10 changes: 10 additions & 0 deletions rollout-radar/DEPLOY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Deployment checklist

1. Create a Supabase project and set `DATABASE_URL`. Run `pnpm prisma migrate deploy` followed by `pnpm db:seed`.
2. Configure Google and GitHub OAuth apps with callback URLs pointing to `/api/auth/callback/google` and `/api/auth/callback/github` respectively.
3. Provision Upstash Redis and set `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN`.
4. Set `ADMIN_EMAILS` to a comma-separated list of administrator accounts.
5. Deploy the Next.js app to Vercel. Configure environment variables in the Vercel dashboard.
6. Enable a Vercel cron job hitting `/api/cron/worker-kick` if you add the ingestion worker.
7. Set `PLAUSIBLE_DOMAIN` if using Plausible analytics.
8. Verify `/sitemap.xml`, `/robots.txt`, and `/rss.xml` respond correctly after deployment.
21 changes: 21 additions & 0 deletions rollout-radar/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Rollout Radar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
55 changes: 55 additions & 0 deletions rollout-radar/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Rollout Radar

Rollout Radar is a production-ready Next.js 14 web application that tracks new feature rollouts across popular apps. It exposes availability by country and device, captures community reports, and provides instructions for enabling features.

## Tech stack

- **Framework:** Next.js 14 (App Router) with TypeScript
- **Styling/UI:** Tailwind CSS, shadcn/ui, lucide-react
- **Data:** Prisma ORM (PostgreSQL/Supabase), TanStack Query, Zod validation
- **Auth:** NextAuth (Google + GitHub OAuth) with role-based access
- **Infrastructure helpers:** Upstash Redis for rate limiting, Plausible analytics, MDX instructions, Playwright & Vitest for testing

## Running locally

1. Install dependencies (from the repo root you can run `pnpm install`, or run the commands inside this directory):
```bash
pnpm install
```
2. Copy `.env.example` to `.env.local` and set the required environment variables (database URL, OAuth credentials, Redis, etc.).
3. Prepare the database:
```bash
pnpm db:migrate
pnpm db:seed
```
4. Start the development server:
```bash
pnpm dev
```
Visit http://localhost:3000 to view the app.

## Testing

```bash
pnpm lint # ESLint + TypeScript rules
pnpm test # Vitest unit tests (checker logic, report handling)
pnpm test:e2e # Playwright smoke tests
```

## Deployment options

Rollout Radar needs a Node.js environment with serverless APIs, database access, and background job support.

- **Vercel (recommended):** Seamless deployment for Next.js, automatic route handlers, and cron jobs. Follow [`DEPLOY.md`](./DEPLOY.md) for Supabase, Upstash, and OAuth setup steps.
- **Netlify:** Use the official Next.js runtime plugin to deploy. Ensure you configure environment variables, Prisma migrations, and optional cron jobs manually.
- **Railway, Fly.io, Render, or custom Node hosting:** Build with `pnpm build` and run with `pnpm start`. Provide the same environment variables and connect to your managed PostgreSQL/Redis services.

Static hosting solutions (e.g., GitHub Pages) are not supported because the application relies on server-side route handlers and background jobs.

## Useful scripts

- `pnpm worker:run` – executes the ingestion worker once using the YAML-configured sources
- `pnpm worker:add-source --feature <slug> --url <url> --type <type>` – append a source to the YAML config and database
- `pnpm db:studio` – open Prisma Studio for inspecting data locally

For environment provisioning and deployment steps, see [`DEPLOY.md`](./DEPLOY.md).
3 changes: 3 additions & 0 deletions rollout-radar/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Security Policy

Please report security vulnerabilities by emailing security@rollout-radar.example.com. We will respond within 5 business days.
9 changes: 9 additions & 0 deletions rollout-radar/next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('next-sitemap').IConfig} */
const config = {
siteUrl: 'https://rollout-radar.example.com',
generateRobotsTxt: true,
sitemapSize: 5000,
exclude: ['/auth/*', '/admin/*'],
};

module.exports = config;
4 changes: 4 additions & 0 deletions rollout-radar/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};

export default nextConfig;
78 changes: 78 additions & 0 deletions rollout-radar/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"name": "rollout-radar",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "prisma generate && next build",
"start": "next start",
"lint": "eslint .",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"test:e2e": "playwright test",
"db:migrate": "prisma migrate deploy",
"db:studio": "prisma studio",
"db:seed": "tsx prisma/seed.ts",
"worker:run": "tsx worker/index.ts",
"worker:add-source": "tsx worker/add-source.ts",
"prepare": "next-sitemap",
"postinstall": "prisma generate"
},
"dependencies": {
"@mdx-js/react": "^3.1.0",
"@next-auth/prisma-adapter": "^1.0.7",
"@prisma/client": "^5.22.0",
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-slot": "^1.2.3",
"@tanstack/react-query": "^5.66.11",
"@upstash/ratelimit": "^1.2.0",
"@upstash/redis": "^1.33.0",
"cheerio": "^1.0.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"gray-matter": "^4.0.3",
"lucide-react": "^0.471.0",
"next": "14.2.5",
"next-auth": "^4.24.10",
"next-mdx-remote": "^5.0.0",
"next-sitemap": "^4.2.3",
"next-themes": "^0.3.0",
"plausible-tracker": "^0.3.9",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rehype-raw": "^7.0.0",
"rehype-sanitize": "^6.0.0",
"remark-gfm": "^4.0.0",
"rss-parser": "^3.13.0",
"tailwind-merge": "^3.3.1",
"yaml": "^2.8.1",
"zod": "^3.24.1",
"zod-form-data": "^2.0.4"
},
"devDependencies": {
"@playwright/test": "^1.50.1",
"@types/cheerio": "^0.22.35",
"@types/node": "^20.17.12",
"@types/react": "^18.3.24",
"@types/react-dom": "^18.3.7",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"autoprefixer": "^10.4.20",
"eslint": "^8.57.1",
"eslint-config-next": "14.2.5",
"postcss": "^8.5.6",
"prisma": "^5.22.0",
"tailwindcss": "^3.4.17",
"tailwindcss-animate": "^1.0.7",
"ts-node": "^10.9.2",
"tslib": "^2.8.1",
"tsx": "^4.19.2",
"typescript": "^5.7.3",
"vitest": "^2.1.8"
}
}
Loading