Installation
Prerequisites
Section titled “Prerequisites”Before installing Grmlin, make sure you have:
- Node.js 18 or later
- A package manager (npm, yarn, or pnpm)
- A database (PostgreSQL, MySQL, or SQLite)
Framework Installation
Section titled “Framework Installation”-
Create a new Next.js project
Section titled “Create a new Next.js project”Terminal window npx create-next-app@latest my-grmlin-appcd my-grmlin-app -
Install Grmlin
Section titled “Install Grmlin”Terminal window npm install @grmlin/core @grmlin/ui @grmlin/cli -
Initialize Grmlin
Section titled “Initialize Grmlin”Terminal window npx grmlin init -
Configure your database
Section titled “Configure your database”Add your database configuration to
.env.local:.env.local DATABASE_URL="postgresql://username:password@localhost:5432/mydb"GREMLIN_SECRET="your-secret-key"
-
Create a new Nuxt.js project
Section titled “Create a new Nuxt.js project”Terminal window npx nuxi@latest init my-grmlin-appcd my-grmlin-app -
Install Grmlin
Section titled “Install Grmlin”Terminal window npm install @grmlin/nuxt @grmlin/core -
Add the Nuxt module
Section titled “Add the Nuxt module”nuxt.config.ts export default defineNuxtConfig({modules: ['@grmlin/nuxt'],grmlin: {// Configuration options},}); -
Configure environment variables
Section titled “Configure environment variables”.env DATABASE_URL="postgresql://username:password@localhost:5432/mydb"GREMLIN_SECRET="your-secret-key"
-
Create a new SvelteKit project
Section titled “Create a new SvelteKit project”Terminal window npm create svelte@latest my-grmlin-appcd my-grmlin-appnpm install -
Install Grmlin
Section titled “Install Grmlin”Terminal window npm install @grmlin/sveltekit @grmlin/core -
Configure SvelteKit adapter
Section titled “Configure SvelteKit adapter”vite.config.js import { sveltekit } from '@sveltejs/kit/vite';import { grmlin } from '@grmlin/sveltekit';export default {plugins: [sveltekit(), grmlin()],}; -
Set up environment variables
Section titled “Set up environment variables”.env DATABASE_URL="postgresql://username:password@localhost:5432/mydb"GREMLIN_SECRET="your-secret-key"
-
Create a new Astro project
Section titled “Create a new Astro project”Terminal window npm create astro@latest my-grmlin-appcd my-grmlin-app -
Install Grmlin
Section titled “Install Grmlin”Terminal window npm install @grmlin/astro @grmlin/core -
Configure Astro integration
Section titled “Configure Astro integration”astro.config.mjs import { defineConfig } from 'astro/config';import grmlin from '@grmlin/astro';export default defineConfig({integrations: [grmlin()],}); -
Add environment variables
Section titled “Add environment variables”.env DATABASE_URL="postgresql://username:password@localhost:5432/mydb"GREMLIN_SECRET="your-secret-key"
-
Create a new React project
Section titled “Create a new React project”Terminal window npx create-react-app my-grmlin-appcd my-grmlin-app -
Install Grmlin
Section titled “Install Grmlin”Terminal window npm install @grmlin/react @grmlin/core -
Set up Grmlin provider
Section titled “Set up Grmlin provider”src/App.tsx import { GrmlinProvider } from '@grmlin/react';function App() {return (<GrmlinProvider config={{ apiUrl: '/api' }}>{/* Your app components */}</GrmlinProvider>);} -
Configure environment variables
Section titled “Configure environment variables”.env REACT_APP_DATABASE_URL="postgresql://username:password@localhost:5432/mydb"REACT_APP_GREMLIN_SECRET="your-secret-key"
Database Setup
Section titled “Database Setup”PostgreSQL
Section titled “PostgreSQL”# Install PostgreSQL (macOS)brew install postgresqlbrew services start postgresql
# Create a databasecreatedb my-grmlin-db# Install MySQL (macOS)brew install mysqlbrew services start mysql
# Create a databasemysql -u root -p -e "CREATE DATABASE my_grmlin_db;"SQLite
Section titled “SQLite”For development, you can use SQLite which requires no additional setup:
DATABASE_URL="file:./dev.db"Verification
Section titled “Verification”After installation, verify everything is working:
npx grmlin generatenpx grmlin migratenpm run devVisit your application and you should see the Grmlin admin interface at /admin.