diff --git a/docs/api/auth-service.html b/docs/api/auth-service.html new file mode 100644 index 00000000..c3e7659f --- /dev/null +++ b/docs/api/auth-service.html @@ -0,0 +1,51 @@ + + + + + + + @create-mern-app/auth-service + + + + + +
+ ← Back to API Index +

@create-mern-app/auth-service

+

Simple OAuth2.0 helper: auth URL, token exchange, refresh, profile.

+ +

Install

+
npm install @create-mern-app/auth-service
+ +

Usage

+
import AuthService from '@create-mern-app/auth-service';
+
+const authService = new AuthService({
+  clientId: 'your_client_id',
+  clientSecret: 'your_client_secret',
+  redirectUri: 'http://localhost:5500/callback',
+  authBaseUrl: 'http://localhost:3000'
+});
+
+const url = authService.getAuthUrl();
+// Redirect user to `url`
+
+const { accessToken, refreshToken } = await authService.getAccessToken('auth_code');
+const refreshed = await authService.getRefreshToken(refreshToken);
+const profile = await authService.getUserProfile(accessToken);
+
+ +

API

+ +
+ + + + diff --git a/docs/api/create-mernjs-app.html b/docs/api/create-mernjs-app.html new file mode 100644 index 00000000..ccf9b300 --- /dev/null +++ b/docs/api/create-mernjs-app.html @@ -0,0 +1,77 @@ + + + + + + + CLI: create-mernjs-app + + + + + +
+ ← Back to API Index +

create-mernjs-app (CLI)

+

Scaffold apps, libraries, packages, and snippets from curated templates.

+ +

Requirements

+ + +

Usage

+
npx create-mernjs-app <project-directory> [--template app|library|packages|snippets] [--yes]
+ +

Arguments

+ + +

Options

+ + +

Examples

+
# Create an app (interactive category selection)
+npx create-mernjs-app my-app
+
+# Create a library project
+npx create-mernjs-app my-lib --template library
+
+# Create from packages catalog
+npx create-mernjs-app my-tool --template packages
+
+# Create from snippets catalog, auto-confirm
+npx create-mernjs-app my-sample --template snippets --yes
+ +

What it does

+
    +
  1. Validates project name and Node version.
  2. +
  3. Loads live template list from GitHub.
  4. +
  5. Prompts for a template within the chosen catalog.
  6. +
  7. Performs a sparse checkout to copy only the selected template.
  8. +
  9. Rewrites package.json name (and app.json for React Native).
  10. +
  11. Runs npm install --legacy-peer-deps.
  12. +
  13. Prints next steps: cd <project> and npm run dev.
  14. +
+ +

Troubleshooting

+ + +

Links

+ +
+ + + + diff --git a/docs/api/index.html b/docs/api/index.html new file mode 100644 index 00000000..5603e8cf --- /dev/null +++ b/docs/api/index.html @@ -0,0 +1,40 @@ + + + + + + + Create MERN App - API Docs + + + + + +
+

Create MERN App - API Documentation

+

Public commands, functions, and components with concise usage examples.

+ +

CLI

+ + +

Packages

+ + +

Templates and Boilerplates

+

See the main site for template catalogs and usage steps.

+ +
+ + + + diff --git a/docs/api/node-google-sheet.html b/docs/api/node-google-sheet.html new file mode 100644 index 00000000..f94abf4f --- /dev/null +++ b/docs/api/node-google-sheet.html @@ -0,0 +1,52 @@ + + + + + + + @mernjs/googlesheets + + + + + +
+ ← Back to API Index +

@mernjs/googlesheets

+

Wrapper for Google Sheets: authorize, manage sheets, and CRUD data.

+ +

Install

+
npm install @mernjs/googlesheets
+ +

Quick start

