Before you begin, make sure you have:
git clone https://github.com/usaikoo/openinvoice.git
cd openinvoice
Using Bun (recommended):
bun install
Or using npm:
npm install
Copy the example environment file:
cp env.example.txt .env.local
Edit .env.local and configure the following required variables:
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/openinvoice
# Clerk Redirect URLs
NEXT_PUBLIC_CLERK_SIGN_IN_URL="/auth/sign-in"
NEXT_PUBLIC_CLERK_SIGN_UP_URL="/auth/sign-up"
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL="/dashboard/overview"
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL="/dashboard/overview"
For full functionality, you may also want to configure:
See the Environment Variables guide for complete configuration details.
Generate Prisma Client:
bun prisma generate
Run database migrations:
bun prisma migrate dev
This will create all necessary database tables.
Start the development server:
bun run dev
The application will be available at http://localhost:3000
If you encounter any issues during installation:
DATABASE_URL is correct and PostgreSQL is runningbun prisma migrate resetFor more help, see the Troubleshooting section.