Skip to content

Repository files navigation

Local Events Platform

A platform for organizing and discovering local events.

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB (local installation or MongoDB Atlas account)
  • npm or yarn

Setup Instructions

1. Backend Setup

  1. Navigate to the backend directory:
cd backend
  1. Install dependencies:
npm install
  1. Create a .env file in the backend directory with the following:
MONGO_URI=mongodb://localhost:27017/local-events
PORT=5000
JWT_SECRET=local-events-dev-secret

For MongoDB Atlas (cloud):

MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/local-events?retryWrites=true&w=majority
PORT=5000
JWT_SECRET=local-events-dev-secret
  1. Start the backend server:
# Development mode (with auto-reload)
npm run dev

# Or production mode
npm start

The backend will run on https://micro-event-discovery.onrender.com

2. Frontend Setup

  1. Open a new terminal and navigate to the frontend directory:
cd frontend
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev

The frontend will run on http://localhost:5173 (or another port if 5173 is busy)

Running the Application

  1. Start MongoDB (if using local MongoDB):

    • Make sure MongoDB is running on your system
    • Or use MongoDB Atlas (cloud) - no local installation needed
  2. Start Backend (Terminal 1):

    cd local-events-platform/backend
    npm run dev
  3. Start Frontend (Terminal 2):

    cd local-events-platform/frontend
    npm run dev
  4. Open Browser:

    • Navigate to http://localhost:5173 (or the port shown in terminal)

Available Scripts

Backend

  • npm start - Start the server
  • npm run dev - Start the server with nodemon (auto-reload)

Frontend

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build

Quick Start Checklist

Before running, make sure:

  • Node.js is installed (node -v)
  • MongoDB is running (local or Atlas)
  • .env file exists in backend folder with MONGO_URI
  • Dependencies installed in both backend and frontend (npm install)
  • Backend runs without errors (npm run dev in backend folder)
  • Frontend runs without errors (npm run dev in frontend folder)

Troubleshooting

If the app crashes, see TROUBLESHOOTING.md for common issues and solutions.

Notes

  • The seeder file has been removed - events are now only created by organizers through the UI
  • Organizers can create events from the Organizer Dashboard
  • Events created by organizers will appear on both:
    • Organizer Dashboard (for the organizer)
    • User Dashboard (for all users in the same city)
  • Fixed: Added null checks for user properties to prevent crashes

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages