DEV3 Promptly – AI Content & Chatbot SaaS Laravel Script with AI Writer, Document Chat & Credit Plans

A self-hosted AI SaaS on Laravel 12 and Filament 4: an AI writer with 50 templates and live streaming, chat with your documents with cited answers, embeddable website chatbots with leads, and workspaces on credit plans, all on provider-agnostic DEV3 AI.

by DEV3 TechnologiesVerified Author(0) 0 sales 0 viewsUpdated 01 Nov 2026

Video tour. Pick a section below to browse 118 screenshots in 22 sections.

Promptly is a complete AI content and chatbot platform that you host yourself and sell as your own SaaS, built by DEV3 Technologies on Laravel 12, Filament 4 and Livewire 3. Your customers sign up, get a workspace on a credit plan, and use an AI writer, a long-form editor, chat with their own documents and website chatbots that answer visitors and capture leads. Every request is metered in credits, and you run the platform from a super-admin panel with plans, billing, MRR, usage analytics and abuse review.

You bring the AI provider. In the product the AI is always called DEV3 AI, and the provider behind it is an admin-only setting. Promptly ships with an offline demo model that needs no API key and costs nothing, so you can install it and try every feature straight away. To serve real customers, connect your own OpenAI-compatible, Anthropic or Google API key in Settings. Your provider bills you directly for that usage, and you set the credit prices your customers pay.

No live demo: the 118 grouped screenshots and the two video tours above show every screen, including the writer, document chat, chatbot and upgrade flows step by step. All the text in them, including the streamed answers and the cited replies, was written by the offline demo model. Install it with the bundled demo data (the fictional agency "Brightpath Media" and its neighbours) to try every role on your own server.

DEV3 AI: one AI layer, your provider

  • Every AI call goes through one pipeline: moderation, a credit check against an estimate, the provider driver, a usage log and the credit debit.
  • Drivers: the offline demo model (the default), an OpenAI-compatible driver, an Anthropic driver and a Google driver, all with streaming and token counting. The OpenAI-compatible base URL is a setting, so the same driver can talk to any Chat Completions-compatible endpoint, hosted or self-hosted. You can also add your own driver for any other provider.
  • Models: each row in DEV3 AI → Models & providers is an option your customers choose, such as "DEV3 AI Swift", "Balanced", "Deep Context" or "Pro". You map it to a provider and an exact model id, and give it a credit multiplier that reflects what it costs you.
  • API keys are stored encrypted and never reach the workspace app, the widget or the public website.

AI writer

  • 50 templates in 7 categories: blog, ads, email, e-commerce, social, website and SEO, and business. Each template has its own fields and a prompt with placeholders, and you can edit them or add your own in the admin panel.
  • Tone (10 options), 10 output languages, three lengths and the DEV3 AI model. The workspace's brand voice guidelines are added to every prompt automatically.
  • The answer streams in word by word over ordinary HTTP (server-sent events), with no websockets, Node.js or Redis. The neural orb in the brief panel pulses with every token.
  • History of every run with favourites, ratings and reuse with the same inputs, and "Save & edit" turns a result into a document.

Long-form editor

  • A rich-text editor with autosave, word count and reading time.
  • Continue writing streams the next section straight into the page.
  • Select any passage to improve, shorten, expand, simplify, fix grammar, change the tone or summarise, then replace it or insert the suggestion.
  • Export to Markdown, HTML or plain text, mark drafts final and keep favourites.

Chat with your documents

  • Upload PDF, DOCX, TXT, Markdown or CSV files (10 MB by default) or import a web page by URL; scripts, navigation and footers are stripped.
  • Text is split into chunks of about 900 characters with overlap. Each chunk keeps its nearest heading and page number and never spans two pages.
  • Answers come only from the sources you pick. Every claim carries a numbered citation like [1], and opening it shows the document, page, section and the exact passage.
  • Built-in offline embeddings need no API. For semantic search, connect an OpenAI-compatible embeddings endpoint and re-index.
  • Uploads stay private: files are stored on a private disk in a folder per workspace under random names, never in the public web folder, and only signed-in members of that workspace can download the original.

Website chatbots

  • Train a chatbot on chosen documents and web pages, then set its persona, welcome message, fallback answer, colour, light or dark theme, position, launcher text and suggested questions.
  • Install it with one script tag. The widget runs in a Shadow DOM, so it never clashes with the host site's CSS, and switches to right-to-left for Arabic.
  • Locked to your sites: requests from domains outside the bot's allowed list get a 403. Each visitor gets a signed, expiring token tied to one conversation, and each bot is rate-limited per visitor IP.
  • Each bot also has a hosted chat page for links and QR codes, and a preview on a sample website.

