This guide will walk you through setting up DevEvent Tracker on your local machine. Follow these steps to configure your database and media hosting environments.
Before starting, ensure you have the following installed:
- Node.js: Version 18.x or 20.x (LTS versions are recommended).
- npm (included with Node.js) or an alternative package manager such as Yarn, pnpm, or Bun.
- Git installed on your system.
- Fork the repository on GitHub.
- Clone your forked repository:
git clone https://github.com/YOUR_USERNAME/DevEvent_Tracker.git cd DevEvent_Tracker
Run the following command in the project root to install the required packages:
npm installCreate a file named .env.local in the root of the project. This file is ignored by Git, ensuring that your local credentials remain secure.
Copy and paste the following keys into your .env.local:
# MongoDB Connection URI
MONGODB_URI=mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/devevent?retryWrites=true&w=majority
# Base URL (For local development)
NEXT_PUBLIC_BASE_URL=http://localhost:3000
# Cloudinary Credentials (For image uploads)
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
# PostHog Analytics (Optional: Keep empty if not using analytics)
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.comDevEvent Tracker uses MongoDB to store event and booking data. Follow these steps to configure a free database:
- Sign up for a free account at MongoDB Atlas.
- Create a new project and provision a database cluster using the free M0 Sandbox.
- Under Database Access, configure a user with a password (take note of these credentials).
- Under Network Access, add an IP entry for
0.0.0.0/0to allow access from any IP address (recommended for development), or add your current IP address. - Navigate to your Database deployments dashboard, click Connect, select Drivers, and choose Node.js.
- Copy the database connection string.
- Paste this connection string as the value for
MONGODB_URIin your.env.localfile, replacing<username>and<password>with the credentials of the database user you created.
DevEvent Tracker allows organizers to upload banner images for events. These images are stored on Cloudinary:
- Sign up for a free account at Cloudinary.
- Once signed in, navigate to your dashboard console.
- You will find your Cloud Name, API Key, and API Secret displayed on the page.
- Copy these values and paste them into your
.env.localfile:CLOUDINARY_CLOUD_NAMECLOUDINARY_API_KEYCLOUDINARY_API_SECRET
- Note: When you upload an image through the app, a folder named
DevEventwill be automatically generated in your Cloudinary media library.
Start the local server by running:
npm run devOpen http://localhost:3000 in your web browser. You should see the DevEvent dashboard running.
Ensure that your env file is named exactly .env.local and is located in the root directory (the same folder as package.json). If you modified the file while the server was running, restart the server (press Ctrl+C in the terminal and run npm run dev again).
- Double-check that your database user's username and password in the connection string match what was created in Atlas. If your password contains special characters, they must be URL-encoded (for example,
@becomes%40). - Ensure that the IP Access List in MongoDB Atlas is configured to allow connections (either from your current IP address or from
0.0.0.0/0).
Ensure you copied the correct API keys. A missing or incorrect Cloudinary configuration will cause the Create Event submission to return a server error (status 500) during banner image processing.