Repository navigation
Getting Started
This guide walks you through setting up CrowdWide on your local machine.
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
Open your terminal (Command Prompt, PowerShell, or Git Bash) and run:
git clone https://github.com/DeveloperPuneet/Crowdwide.gitMove into the project directory:
cd CrowdwideInstall the required Node.js packages:
npm installWait for the installation to finish.
Create your local environment file from the example:
cp .env.example .envWindows PowerShell alternative:
Copy-Item .env.example .envOpen 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β usehttp://localhost:3000for 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.envfile, database credentials, or secret keys to GitHub.
Run the development server:
npm run devOnce the server starts successfully, open:
To run the standard test suite:
npm testFor end-to-end tests:
npm run test:e2eEnd-to-end tests require MongoDB configuration or the supported in-memory database setup.
- Verify that MongoDB is running or that your Atlas connection string is correct.
- Check that
MONGODB_URIis set correctly in.env. - For Atlas, verify that your database user and network access settings are configured.
- Make sure
.envexists in the project root. - Check that
MONGODB_URI,SESSION_SECRET, andAPP_URLhave valid values.
Another application may already be using port 3000. Stop that application or review the project's port configuration.
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