Inbox, hand-over and leads

  • Every conversation lands in a team inbox with the visitor's page and device, the bot's cited answers and filters for open, needs-human, leads and resolved.
  • When a visitor asks for a person, the bot hands over and flags the conversation. Your team's reply appears in the visitor's widget.
  • Lead capture (on plans that include it) asks for the fields you choose after a set number of questions. Leads go to a pipeline (new, contacted, qualified, won, lost) with tags, notes and CSV export, and the workspace owner gets an email and an in-app notification.

Workspaces, plans and credits

  • Every customer works in a workspace with members and roles (owner, admin, editor, viewer), email invitations and a workspace switcher. Agencies can run one workspace per client.
  • Roles are enforced on the server, in the pages, the streaming endpoints and the API. Viewers are read-only: they can open documents, history, chatbots, the inbox, leads and usage, but can't run DEV3 AI, edit or reply.
  • Plans carry a monthly credit allowance and limits on chatbots, knowledge sources, documents and members. Four starter plans, Free, Creator, Pro and Agency with 1,000 to 40,000 credits a month, are fully editable.
  • Plan features are enforced: lead capture and the inbox's lead tools, REST API access, premium DEV3 AI models and removing the "Powered by" badge are switched on per plan and checked on the server. Locked features show an "Upgrade plan" link.
  • Credits: tokens are converted with a feature multiplier (writer, editor actions, document chat, chatbot replies, indexing) and the model's multiplier. Each workspace has an append-only ledger of grants, renewals, top-ups, debits and adjustments with the balance after every row.
  • New workspaces get the plan's credits plus a welcome bonus. Owners are warned by email and in the app at 20% and 5% left. At zero, AI requests stop with an "Upgrade plan" link, and chatbots switch to a polite fallback that asks visitors for their contact details.
  • Billing: subscriptions with trials, monthly or yearly pricing, cancel and resume, and PDF invoices. The credit allowance follows a plan change at once: an upgrade tops the balance up to the new allowance (extra credits are kept), and a downgrade keeps what is left, capped at the new allowance.

Trust and safety

  • Every prompt and widget message is scanned. Blocked terms are refused and raise a high-severity flag. Prompt-injection attempts, personal data (card and ID numbers are masked), link spam and rate spikes are flagged for review.
  • The Abuse flags queue lets the super admin or the support role dismiss a flag or take action, which suspends the workspace.

Super-admin panel

  • A dashboard with active workspaces, tokens, credits consumed, open flags, MRR history, the plan mix and the top workspaces by usage.
  • Workspaces (grant credits as an audit-logged top-up, adjust credits, change plan, suspend), users, all chatbots, tenants, subscriptions, plans and invoices with refunds.
  • DEV3 AI models and providers, credit pricing, writer templates, the global prompt library, usage analytics by feature, model and template, and the credit ledger across every workspace.

Public website

  • A home page with a 3D neural orb that reacts to the cursor, to typing and to streaming, and a live "try DEV3 AI" box that streams an answer.
  • Features, a gallery of all 50 templates, a chatbots page, pricing with a monthly / yearly switch, contact and legal pages. Your own Promptly chatbot can answer questions on every page.
  • The workspace dashboard shows token-usage particles: a radial 3D chart of daily usage around a glowing core.

Platform

  • English and Arabic with a full right-to-left layout on the website, both panels and the widget, and dark mode throughout.
  • A prompt library of 38 curated text and image prompts. Image prompts are text only: Promptly never calls an image model.
  • A REST API (v1) with workspace tokens on plans with API access: workspace and credits, templates, generate, documents, cited document chat and leads, metered like the app and described in OpenAPI. Clear error codes: 402 out of credits, 403 for a missing plan feature or a read-only token, 422 for blocked content.
  • Two-factor sign-in: an authenticator app with 8 single-use recovery codes, or codes by email. Turn on Require 2FA for staff to make it mandatory in /admin; workspace members can turn it on for themselves. A super admin can reset a user's 2FA, or run php artisan dev3:2fa-reset on the server. One-click demo logins skip the challenge.
  • Roles and permissions, an audit log with before and after values, one-click backups that include the private uploads, a media library that hides private files, system health and notifications.
  • Payments through Stripe, PayPal, Razorpay or a built-in simulated gateway, with the keys stored encrypted.
  • Demo mode with one-click role logins, locked destructive actions and a nightly reset.

Installs like a script, not a project

  • A 5-step web installer at /install (requirements, database, demo or empty data, admin account, finish) or php artisan dev3:install.
  • vendor/ and the compiled assets are included, so you need PHP and a database but not Composer or Node.js. It runs on shared hosting with one cron entry; a queue worker is optional.

