Skip to content

AryamanSi17/MedEJS

Repository files navigation

Global Med Academy (MedEJS)

Global Med Academy is a comprehensive healthcare EdTech platform designed to provide blended learning medical fellowship, certificate courses, and diplomas for medical professionals. This application handles user registration, course browsing, purchasing, and integration with Moodle for learning management.

Features

  • User Authentication: Secure login and registration using Passport.js (Local and Google OAuth).
  • Course Management: Browse available courses, view details, and purchase courses.
  • Payment Integration: Secure payment processing using Stripe and CCAvenue.---- This was removed in latest version
  • LMS Integration: Seamless integration with Moodle for user enrollment and course access.
  • CRM Integration: Integration with Kit19 for lead management and enquiry handling.
  • User Dashboard: View purchased courses, upload required documents, and manage profile.
  • Instructor Portal: Application form for medical professionals to apply as instructors.
  • Referral System: Refer-and-earn functionality for users.
  • OTP Verification: Email verification using OTPs.
  • Responsive Design: Mobile-friendly interface using EJS templates and custom CSS.

Tech Stack

  • Backend: Node.js, Express.js
  • Database: MongoDB (Mongoose ODM)
  • Templating: EJS (Embedded JavaScript templates)
  • Authentication: Passport.js, JWT (JSON Web Tokens), Cookie Session
  • Storage: DigitalOcean Spaces (AWS S3 compatible) for file uploads
  • Email: Nodemailer
  • Integrations: Moodle API, Kit19 API

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd MEDEJS
  2. Install dependencies:

    npm install
  3. Set up Environment Variables:

    Create a .env file in the root directory and add the following variables:

    # Database
    MONGODB_URI=mongodb://localhost:27017/medejs # Or your MongoDB Atlas URI
    
    # Google OAuth
    CLIENT_ID=your_google_client_id
    CLIENT_SECRET=your_google_client_secret
    
    # Payment Gateways
    STRIPE_SECRET_KEY=your_stripe_secret_key
    # CCAvenue keys are currently handled in utils/ccavRequestHandler.js
    
    # Moodle Integration
    MOODLE_TOKEN=your_moodle_webservice_token
    
    # Email Service
    EMAIL_PASS=your_email_password # For info@globalmedacademy.com
    
    # Kit19 Integration
    KIT19_USERNAME=your_kit19_username
    TOKEN_GUID=your_kit19_token_guid
    
    # Session & JWT (Note: Some keys might be hardcoded in app.js, consider moving them here)
    # JWT_SECRET=your_jwt_secret
  4. Run the Application:

    # Development mode (using nodemon)
    npm start
    
    # Production build script
    npm run build
  5. Access the App:

    Open your browser and navigate to http://localhost:3000 (or the port specified in your environment).

Project Structure

globalmedacademy/
├── app.js                  # Main application entry point
├── package.json            # Project dependencies and scripts
├── public/                 # Static assets (CSS, JS, Images)
├── views/                  # EJS templates for frontend pages
├── utils/                  # Helper functions and configurations
│   ├── db.js               # Database connection and Schema definitions
│   ├── email.js            # Email sending logic
│   ├── authMiddleware.js   # Authentication middleware
│   ├── routes.js           # Route definitions
│   └── ...
├── uploads/                # Directory for user uploaded files
└── ...

Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a Pull Request.

License

This project is licensed under the ISC License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •