feat: introduce Gatekeeper application, Directus utilities, and monorepo configuration for linting, testing, and husky hooks.
This commit is contained in:
29
packages/infra/templates/website/.gitignore
vendored
Normal file
29
packages/infra/templates/website/.gitignore
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnpm-debug.log*
|
||||
|
||||
# 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
|
||||
25
packages/infra/templates/website/scripts/setup-directus.ts
Normal file
25
packages/infra/templates/website/scripts/setup-directus.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import client, { ensureAuthenticated } from "../src/lib/directus";
|
||||
import { updateSettings } from "@directus/sdk";
|
||||
|
||||
async function setupBranding() {
|
||||
console.log("🎨 Setup Directus Branding...");
|
||||
await ensureAuthenticated();
|
||||
|
||||
try {
|
||||
await client.request(
|
||||
updateSettings({
|
||||
project_name: process.env.PROJECT_NAME || "Mintel Project",
|
||||
project_color: process.env.PROJECT_COLOR || "#82ed20",
|
||||
theme_light_overrides: {
|
||||
primary: process.env.PROJECT_COLOR || "#82ed20",
|
||||
borderRadius: "16px",
|
||||
},
|
||||
} as any),
|
||||
);
|
||||
console.log("✨ Branding applied!");
|
||||
} catch (error) {
|
||||
console.error("❌ Error setting up branding:", error);
|
||||
}
|
||||
}
|
||||
|
||||
setupBranding();
|
||||
45
packages/infra/templates/website/src/app/globals.css
Normal file
45
packages/infra/templates/website/src/app/globals.css
Normal file
@@ -0,0 +1,45 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
@theme {
|
||||
--font-sans:
|
||||
"Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||||
"Helvetica Neue", Arial, sans-serif;
|
||||
--font-heading: "Inter", system-ui, sans-serif;
|
||||
--font-body: "Inter", system-ui, sans-serif;
|
||||
|
||||
--color-primary: #001a4d;
|
||||
--color-primary-dark: #000d26;
|
||||
--color-primary-light: #e6ebf5;
|
||||
|
||||
--color-accent: #82ed20;
|
||||
--color-accent-dark: #6bc41a;
|
||||
--color-accent-light: #f0f9e6;
|
||||
|
||||
--color-text-primary: #111827;
|
||||
--color-text-secondary: #4b5563;
|
||||
--color-text-light: #9ca3af;
|
||||
}
|
||||
|
||||
@layer base {
|
||||
body {
|
||||
@apply antialiased bg-white text-text-primary;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
@apply font-heading font-bold tracking-tight text-primary;
|
||||
}
|
||||
}
|
||||
|
||||
@utility touch-target {
|
||||
min-height: 48px;
|
||||
min-width: 48px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
12
packages/infra/templates/website/src/lib/directus.ts
Normal file
12
packages/infra/templates/website/src/lib/directus.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import {
|
||||
createMintelDirectusClient,
|
||||
ensureDirectusAuthenticated,
|
||||
} from "@mintel/next-utils";
|
||||
|
||||
const client = createMintelDirectusClient(process.env.DIRECTUS_URL);
|
||||
|
||||
export async function ensureAuthenticated() {
|
||||
await ensureDirectusAuthenticated(client);
|
||||
}
|
||||
|
||||
export default client;
|
||||
Reference in New Issue
Block a user