Skip to content

Latest commit

 

History

History
110 lines (80 loc) · 1.98 KB

File metadata and controls

110 lines (80 loc) · 1.98 KB

Running Locally Without Docker

Step 1: Set up MongoDB

You have two options:

Option A: Use MongoDB Atlas (Cloud - Recommended)

  1. Go to https://www.mongodb.com/cloud/atlas
  2. Create a free account and cluster
  3. Get your connection string (looks like: mongodb+srv://user:pass@cluster.mongodb.net/dbname)
  4. Update .env file:
    MONGODB_URI=mongodb+srv://your-connection-string
    

Option B: Install MongoDB Locally

macOS:

brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-community

Linux:

# Ubuntu/Debian
sudo apt-get install mongodb

# Start MongoDB
sudo systemctl start mongodb

Windows: Download from https://www.mongodb.com/try/download/community

Step 2: Create Admin User

Once MongoDB is running, create the admin user:

npm run seed:admin

This will create:

Step 3: Start the Application

In separate terminals:

Terminal 1 - Backend:

cd backend
npm run dev

Terminal 2 - Frontend:

cd frontend
npm run dev

Step 4: Access the Application

Login with:

  • Email: 0xbugatti@gmail.com
  • Password: @Pentestpass

Troubleshooting

MongoDB Connection Error

If you see ECONNREFUSED:

  1. Check if MongoDB is running: brew services list (macOS) or sudo systemctl status mongodb (Linux)
  2. Or use MongoDB Atlas cloud service
  3. Verify .env has correct MONGODB_URI

Port Already in Use

If port 3000 or 4000 is in use:

  1. Change ports in .env:
    BACKEND_PORT=4001
    FRONTEND_PORT=3001
    
  2. Update CORS_ORIGIN accordingly

Dependencies Missing

# Install root dependencies
npm install

# Install backend dependencies
cd backend && npm install

# Install frontend dependencies
cd frontend && npm install

# Install script dependencies
cd scripts && npm install