Makeships Beta
Makeships Procurement · setup guide

Set up Makeships Procurement

Install Procurement in your own cloud, set up who approves what, your vendors and budgets, then connect it to Inventory so deliveries and real costs flow back into stock.

Time
About 20 minutes to install, plus time to set up workflows and vendors
Local ports
App 4100 · Postgres 5433
Who does what
A developer installs; your team does the first-run setup in the app.

Before you start

Node.js 20.9+

22 LTS recommended, with npm

Postgres 16

Docker Compose starts one locally; use a managed Postgres in production

A domain on HTTPS

e.g. procurement.example.com

SMTP

For invitations and approval emails

Optional

An AI Gateway key for the AI agents (not needed on Vercel)

For your developer

Install

  1. 1

    Get the code and create the settings file

    Copy the example settings and fill them in (table below).

    cd humlens/apps/humlens-procurement
    cp .env.example .env
  2. 2

    Start the database and create the tables

    Docker Compose starts Postgres on port 5433.

    docker compose up -d
    npm install
    npx prisma migrate deploy
  3. 3

    Run it

    Procurement opens at http://localhost:4100.

    npm run dev
  4. 4

    Deploy to production

    The self-host stack builds the image, runs migrations in a one-off container, then starts the app with Postgres. On a plain Node host, npm run build and npm start do the same.

    cp .env.selfhost.example .env
    docker compose -f docker-compose.selfhost.yml up -d --build

For your developer

Settings

These go in the .env file, or your host's secret manager in production.

Setting Needed What it is
DATABASE_URL Required Postgres connection string
NEXTAUTH_URL, APP_URL Required Procurement's public address
NEXTAUTH_SECRET Required Random string for sign-in sessions
SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, SMTP_FROM Required Email for invitations and approvals
CONNECTIONS_SECRET Recommended Encrypts the Inventory key saved in Settings › Integrations. Falls back to NEXTAUTH_SECRET.
HUMLENS_SSO_SECRET When connected The same 32+ character random value in every connected app, so people move between apps without signing in again.
NEXT_PUBLIC_HUMLENS_INVENTORY_URL, …_PROCUREMENT_URL, …_COMMERCE_URL When connected Each app's public address. Apps with an address appear as links in the menu.
DISABLE_SCHEDULER Serverless only Turns off the built-in message delivery; run npm run agent-scheduler from a cron instead.
AI_GATEWAY_API_KEY Optional Enables the AI agents
AGENT_MAX_AUTO_APPROVE_AMOUNT Recommended Hard ceiling on what an AI agent may approve on its own

For your team

First-run setup

Done in the app's own screens, in this order. No code involved.

  1. 01

    Create your account and team

    Sign up

    The person who creates the team is its Owner.

  2. 02

    Set approval workflows

    Settings › Approval workflows

    Who approves which amount, for example one approver up to ₹25,000 and two above it.

  3. 03

    Add vendors

    Vendors

    New vendors wait for approval before they can be used on a purchase order.

  4. 04

    Set budgets

    Budgets

    Optional. Submitting a request commits its amount against the budget.

  5. 05

    Invite your team

    Settings › Members & invitations

    Requesters raise requests, approvers approve, finance handles invoices and payments, auditors can only read.

Commerce · Inventory · Procurement

Connect the apps

Procurement receives purchase requests from Inventory (and the store) and sends deliveries and costs back to Inventory.

  1. 1

    Give the store and Inventory a key each

    Settings › API keys

    Create keys named "Store" and "Inventory". Paste the first into the store under Connect › Integrations › Operations, and the second into Inventory under Settings › Integrations.

  2. 2

    Connect to Inventory

    Settings › Integrations

    Paste Inventory's address and a key created there, then Test and connect. Keep Add received goods to Inventory stock and Update item costs from approved invoices on.

Setting up all three? Do them in this order: Commerce, Inventory, then Procurement, and connect them last.

Check it works

  • You can sign in, and invitation emails arrive.
  • A low-stock request from Inventory appears under Requisitions.
  • Approving it, raising the PO from it and receiving the goods adds exactly that quantity to Inventory.
  • Approving the supplier's invoice updates the item's cost in Inventory.
  • Settings › Integrations shows Inventory connected and no failed messages.

Troubleshooting

A delivery didn't add stock

Raise POs from the approved request so each line carries its SKU. POs typed from scratch have no SKUs.

A red banner says updates couldn't be delivered

Open Settings › Integrations, fix the cause shown, then press Retry now.

Invitation emails don't arrive

Check the SMTP_* settings and that SMTP_FROM is allowed to send from your provider.

A new vendor can't be picked on a PO

Approve the vendor first on its page; only Active vendors appear.

Going live

  • Fresh random NEXTAUTH_SECRET and CONNECTIONS_SECRET, never committed.
  • npm run build runs on every deploy (it applies migrations).
  • On serverless hosting, DISABLE_SCHEDULER=1 and a cron running npm run agent-scheduler.
  • SMTP uses your production domain, with SPF and DKIM set up.
  • Daily database backups, with a restore tested once.

Rather have us set it up?

Our team can install Procurement in your AWS, GCP or Azure account and configure it with you.

Other setup guides