Getting Started
This guide will help you set up and start using Qmatic Canvas for your visual design projects.
Prerequisites
Before you begin, make sure you have:
- Node.js 18 or later
- pnpm package manager
- A PostgreSQL database (we recommend Neon)
Installation
- Clone the repository:
git clone <your-repo-url>
cd qmatic_canvas
- Install dependencies:
pnpm install
- Set up your environment variables by creating a
.env.local
file:
DATABASE_URL= # Your Neon PostgreSQL connection
BETTER_AUTH_SECRET= # Better Auth secret key
BETTER_AUTH_URL= # Base URL (http://localhost:3000 for dev)
GOOGLE_CLIENT_ID= # Google OAuth credentials
GOOGLE_CLIENT_SECRET=
GITHUB_CLIENT_ID= # GitHub OAuth credentials
GITHUB_CLIENT_SECRET=
RESEND_API_KEY= # Email service for magic links
Database Setup
- Generate the Better Auth schema:
npx @better-auth/cli generate
-
Copy the generated auth-schema.ts content to your Drizzle schema in
src/db/schema.ts
-
Generate and push the database schema:
pnpm run db:generate
pnpm run db:push
Development
Start the development server:
pnpm run dev
Visit http://localhost:3000 to see your application running.
First Steps
- Sign In: Create an account or sign in with Google/GitHub
- Access Dashboard: Navigate to the dashboard to see available features
- Open Canvas Editor: Go to the Surface Editor to start designing
- Explore Components: Use the component library to add elements
- Customize: Use the properties panel to modify component settings
Project Structure
src/
├── app/ # Next.js App Router pages
├── components/ # React components
│ └── dashboard/ # Dashboard-specific components
│ └── canvas/ # Canvas editor components
├── lib/ # Utility functions
├── db/ # Database schema and connection
└── hooks/ # Custom React hooks
Next Steps
- Learn about Components
- Explore the API Reference
- Check out Examples