+
import GoogleSheets from '@mernjs/googlesheets';
+
+const sheets = new GoogleSheets();
+await sheets.authorize('path/to/key.json', 'spreadsheet-id');
+await sheets.connectSheet('MyActiveSheet');
+
+await sheets.createSheet('NewSheetTitle');
+const all = await sheets.getAllSheets();
+const values = await sheets.getSheet('sheetId');
+await sheets.updateSheet('sheetId', 'UpdatedTitle');
+await sheets.deleteSheet('sheetId');
+
+await sheets.addHeader(['Name', 'Email']);
+await sheets.insertData([{ Name: 'Alice', Email: 'a@example.com' }]);
+const found = await sheets.findData({ Email: 'a@example.com' });
+await sheets.updateData({ Email: 'a@example.com' }, { Name: 'Alice A.'});
+await sheets.deleteData({ Email: 'a@example.com' });
+
+ +

Key methods

+ +
+ + + + diff --git a/docs/api/react-svg-icons-loader.html b/docs/api/react-svg-icons-loader.html new file mode 100644 index 00000000..74153a6e --- /dev/null +++ b/docs/api/react-svg-icons-loader.html @@ -0,0 +1,56 @@ + + + + + + + react-svg-icons-loader + + + + + +
+ ← Back to API Index +

react-svg-icons-loader

+

Lightweight React SVG icon loader with component and named exports.

+ +

Install

+
npm install react-svg-icons-loader
+ +

Usage

+

Icon component

+
import Icon from 'react-svg-icons-loader';
+
+export default function Example() {
+  return (
+    <div>
+      <Icon name="Hierarchical" size={100} color="blue" />
+      <Icon name="Businessman" size={100} color="blue" />
+    </div>
+  );
+}
+ +

Named icons

+
import { Businessman, Hierarchical } from 'react-svg-icons-loader';
+
+export default function Example() {
+  return (
+    <div>
+      <Hierarchical size={100} color="blue" />
+      <Businessman size={100} color="blue" />
+    </div>
+  );
+}
+ +

Props

+ +
+ + + + diff --git a/docs/api/xml-to-json-chunk-processor.html b/docs/api/xml-to-json-chunk-processor.html new file mode 100644 index 00000000..808b2735 --- /dev/null +++ b/docs/api/xml-to-json-chunk-processor.html @@ -0,0 +1,51 @@ + + + + + + + xml-to-json-chunk-processor + + + + + +
+ ← Back to API Index +

xml-to-json-chunk-processor

+

Split large XML files by tag and convert chunks to JSON with callbacks.

+ +

Install

+
npm install xml-to-json-chunk-processor
+ +

Usage

+
const xmltoJson = require('xml-to-json-chunk-processor');
+
+const params = {
+  xmlUrl: 'path/to/large.xml',
+  openingTag: '<item>',
+  closingTag: '</item>',
+  chunkSize: 2500,
+  callback: (data) => {
+    console.log('Processed data:', data);
+  }
+};
+
+xmltoJson(params)
+  .then(() => console.log('XML Processing Completed'))
+  .catch(console.error);
+
+ +

Parameters

+ +
+ + + + diff --git a/docs/api/xml-to-mongodb-importer.html b/docs/api/xml-to-mongodb-importer.html new file mode 100644 index 00000000..3955fbf3 --- /dev/null +++ b/docs/api/xml-to-mongodb-importer.html @@ -0,0 +1,54 @@ + + + + + + + xml-to-mongodb-importer + + + + + +
+ ← Back to API Index +

xml-to-mongodb-importer

+

Split large XML files and import parsed JSON into MongoDB.

+ +

Install

+
npm install xml-to-mongodb-importer
+ +

Usage

+
const { runImporter } = require('xml-to-mongodb-importer');
+
+const params = {
+  xmlUrl: 'path/to/file.xml',
+  openingTag: '<item>',
+  closingTag: '</item>',
+  connection: {
+    mongoURI: 'mongodb://localhost:27017',
+    databaseName: 'yourDb',
+    collectionName: 'items'
+  },
+  chunkSize: 2500
+};
+
+runImporter(params)
+  .then(() => console.log('Import completed successfully!'))
+  .catch(console.error);
+
+ +

Parameters

+ +
+ + + + diff --git a/docs/index.html b/docs/index.html index b616bd89..831050ed 100755 --- a/docs/index.html +++ b/docs/index.html @@ -320,6 +320,13 @@

Getting started is easy!

MERN App.

+
+

+ Looking for API and package documentation? Visit the + API Docs for CLI commands and package usage examples. +

+
+

Create MERN App