What's in the download

  • promptly-v1.0.1.zip: the full Laravel source with vendor/, the DEV3 core and SaaS packages and public/build, ready to upload.
  • Documentation/: HTML documentation covering requirements, shared hosting, VPS, Docker and the CLI installer, workspaces, plans and credits, two-factor sign-in, connecting AI providers, the writer and templates, document chat, chatbots and the widget, moderation, payments and billing, cron and queue, the REST API, languages, demo mode, customisation, updating and a troubleshooting FAQ.
  • Demo and empty seeders, 132 Pest tests and the Larastan and Pint configuration.

Requirements

  • PHP 8.2 or newer (8.3 and 8.4 work) with bcmath, ctype, curl, dom, fileinfo, json, mbstring, openssl, pdo, tokenizer, xml, zip and gd
  • MySQL 8, MariaDB 10.6+ or SQLite 3.35+
  • Apache with mod_rewrite or Nginx (with response buffering off for streaming), and one cron entry every minute
  • Your own API key from an OpenAI-compatible service, Anthropic or Google to serve real customers (not needed for the demo model)

Good to know

  • The demo data, screenshots and video tours use the offline demo model. It writes English and Arabic only (other languages fall back to English), and seeded Arabic drafts keep some English topic words. With your own provider, the chosen language is passed to it in the prompt.
  • AI usage is billed to you by your provider. Promptly meters and limits usage in credits, but you set the prices, so check your provider's rates before you set the multipliers.
  • The OpenAI-compatible, Anthropic and Google drivers follow the providers' documented APIs but were not run against live accounts, because no real AI key is used in testing. Try them with a low-limit key first.
  • The web installer seeds a lighter demo, about 35% of the full history, so it fits shared-hosting request limits. php artisan dev3:install --demo seeds the full set.
  • There is no self-serve credit-pack checkout: a workspace gets more credits by upgrading its plan, at its next renewal, or from a super-admin Grant credits top-up (for example a pack paid by invoice).
  • The usage meter on the Billing page counts calendar months, while each workspace's credit period follows its renewal date, so the two can differ within a month.
  • Document search compares vectors in PHP, without a vector database. That suits knowledge bases of thousands of chunks, not millions. Scanned PDFs need OCR first.
  • Chatbot replies arrive whole with a typing effect rather than token by token, and team replies reach the widget by polling every few seconds.
  • The Stripe, PayPal and Razorpay drivers follow the providers' documented APIs but were not tested against live accounts, so test with sandbox or test-mode keys first. Renewals on those gateways depend on their webhooks, and plan changes are not prorated.

The How it's built section below covers the engineering behind Promptly.

How it's built

Architecture, stack, key decisions and the quality gates DEV3 Promptly passed before release.

The engineering behind Promptly, the AI SaaS of the DEV3 Laravel suite: Laravel 12 and Filament 4 on the shared DEV3 core and SaaS packages, a provider-agnostic DEV3 AI pipeline with an offline demo model, streaming without websockets, a credit ledger, cited retrieval and an embeddable widget.

The problem it solves

An AI SaaS has a cost problem that most SaaS products don't: every click spends real money with an AI provider, and the customer's plan has to cover it. Usage must be measured in tokens, turned into something customers understand, checked before the request runs and charged after it, without ever letting a busy workspace go below zero or a slow request charge twice. Buyers of a script also want a free choice of AI vendor, and they need to install, demo and test the product without an API key or a bill, so the AI layer had to be provider-agnostic, with an offline model good enough to show every feature. Answers about a customer's own documents are only useful if they can be checked, so each one needed to point at the page and section it came from. A website chatbot runs on other people's sites, where it must not break their CSS, must not answer for sites it wasn't installed on, and has to hand a visitor to a person when the bot can't help. Streaming had to work on shared hosting with no websockets, Node.js or Redis. And all of it had to share the workspaces, plans, invoices and MRR of the DEV3 SaaS package already used by Slotwise, and install from a zip through a web wizard.

Architecture and approach

Promptly is a Laravel 12 application with two Filament 4 panels on one user table: /app/{workspace} for customers, with Filament tenancy so each URL belongs to one workspace, and /admin for the platform owner and the support role. The public website, the live demo box and the chatbot widget are Blade with a small vanilla-JS layer, which keeps the public page at 29.0 KB of gzipped JS and CSS.

Two shared DEV3 packages

  • The core. dev3/laravel-core provides the installer, typed and encrypted settings, branding, the Blade UI kit, motion and 3D helpers, demo mode, roles and permissions, the audit log, payment gateways, backups, system health, Sanctum tokens, English and Arabic with RTL, and the AI contracts: an AiClient interface with streaming and token counting, and a CreditLedger extension point.
  • The SaaS layer. dev3/laravel-saas adds single-database tenancy by team_id with a global scope, invitations, plans with limits and metered usage, trials, subscriptions, PDF invoices and MRR metrics. In Promptly a Workspace extends the package's Team with credit columns, a brand voice and default tone and language, so documents, sources, chatbots, conversations, leads and ledger rows are isolated per workspace without a line of filtering in the product code.

