Skip to content

Basic CRM designed specifically for busy professionals who understand that their business doesn't exist with their clients and their relationship with them.

Notifications You must be signed in to change notification settings

hackastak/MossKeep

Repository files navigation

MossKeep

A Next.js application with Supabase authentication and Drizzle ORM.

Prerequisites

  • Node.js 18+
  • A Supabase project

Setup

  1. Install dependencies

    npm install
  2. Configure environment variables

    Copy the example environment file and fill in your Supabase credentials:

    cp .env.example .env.local

    Required variables:

    • NEXT_PUBLIC_SUPABASE_URL - Your Supabase project URL
    • NEXT_PUBLIC_SUPABASE_ANON_KEY - Your Supabase anonymous key
    • DATABASE_URL - Your Supabase PostgreSQL connection string
  3. Set up the database

    Generate migrations from the schema:

    npm run db:generate

    Apply migrations to your database:

    npm run db:migrate

    Or push schema directly (for development):

    npm run db:push
  4. Add foreign key constraint for Supabase auth

    Run this SQL in your Supabase SQL Editor to link the users table to Supabase auth:

    ALTER TABLE public.users
    ADD CONSTRAINT users_user_id_fkey
    FOREIGN KEY (user_id) REFERENCES auth.users(id) ON DELETE CASCADE;
  5. Run the development server

    npm run dev

    Open http://localhost:3000 in your browser.

Database Commands

Command Description
npm run db:generate Generate migrations from schema
npm run db:migrate Apply migrations to database
npm run db:push Push schema directly (dev only)
npm run db:studio Open Drizzle Studio GUI

Tech Stack

About

Basic CRM designed specifically for busy professionals who understand that their business doesn't exist with their clients and their relationship with them.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages