Skip to content

Clone GatheringTech

Yshareef edited this page May 16, 2025 · 1 revision

Cloning and Setting Up GatheringTech Learning Platform

This guide will help you clone and set up the GatheringTech Learning Platform on your local machine.

Prerequisites

Before you begin, ensure you have the following installed:

Step 1: Clone the Repository

# Clone the repository
git clone https://github.com/Yaser-Alshareef/GatheringTech-Learning-Platform.git

# Navigate to the project directory
cd GatheringTech-Learning-Platform

Step 2: Install Dependencies

# Install all required dependencies
npm install

Step 3: Environment Setup

  1. Create a .env file in the root directory with the following variables:
MONGODB_URI=mongodb://localhost:27017/gatheringtech
SESSION_SECRET=your_session_secret
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_CALLBACK_URL=http://localhost:3000/auth/google/callback

Note: You'll need to:

  • Set up a MongoDB database (local or Atlas)
  • Create a Google OAuth 2.0 Client ID from the Google Cloud Console
  • Replace the placeholder values with your actual credentials

Step 4: Database Setup

  1. Ensure MongoDB is running on your system
  2. The application will automatically create necessary collections when it starts

Step 5: Seed Initial Data (Optional)

# Run the seed script to populate the database with sample courses
node seedCourses.js

Step 6: Start the Application

# Start the development server
npm start

The application will be available at http://localhost:3000

Project Structure

GatheringTech/
├── server/         # Server-side code
│   ├── config/     # Configuration files
│   ├── middleware/ # Custom middleware
│   ├── models/     # Database models
│   └── routes/     # Route handlers
├── utils/          # General utilities
├── public/         # Static assets
│   ├── css/        # Stylesheets
│   └── images/     # Image assets
├── views/          # EJS templates
│   ├── courses/    # Course-related views
│   ├── dashboard/  # Dashboard views
│   ├── layouts/    # Layout templates
│   └── partials/   # Reusable view components
├── app.js          # Main application file
└── package.json    # Project dependencies

Troubleshooting

  1. MongoDB Connection Issues

    • Ensure MongoDB is running
    • Check your connection string in .env
    • Verify network connectivity
  2. Google OAuth Issues

    • Verify your Google OAuth credentials
    • Ensure callback URLs are correctly configured
    • Check if the application is running on the correct port
  3. Node.js Issues

    • Clear node_modules and reinstall:
      rm -rf node_modules
      npm install

Contributing

  1. Fork the repository
  2. Create a new branch for your feature
  3. Make your changes
  4. Submit a pull request

License

This project is licensed under the ISC License - see the LICENSE file for details.