DEV3 AI: one pipeline, any provider

  • Every request takes the same path. The writer, the editor actions, document chat, chatbot replies and the REST API all call one service, PromptlyAi: moderation, then a credit check against an estimate (the prompt's tokens plus the expected answer), then the driver, then a usage log, then the debit for the tokens actually used.
  • Customers see models, not vendors. Each model row ("DEV3 AI Swift", "Balanced", "Deep Context", "Pro") maps to a driver and an exact provider model id with its own credit multiplier. A row on "Default provider" follows Settings, so switching vendor is one setting, and the UI, the widget and the website only ever say DEV3 AI.
  • Drivers are thin HTTP clients. OpenAI-compatible, Anthropic and Google drivers implement the core contract with streaming, and buyers can register their own. Keys are stored encrypted in Settings, and the OpenAI-compatible base URL is a setting too, so any Chat Completions-compatible endpoint, hosted or self-hosted, works without code.
  • An offline demo model that shows every feature. The default fake driver makes no network calls. A seeded content engine writes template-aware drafts (blog posts, ad sets, emails, FAQs and more) in English or Arabic, the same input always gives the same draft, a rewriter handles the editor actions, and a composer builds cited answers from the retrieved chunks. It is what the demo, the tests and every screenshot use, so no real AI key is ever needed to develop, test or seed Promptly.

Credits: an append-only ledger

  • One formula. Credits are ceil(tokens ÷ tokens per credit × feature multiplier × model multiplier), with a minimum of 1. The defaults are 10 tokens per credit; writer 1.0, editor actions 0.8, document chat 1.0, chatbot replies 0.8 and indexing 0.1; and model multipliers from ×0.5 to ×2. All of them are admin settings.
  • Rows, not a running total you can't explain. WorkspaceCreditLedger implements the core's ledger contract. Every grant, renewal, debit and adjustment is a row with its tokens, feature, model, member and the balance after it. A debit locks the workspace row inside a transaction and charges at most what is left, so concurrent requests never push a balance below zero.
  • Periods and alerts. An hourly promptly:renew-credits job resets each workspace whose renewal date has passed to its plan allowance, so unused credits expire, and records the change as a renewal row. Low-balance emails and in-app notices fire once at 20% and once at 5%, and a new grant re-arms them.
  • A hard stop with a way out. When the estimate doesn't fit, the request never reaches the provider: the writer shows an "Upgrade plan" link, the API returns 402, and a chatbot switches to a fallback that flags the conversation for a person and asks the visitor for their details. When a subscription starts or a plan changes, an event listener moves the allowance to the new plan at once: an upgrade tops the balance up to the new allowance and keeps anything above it, and a downgrade keeps min(remaining, new allowance), each as a ledger row. A super admin can also grant credits, which writes a topup row and an audit entry. Each debit is also recorded as metered usage in the SaaS package, which drives the meters on the Billing page and in the admin tenant view.

Plans, roles and private files, enforced on the server

  • Plan features are checks, not labels. Lead capture, REST API access, premium DEV3 AI models and removing the "Powered by" badge are per-plan features checked in the widget endpoints, the inbox, the writer, the API and the chatbot form. A locked feature shows an "Upgrade plan" link in the app, and the API answers 403 with a plan_feature code.
  • Read-only means read-only. Workspace roles map to abilities (content.write, chatbots.manage, settings.manage) enforced by model policies, page and action guards, the streaming endpoints and the API. A viewer can read everything but can't run DEV3 AI, edit or reply; owners and admins can do everything.
  • Private knowledge files. Uploads go to a private knowledge disk as workspace-<id>/<random name>, with the original name kept in the database. The only way to read one is an authorised download route that checks membership of the source's workspace; other workspaces get a 404. An upgrade migration moves 1.0.0 files off the public disk, and the core's backups include the private folder.
  • Two-factor sign-in from the core. Filament's multi-factor authentication is wired once in the DEV3 core: an authenticator app with 8 recovery codes, or email codes. /admin honours a "Require 2FA for staff" setting, workspaces keep it optional, a super admin can reset it (also php artisan dev3:2fa-reset), and one-click demo logins never see a challenge.

Streaming without websockets

  • Server-sent events over a POST. The writer, the editor and document chat post to /app/stream/* and read a text/event-stream response with chunk, done and error events. The response turns off PHP output buffering and compression, sends X-Accel-Buffering: no and a 2 KB padding comment so proxies flush early. It works with PHP-FPM on shared hosting, with no websockets, Node.js or Redis; 1.0.1 even drops the unused Reverb package.
  • The same shape for every driver. Real drivers stream provider tokens through a callback. The demo model writes its answer and replays it word by word at a short, capped pace, so the demo feels like the real thing. The neural orb listens for promptly:orb browser events and speeds up while tokens arrive.

Retrieval with citations

  • Extraction. PDFs are read page by page, DOCX files keep their headings, and imported web pages lose their scripts, navigation and footers.
  • Chunking that remembers where it came from. A paragraph-aware chunker with a sentence fallback cuts about 900 characters with 150 characters of overlap, keeps the nearest heading, and never lets a chunk span two pages, so a citation's page number is exact. The heading is embedded with the chunk's text.
  • Embeddings with no API by default. The built-in provider is 256-dimension signed feature hashing of words and word pairs, with stop words removed and L2 normalisation: deterministic, free and good at the keyword-heavy questions people ask about price lists and policies. An OpenAI-compatible embeddings endpoint can replace it. Indexing is charged at the low indexing rate.
  • Answers that show their sources. The question is embedded, the chunks of the selected sources are scored by cosine similarity, and the best four above a 0.08 floor become numbered context that DEV3 AI must cite as [n]. Afterwards Promptly keeps only the citations the answer actually used and stores each one with its source, page, section and excerpt, so the reader can check the claim.

A chatbot widget that is safe to embed

  • Isolated on the host page. One script tag loads widget.js, which renders inside a Shadow DOM, so the host site's CSS can't reach it and its CSS can't leak out. It reads its colours, texts and suggested questions from the bot's config.
  • Bound to its sites and its visitor. Each request's Origin (or Referer) must match the bot's allowed domains, subdomains included, or it gets a 403. Starting a chat issues a visitor token, a base64url payload of the conversation, bot, visitor and expiry signed with HMAC-SHA256 using the app key and the bot's public key, valid for 24 hours. Messages, polling, leads and ratings all need it, so there is no cookie on third-party sites and one visitor can't read another's conversation. The endpoints are rate-limited per bot and IP.
  • From bot to person. When a visitor asks for a human, the bot answers that the team has been told and flags the conversation. The team's inbox refreshes on its own, an agent's reply clears the flag, and the widget picks it up on its next poll. Lead capture asks for the chosen fields after a set number of questions or at hand-over, creates the lead and notifies the owner by email and in the app.

Moderation and abuse flags

  • Every prompt and widget message passes a moderation step before any credit is spent. Blocked terms are refused with a high-severity flag (the API answers 422). Prompt-injection phrases, card or ID numbers (stored masked), messages with many links and per-workspace rate spikes are flagged but allowed, so false positives don't block customers. Review happens in the admin's Abuse flags queue, where taking action suspends the workspace and stops its AI and its chatbots.

An installer and demo data made by the real services

  • Installs like a script. If .env is missing the app creates it, then redirects to a 5-step /install wizard (requirements, database, demo or empty data, admin account, finish); php artisan dev3:install does the same over SSH. vendor/ and public/build ship in the zip, the queue defaults to sync, and the scheduler also drains queued indexing jobs on hosts without a worker.
  • A believable demo. The seeders build "Brightpath Media", a content agency on the Pro plan with five members and a brand voice, six more named workspaces from a travel company to a low-credit analytics start-up, and 16 smaller ones on every plan. Months of writer runs, editor actions, document chats, chatbot conversations, hand-overs and leads all go through the real AI pipeline, ledger, ingestor and bot service with the demo model, so balances, usage charts and MRR reconcile. The knowledge-base PDFs are generated by code. The web installer seeds about 35% of that history to stay inside shared-hosting request limits.

The 3D and motion approach

  • A neural orb in the hero. About 150 nodes on a sphere, linked to their nearest neighbours, with an inner core, a token ring and pulses that travel along the links. Typing in the live demo box sends a ripple; streaming makes the pulses race and the core brighten, then the orb settles.
  • Token particles on the dashboard. The workspace's daily token usage becomes a radial chart of particle columns around a glowing core, with today's column brightest and a spiral of particles streaming inward at a speed set by recent usage.
  • Cheap by default. three.js loads lazily as its own 187 KB chunk, the device pixel ratio is capped, scenes pause off-screen, reduced motion is respected, and SVG posters show without WebGL or when 3D is switched off in Settings → Branding. Reveals and counters come from the core's data-attribute motion.js with Lenis smooth scrolling, not GSAP.

Quality gates and results

Promptly 1.0.1 passed all seven release gates of the DEV3 Laravel suite in one run against the packaged build:

  • Static analysis: composer validate, php -l on 297 files, Pint clean and Larastan level 6 with 0 errors, with the core and SaaS packages included.
  • Tests: 132 Pest tests with 708 assertions, including required money-path suites for the credit ledger, metering and plan limits, RAG chunking and citations, and widget security, plus suites for private knowledge storage, plan features, the read-only viewer role, credit top-ups and two-factor sign-in. Every test runs on the offline demo model.
  • Front-end budget: 11.9 KB of JS and 17.1 KB of CSS gzipped on the public page (29.0 KB against a 180 KB budget), with the 187 KB three.js chunk loaded only when a scene needs it.
  • Databases: the demo and empty seeders run on both MySQL 8 and SQLite. The demo seed writes 498 generations, 987 ledger rows, 935 AI usage records, 112 documents, 128 document-chat messages, 276 chatbot conversations with 1,116 messages, and 87 subscription payments.
  • Browser checks: 117 pages in headless Chrome with 0 console errors, plus 4 happy paths: sign-up to a streamed writer result saved into the editor, a document-chat answer with citations, a widget chat that becomes a lead and gets a reply from the inbox, and a low-credit workspace reaching the upgrade prompt.
  • Installer: the release zip unzipped into a clean folder, installed through the /install wizard on MySQL with demo data, then signed in as the admin.
  • Secret scan: 19,120 files in the 25 MB release zip, clean.

The 118 screenshots and the two video tours were captured from the seeded demo across both panels, the public site and the widget, in light and dark mode, Arabic, tablet and phone. They follow the main flows step by step: a template from brief to streamed draft to document, a question answered with citations, a chatbot from training to embed code to a captured lead, and a workspace running low on credits and upgrading. Every answer in them comes from the offline demo model.

Version 1.0.1 closed the gaps we had listed for 1.0.0: two-factor sign-in, private knowledge uploads, server-side plan features, a read-only viewer role and super-admin credit top-ups.

The remaining known gaps are listed openly:

  • The OpenAI-compatible, Anthropic and Google drivers and the Stripe, PayPal and Razorpay gateways have not been run against live accounts.
  • The demo model writes English and Arabic only, and the web installer seeds a lighter demo than the command line.
  • The Billing page's usage meter counts calendar months while the ledger follows each workspace's renewal date.

Tech stack

Area Technologies
Backend Laravel 12, Filament 4 panels with tenancy, Livewire 3, Laravel Sanctum, spatie/laravel-permission, Scheduler and database queue, Filament MFA (TOTP + email codes)
AI layer DEV3 AI client contract, Offline demo model, OpenAI-compatible driver, Anthropic and Google drivers, Server-sent events streaming, Moderation and abuse flags
SaaS and credits Workspace tenancy by team_id, Plans, limits and metering, Append-only credit ledger, Subscriptions and PDF invoices, MRR and plan-mix metrics
Retrieval and chatbots Private per-workspace knowledge disk, Heading- and page-aware chunker, Hash or HTTP embeddings, Cosine retrieval with [n] citations, Shadow-DOM widget, HMAC-signed visitor tokens, Inbox hand-over and leads
Frontend Blade, Tailwind CSS 4, Vite 7, Vanilla JS motion, Lenis, three.js
Delivery Pest, Larastan level 6, Pint, Headless Playwright, Web installer, Secret scan

Inside the build

Home page with the 3D neural orb: A glowing network of synapses reacts to the cursor in a GPU-rendered hero, with a clear sign-up call to action. Home page with the 3D neural orb — A glowing network of synapses reacts to the cursor in a GPU-rendered hero, with a clear sign-up call to action.

Live “try DEV3 AI” box: Visitors type a request and watch the answer stream in word by word while the neural orb pulses with every token. Live “try DEV3 AI” box — Visitors type a request and watch the answer stream in word by word while the neural orb pulses with every token.

Guides & articles

Practical guides and engineering write-ups for DEV3 Promptly.

AI writer & chatbot SaaS script: 9 things to check before you launch

Last updated
AI writer & chatbot SaaS script: 9 things to check before you launch: DEV3 Promptly

AI writer and chatbot scripts all promise the same list: templates, chat with your PDFs, a website bot, credits. The differences show up after launch. A customer's request runs before anyone checks the balance and the provider bill arrives anyway. Answers about a policy document can't be traced back to the policy. The chatbot widget breaks the styling of a customer's site, or answers on a site it was never installed on. Or the "streaming" only works on a server with websockets you don't have. This guide covers nine things worth testing before you choose a self-hosted AI SaaS script, and how Promptly, built on Laravel 12 and Filament 4, handles each one.

One note before the list: every screenshot below was produced by Promptly's offline demo model, which needs no API key. On a live site you connect your own AI provider and pay that provider for what your customers use.

The Promptly home page: a glowing 3D neural orb in the hero above a

1. Can you choose, and change, the AI provider?

A script hard-wired to one vendor ties your margins to that vendor's prices. Check whether the provider is a setting or a code change, whether you can offer cheaper and stronger models side by side, and whether the product works at all before you add a key.

In Promptly the AI is always presented as "DEV3 AI". Behind it, an admin chooses an OpenAI-compatible, Anthropic or Google driver and pastes the key, which is stored encrypted. The OpenAI-compatible base URL is a setting too, so you can point it at any Chat Completions-compatible service, including one you host yourself. Each model your customers pick, such as "DEV3 AI Swift" or "DEV3 AI Pro", is a row that maps to a provider model id with its own credit multiplier, so a premium model can cost more credits than a fast one. Until you add a key, an offline demo model writes realistic drafts and cited answers in English and Arabic with no network calls, which is how you can install and demo everything for free. The real drivers follow the providers' documented APIs but haven't been run against live accounts, so start with a low-limit key.

Provider settings: the built-in demo model or an OpenAI-compatible, Anthropic or Google key, stored encrypted

2. Does streaming work on ordinary hosting?

Watching an answer appear word by word is what makes an AI product feel fast. Many scripts get it from websockets or a Node.js service, which shared hosting doesn't offer.

Promptly streams with server-sent events over a normal POST request. The response switches off PHP output buffering and compression and tells Nginx not to buffer, so it works with PHP-FPM on shared hosting, and the same stream shape is used for every driver. The writer, the long-form editor's "continue writing" and document chat all stream, and a 3D neural orb in the brief panel pulses while tokens arrive. If a proxy still buffers, the FAQ lists the setting to turn off.

A writer template streaming its draft live while the neural orb pulses with every token

3. How are credits metered, and can a workspace overspend?

Your provider charges per token, but customers think in words and plans. Look for a conversion you control, a check before the request runs, and a record of every charge you can show a customer who disputes their balance.

Promptly converts tokens to credits with a feature multiplier (writer, editor actions, document chat, chatbot replies, indexing) and the model's multiplier, all set by the admin. Before any request, an estimate must fit the workspace's balance. Afterwards the real token count is charged as one row in an append-only ledger, with the feature, model, member and balance after it. A debit locks the workspace and charges at most what is left, so the balance never goes below zero. Owners are emailed at 20% and 5% left, and at zero the app shows an "Upgrade plan" link instead of failing silently.

The credit ledger: every grant, renewal and debit with its feature, tokens, member and running balance

4. Are document answers grounded, and can you check them?

"Chat with your documents" is only useful if the answer comes from the documents and you can see where. Ask for an answer about a specific page and check whether the product shows the source, the page and the passage.

Promptly reads PDFs page by page and keeps the headings of Word files and web pages. It cuts the text into chunks of about 900 characters that never span two pages, each with its nearest heading. The best-matching chunks become numbered context, DEV3 AI must cite them as [1], [2] and so on, and Promptly keeps only the citations the answer really used. Each citation opens to show the document, page, section and quoted passage. Built-in embeddings work offline; for semantic search you can connect an OpenAI-compatible embeddings endpoint. Search runs in PHP without a vector database, which suits business knowledge bases of thousands of chunks rather than millions. The uploaded files themselves stay private: each workspace's files sit in their own folder on a private disk under random names, and only signed-in members of that workspace can download the original.

A cited answer: each claim carries a numbered citation that opens to the source, page, section and quote

5. Is the website chatbot safe to embed on a customer's site?

The widget runs on sites you don't control. It must not clash with their CSS, it must not answer for sites it wasn't installed on, and one visitor must never see another visitor's conversation.

Promptly's widget installs with one script tag and renders inside a Shadow DOM, so the host page's styles can't touch it. Each bot has a list of allowed domains, and requests from anywhere else get a 403. Starting a chat issues a signed visitor token that expires after 24 hours and is tied to one conversation of one bot, and every message, poll and lead form needs it. The endpoints are rate-limited per bot and visitor IP, and every visitor message goes through moderation and credit checks like any other request.

Embed and secure: one script tag, an allowed-domains list and signed visitor tokens

6. What happens when the bot can't help?

A bot that loops on "I don't know" loses the lead. Check for a hand-over to a person, a shared inbox for the team, and a way to collect contact details.

When a visitor asks for a person, Promptly's bot says the team has been told and flags the conversation in the team inbox, where it appears with the visitor's page, device and the bot's cited answers. A team reply shows up in the visitor's widget within a few seconds. On plans that include lead capture, the bot asks for the fields you choose after a set number of questions, or at hand-over. Leads go to a pipeline from new to won with tags, notes and CSV export, and the owner is emailed. If a workspace runs out of credits, the bot doesn't go silent: it switches to a fallback that flags the chat and asks for contact details.

Human hand-over: the conversation is flagged, the team replies, and the message appears in the widget

7. Are workspaces, plans and billing built in?

Selling AI as a service needs more than an AI feature: sign-up, teams, plans, invoices and a view of your revenue.

Every Promptly sign-up creates a workspace with the default plan's credits and a welcome bonus. Workspaces have members with roles, email invitations and a switcher, so an agency can run one per client. Plans carry a monthly credit allowance and limits on chatbots, sources, documents and members, with monthly and yearly prices, trials and PDF invoices, and the allowance follows a plan change at once. The admin dashboard shows MRR, the plan mix and the top workspaces by usage. Payments run through Stripe, PayPal, Razorpay or a simulated gateway for demos. Plan features such as lead capture, API access, premium models and removing the "Powered by" badge are checked on the server, and a locked feature shows an upgrade link. Roles are enforced the same way, so a viewer really is read-only. An upgrade tops the balance up to the new allowance, a downgrade keeps what is left up to the new allowance, and a super admin can grant extra credits as an audit-logged top-up. One limit is worth knowing: the billing page's usage meter counts calendar months, while the credit period follows each workspace's renewal date.

Edit a plan: monthly credits and limits on chatbots, sources, documents and members

8. How do you catch abuse?

An open sign-up form plus an AI key is an invitation for spam, scraping and prompt injection, all on your bill.

Promptly scans every prompt and widget message before any credit is spent. Terms on your blocked list are refused and raise a high-severity flag. Prompt-injection phrases, card and ID numbers (stored masked), link spam and sudden rate spikes are flagged but allowed, so a false positive doesn't block a paying customer. Flags wait in a review queue, where the super admin or a support role can dismiss them or suspend the workspace, which stops its AI and its chatbots.

Abuse flags: blocked terms, prompt injection, personal data, spam and rate spikes waiting for review

9. Can you install it without being a Laravel developer?

A script you can't install is a project you have to hire for. Check whether it ships with vendor/ and built assets, whether there's a web installer, and what the server really needs.

Promptly's download includes vendor/ and the compiled assets, so you need PHP 8.2+ and MySQL, MariaDB or SQLite, but not Composer or Node.js. Visit /install and a five-step wizard checks the requirements, tests the database, loads demo or empty data, creates your admin and locks itself; php artisan dev3:install does the same over SSH. One cron entry renews credit periods and processes document indexing on hosts without a queue worker. The web installer seeds a lighter demo than the command line, to stay inside shared-hosting time limits.

The installer's data step: the Brightpath Media demo workspaces, or a clean install with templates and prompts only

See it in action

The video tour starts on the neural-orb home page and its live demo box, then streams a template in the writer and saves it to the editor. It asks a question of the knowledge base and opens a citation, builds a chatbot, chats as a visitor, captures a lead and answers it from the inbox. It ends on credits, billing and the super-admin panel.

Video tour of Promptly

What else to compare

  • Writing tools: 50 templates in seven categories, 10 tones, 10 output languages, brand voice, history and favourites, and a long-form editor with selection actions and Markdown, HTML or text export.
  • Languages: English and Arabic with a full right-to-left layout on the website, both panels and the widget. The offline demo model writes only English and Arabic.
  • API: a REST API with workspace tokens to generate content, ask documents and read leads, metered like the app, on plans with API access. Blocked content gets a clear 422.
  • Security: two-factor sign-in with an authenticator app (plus 8 recovery codes) or email codes, which you can require for staff in the admin panel; private knowledge files; and backups that include them.
  • What's not included: no image generation (the prompt library's image prompts are text only), no self-serve credit-pack checkout, and the payment gateways and AI drivers haven't been run against live accounts.
  • Quality: Promptly 1.0.1 shipped with 132 Pest tests covering the credit ledger, metering, citations, widget security, private uploads, plan features and roles, Larastan level 6 with no errors, and 117 pages checked in a headless browser with no console errors.

Promptly costs $29 on DEV3. Instead of a live demo, the listing has 118 grouped screenshots and two video tours, and the "How it's built" section explains the architecture in more detail.

Frequently asked questions

The complete source code (version 1.0.1) as a download from your account, with the setup and usage guides shown on this page. You can modify the code to suit your product.

Buying guides: Laravel scripts with Filament panels and a web installer · Next.js or Laravel for a SaaS script?

More from this author

View all

Related in Web Scripts & Software

View all