Skip to content

Getting Started

Puneet Kumar Mishra edited this page Oct 15, 2026 · 1 revision

πŸš€ Getting Started

This guide walks you through setting up CrowdWide on your local machine.

πŸ“‹ Prerequisites

Before you begin, make sure you have:

  • Node.js 22 or newer β€” Download Node.js
  • npm β€” included with Node.js
  • MongoDB β€” either a local installation or a MongoDB Atlas database

πŸ“₯ 1. Clone the Repository

Open your terminal (Command Prompt, PowerShell, or Git Bash) and run:

git clone https://github.com/DeveloperPuneet/Crowdwide.git

Move into the project directory:

cd Crowdwide

πŸ“¦ 2. Install Dependencies

Install the required Node.js packages:

npm install

Wait for the installation to finish.

βš™οΈ 3. Configure Environment Variables

Create your local environment file from the example:

cp .env.example .env

Windows PowerShell alternative:

Copy-Item .env.example .env

Open the new .env file in your code editor.

Set the following required values:

  • MONGODB_URI β€” your MongoDB connection string.
  • SESSION_SECRET β€” a long, unique random string used to sign session cookies.
  • APP_URL β€” use http://localhost:3000 for local development.

For SESSION_SECRET, you can generate a random value using:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Save the .env file when you're done.

⚠️ Never commit your .env file, database credentials, or secret keys to GitHub.

▢️ 4. Start CrowdWide

Run the development server:

npm run dev

Once the server starts successfully, open:

http://localhost:3000

πŸ§ͺ 5. Run Tests

To run the standard test suite:

npm test

For end-to-end tests:

npm run test:e2e

End-to-end tests require MongoDB configuration or the supported in-memory database setup.

πŸ“š Troubleshooting

MongoDB connection errors

  • Verify that MongoDB is running or that your Atlas connection string is correct.
  • Check that MONGODB_URI is set correctly in .env.
  • For Atlas, verify that your database user and network access settings are configured.

Missing environment variables

  • Make sure .env exists in the project root.
  • Check that MONGODB_URI, SESSION_SECRET, and APP_URL have valid values.

Port already in use

Another application may already be using port 3000. Stop that application or review the project's port configuration.

Email verification codes are not arriving

Email delivery is optional for local development. If email credentials are not configured, verification codes and security email previews are written to the server log.

See the main README and Deployment Guide for more details.


Next: Project Overview

Clone this wiki locally