Flash Sale — every product $10, or get them all for $100.
KodeBaseKODEBASE
Back to Prompt Library
App Building Featured

Build a Complete Internal CRM System

Add a full HubSpot-style internal CRM — leads, contacts, companies, deals, pipelines, activities, tasks, reports, automations, and AI helpers — built natively into your current app without breaking existing flows.

The prompt
I need you to add a complete internal CRM system to my existing Base44 app — full lead management, contact management, company management, deal pipeline, sales activity, follow-up, reporting, and automation, similar to HubSpot CRM. This is an internal business tool.

IMPORTANT: Before building anything, scan my entire existing app first. Do not create duplicate systems. Reuse my current authentication, users, roles, navigation, layout, admin dashboard, notifications, file handling, email/SMS integrations, activity logs, and design system wherever possible. Do not break existing pages, routes, permissions, entities, backend functions, automations, or user flows. The CRM must feel native.

PHASE 1 — FULL APP SCAN FIRST: Review existing pages, layout, navigation, auth, roles, admin tools, notifications, email/SMS, contact/client/customer entities, lead/customer forms, file upload patterns, dashboard/reporting patterns, activity/audit logs, modals, table/card/list components, mobile responsiveness, backend functions, and automations. Then identify where the CRM should live, which entities to reuse, which new ones are required, which roles access the CRM, which components to reuse, notification/email/SMS systems to integrate, naming conflicts, security risks, and performance concerns. Then proceed.

MODULE: Add as "CRM" with suggested routes /crm/dashboard, /leads, /contacts, /companies, /deals, /pipeline, /tasks, /activities, /calendar, /lists, /campaigns, /reports, /import, /settings (follow the existing routing pattern if better).

CORE GOAL: Let the team capture leads; manage contacts, companies, and deals; build multiple pipelines and drag deals through stages; assign records; track calls/emails/meetings/notes/SMS/tasks; view full customer timelines; add tags/lifecycle stages/lead sources/custom fields; score and qualify leads; create follow-ups; automate assignment and follow-ups; track and forecast pipeline revenue; generate reports; import/export; segment into lists; and use AI to summarize records, score leads, draft follow-ups, and recommend next steps.

ROLES & PERMISSIONS: Use existing roles if available; otherwise support Super Admin, Admin, Sales Manager, Sales Rep, Marketing User, and Viewer with appropriate access. Every record supports ownership and visibility (owner_id, team_ids, visibility private/team/all_crm_users, created_by, updated_by). Admins see all; managers see team; reps see owned/assigned; viewers read-only; exports restricted to Admin/Manager.

REQUIRED ENTITIES (create unless equivalents exist; extend rather than duplicate): CRMLead, CRMContact, CRMCompany, CRMDeal (weighted_value = amount × probability/100), CRMPipeline, CRMPipelineStage, CRMActivity, CRMTask, CRMNote, CRMFile, CRMList, CRMTag, CRMCustomField, CRMNotification (integrate with existing notifications if present), CRMImportJob, CRMFormSubmission, CRMCampaign. Use comprehensive fields for status, lifecycle stage, source, scoring, ownership, timestamps, and relationships.

REQUIRED PAGES: CRM Dashboard (summary cards + charts + alert sections); Leads + Lead Detail (with conversion to contact/company/deal); Contacts + Contact Detail; Companies + Company Detail; Deals; Pipeline Board (drag-and-drop, recalculates probability/weighted value, per-stage totals, risk highlights); Deal Detail (mark won/lost with reasons + actual_close_date); CRM Tasks (tabs, quick complete, completion logs an activity); CRM Activities (timeline/table); CRM Calendar; Lists/Segments (filter builder); Campaigns; CRM Reports (Recharts or existing chart library); Import (CSV upload → mapping → preview → duplicate detection → run → results); CRM Settings (admin-only).

KEY FEATURES: Consistent record detail UI; full timelines; @mentions in notes with notifications; email/SMS logging (send only if integrations exist, respect opt-ins, never fake sending); call/meeting logging; manual + rule-based lead scoring; deal forecasting; automations (lead assignment, follow-up reminders, stale deal reminders, close-date reminders, weekly digest) only if Base44 automations are available; notifications (no self-notify, no duplicates, action_url); dashboard alerts; global search; filtering/sorting; bulk actions; custom fields; global tags; duplicate detection; optional record merging; import/export; activity logging.

SECURITY: Authenticated only; role-based access on every page; permission checks on every create/update/delete; backend functions validate permissions; reps can't view private records they don't own unless shared; viewers can't edit/delete/export; export/import access restricted; confirm destructive actions; no frontend-only protection; validate input; no private-note leakage; respect do_not_contact/opt-ins.

PERFORMANCE: Pagination, scoped queries, lazy loading, query limits, per-tab loading, summary counts, fast at thousands of records. RESPONSIVE for desktop/tablet/mobile. UI/UX: use the existing design system with cards, filterable tables, pipeline board, drawers/modals, badges, avatars, empty/loading/error states, confirm dialogs, and toasts — no raw forms. Include meaningful empty states and full validation.

BACKEND FUNCTIONS (existing pattern; each with auth, permissions, validation, activity logs, notifications, clear errors): createLead, convertLead, createContact, createCompany, createDeal, updateDealStage, markDealWon, markDealLost, createCRMTask, completeCRMTask, logCRMActivity, addCRMNoteWithMentions, uploadCRMFile, importCRMRecords, exportCRMRecords, generateCRMRecordSummary, generateLeadScoreRecommendation, generateDealRiskReview, sendCRMFollowUpReminders, sendWeeklyCRMDigest.

ADD CRM settings to the existing admin area. Build reusable components (CRMDashboard, LeadTable, LeadDetailDrawer, PipelineBoard, DealCard, CRMActivityTimeline, CRMFilters, CRMImportWizard, etc.), reusing existing ones where available.

FINAL QA: Test admin dashboard, lead creation, assignment + notification, call logging + @mention notification, follow-up task creation, lead conversion, pipeline drag with weighted value update, mark won/lost, timelines, dashboard metrics + reports, CSV import + duplicate detection, permission enforcement (private records, viewer, rep export), mobile views, and that existing app functionality still works.

OUTPUT AFTER BUILD: Summary of CRM pages, entities, backend functions, permissions, notifications, automations, AI helpers, import/export, reports, manual setup required, known limitations, and recommended next improvements. Build this as a production-ready internal CRM that feels native to my current Base44 app.

Want a hand applying this?

Get an audit of your Base44 app, or help moving it somewhere you control.

App Building
#crm
#leads
#deals
#pipeline