Read the contract, flag the risk, report it clearly
AR Contract Analyser is a review aid for advocates. An advocate signs in, uploads a contract PDF (the text is extracted server-side with iTextSharp) or pastes the contract text, and names the contract and its type. The AI then works through the contract clause by clause: it classifies each clause, assigns a risk level — red, amber or green — scores it, explains in plain language why it matters, and suggests an amendment where the clause is one-sided or risky. It also checks the contract against the standard clauses a document of its type usually contains and lists any that appear to be missing. The results are shown as a red/amber/green clause map with an overall-risk banner and red, amber and green counts. From there the advocate can open the AR review — red, amber and green markers overlaid on the printed contract page on supported devices, with a 2D risk map that works everywhere — download a PDF risk report, and use the clause library to explain a clause or request a safer amendment. The tenant is the firm: every advocate shares that firm's contracts, clauses, reports and clause templates, and each record is scoped to the firm.
Upload or paste
Upload a contract PDF for server-side text extraction, or paste the contract text directly, then name it and pick a type.
Clause-by-clause risk
Each clause is classified, flagged red, amber or green, explained in plain language and given an amendment suggestion.
Missing-clause detection
The contract is checked against the standard clauses its type usually carries, and any that look absent are listed.
AR risk overlay
Red, amber and green markers overlay the printed contract page on supported devices, with a universal 2D risk map everywhere.
PDF risk report
A clean iTextSharp PDF with the overall risk, red/amber/green counts, the summary, missing clauses and the full clause table.
Clause library
Browse standard clause templates and use AI tools to explain a clause in plain language or suggest a safer amendment.
FirmID (the kit
OrgId), all under the prefix ACR_.
Please read this before relying on any result
AR Contract Analyser is AI-assisted decision support. It is not legal advice, and it is not a substitute for a qualified advocate.
- The AI reasons over the contract text you provide. It can miss a clause, misclassify a risk, or misread text that was imperfectly extracted from a scanned or complex PDF.
- Red, amber and green flags, explanations, amendment suggestions and the "missing clauses" list are starting points for an advocate's own review — not conclusions, and not tailored legal advice for a specific matter, jurisdiction or client.
- A qualified advocate must read the contract in full and independently verify every flag and suggestion before advising a client, negotiating or signing. Nothing in this product creates an advocate-client relationship.
This message is surfaced across the app — on the landing page, in the master header, on the analysis and report screens, and on the PDF risk report — so it is always in view.
Built for advocates who review contracts
Advocates & law firms
Practitioners in corporate, commercial and IP work who review a steady stream of agreements and want a faster first pass.
In-house legal teams
Company legal teams triaging vendor, service and employment contracts before they reach an advocate for sign-off.
Junior advocates
Associates who benefit from a structured clause-by-clause view and plain-language explanations while they build experience.
Contract negotiators
Anyone preparing to negotiate who wants the risky and one-sided clauses surfaced with concrete amendment ideas.
It suits any advocate who wants to standardise a first-pass contract review and produce a clear risk report. AR Contract Analyser is a decision-support and documentation aid: the AI reasons over the contract text the advocate provides — it does not replace an advocate's judgement, and every result must be independently checked before it is relied on.
Per-advocate monthly subscription
AR Contract Analyser is billed as a flat monthly subscription per advocate — one price per advocate covers contract text extraction, clause-by-clause AI risk analysis, missing-clause detection, the AR risk overlay and 2D risk map, PDF risk reports and the clause library. Payment is via Razorpay from the Subscription area, and a successful charge keeps the firm plan active for one month from the payment date.
The page map
| Page | Who | Purpose |
|---|---|---|
| ACR_AdvocateDashboard.aspx | All signed-in | The post-login home: the firm name and plan tier, stat cards (contracts, analysed, total red flags, total amber flags, advocates, clause templates), big CTAs to analyse a contract, open the AR review or the clause library, and a recent-contracts list with an overall-risk chip. |
| ACR_ContractUpload.aspx | All signed-in workhorse | Upload a contract PDF (text extracted server-side) or paste contract text with a title and type, then run the analysis. Shows the clause-by-clause red/amber/green cards, the overall-risk banner, the missing-clause panel, a per-clause "explain" action, and links to the AR review and PDF risk report. |
| ACR_ARContractView.aspx | All signed-in hero | The AR review of a contract's risk: MindAR image tracking overlays red, amber and green markers on the printed contract page on supported devices, with a universal 2D risk-map fallback (a vertical list of red/amber/green clause cards) that works on every device. |
| ACR_RiskReport.aspx | All signed-in | Pick a contract (or deep-link) and see the on-page risk report: overall-risk banner, red/amber/green counts, the summary, the missing-clauses list and the full clause table, with a "Download PDF" button. |
| ACR_ClauseLibrary.aspx | All signed-in | Browse and manage the clause template library (shared plus firm-owned), filter by contract type, and use two AI tools: explain a clause in plain language, or suggest a safer amendment for a one-sided clause. |
| ACR_Subscription.aspx | Settings capability | Current plan, expiry and days remaining, and a Razorpay checkout to subscribe or renew the firm plan. |
| ACR_Master.master | Layout | The shared master page — sidebar navigation, topbar, mobile hamburger menu and a persistent "AI decision-support, not legal advice" note — every ACR_ page renders inside it. |
From an uploaded contract to a PDF risk report
Upload or paste
On ACR_ContractUpload.aspx the advocate uploads a PDF (text extracted by ACR_ContractUploadHandler.ashx via iTextSharp) or pastes the contract text.
Analyse clauses
AnalyseContract classifies each clause, flags it red/amber/green, explains it and suggests an amendment; the clauses are saved.
Detect missing
DetectMissingClauses compares the present clause titles against the standard clauses for the contract type and lists any gaps.
Save the report
Red/amber/green counts and the overall risk are computed and stored via ACR_usp_SaveRiskReport; status becomes 'analysed'.
Review in AR / 2D
ACR_ARContractView.aspx overlays risk markers on the printed page in AR, with a 2D risk map that works everywhere.
Export the PDF
ACR_RiskReportPdf.ashx produces the downloadable PDF risk report, disclaimer included.
Four focused AI passes, all routed through ACR_ClaudeHelper
All AI calls are routed through ACR_ClaudeHelper and never throw — on any error
or malformed reply, the calling page shows a clear message instead of a raw exception. The provider is
configurable (Groq by default, or the Claude API), and every prompt returns strict JSON so the pages can render
structured, defensively-parsed results. None of these outputs is legal advice; each is an aid for an advocate's
own review.
AnalyseContract — clause-by-clause risk analysis
You are assisting a qualified advocate with a first-pass contract
review. This is decision support, NOT legal advice. Analyse the
contract clause by clause. Contract type: "{{contract_type}}".
Contract text: {{contract_text}}
Return STRICT JSON only:
{ "overallRisk": "low | medium | high",
"summary": "a short plain-language summary of the key risks",
"clauses": [ { "clauseNo": 1, "title": "short clause title",
"category": "e.g. Liability | Payment | IP | Confidentiality",
"riskLevel": "red | amber | green", "riskScore": 0-100,
"explanation": "why this clause matters, in plain language",
"suggestion": "a safer amendment, or 'No change required'" } ] }
Base it only on the text provided. Flag anything one-sided or unusual.
Remind that an advocate must verify every point. No emojis, no hype.
DetectMissingClauses — standard clauses that appear absent
Given a "{{contract_type}}" contract, list the standard protective
clauses it commonly SHOULD contain but appears to be missing.
Clause titles already present (JSON): {{present_clause_titles_json}}.
Return STRICT JSON: { "missing": [ "Liability cap tied to fees",
"Force Majeure clause", "Dispute resolution / arbitration" ] }
Only list genuinely standard clauses for this contract type that are
not already present. This is guidance for an advocate to confirm, not
legal advice. No emojis, no hype.
ExplainClause — a clause in plain language
Explain this contract clause in plain language for an advocate's
quick reference. Clause: {{clause_text}}
Return STRICT JSON: { "plainLanguage": "what the clause means",
"risks": [ "a risk or one-sided aspect" ],
"suggestion": "an optional safer approach" }
Base it only on the clause text. This is decision support, not legal
advice; the advocate must confirm it. No emojis, no hype.
SuggestAmendment — a safer re-draft
Suggest a safer, more balanced amendment to this contract clause.
Clause: {{clause_text}}. Current risk level: {{risk_level}}.
Return STRICT JSON: { "amendedText": "the suggested re-draft",
"rationale": "why this is safer / more balanced" }
Keep the amendment fair to both parties and drawn only from the clause
given. This is a drafting aid an advocate must review, not legal
advice. No emojis, no hype.
ACR_usp_SaveClause (after ACR_usp_ClearClauses clears any
prior analysis), and the overall risk, summary, missing-clause list and red/amber/green counts via
ACR_usp_SaveRiskReport — so a contract can be reopened, re-analysed and re-exported
as a PDF later.A universal 2D risk map, with a MindAR image-tracked overlay where the device supports it
The risk view always works as a 2D risk map in the browser — a vertical list of red, amber and green clause cards that renders on any device with no camera and no marker. The optional AR overlay uses MindAR image tracking to recognise the printed contract page and float red, amber and green risk markers over it; it needs a camera, HTTPS, and the printed page matching the analysed contract's image target. When the camera or MindAR is unavailable — notably on some iOS browsers and most desktops — the page shows an honest note and keeps the fully-working 2D risk map as the universal fallback. The AR overlay is a visualisation aid to help relate the risk flags to the paper contract — it is not a certified, precisely-registered overlay and must not be relied on for exact positioning.
- AR uses
mind-ar@1.2.5image tracking; the target is the contract'sTargetMindPath.mindfile, falling back to the demo target/ArProjects/ARContractAnalyser/targets/demo-contract.mind. The page handles a missing target gracefully by staying in the 2D view. - Everyone gets the 2D risk map — the red/amber/green clause cards — straight from the analysis, so the risk is always reviewable regardless of device or camera.
- The user can switch modes explicitly, and the page defaults to the 2D map when AR is not available.
Marketing and in-app copy describe this accurately — "review the risk as a red/amber/green map anywhere, and overlay it on the printed contract in AR on supported devices" — never implying the AR overlay is a certified registration or that it works on every device.
2D risk map
A vertical list of red/amber/green clause cards with the overall-risk banner and counts — works on every device.
MindAR overlay
On supported devices with a camera, red/amber/green markers float over the recognised printed contract page.
Tappable markers
Each marker opens that clause's title, risk level and explanation, tying the flag back to the wording.
Aid, not certification
The overlay assists orientation; it is not precise registration and is not a substitute for reading the contract.
Red, amber and green — used consistently everywhere
Every clause carries a single, fixed-colour risk level. The same three colours are used on the clause cards, the AR markers, the 2D risk map, the report table and the PDF, so the meaning never shifts.
Red — high risk
A clause that is one-sided, unusual or exposes a party to open-ended risk (for example unlimited liability or an uncapped indemnity). Renegotiate before signing.
Amber — caution
A clause that is workable but vague or incomplete (for example undefined payment terms or an IP assignment with no background-IP carve-out). Tighten the wording.
Green — low risk
A balanced, well-drafted clause with a clear scope and mutual terms. Usually no change required.
The stack
Backend
ASP.NET Web Forms, VB.NET, .NET Framework 4.7.2. AJAX via page <WebMethod> PageMethods returning JSON. No full-page postbacks for data operations.
Database
SQL Server (shared db_9b0fff_aiscompany). Parameterised CDATA SQL and stored procedures via ACR_DBHelper, soft delete (IsDeleted), audit columns. Prefix-scoped to ACR_.
Frontend
Tailwind CDN, legal indigo/gold glassmorphism, Font Awesome 6.5.1, MindAR (mind-ar@1.2.5) image tracking for the AR risk overlay, an optional Chart.js risk chart, and the master page ACR_Master.master with a persistent "not legal advice" note.
Integrations
Groq/Claude AI routing (contract analysis, missing-clause detection, clause explanation, amendment suggestion), iTextSharp for both the server-side PDF text extraction and the PDF risk report, Razorpay (subscription checkout + webhook), WhatsApp (1msg.io) analysis-ready notices, Telegram build/activity alerts.
Shared helpers referenced across the pages: ACR_DBHelper
(GetTable / GetTableSP / GetTableSPSet / ExecuteSP / Scalar / P), ACR_ClaudeHelper
(AnalyseContract, DetectMissingClauses,
ExplainClause, SuggestAmendment),
ACR_WhatsApp, and the shared AIS RBAC/auth kit for sign-in, since there is no separate
ACR_Auth table — the advocate's identity comes from the shared kit and the firm is
the OrgId.
A firm-scoped data model
Tables
ACR_Firms
The tenant firm — name, practice areas, city, contacts, subscription tier and expiry. FirmID is the kit OrgId.
ACR_Advocates
The firm's advocates — name, bar registration number and specialisation, linked to the shared kit user via KitUserId.
ACR_ContractUploads
Uploaded or pasted contracts — title, type, file path, the extracted text, the MindAR target path and status (uploaded / analysed).
ACR_ClauseAnalysis
One row per analysed clause — number, title, text, category, risk level (red/amber/green), score, explanation and amendment suggestion.
ACR_RiskReports
The overall risk summary — overall risk, summary text, the missing-clauses JSON and the red/amber/green counts.
ACR_TemplateLibrary
Clause templates — contract type, clause name, standard text and guidance. A NULL FirmID is a shared, read-only template.
ACR_Subscriptions
Razorpay subscription/order rows — plan, amount, dates, status and webhook payload.
ACR_WhatsAppLog
WhatsApp notices — mobile number, message type, body, status and time, for analysis-ready notifications.
ACR_error_log / ACR_activity_log / ACR_ai_calls
Page/method error log, the activity trail (tenant firm and acting kit-user kept distinct) and a log of AI calls.
Key stored procedures
| ACR_usp_GetFirm | Resolve the tenant firm row with its subscription tier and expiry. |
| ACR_usp_GetDashboard | Headline counts for the dashboard (contracts, analysed, red/amber flag totals, advocates, templates). |
| ACR_usp_GetContracts / GetContract / SaveContract / DeleteContract / SetContractStatus | List, read, upsert, soft-delete contracts, and set the uploaded / analysed status. |
| ACR_usp_SaveClause / GetClauses / ClearClauses | Save each analysed clause, list a contract's clauses, and clear prior clauses before a re-analysis. |
| ACR_usp_SaveRiskReport / GetRiskReport | Save the overall risk, summary, missing-clause list and counts; read the latest report for a contract. |
| ACR_usp_GetTemplates / GetTemplate / SaveTemplate / DeleteTemplate | Browse (shared + firm), read, upsert or soft-delete clause templates. |
| ACR_usp_GetAdvocates / SaveAdvocate | List the firm's advocates and upsert an advocate record. |
| ACR_usp_SaveSubscription | Record a subscription/order row; extends the firm's plan on a paid/active/charged webhook event. |
Deploy via sqlcmd
Apply the product schema directly to the shared SQL Server instance, then verify object counts. The script is
idempotent and prefix-scoped — it never touches other products' objects. (The prefix is
ACR_, remapped from the spec's ACA_ to avoid a collision with an
existing Academy product already in the shared database.)
sqlcmd -S sql5083.site4now.net -U db_user -P ****** -d db_9b0fff_aiscompany ^
-i C:\asp.net\CompanyProjects\AIAis\ArProjects\ARContractAnalyser\ACR_Database.sql
-- verify
SELECT COUNT(*) FROM sys.tables WHERE name LIKE 'ACR_%'; -- the product tables
SELECT COUNT(*) FROM sys.procedures WHERE name LIKE 'ACR_usp_%'; -- the proc layer
Serve the site over HTTPS at /ArProjects/ARContractAnalyser/ — required for the
camera used by the MindAR AR overlay. Set the Groq/Claude and Razorpay credentials in the shared config. Sign in,
upload a contract PDF or paste contract text, run the analysis to see the clause-by-clause red/amber/green cards
and missing clauses, open the AR review to see the risk overlay and 2D risk map, download the PDF risk report, and
use the clause library to explain a clause or suggest an amendment.
Demo & review accounts
ACR_Default login. The demo firm "Demo Legal Associates" is seeded with two advocates,
one already-analysed demo "Master Services Agreement" with realistic clause prose, six clause rows spanning red,
amber and green, a risk report and five shared clause templates. The reviewer/demo account is granted full,
non-expiring access so every module unlocks without hitting a paywall or checkout — important for app-store
and Play-review access checks.How contracts, clauses and the AI results are handled
Server-side gating
Every authenticated page and PageMethod re-checks sign-in and the calling firm's own FirmID — never trusting the client.
Firm scoping
All contracts, clauses, risk reports and firm-owned templates are filtered by the signed-in firm's FirmID, so one firm never sees another's data.
Defensive AI parsing
AI responses for analysis, missing clauses, explanations and amendments are parsed defensively; malformed output surfaces as a clear on-screen message rather than a raw error or a corrupted save.
Not legal advice
The disclaimer is surfaced across the app and on the PDF; every AI output is decision support that a qualified advocate must independently verify.
Payment verification
Razorpay orders are created server-side; webhook events are HMAC-verified before a subscription is marked paid.
Contract confidentiality
Contracts and clauses are stored against the firm's own account to support reopening, reporting and PDF export; they are not used to train any model.
Where AR Contract Analyser goes next
- Redline / compare mode: compare an uploaded contract against a firm's standard template and highlight every deviation, not just clause-level risk.
- Anchored AR clause pinning: pin each risk marker to the exact clause on the page via OCR text anchoring, moving beyond a whole-page image target toward precise per-clause placement.
- Clause-level negotiation log: track which flagged clauses were accepted, amended or rejected across drafts, with a version history per contract.
- Jurisdiction & contract-type packs: curated missing-clause checklists and standard wording per jurisdiction and contract type, maintained by the firm.
- Batch review: analyse a folder of contracts at once and produce a portfolio risk dashboard for a legal team.
- Advocate sign-off workflow: a review-and-approve step where a qualified advocate confirms or overrides each AI flag before the report is finalised, reinforcing that the advocate makes the final call.
- Export to Word: generate a redlined DOCX with the suggested amendments as tracked changes for onward negotiation.