DEV Community

Sietrix Technologies
Sietrix Technologies

Posted on

How to Build a Simple CRM with Node.js & React

The majority of small businesses begin by using spreadsheets to manage leads. It functions initially, but it soon becomes disorganized, difficult to monitor, and ineffective.

I therefore created a straightforward custom CRM to manage leads, monitor status, and maintain organization rather than depending on sophisticated tools. Here's a basic example of how to create one with React and Node.js.


Tech Stack

  • Node.js (Backend)
  • Express (API)
  • React (Frontend)
  • MongoDB (Database)

Core Features

  • Add & manage leads
  • Track contact details
  • Basic status pipeline (New β†’ Contacted β†’ Closed)

Backend (Node.js + Express)

Create a simple lead model:

const LeadSchema = new mongoose.Schema({
  name: String,
  email: String,
  status: String
});
Enter fullscreen mode Exit fullscreen mode

Basic API route:

app.post('/leads', async (req, res) => {
  const lead = new Lead(req.body);
  await lead.save();
  res.json(lead);
});
Enter fullscreen mode Exit fullscreen mode

Frontend (React)

Simple form to add leads:

function AddLead() {
  const [name, setName] = useState('');

  const handleSubmit = async () => {
    await fetch('/leads', {
      method: 'POST',
      body: JSON.stringify({ name }),
    });
  };

  return <button onClick={handleSubmit}>Add Lead</button>;
}
Enter fullscreen mode Exit fullscreen mode

What You Can Improve

  • Add authentication
  • Build a dashboard UI
  • Add filters & search
  • Automate workflows

Final Thoughts

A CRM doesn’t need to be complStart small, build what you need, and grow as your workflow.

Top comments (0)