@seo-console/package 1.0.0
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.
- package/README.md +114 -0
- package/dist/components/index.d.mts +4 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +3642 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +3593 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/hooks/index.d.mts +43 -0
- package/dist/hooks/index.d.ts +43 -0
- package/dist/hooks/index.js +229 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +201 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/index-6lAOwFXQ.d.mts +329 -0
- package/dist/index-6lAOwFXQ.d.ts +329 -0
- package/dist/index.d.mts +81 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +4377 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4316 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +68 -0
package/README.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# SEO Console Package
|
|
2
|
+
|
|
3
|
+
A production-ready SEO validation and management system for Next.js applications. Install this package into your existing Next.js project to add SEO metadata management capabilities.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @seo-console/package
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
### 1. Set up Supabase
|
|
14
|
+
|
|
15
|
+
1. Create a Supabase project at [supabase.com](https://supabase.com)
|
|
16
|
+
2. Run the database migrations from `supabase/migrations/`:
|
|
17
|
+
- `001_initial_schema.sql` - User profiles
|
|
18
|
+
- `002_seo_records_schema.sql` - SEO records table
|
|
19
|
+
|
|
20
|
+
### 2. Configure Environment Variables
|
|
21
|
+
|
|
22
|
+
Add to your `.env.local`:
|
|
23
|
+
|
|
24
|
+
```env
|
|
25
|
+
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
|
|
26
|
+
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 3. Use in Your Next.js App
|
|
30
|
+
|
|
31
|
+
#### Add SEO Metadata to Pages
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
// app/blog/[slug]/page.tsx
|
|
35
|
+
import { useGenerateMetadata } from "@seo-console/package/hooks";
|
|
36
|
+
|
|
37
|
+
export async function generateMetadata({ params }: { params: { slug: string } }) {
|
|
38
|
+
const metadata = await useGenerateMetadata({
|
|
39
|
+
routePath: `/blog/${params.slug}`,
|
|
40
|
+
});
|
|
41
|
+
return metadata;
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Add Admin Components to Your Admin Page
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
// app/admin/seo/page.tsx
|
|
49
|
+
"use client";
|
|
50
|
+
|
|
51
|
+
import { SEORecordList, SEORecordForm } from "@seo-console/package/components";
|
|
52
|
+
import { ValidationDashboard } from "@seo-console/package/components";
|
|
53
|
+
|
|
54
|
+
export default function SEOAdminPage() {
|
|
55
|
+
return (
|
|
56
|
+
<div>
|
|
57
|
+
<h1>SEO Management</h1>
|
|
58
|
+
<SEORecordList />
|
|
59
|
+
<SEORecordForm />
|
|
60
|
+
<ValidationDashboard />
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## API Reference
|
|
67
|
+
|
|
68
|
+
### Hooks
|
|
69
|
+
|
|
70
|
+
#### `useGenerateMetadata(options)`
|
|
71
|
+
|
|
72
|
+
Generates Next.js metadata from SEO records stored in Supabase.
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { useGenerateMetadata } from "@seo-console/package/hooks";
|
|
76
|
+
|
|
77
|
+
const metadata = await useGenerateMetadata({
|
|
78
|
+
routePath: "/about",
|
|
79
|
+
fallback: {
|
|
80
|
+
title: "Default Title",
|
|
81
|
+
description: "Default description"
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Components
|
|
87
|
+
|
|
88
|
+
#### `SEORecordList`
|
|
89
|
+
|
|
90
|
+
Displays a list of all SEO records with edit/delete functionality.
|
|
91
|
+
|
|
92
|
+
#### `SEORecordForm`
|
|
93
|
+
|
|
94
|
+
Form for creating and editing SEO records.
|
|
95
|
+
|
|
96
|
+
#### `ValidationDashboard`
|
|
97
|
+
|
|
98
|
+
Dashboard showing validation results for all SEO records.
|
|
99
|
+
|
|
100
|
+
#### `OGImagePreview`
|
|
101
|
+
|
|
102
|
+
Preview component showing how OG images appear on social platforms.
|
|
103
|
+
|
|
104
|
+
## Database Schema
|
|
105
|
+
|
|
106
|
+
The package requires two Supabase tables:
|
|
107
|
+
- `profiles` - User profiles (from migration 001)
|
|
108
|
+
- `seo_records` - SEO metadata records (from migration 002)
|
|
109
|
+
|
|
110
|
+
See `supabase/migrations/` for the full schema.
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
MIT
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { B as Button, d as Card, i as CardContent, h as CardDescription, f as CardFooter, e as CardHeader, g as CardTitle, I as Input, O as OGImagePreview, b as SEORecordForm, a as SEORecordList, j as Spinner, V as ValidationDashboard } from '../index-6lAOwFXQ.mjs';
|
|
2
|
+
import 'react/jsx-runtime';
|
|
3
|
+
import 'zod';
|
|
4
|
+
import 'react';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { B as Button, d as Card, i as CardContent, h as CardDescription, f as CardFooter, e as CardHeader, g as CardTitle, I as Input, O as OGImagePreview, b as SEORecordForm, a as SEORecordList, j as Spinner, V as ValidationDashboard } from '../index-6lAOwFXQ.js';
|
|
2
|
+
import 'react/jsx-runtime';
|
|
3
|
+
import 'zod';
|
|
4
|
+
import 'react';
|