@seo-console/package 1.0.1 → 1.0.2

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 (2) hide show
  1. package/README.md +56 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -10,23 +10,40 @@ npm install @seo-console/package
10
10
 
11
11
  ## Quick Start
12
12
 
13
- ### 1. Set up Supabase
13
+ ### 1. Storage Options
14
+
15
+ The package supports multiple storage backends. **File storage is the default** and requires no database setup.
16
+
17
+ #### Option A: File Storage (Default - No Database Required)
18
+
19
+ File storage is the default option. SEO records are stored in a JSON file (`seo-records.json` by default).
20
+
21
+ No configuration needed! The package will automatically use file storage if no Supabase credentials are provided.
22
+
23
+ To customize the file path, set an environment variable:
24
+
25
+ ```env
26
+ SEO_CONSOLE_STORAGE_PATH=./data/seo-records.json
27
+ ```
28
+
29
+ #### Option B: Supabase Storage (Optional)
30
+
31
+ If you prefer using Supabase as your storage backend:
14
32
 
15
33
  1. Create a Supabase project at [supabase.com](https://supabase.com)
16
- 2. Run the database migrations from `supabase/migrations/`:
34
+ 2. Run the database migrations from `migrations/`:
17
35
  - `001_initial_schema.sql` - User profiles
18
36
  - `002_seo_records_schema.sql` - SEO records table
19
-
20
- ### 2. Configure Environment Variables
21
-
22
- Add to your `.env.local`:
37
+ 3. Add environment variables:
23
38
 
24
39
  ```env
25
40
  NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
26
41
  NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
27
42
  ```
28
43
 
29
- ### 3. Use in Your Next.js App
44
+ The package will automatically detect Supabase credentials and use Supabase storage instead of file storage.
45
+
46
+ ### 2. Use in Your Next.js App
30
47
 
31
48
  #### Add SEO Metadata to Pages
32
49
 
@@ -69,7 +86,7 @@ export default function SEOAdminPage() {
69
86
 
70
87
  #### `useGenerateMetadata(options)`
71
88
 
72
- Generates Next.js metadata from SEO records stored in Supabase.
89
+ Generates Next.js metadata from SEO records.
73
90
 
74
91
  ```typescript
75
92
  import { useGenerateMetadata } from "@seo-console/package/hooks";
@@ -101,13 +118,39 @@ Dashboard showing validation results for all SEO records.
101
118
 
102
119
  Preview component showing how OG images appear on social platforms.
103
120
 
104
- ## Database Schema
121
+ ### Server-Side Functions
122
+
123
+ The package exports server-side functions for API routes and server components:
124
+
125
+ ```typescript
126
+ import {
127
+ getSEORecords,
128
+ getSEORecordByRoute,
129
+ createSEORecord,
130
+ updateSEORecord,
131
+ deleteSEORecord,
132
+ generateSitemapFromRecords,
133
+ generateRobotsTxt,
134
+ discoverNextJSRoutes,
135
+ extractMetadataFromURL
136
+ } from "@seo-console/package/server";
137
+ ```
138
+
139
+ ## Storage Backends
140
+
141
+ ### File Storage (Default)
142
+
143
+ - **No database required** - stores data in a JSON file
144
+ - **Perfect for small to medium sites** - simple and fast
145
+ - **File location**: `seo-records.json` (configurable via `SEO_CONSOLE_STORAGE_PATH`)
146
+ - **Automatic**: Works out of the box with no configuration
105
147
 
106
- The package requires two Supabase tables:
107
- - `profiles` - User profiles (from migration 001)
108
- - `seo_records` - SEO metadata records (from migration 002)
148
+ ### Supabase Storage (Optional)
109
149
 
110
- See `supabase/migrations/` for the full schema.
150
+ - **Database-backed** - uses Supabase PostgreSQL
151
+ - **Better for larger sites** - scalable and supports concurrent access
152
+ - **Requires**: Supabase project and migrations
153
+ - **Auto-detected**: If `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_ANON_KEY` are set
111
154
 
112
155
  ## License
113
156
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seo-console/package",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "SEO validation and management system for Next.js applications",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",