VS CODE CRM LEADS WITH AI — How I Built a Multi-User CRM in Hours Using GPT-5 Codex and VS Code

VS CODE CRM LEADS WITH AI — How I Built a Multi-User CRM in Hours Using GPT-5 Codex and VS Code

If you want to build software with artificial intelligence and actually make money from it, you’re in the right place. I’m Dante Testa, and in this post I’ll walk you through the exact workflow I used to create a CRM for real estate leads using GPT-5 Codex integrated into VS Code. I’ll show the tools I used, the architecture, the prompt strategy, the practical steps to deploy it as a SaaS, the hosting and database tips, how to avoid common pitfalls, and how you can get a working product in a few hours. This is the real, hands-on guide — no fluff. Follow me and you’ll be able to replicate the same process and even sell your own copy.

Buy This CRM With Me – Click Here

Attention: Why AI + VS Code Is a Game-Changer for Rapid Productization

Imagine telling an AI “build me a CRM with authentication, a Trello-like Kanban, per-user data isolation, and an installer that sets up the remote database” — and then watching it scaffold tens or hundreds of files, create SQL schemas and produce front-end components styled with Tailwind. That’s no longer fantasy. With the right prompt, the GPT-5 Codex agent inside VS Code and a handful of web technologies (PHP + MySQL + Tailwind), you can build a fully functional product fast.

This approach flips the old model: instead of spending weeks in meetings, design, and manual coding, you can prototype, iterate and deploy much faster. That speed is how I deliver value to clients and how you can start monetizing sooner.

Interest: Tools, Technologies and Why I Picked Them

Before we dive into the step-by-step, here’s the toolbox I used and why each item matters:

  • VS Code — free, extensible IDE. The OpenAI / Codex extension lets GPT-5 Codex act inside the editor, creating files and editing them directly.
  • GPT-5 Codex (via VS Code extension) — the AI agent that writes code, scaffolds architecture, and executes tasks when you allow permissions inside the editor.
  • PHP + MySQL — stable, widely supported server stack. PHP is simple to deploy on most shared hosts and is understood by many developers. MySQL is the database standard for quick SaaS prototypes.
  • Tailwind CDN — fast, utility-first CSS to get attractive UI without a lot of custom CSS work. Ideal for MVPs.
  • Napoleon Host (or any cPanel host) — I used Napoleon Host because it’s easy to manage databases and remote access through cPanel. Remote MySQL access and phpMyAdmin are essential for this workflow.
  • phpMyAdmin — useful for inspecting tables, running SQL scripts manually and debugging DB content.
  • WindSurf (alternative) — an integrated coding environment with built-in AI models, preview mode, and “send element” features that let you target specific UI components. Great as a backup or as an alternative when your VS Code credits run out.

Why PHP, MySQL and Tailwind?

I recommend PHP + MySQL because they are simple, reliable and widely available on shared hosts. Tailwind CDN gives you a modern-looking UI with minimal effort. If you’re not familiar with more modern frameworks, this stack will get your product live faster and keep hosting costs low.

Desire: The CRM I Built — Features That Matter for a Real Product

Here are the features I included in my CRM prototype — all implemented by prompting the AI and iterating directly inside VS Code:

  • Registration, Login and Password Reset — complete authentication flow so each user has an account.
  • Per-User Data Isolation (SaaS-style) — each user sees only their own leads. That’s the difference between a single-instance app and true SaaS behavior.
  • Dashboard with Kanban (Trello-like) — boards, stages (columns), cards. You can move cards between columns, edit labels, and modify cards using modals.
  • Configurable Kanban Stages and Colors — users can add and edit columns, change colors and reorder lists with drag-and-drop.
  • Modal Forms for Crud Operations — add, edit and delete leads from modals to keep UX smooth.
  • Installer Script — an install script that populates the remote MySQL database so the app can be deployed easily to a hosted server.
  • Multi-user settings — profile editing, logout, and separation of Kanban order per user so every account keeps its own board ordering.

The end product looked like a legit SaaS MVP: a landing page with Login/Register, and a powerful internal CRM experience.

Action: Step-by-Step Walkthrough — From Prompt to Running SaaS

Below I detail the exact process I used. Use this as a checklist as you build.

1. Install VS Code and the Codex Extension

Install VS Code (free) and search for the OpenAI / Codex extension in the extensions marketplace. Install and log in. If the extension asks to connect to ChatGPT/Plus, ensure you have an active ChatGPT Plus subscription (the agent needs higher-tier access to work well).

2. Prepare the Prompt — Ask the AI to Act as a Senior Developer

