openadminjs 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/create-project.js +14 -21
  2. package/dist/create-project.test.d.ts +1 -0
  3. package/dist/create-project.test.js +75 -0
  4. package/package.json +2 -1
  5. package/template/.env.example +6 -0
  6. package/template/README.md +13 -0
  7. package/template/apps/web/README.md +12 -0
  8. package/template/apps/web/app/globals.css +12 -0
  9. package/template/apps/web/app/layout.tsx +18 -0
  10. package/template/apps/web/app/page.tsx +27 -0
  11. package/template/apps/web/app/posts/[slug]/page.tsx +38 -0
  12. package/template/apps/web/app/posts/page.tsx +20 -0
  13. package/template/apps/web/app/robots.txt/route.ts +9 -0
  14. package/template/apps/web/app/sitemap.xml/route.ts +20 -0
  15. package/template/apps/web/components/public-fields.tsx +22 -0
  16. package/template/apps/web/lib/openadmin-client.ts +71 -0
  17. package/template/apps/web/lib/seo.ts +42 -0
  18. package/template/apps/web/next-env.d.ts +2 -0
  19. package/template/apps/web/next.config.mjs +5 -0
  20. package/template/apps/web/package.json +29 -0
  21. package/template/apps/web/postcss.config.mjs +6 -0
  22. package/template/apps/web/public/brand/apple-touch-icon.png +0 -0
  23. package/template/apps/web/public/brand/favicon.svg +1 -0
  24. package/template/apps/web/public/brand/og-image.png +0 -0
  25. package/template/apps/web/public/brand/openadminjs-icon-new.png +0 -0
  26. package/template/apps/web/public/brand/openadminjs-logo-monochrome.png +0 -0
  27. package/template/apps/web/public/brand/openadminjs-logo-new.png +0 -0
  28. package/template/apps/web/tailwind.config.ts +21 -0
  29. package/template/apps/web/tsconfig.json +23 -0
  30. package/template/package.json +19 -0
  31. package/template/pnpm-workspace.yaml +3 -0
@@ -1,5 +1,5 @@
1
1
  import { existsSync, readdirSync } from "node:fs";
2
- import { dirname, resolve } from "node:path";
2
+ import { dirname, join, resolve } from "node:path";
3
3
  import { spawnSync } from "node:child_process";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { cancel, confirm, intro, isCancel, outro, select, text } from "@clack/prompts";
@@ -62,6 +62,9 @@ export function createProject(options) {
62
62
  errorOnExist: true,
63
63
  filter: (source) => !source.includes("node_modules") && !source.includes(".next") && !source.includes("dist")
64
64
  });
