Quick Start¶
This guide walks through creating your first tenant, user, borrower, and loan. It assumes you've completed the Installation steps.
1. Create a Tenant¶
Tenants are created programmatically. Use the Django shell:
from apps.tenants.models import Tenant, Domain
# Create a tenant
tenant = Tenant.objects.create(
name="Acme Lending",
slug="acme",
status="active",
locale="en-US",
timezone="America/New_York",
default_currency="USD",
)
# Map a domain to the tenant
Domain.objects.create(
tenant=tenant,
domain="acme.localhost",
is_primary=True,
)
This creates the tenant_acme PostgreSQL schema and runs all migrations in it.
2. Create an Admin User¶
Switch to the tenant schema and create a user:
from django_pgschemas.schema import Schema
with Schema.create(schema_name="tenant_acme"):
from apps.users.models import User
user = User.objects.create_user(
email="admin@acme.com",
password="changeme123",
first_name="Admin",
last_name="User",
tenant_role="superadmin",
)
3. Start the Services¶
Open separate terminals for each service:
4. Log In to the Admin Dashboard¶
- Open
http://localhost:5173in your browser - Log in with
admin@acme.com/changeme123 - You should see the dashboard with empty stats
5. Create a Lending Program¶
Before creating loans, you need a lending program and product:
- Navigate to Administration > Programs in the sidebar
- Click Create
- Fill in:
- Name: "Consumer Installment"
- Program Type: Installment Loan
- Day Count Convention: Actual/365
- Accrual Method: Simple
- Payment Allocation Order:
["interest", "fees", "principal"]
- Save
6. Create a Loan Product¶
- Navigate to Administration > Products
- Click Create
- Fill in:
- Name: "36-Month Fixed Personal Loan"
- Program: Select "Consumer Installment"
- Rate Type: Fixed
- Default Interest Rate: 0.085 (8.5%)
- Min Term: 12
- Max Term: 60
- Min Amount: 1000
- Max Amount: 50000
- Grace Period: 15 days
- Save
7. Create a Borrower¶
- Navigate to Origination > Borrowers
- Click Create
- Fill in name, SSN last four, and other required fields
- Save
- Add an address, email, and phone via the tabs on the borrower's show page
8. Create a Loan¶
- Navigate to Origination > Loans
- Click Create
- Fill in:
- Borrower: Select the borrower you created
- Program: Consumer Installment
- Product: 36-Month Fixed Personal Loan
- Principal Amount: 10000
- Interest Rate: 0.085
- Term: 36 months
- Save --- the loan is created in
pendingstatus
9. Process the Loan¶
Approve¶
On the loan's show page, click the Approve action button. This runs compliance checks (if configured) and moves the loan to approved status.
Disburse¶
- Navigate to the Disbursements tab
- Click Create Disbursement
- Enter the amount and method
- Process the disbursement
On completion:
- An amortization schedule is generated
- GL entries are posted (DR Loans Receivable, CR Cash)
- Origination fees are assessed (if configured on the product)
- The loan moves to
activestatus
Record a Payment¶
- Navigate to the Payments tab on the loan
- Click Record Payment
- Enter the amount and payment method
- Submit
The payment is allocated across fees, interest, and principal per the lending program's allocation order, and corresponding GL entries are posted.
10. View Ledger Entries¶
Navigate to Accounting > Journal Entries to see all GL entries generated by the disbursement and payment. Each entry shows balanced debit and credit lines.
You can also view loan-specific entries on the Sub-Ledger tab of the loan's show page.
Next Steps¶
- Architecture Overview --- Understand the system design
- Project Structure --- Learn the codebase layout
- Domain Guide --- Explore all business domains in detail