init
Some checks failed
Code Quality / lint-and-build (push) Failing after 29s
Release Packages / release (push) Failing after 41s

This commit is contained in:
2026-01-31 19:26:46 +01:00
commit 9a0900e3ff
42 changed files with 8346 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
import { nextConfig } from "@mintel/eslint-config/next";
export default nextConfig;

View File

@@ -0,0 +1,6 @@
import mintelNextConfig from "@mintel/next-config";
/** @type {import('next').NextConfig} */
const nextConfig = {};
export default mintelNextConfig(nextConfig);

View File

@@ -0,0 +1,27 @@
{
"name": "sample-website",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"next": "15.1.6",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"@mintel/next-utils": "workspace:*"
},
"devDependencies": {
"@types/node": "^20.0.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"typescript": "^5.0.0",
"@mintel/tsconfig": "workspace:*",
"@mintel/eslint-config": "workspace:*",
"@mintel/next-config": "workspace:*"
}
}

View File

@@ -0,0 +1,14 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--background: #ffffff;
--foreground: #171717;
}
body {
color: var(--foreground);
background: var(--background);
font-family: Arial, Helvetica, sans-serif;
}

View File

@@ -0,0 +1,19 @@
import type { Metadata } from "next";
import "./globals.css";
export const metadata: Metadata = {
title: "Sample Website",
description: "A sample website using @mintel shared packages",
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}

View File

@@ -0,0 +1,36 @@
"use client";
import { isValidLang, rateLimit } from "@mintel/next-utils";
export default function Home() {
const testLang = "en";
const isLangValid = isValidLang(testLang);
const handleTestRateLimit = async () => {
try {
await rateLimit("test-user");
console.log("Rate limit check passed");
} catch (e) {
console.error(e);
}
};
return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
<h1 className="text-4xl font-bold">Sample Website</h1>
<p className="mt-4">
Testing @mintel/next-utils:
<br />
Is {'"'}en{'"'} valid? {isLangValid ? "Yes" : "No"}
</p>
<button
onClick={handleTestRateLimit}
className="mt-4 px-4 py-2 bg-blue-500 text-white rounded"
>
Test Rate Limit
</button>
</div>
</main>
);
}

View File

@@ -0,0 +1,10 @@
{
"extends": "@mintel/tsconfig/nextjs.json",
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}