Installation
Learn how to install and set up AssetMinder in your project
Prerequisites
Before installing AssetMinder, make sure you have:
- Node.js 18 or later
- A package manager (npm, yarn, or pnpm)
- A database (PostgreSQL, MySQL, or SQLite)
Framework Installation
Create a new Next.js project
npx create-next-app@latest my-simplasset-app
cd my-simplasset-appInstall AssetMinder
npm install @simplasset/core @simplasset/ui @simplasset/cliInitialize AssetMinder
npx simplasset initConfigure your database
Add your database configuration to .env.local:
DATABASE_URL="postgresql://username:password@localhost:5432/mydb"
SIMPLASSET_SECRET="your-secret-key"Create a new Nuxt.js project
npx nuxi@latest init my-simplasset-app
cd my-simplasset-appInstall AssetMinder
npm install @simplasset/nuxt @simplasset/coreAdd the Nuxt module
export default defineNuxtConfig({
modules: ['@simplasset/nuxt'],
simplasset: {
// Configuration options
}
})Configure environment variables
DATABASE_URL="postgresql://username:password@localhost:5432/mydb"
SIMPLASSET_SECRET="your-secret-key"Create a new SvelteKit project
npm create svelte@latest my-simplasset-app
cd my-simplasset-app
npm installInstall AssetMinder
npm install @simplasset/sveltekit @simplasset/coreConfigure SvelteKit adapter
import { sveltekit } from '@sveltejs/kit/vite';
import { simplasset } from '@simplasset/sveltekit';
export default {
plugins: [sveltekit(), simplasset()]
};Set up environment variables
DATABASE_URL="postgresql://username:password@localhost:5432/mydb"
SIMPLASSET_SECRET="your-secret-key"Create a new Astro project
npm create astro@latest my-simplasset-app
cd my-simplasset-appInstall AssetMinder
npm install @simplasset/astro @simplasset/coreConfigure Astro integration
import { defineConfig } from 'astro/config';
import simplasset from '@simplasset/astro';
export default defineConfig({
integrations: [simplasset()]
});Add environment variables
DATABASE_URL="postgresql://username:password@localhost:5432/mydb"
SIMPLASSET_SECRET="your-secret-key"Create a new React project
npx create-react-app my-simplasset-app
cd my-simplasset-appInstall AssetMinder
npm install @simplasset/react @simplasset/coreSet up AssetMinder provider
import { AssetMinderProvider } from '@simplasset/react';
function App() {
return (
<AssetMinderProvider config={{ apiUrl: '/api' }}>
{/* Your app components */}
</AssetMinderProvider>
);
}Configure environment variables
REACT_APP_DATABASE_URL="postgresql://username:password@localhost:5432/mydb"
REACT_APP_SIMPLASSET_SECRET="your-secret-key"Database Setup
AssetMinder supports PostgreSQL, MySQL, and SQLite. We recommend PostgreSQL for production applications.
PostgreSQL
# Install PostgreSQL (macOS)
brew install postgresql
brew services start postgresql
# Create a database
createdb my-simplasset-dbMySQL
# Install MySQL (macOS)
brew install mysql
brew services start mysql
# Create a database
mysql -u root -p -e "CREATE DATABASE my_simplasset_db;"SQLite
For development, you can use SQLite which requires no additional setup:
DATABASE_URL="file:./dev.db"Verification
After installation, verify everything is working:
npx simplasset generate
npx simplasset migrate
npm run devVisit your application and you should see the AssetMinder admin interface at /admin.
Next Steps
Make sure to keep your SIMPLASSET_SECRET environment variable secure and never
commit it to version control.