{"id":20390480,"url":"https://github.com/checkly/mac-demo-repo","last_synced_at":"2026-06-07T11:31:28.179Z","repository":{"id":103285526,"uuid":"583049190","full_name":"checkly/mac-demo-repo","owner":"checkly","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-06T14:20:04.000Z","size":637,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-01T08:44:02.657Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"mac-demo-repo.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/checkly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-28T16:00:32.000Z","updated_at":"2023-02-06T16:10:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"58394349-13cf-4f9b-8732-88554fa2b5d7","html_url":"https://github.com/checkly/mac-demo-repo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/checkly/mac-demo-repo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkly%2Fmac-demo-repo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkly%2Fmac-demo-repo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkly%2Fmac-demo-repo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkly%2Fmac-demo-repo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/checkly","download_url":"https://codeload.github.com/checkly/mac-demo-repo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkly%2Fmac-demo-repo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34020187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T03:25:10.727Z","updated_at":"2026-06-07T11:31:28.160Z","avatar_url":"https://github.com/checkly.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a repo used to demo and test the Monitoring-as-Code (MaC) workflow using the [Checkly CLI](https://github.com/checkly/checkly-cli). \nIt is based on a simple Nextjs getting started template.\n\nCheckly's MaC workflow brings:\n\n- Synthetic monitoring checks for E2E and API endpoints defined in your code base.\n- A local, JS/TS workflow: no more click ops, no more HCL, no more YAML.\n- Use `@playwright/test` to test your webapp around the clock and at deploy time.\n- Branch aware, working perfectly with GitHub|Lab and Preview deployments.\n\n# Project structure\n\nThe project structure in this repo follows the approach where:\n\n1. The basic `checkly.config.js` file is at the root of the repo. This is required. \n2. Common defaults and shared resources like `alert-channels.js` are in the `__checks__` directory at the root.\n3. One Playwright-based Browser Check is also in the `__checks__` directory at the root.\n4. Other checks are nested according to the `pages` or `api` the test in the Next.js code base. \n\n\nAll of the above are just conventions. You can change any of the paths, file names as you please. [See our docs on project\nstructure](https://github.com/checkly/checkly-cli#project-structure) to get all the details.\n\n```\n.\n├── checkly.config.js\n├── __checks__\n│   ├── alert-channels.js\n│   ├── api\n│   │   ├── api.check.js\n│   │   ├── setup.js\n│   │   └── teardown.js\n│   ├── defaults.js\n│   ├── home.check.js\n│   ├── home.spec.js\n│   └── pages\n│       ├── about.spec.js\n│       └── product.spec.js\n```\n\n## Running the checks\n\nYou can clone this repo and run the check for yourself. Start with a \n\n```bash\ngit clone https://github.com/checkly/mac-demo-repo.git\ncd mac-demo-repo\nnpm install\n```\n\n1. Make sure you have signed up for a free Checkly account over at https://www.checklyhq.com/\n2. Log in to your Checkly account with the CLI with `npx checkly login`\n3. With the project structure above, run the `npx checkly test` command and you will get an output similar to:\n\n```\nnpx checkly test\n\nRunning 5 checks in eu-central-1.\n\n__checks__/api/api.check.js\n  ✔ Hello API (187ms)\n  ✔ Product API (208ms)\n__checks__/home.check.js\n  ✔ HomePage (5s)\n__checks__/pages/about.spec.js\n  ✔ about.spec.js (6s)\n__checks__/pages/product.spec.js\n  ✔ product.spec.js (5s)\n\n5 passed, 5 total\n```\n\nWhat just happened?\n1. We bundled up your API checks and Playwright-based Browser checks and executed them against the stable \nURL https://mac-demo-repo.vercel.app defined in the `__checks__/defaults.js` file. \n2. We executed them from the region `us-east-1` on the \n\nTo deploy these checks to your Checkly account, just run:\n\n```\nnpx checkly deploy\n```\n\nYou now have a set of synthetic monitoring checks running around the clock.\n\nIf you clone this repo and deploy it to Vercel or another provider, make sure to update the `pageUrl` variable in the \n`__checks__/defaults.js` file to your own domain.\n\n## Usage in CI\n\nPreferably, you lifecycle your checks with your codebase, smoke test them with `npx checkly test` and deploy them to Checkly\nonly when your checks are solid. The file `.github/workflows/checkly.yaml` shows how you can do this with GitHub Actions.\n\nHowever, this pattern is adaptable to any CI system. The crux is:\n\n1. Wait for a deploy to a Staging / Preview or Production environment to finish.\n2. Run the `npx checkly test` command.\n3. If it passes, run `npx checkly deploy`, if not abort.\n\n## Building the project\n\nFirst, run the development server:\n\n```bash\nnpm install\nnpm run dev\n# or\nyarn dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\nYou can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.\n\n[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.\n\nThe `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.\n\nThis project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheckly%2Fmac-demo-repo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheckly%2Fmac-demo-repo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheckly%2Fmac-demo-repo/lists"}