The most important part: the prompt. I asked the AI to act as a senior CRM developer and to build a PHP + MySQL + Tailwind CDN project with an MVC-like structure (we implement a lightweight custom MVC) and the features listed earlier. Also include additional instructions:

  • Make the system SaaS-ready: user accounts isolate their leads.
  • Create an install script that connects to a remote MySQL database and populates schema and basic seed data.
  • Generate a config file for DB credentials and an index file in the project root that forwards to the public folder.
  • Use modal-based forms for CRUD and a Kanban with drag-and-drop ordering saved per user.
  • Output a schema.sql file and a scripts/install_database.php file so the database can be created remotely.

Important: ask the AI to output the prompt first and to plan the development when using the agent in “plan” mode. Then switch to “agent” or “execute” mode to let it build, approving actions as it requests permission to create files.

3. Configure Remote MySQL in cPanel

I use Napoleon Host with cPanel. The steps were:

  1. Login to cPanel, go to MySQL Database Wizard and create the database (e.g., crmsimples), the DB user and a password.
  2. Assign all privileges to the user for that database.
  3. Enable remote access in cPanel → Remote MySQL: add the wildcard percent sign (%) to allow any IP to connect (useful if you want VS Code on different machines to connect).
  4. Copy the hosting IP address — you’ll use it in the AI prompt as your DB host so the create/install scripts connect directly to the remote database.

Note: for production SaaS you’ll want to restrict remote access by IP and avoid using wildcard access. This is an MVP convenience step, not a best-practice production step.

4. Execute the AI Plan in VS Code

Paste the long prompt into the Codex chat inside VS Code. Don’t hit send immediately — add the remote DB host, DB username, DB name and password into the prompt and also request the install script file to be generated. Then switch the AI to agent mode and allow it to create files when it asks for permissions.

It will create:

  • config.php — with DB constants for host, user, pass, dbname
  • index.php (root) — a small redirector to public/
  • public/index.php — main entry file for the app
  • controllers, models, views directories — light MVC structure
  • scripts/install_database.php and schema.sql — installer and schema
  • assets with Tailwind included via CDN

Approve file creation buttons as the AI requests them.

5. Run Locally and Debug

Start the built-in PHP server in VS Code (or use the provided commands the AI wrote). If you hit errors, copy the PHP stack trace into the AI chat and ask it to debug — the agent can often locate the problem and patch the file. Common issues:

  • Missing index in root → create a small forwarding index.php and a .htaccess if needed.
  • DB connection failures → wrong host/IP or remote access not allowed. Recheck cPanel Remote MySQL.
  • Permission denied on scripts → VS Code might need manual permission approvals when it tries to run terminal commands via the agent.

Important practice: every time a milestone is reached (e.g., login works, install script runs, Kanban populates), zip the project folder and keep a backup. If the AI later messes up something during a new change, you can restore quickly.

6. Run the Installer

The AI created an installer script (scripts/install_database.php) that reads config.php and runs the schema.sql on the remote DB. Either:

  • Run the script via terminal (php scripts/install_database.php) and let the AI perform the operation if it can access your terminal; or
  • Open the URL public/scripts/install_database.php in the browser so the script runs through HTTP and populates the remote DB.

If the installer fails due to remote access, recheck Remote MySQL settings in cPanel and add the % host. Once it runs, verify tables in phpMyAdmin.

7. Test the App — Create Accounts and Validate Multi-Tenancy

Create two user accounts and test separation:

  1. Sign up as User A, create leads, and observe your Kanban.
  2. Sign out and sign up as User B, create leads — User B should not see User A leads.
  3. Each user should be able to customize Kanban stages and ordering; ordering should persist per user.

This is fundamental for SaaS: users must have their own dataset and view states.

8. Add Improvements Iteratively — Use Prompts to Extend Functionality

Want drag-and-drop ordering of lists? Prompt the agent: “Add a Kanban management module allowing drag-and-drop ordering of lists and save the list order per user.” The AI will add the necessary front-end JS and server-side endpoints.

Always follow this loop:

  1. Ask AI to analyze the project and explain the current structure.
  2. Ask for the specific change you want (e.g., reordering lists, exporting CSV, email notifications).
  3. Approve file changes one-by-one as the agent proposes them.
  4. Backup after the change completes successfully.

Practical Tips, Gotchas and Security Notes

Here are the hard lessons and small tricks that saved me time:

  • Back up early and often: zip the project folder and export DB snapshots. If the AI breaks something, you’ll thank yourself.
  • Make the AI analyze the project before edits: If you close VS Code and return later, ask the agent to “analyze my project, explain how it works and list the main files” so it doesn’t rewrite or break existing code.
  • Watch for context loss: Large projects can confuse the AI. Build features in small modules and test after each change.
  • Remote MySQL wildcards are convenient but risky: only use % for development. In production, whitelist specific IPs or use a proper DB server.
  • Use PHPMailer + SMTP for emails: If you want to send password reset emails, implement PHPMailer and require the SMTP credentials in the settings page.
  • Credit limits: Both VS Code Codex and WindSurf use credits. Have backup tooling (WindSurf or another AI) so you can switch when credits run out.