65
+ if (!existsSync(join(targetDir, "package.json"))) {
66
+ throw new Error(`Template copy failed: package.json not found in ${targetDir}`);
67
+ }
65
68
  renderTemplateFiles(targetDir, {
66
69
  __APP_NAME__: appName,
67
70
  __PACKAGE_NAME__: packageName,
@@ -74,11 +77,17 @@ export function createProject(options) {
74
77
  __API_PORT__: options.apiPort
75
78
  });
76
79
  if (options.git) {
77
- spawnSync("git", ["init"], { cwd: targetDir, stdio: "ignore" });
80
+ const gitResult = spawnSync("git", ["init"], { cwd: targetDir, stdio: "ignore" });
81
+ if (gitResult.status !== 0 || gitResult.error) {
82
+ throw new Error("Failed to initialize git repository.");
83
+ }
78
84
  }
79
85
  if (options.install) {
80
86
  const installArgs = options.packageManager === "yarn" ? [] : ["install"];
81
- spawnSync(options.packageManager, installArgs, { cwd: targetDir, stdio: "inherit" });
87
+ const installResult = spawnSync(options.packageManager, installArgs, { cwd: targetDir, stdio: "inherit" });
88
+ if (installResult.status !== 0 || installResult.error) {
89
+ throw new Error(`Dependency installation failed. Run "${options.packageManager} ${installArgs.join(" ")}" inside ${targetDir}.`);
90
+ }
82
91
  }
83
92
  return {
84
93
  appName,
@@ -199,24 +208,8 @@ export async function createProjectInteractive(options = {}) {
199
208
  cancel("Cancelled");
200
209
  return undefined;
201
210
  }
202
- const adminOrigin = options.adminOrigin ??
203
- (await text({
204
- message: "Admin origin",
205
- defaultValue: "http://localhost:3000"
206
- }));
207
- if (isCancel(adminOrigin)) {
208
- cancel("Cancelled");
209
- return undefined;
210
- }
211
- const apiPort = options.apiPort ??
212
- (await text({
213
- message: "API port",
214
- defaultValue: "4000"
215
- }));
216
- if (isCancel(apiPort)) {
217
- cancel("Cancelled");
218
- return undefined;
219
- }
211
+ const adminOrigin = options.adminOrigin ?? "http://localhost:3000";
212
+ const apiPort = options.apiPort ?? "4000";
220
213
  const git = options.git ?? (await confirm({ message: "Initialize git?", initialValue: true }));
221
214
  if (isCancel(git)) {
222
215
  cancel("Cancelled");
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,75 @@
1
+ import { mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import { tmpdir } from "node:os";
4
+ import { describe, expect, it } from "vitest";
5
+ import { createProject, defaultTemplateDir } from "./create-project.js";
6
+ describe("create project", () => {
7
+ it("ships template env defaults for admin origin and api port", () => {
8
+ const envExample = readFileSync(join(defaultTemplateDir(), ".env.example"), "utf8");
9
+ expect(envExample).toContain("ADMIN_ORIGIN=http://localhost:3000");
10
+ expect(envExample).toContain("API_PORT=4000");
11
+ expect(envExample).not.toContain("__ADMIN_ORIGIN__");
12
+ expect(envExample).not.toContain("__API_PORT__");
13
+ });
14
+ it("creates project with rendered env values", () => {
15
+ const cwd = mkdtempSync(join(tmpdir(), "openadminjs-cli-test-"));
16
+ try {
17
+ const result = createProject({
18
+ projectName: "my-app",
19
+ cwd,
20
+ packageManager: "pnpm",
21
+ database: "postgresql",
22
+ superadminEmail: "admin@localhost.dev",
23
+ superadminPassword: "12345678",
24
+ databaseUrl: "postgresql://localhost:5432/my-app?schema=public",
25
+ redisUrl: "redis://localhost:6379",
26
+ jwtSecret: "test-jwt-secret",
27
+ jwtRefreshSecret: "test-jwt-refresh-secret",
28
+ adminOrigin: "http://localhost:3000",
29
+ apiPort: "4000",
30
+ git: false,
31
+ install: false,
32
+ templateDir: defaultTemplateDir()
33
+ });
34
+ const envExample = readFileSync(join(result.targetDir, ".env.example"), "utf8");
35
+ expect(envExample).toContain("DATABASE_URL=postgresql://localhost:5432/my-app?schema=public");
36
+ expect(envExample).toContain("REDIS_URL=redis://localhost:6379");
37
+ expect(envExample).toContain("JWT_SECRET=test-jwt-secret");
38
+ expect(envExample).toContain("JWT_REFRESH_SECRET=test-jwt-refresh-secret");
39
+ expect(envExample).toContain("ADMIN_ORIGIN=http://localhost:3000");
40
+ expect(envExample).toContain("API_PORT=4000");
41
+ }
42
+ finally {
43
+ rmSync(cwd, { recursive: true, force: true });
44
+ }
45
+ });
46
+ it("fails fast when template package.json is missing", () => {
47
+ const cwd = mkdtempSync(join(tmpdir(), "openadminjs-cli-test-"));
48
+ const badTemplate = mkdtempSync(join(tmpdir(), "openadminjs-cli-template-"));
49
+ try {
50
+ writeFileSync(join(badTemplate, ".env.example"), "DATABASE_URL=__DATABASE_URL__\n");
51
+ mkdirSync(join(badTemplate, "apps"), { recursive: true });
52
+ expect(() => createProject({
53
+ projectName: "broken-app",
54
+ cwd,
55
+ packageManager: "pnpm",
56
+ database: "postgresql",
57
+ superadminEmail: "admin@localhost.dev",
58
+ superadminPassword: "12345678",
59
+ databaseUrl: "postgresql://localhost:5432/broken-app?schema=public",
60
+ redisUrl: "redis://localhost:6379",
61
+ jwtSecret: "test-jwt-secret",
62
+ jwtRefreshSecret: "test-jwt-refresh-secret",
63
+ adminOrigin: "http://localhost:3000",
64
+ apiPort: "4000",
65
+ git: false,
66
+ install: false,
67
+ templateDir: badTemplate
68
+ })).toThrow(/package\.json not found/);
69
+ }
70
+ finally {
71
+ rmSync(cwd, { recursive: true, force: true });
72
+ rmSync(badTemplate, { recursive: true, force: true });
73
+ }
74
+ });
75
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openadminjs",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "openadminjs": "dist/index.js"
@@ -22,6 +22,7 @@
22
22
  },
23
23
  "files": [
24
24
  "dist",
25
+ "template",
25
26
  "README.md"
26
27
  ],
27
28
  "scripts": {
@@ -0,0 +1,6 @@
1
+ DATABASE_URL=__DATABASE_URL__
2
+ REDIS_URL=__REDIS_URL__
3
+ JWT_SECRET=__JWT_SECRET__
4
+ JWT_REFRESH_SECRET=__JWT_REFRESH_SECRET__
5
+ ADMIN_ORIGIN=http://localhost:3000
6
+ API_PORT=4000
@@ -0,0 +1,13 @@
1
+ # __APP_NAME__
2
+
3
+ Generated by OpenAdminJS.
4
+
5
+ ```bash
6
+ pnpm install
7
+ docker compose up -d
8
+ pnpm db:migrate
9
+ pnpm db:seed
10
+ pnpm dev
11
+ ```
12
+
13
+ Superadmin credentials are created during `pnpm db:seed`.
@@ -0,0 +1,12 @@
1
+ # OpenAdminJS Web Layer
2
+
3
+ This folder is part of the generated application, not the library marketing site.
4
+
5
+ Use it for:
6
+
7
+ - public frontend pages powered by OpenAdminJS API/resource metadata;
8
+ - custom pages for entities created in the admin;
9
+ - SEO metadata, canonical URLs, robots and sitemap generation;
10
+ - field-level public rendering where you choose which resource fields appear on each page.
11
+
12
+ The marketing landing/docs site for GitHub Pages lives in `/site`.
@@ -0,0 +1,12 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ :root {
6
+ --brand-primary: #059669;
7
+ }
8
+
9
+ body {
10
+ background: #ffffff;
11
+ color: #0f172a;
12
+ }
@@ -0,0 +1,18 @@
1
+ import type { Metadata } from "next";
2
+ import "./globals.css";
3
+
4
+ export const metadata: Metadata = {
5
+ title: {
6
+ default: "OpenAdminJS Web",
7
+ template: "%s | OpenAdminJS Web"
8
+ },
9
+ description: "Public frontend layer powered by OpenAdminJS resources."
10
+ };
11
+
12
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
13
+ return (
14
+ <html lang="en">
15
+ <body>{children}</body>
16
+ </html>
17
+ );
18
+ }
@@ -0,0 +1,27 @@
1
+ import Link from "next/link";
2
+ import { listPublicRecords } from "../lib/openadmin-client";
3
+
4
+ export default async function HomePage() {
5
+ const posts = await listPublicRecords("posts");
6
+
7
+ return (
8
+ <main className="mx-auto max-w-5xl px-4 py-12">
9
+ <section className="max-w-3xl">
10
+ <p className="text-sm font-semibold uppercase text-emerald-700">OpenAdminJS Web Layer</p>
11
+ <h1 className="mt-3 text-4xl font-semibold tracking-normal">Public frontend powered by resources</h1>
12
+ <p className="mt-4 text-lg leading-8 text-slate-600">
13
+ This side is part of generated applications. Use it to build public pages, SEO landing pages, catalogs, blogs or custom frontend flows on top of the same API and resource metadata.
14
+ </p>
15
+ </section>
16
+
17
+ <section className="mt-10 grid gap-4">
18
+ {posts.map((post) => (
19
+ <Link key={post.id} href={`/posts/${post.slug}`} className="rounded-md border border-slate-200 bg-white p-5 hover:border-emerald-300">
20
+ <h2 className="font-semibold">{String(post.title)}</h2>
21
+ <p className="mt-2 text-sm leading-6 text-slate-600">{String(post.excerpt)}</p>
22
+ </Link>
23
+ ))}
24
+ </section>
25
+ </main>
26
+ );
27
+ }
@@ -0,0 +1,38 @@
1
+ import { notFound } from "next/navigation";
2
+ import type { Metadata } from "next";
3
+ import { PublicFields } from "../../../components/public-fields";
4
+ import { getPublicRecord, getPublicResource, listPublicRecords } from "../../../lib/openadmin-client";
5
+ import { metadataForRecord } from "../../../lib/seo";
6
+
7
+ export async function generateStaticParams() {
8
+ const posts = await listPublicRecords("posts");
9
+ return posts.map((post) => ({ slug: String(post.slug ?? post.id) }));
10
+ }
11
+
12
+ export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }): Promise<Metadata> {
13
+ const { slug } = await params;
14
+ const resource = getPublicResource("posts");
15
+ const post = await getPublicRecord("posts", slug);
16
+ if (!post) return {};
17
+ return metadataForRecord(resource, post);
18
+ }
19
+
20
+ export default async function PostPage({ params }: { params: Promise<{ slug: string }> }) {
21
+ const { slug } = await params;
22
+ const resource = getPublicResource("posts");
23
+ const post = await getPublicRecord("posts", slug);
24
+ if (!post) notFound();
25
+
26
+ return (
27
+ <main className="mx-auto max-w-3xl px-4 py-12">
28
+ <article>
29
+ <p className="text-sm font-semibold uppercase text-emerald-700">{resource.label}</p>
30
+ <h1 className="mt-3 text-4xl font-semibold tracking-normal">{String(post.title)}</h1>
31
+ <p className="mt-4 text-lg leading-8 text-slate-600">{String(post.excerpt)}</p>
32
+ <div className="mt-10">
33
+ <PublicFields resource={resource} record={post} />
34
+ </div>
35
+ </article>
36
+ </main>
37
+ );
38
+ }
@@ -0,0 +1,20 @@
1
+ import Link from "next/link";
2
+ import { listPublicRecords } from "../../lib/openadmin-client";
3
+
4
+ export default async function PostsPage() {
5
+ const posts = await listPublicRecords("posts");
6
+
7
+ return (
8
+ <main className="mx-auto max-w-4xl px-4 py-12">
9
+ <h1 className="text-3xl font-semibold tracking-normal">Posts</h1>
10
+ <div className="mt-8 grid gap-4">
11
+ {posts.map((post) => (
12
+ <Link key={post.id} href={`/posts/${post.slug}`} className="rounded-md border border-slate-200 bg-white p-5">
13
+ <h2 className="font-semibold">{String(post.title)}</h2>
14
+ <p className="mt-2 text-sm text-slate-600">{String(post.excerpt)}</p>
15
+ </Link>
16
+ ))}
17
+ </div>
18
+ </main>
19
+ );
20
+ }
@@ -0,0 +1,9 @@
1
+ import { absoluteUrl } from "../../lib/seo";
2
+
3
+ export function GET() {
4
+ return new Response(`User-agent: *\nAllow: /\nSitemap: ${absoluteUrl("/sitemap.xml")}\n`, {
5
+ headers: {
6
+ "content-type": "text/plain"
7
+ }
8
+ });
9
+ }
@@ -0,0 +1,20 @@
1
+ import { listPublicRecords } from "../../lib/openadmin-client";
2
+ import { absoluteUrl, sitemapXml } from "../../lib/seo";
3
+
4
+ export async function GET() {
5
+ const posts = await listPublicRecords("posts");
6
+ const urls = [
7
+ { loc: absoluteUrl("/") },
8
+ { loc: absoluteUrl("/posts") },
9
+ ...posts.map((post) => ({
10
+ loc: absoluteUrl(`/posts/${post.slug ?? post.id}`),
11
+ lastmod: post.updatedAt
12
+ }))
13
+ ];
14
+
15
+ return new Response(sitemapXml(urls), {
16
+ headers: {
17
+ "content-type": "application/xml"
18
+ }
19
+ });
20
+ }
@@ -0,0 +1,22 @@
1
+ import type { PublicRecord, PublicResourceConfig } from "../lib/openadmin-client";
2
+
3
+ export function PublicFields({ resource, record }: { resource: PublicResourceConfig; record: PublicRecord }) {
4
+ const fields = Object.entries(resource.fields).filter(([, field]) => field.public);
5
+
6
+ return (
7
+ <dl className="grid gap-4">
8
+ {fields.map(([name, field]) => (
9
+ <div key={name} className="rounded-md border border-slate-200 bg-white p-4">
10
+ <dt className="text-sm font-medium text-slate-500">{field.label ?? name}</dt>
11
+ <dd className="mt-2 text-slate-950">{formatValue(record[name], field.type)}</dd>
12
+ </div>
13
+ ))}
14
+ </dl>
15
+ );
16
+ }
17
+
18
+ function formatValue(value: unknown, type: string): string {
19
+ if (value == null) return "";
20
+ if (type === "datetime" || type === "date") return new Date(String(value)).toLocaleDateString();
21
+ return String(value);
22
+ }
@@ -0,0 +1,71 @@
1
+ export type PublicFieldConfig = {
2
+ type: string;
3
+ label?: string;
4
+ public?: boolean;
5
+ seo?: "title" | "description" | "image" | "slug" | "canonical";
6
+ };
7
+
8
+ export type PublicResourceConfig = {
9
+ name: string;
10
+ label: string;
11
+ basePath: string;
12
+ titleField: string;
13
+ descriptionField?: string;
14
+ slugField: string;
15
+ fields: Record<string, PublicFieldConfig>;
16
+ };
17
+
18
+ export type PublicRecord = Record<string, unknown> & {
19
+ id: string;
20
+ slug?: string;
21
+ title?: string;
22
+ description?: string;
23
+ updatedAt?: string;
24
+ };
25
+
26
+ export const publicResources: PublicResourceConfig[] = [
27
+ {
28
+ name: "posts",
29
+ label: "Posts",
30
+ basePath: "/posts",
31
+ titleField: "title",
32
+ descriptionField: "excerpt",
33
+ slugField: "slug",
34
+ fields: {
35
+ title: { type: "text", label: "Title", public: true, seo: "title" },
36
+ slug: { type: "slug", label: "Slug", public: false, seo: "slug" },
37
+ excerpt: { type: "textarea", label: "Excerpt", public: true, seo: "description" },
38
+ content: { type: "richtext", label: "Content", public: true },
39
+ status: { type: "badge", label: "Status", public: false },
40
+ updatedAt: { type: "datetime", label: "Updated", public: true }
41
+ }
42
+ }
43
+ ];
44
+
45
+ const demoPosts: PublicRecord[] = [
46
+ {
47
+ id: "welcome",
48
+ slug: "welcome-to-openadminjs",
49
+ title: "Welcome to OpenAdminJS",
50
+ excerpt: "Public resource pages can be generated from the same metadata as admin resources.",
51
+ content:
52
+ "OpenAdminJS keeps API, admin and public web concerns connected through resource metadata while still letting you write custom frontend pages.",
53
+ updatedAt: new Date("2026-04-29T00:00:00.000Z").toISOString()
54
+ }
55
+ ];
56
+
57
+ export function getPublicResource(name: string): PublicResourceConfig {
58
+ const resource = publicResources.find((item) => item.name === name);
59
+ if (!resource) throw new Error(`Unknown public resource: ${name}`);
60
+ return resource;
61
+ }
62
+
63
+ export async function listPublicRecords(resourceName: string): Promise<PublicRecord[]> {
64
+ if (resourceName === "posts") return demoPosts;
65
+ return [];
66
+ }
67
+
68
+ export async function getPublicRecord(resourceName: string, slug: string): Promise<PublicRecord | undefined> {
69
+ const records = await listPublicRecords(resourceName);
70
+ return records.find((record) => record.slug === slug || record.id === slug);
71
+ }
@@ -0,0 +1,42 @@
1
+ import type { Metadata } from "next";
2
+ import type { PublicRecord, PublicResourceConfig } from "./openadmin-client";
3
+
4
+ const siteUrl = process.env.NEXT_PUBLIC_SITE_URL ?? "http://localhost:3001";
5
+
6
+ export function absoluteUrl(path: string): string {
7
+ return new URL(path, siteUrl).toString();
8
+ }
9
+
10
+ export function metadataForRecord(resource: PublicResourceConfig, record: PublicRecord): Metadata {
11
+ const title = String(record[resource.titleField] ?? resource.label);
12
+ const description = String((resource.descriptionField && record[resource.descriptionField]) || record.description || `${resource.label} page`);
13
+ const slug = String(record[resource.slugField] ?? record.id);
14
+ const canonical = absoluteUrl(`${resource.basePath}/${slug}`);
15
+
16
+ return {
17
+ title,
18
+ description,
19
+ alternates: { canonical },
20
+ openGraph: {
21
+ title,
22
+ description,
23
+ url: canonical,
24
+ type: "article"
25
+ },
26
+ twitter: {
27
+ card: "summary_large_image",
28
+ title,
29
+ description
30
+ }
31
+ };
32
+ }
33
+
34
+ export function sitemapXml(urls: Array<{ loc: string; lastmod?: string }>): string {
35
+ const items = urls
36
+ .map((url) => {
37
+ const lastmod = url.lastmod ? `<lastmod>${url.lastmod}</lastmod>` : "";
38
+ return `<url><loc>${url.loc}</loc>${lastmod}</url>`;
39
+ })
40
+ .join("");
41
+ return `<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">${items}</urlset>`;
42
+ }
@@ -0,0 +1,2 @@
1
+ /// <reference types="next" />
2
+ /// <reference types="next/image-types/global" />
@@ -0,0 +1,5 @@
1
+ export default {
2
+ eslint: {
3
+ ignoreDuringBuilds: true
4
+ }
5
+ };
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@openadminjs/web",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "next dev --port 3001",
8
+ "build": "next build",
9
+ "start": "next start --port 3001",
10
+ "lint": "tsc -p tsconfig.json --noEmit",
11
+ "typecheck": "tsc -p tsconfig.json --noEmit",
12
+ "test": "vitest run --passWithNoTests"
13
+ },
14
+ "dependencies": {
15
+ "next": "^15.1.0",
16
+ "react": "^19.0.0",
17
+ "react-dom": "^19.0.0"
18
+ },
19
+ "devDependencies": {
20
+ "@types/node": "^22.10.2",
21
+ "@types/react": "^19.0.1",
22
+ "@types/react-dom": "^19.0.2",
23
+ "autoprefixer": "^10.4.20",
24
+ "postcss": "^8.4.49",
25
+ "tailwindcss": "^3.4.17",
26
+ "typescript": "^5.7.2",
27
+ "vitest": "^2.1.8"
28
+ }
29
+ }
@@ -0,0 +1,6 @@
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {}
5
+ }
6
+ };
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" role="img" aria-label="OpenAdminJS"><image xlink:href="openadminjs-icon-new.png" href="openadminjs-icon-new.png" width="512" height="512" preserveAspectRatio="xMidYMid meet"/></svg>
@@ -0,0 +1,21 @@
1
+ import type { Config } from "tailwindcss";
2
+
3
+ const config: Config = {
4
+ content: ["./app/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}", "./lib/**/*.{ts,tsx}"],
5
+ theme: {
6
+ extend: {
7
+ colors: {
8
+ brand: {
9
+ DEFAULT: "#059669",
10
+ hover: "#047857",
11
+ soft: "#ECFDF5",
12
+ border: "#A7F3D0",
13
+ accent: "#34D399"
14
+ }
15
+ }
16
+ }
17
+ },
18
+ plugins: []
19
+ };
20
+
21
+ export default config;
@@ -0,0 +1,23 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "jsx": "preserve",
5
+ "noEmit": true,
6
+ "plugins": [
7
+ {
8
+ "name": "next"
9
+ }
10
+ ],
11
+ "allowJs": true,
12
+ "incremental": true
13
+ },
14
+ "include": [
15
+ "next-env.d.ts",
16
+ "**/*.ts",
17
+ "**/*.tsx",
18
+ ".next/types/**/*.ts"
19
+ ],
20
+ "exclude": [
21
+ "node_modules"
22
+ ]
23
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "__PACKAGE_NAME__",
3
+ "private": true,
4
+ "version": "0.1.0",
5
+ "scripts": {
6
+ "dev": "openadminjs dev",
7
+ "build": "openadminjs build",
8
+ "start": "openadminjs start",
9
+ "db:migrate": "openadminjs db migrate",
10
+ "db:seed": "openadminjs db seed",
11
+ "db:studio": "openadminjs db studio",
12
+ "generate": "openadminjs generate",
13
+ "doctor": "openadminjs doctor",
14
+ "security:check": "openadminjs security check"
15
+ },
16
+ "dependencies": {
17
+ "openadminjs": "^0.1.0"
18
+ }
19
+ }
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - "apps/*"
3
+ - "packages/*"