Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.markup.freddiephilpot.dev/llms.txt

Use this file to discover all available pages before exploring further.

Installation

Requirements

Before starting, ensure you have the following installed:
  • Node.js 18+ (latest LTS recommended)
  • npm or another compatible package manager
  • PostgreSQL database
  • WorkOS application credentials
Optional:
  • Rust toolchain
  • Tauri v2 CLI (for desktop builds)

Clone the Repository

git clone https://github.com/pphilfre/markup.git
cd markup

Install Dependencies

npm install

Configure Environment Variables

Create a .env.local file in the project root. Example configuration:
# PostgreSQL / Prisma
DATABASE_URL=postgresql://user:password@localhost:5432/markup

# WorkOS AuthKit
WORKOS_CLIENT_ID=
WORKOS_API_KEY=
WORKOS_COOKIE_PASSWORD=
NEXT_PUBLIC_WORKOS_REDIRECT_URI=http://localhost:3000/api/auth/callback

Environment Variable Details

DATABASE_URL

PostgreSQL connection string used by Prisma. Example:
DATABASE_URL=postgresql://markup:password@localhost:5432/markup

WORKOS_CLIENT_ID

Your WorkOS application client ID.

WORKOS_API_KEY

Your WorkOS secret API key. A long random string used for session encryption. You can generate one with:
openssl rand -base64 32

NEXT_PUBLIC_WORKOS_REDIRECT_URI

Authentication callback URL. For local development:
NEXT_PUBLIC_WORKOS_REDIRECT_URI=http://localhost:3000/api/auth/callback

Database Setup

Generate the Prisma client:
npx prisma generate
Run database migrations:
npx prisma migrate dev
(Optional) Open Prisma Studio:
npx prisma studio

Start the Development Server

npm run dev
Open the app:
http://localhost:3000

Production Build

Build the application:
npm run build
Start the production server:
npm run start

Optional - Tauri Desktop

Run Desktop Development Build

npm run tauri:dev

Build Desktop Application

npm run tauri:build

Troubleshooting

Prisma Client Errors

Regenerate the Prisma client:
npx prisma generate

Migration Issues

Reset the local database:
npx prisma migrate reset

Port Already in Use

Run the app on another port:
npm run dev -- -p 3001

Next Steps

  • Configure deployment environment variables
  • Set up PostgreSQL backups
  • Configure WorkOS authentication providers
  • Build the optional Tauri desktop app