“Be pragmatic: if a feature is complex, break it down and implement iteratively. The AI is powerful, but it needs small, well-defined tasks to deliver reliably.”

Alternative: WindSurf — A Great Backup or Main Tool

WindSurf is an “all in one” IDE with built-in models, preview mode and unique features like “Send Element” — you can click a UI block and tell the AI to change it. I used WindSurf when I exhausted credits in VS Code. Advantages:

  • Built-in preview and live editing.
  • Send Element to target specific blocks.
  • Multiple AI models (Cloud4, GPT-5 Codex, GPT-5 Hi-Resonance, etc.).
  • Rollback button for UI changes: if the AI makes an unwanted visual change, click rollback and restore.

WindSurf’s model flexibility and element-targeted editing can speed up UI changes and design iterations. It’s perfect for designers or developers who want a tighter loop between prompt → visual change → rollback.

Monetization: How to Turn Your CRM Into an Income Stream

Once you have a working CRM, several monetization paths open up:

  • Sell copies: Offer installation services or sell a packaged copy for small agencies. Include installation and basic customization as a paid add-on.
  • Make it SaaS: Host the app yourself, handle subscriptions and charge monthly per active user or per company.
  • Offer customization/consulting: Many small businesses want a tailored CRM. Charge hourly or fixed-price for custom screens, integrations (like Google Maps routing), or API connections.
  • Upsell features: Add premium modules like SMS integration, advanced analytics, mapping and route pricing (using Google Maps API), or team roles and permissions.

Important: before selling, harden the code for security, add rate limits, sanitize inputs, and consider hiring a security review if you plan to collect payments or sensitive user data.

Example Upsell: Route Pricing Module

I built a route-tracking and pricing module for a client that uses the Google Maps API. The user types a postal code, the system calculates distance and returns a suggested delivery fee according to preconfigured distance brackets. This kind of module is a great upsell for local businesses — cafes, delivery services, motoboys — and adds real monetary value.

Action: What You Should Do Next (Step-by-Step Checklist)

  1. Install VS Code and the OpenAI/Codex extension. Get ChatGPT Plus/appropriate access.
  2. Sign up for a cPanel-based host (I used Napoleon Host) and create a database.
  3. Prepare the detailed prompt (authentication, Kanban, installer, SaaS behavior, remote DB host details).
  4. Run the agent in VS Code, approve file creation, and let it scaffold the project.
  5. Run the installer script to populate the remote DB. Fix remote access in cPanel if necessary.
  6. Test multi-user behavior and iterate on features via small prompts.
  7. Zip your folder and save DB snapshots after each milestone.
  8. Consider WindSurf as an alternative or backup platform for further UI tweaks and AI credits.

Final Thoughts: Be Patient, Back Up, and Iterate

AI dramatically speeds up development, but it’s not perfect. Expect errors. Expect to explain context to the AI often. The key is iteration: small changes, frequent backups, and testing. When you adopt that process, you’ll be amazed at how fast you can go from idea → prototype → paid product.

If you want to follow this exact path, do the following now: install VS Code, install Codex, create a hosting DB with remote access, and write a clear prompt asking the AI to scaffold a PHP + MySQL + Tailwind CRM with a remote installer and SaaS-style user isolation. Keep your prompts concrete and avoid asking for overly complex, complete systems in a single instruction. Break features down and ship incrementally.

Now go build. Zip your project after each milestone. Test two user accounts to ensure true SaaS behavior. When you have a stable version, decide whether to sell copies, host a SaaS, or offer custom development services. The market for focused, affordable CRMs is massive — and with AI, you can be the one fulfilling that demand.

Want More Help?

If you want hands-on mentoring, group mentorship or VIP sessions where I help you one-on-one to build this kind of project, I run several formats: weekly full-day live mentor sessions, group mentorship for Vibe Coding, and private VIP hours. You can also explore deeper modules like route pricing with Google Maps, SMTP/PHPMailer integration for email, or turning this into a multi-tenant SaaS with payment processing. If you’re serious, reach out on my contact channels and we’ll plan the next steps together.

Build smart, back up often, and don’t be afraid to let the AI do the heavy lifting — as long as you direct it carefully. Good luck and happy coding!

My Other Vídeo

Fonte: dantetesta.com.br