Skip to content

NRnishad/KnowMore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š KnowMore - Learning Management System

A full-stack Learning Management System (LMS) built with modern technologies, enabling seamless online education experiences for students, instructors, and administrators.

TypeScript React Node.js MongoDB Stripe


✨ Features

πŸ‘¨β€πŸŽ“ For Students

  • Browse and enroll in courses
  • Watch video content and track progress
  • Real-time chat with instructors
  • Secure payment processing via Stripe
  • Progress tracking and course completion certificates

πŸ‘¨β€πŸ« For Instructors

  • Create and manage courses
  • Upload video content via Cloudinary
  • Monitor student enrollment and progress
  • Real-time chat with students
  • Revenue and analytics dashboard

πŸ”§ For Administrators

  • User management (students/instructors)
  • Course approval and moderation
  • Platform analytics and reporting
  • Content moderation tools

πŸ› οΈ Tech Stack

Frontend

Technology Purpose
React 18 UI Library
Vite Build Tool
TypeScript Type Safety
Tailwind CSS Styling
Redux Toolkit State Management
React Router DOM Routing
Radix UI Accessible Components
Chart.js Data Visualization
Socket.io Client Real-time Communication

Backend

Technology Purpose
Node.js Runtime Environment
Express.js Web Framework
TypeScript Type Safety
MongoDB Database
Mongoose ODM
Passport.js Authentication
JWT Token-based Auth
Socket.io Real-time Features
Stripe Payment Processing
Cloudinary Media Storage
Nodemailer Email Service

πŸ“ Project Structure

KnowMore/
β”œβ”€β”€ backend/
β”‚   └── src/
β”‚       β”œβ”€β”€ application/     # Use cases and business logic
β”‚       β”œβ”€β”€ domain/          # Entities and interfaces
β”‚       β”œβ”€β”€ infrastructure/  # Database, external services
β”‚       β”œβ”€β”€ interfaces/      # Controllers, routes, middleware
β”‚       β”œβ”€β”€ main/            # Application entry point
β”‚       β”œβ”€β”€ types/           # TypeScript type definitions
β”‚       └── utils/           # Utility functions
β”‚
β”œβ”€β”€ frontend/
β”‚   └── src/
β”‚       β”œβ”€β”€ api/             # API service calls
β”‚       β”œβ”€β”€ app/             # Redux store configuration
β”‚       β”œβ”€β”€ assets/          # Static assets (images, icons)
β”‚       β”œβ”€β”€ axios/           # Axios instance configuration
β”‚       β”œβ”€β”€ components/      # Reusable UI components
β”‚       β”œβ”€β”€ config/          # Application configuration
β”‚       β”œβ”€β”€ features/        # Redux slices
β”‚       β”œβ”€β”€ hooks/           # Custom React hooks
β”‚       β”œβ”€β”€ lib/             # Third-party library configs
β”‚       β”œβ”€β”€ pages/           # Page components
β”‚       β”‚   β”œβ”€β”€ admin/       # Admin dashboard pages
β”‚       β”‚   β”œβ”€β”€ instructor/  # Instructor dashboard pages
β”‚       β”‚   └── students/    # Student-facing pages
β”‚       β”œβ”€β”€ types/           # TypeScript interfaces
β”‚       └── utils/           # Utility functions
β”‚
└── package.json

πŸš€ Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • MongoDB (local or Atlas)
  • Stripe Account (for payments)
  • Cloudinary Account (for media storage)
  • Google Cloud Console (for OAuth)

Installation

  1. Clone the repository

    git clone https://github.com/NRnishad/KnowMore.git
    cd KnowMore
  2. Install dependencies

    # Install root dependencies
    npm install
    
    # Install backend dependencies
    cd backend
    npm install
    
    # Install frontend dependencies
    cd ../frontend
    npm install
  3. Environment Setup

    Create .env files in both backend/ and frontend/ directories:

    Backend .env:

    # App Configuration
    NODE_ENV=development
    PORT=5001
    
    # CORS Configuration
    CLIENT_URL='http://localhost:5173'
    
    # MongoDB Configuration
    MONGO_URI='your_mongodb_connection_string'
    
    # JWT Configuration
    ACCESS_TOKEN_SECRET=your_access_token_secret
    REFRESH_TOKEN_SECRET=your_refresh_token_secret
    ACCESS_TOKEN_EXPIRE=1d
    REFRESH_TOKEN_EXPIRE=7d
    
    # Google OAuth Configuration
    GOOGLE_CLIENT_ID=your_google_client_id
    GOOGLE_CLIENT_SECRET=your_google_client_secret
    GOOGLE_CALLBACK_URL=http://localhost:5001/auth/google/callback
    
    # Email Configuration
    EMAIL_USER=your_email@gmail.com
    EMAIL_PASS=your_app_password
    
    # Session Configuration
    SESSION_SECRET=your_session_secret
    
    # Cloudinary Configuration
    CLOUDINARY_CLOUD_NAME=your_cloud_name
    CLOUDINARY_API_KEY=your_api_key
    CLOUDINARY_API_SECRET=your_api_secret
    
    # Stripe Configuration
    STRIPE_SECRET_KEY=your_stripe_secret_key
    STRIPE_PUBLIC_KEY=your_stripe_public_key
    STRIPE_WEBHOOK_SECRET=your_webhook_secret

    Frontend .env:

    VITE_API_URL=http://localhost:5001
    VITE_GOOGLE_CLIENT_ID=your_google_client_id
    VITE_STRIPE_PUBLIC_KEY=your_stripe_public_key
  4. Run the application

    # Start backend (from backend directory)
    npm run dev
    
    # Start frontend (from frontend directory)
    npm run dev
  5. Access the application

    • Frontend: http://localhost:5173
    • Backend API: http://localhost:5001

πŸ“‘ API Routes

Route Description
/auth/* Authentication endpoints
/admin/* Admin management endpoints
/instructor/* Instructor operations
/student/* Student operations
/chat/* Real-time chat endpoints
/webhook Stripe webhook handler

πŸ” Authentication

The application supports multiple authentication methods:

  • Email/Password - Traditional signup and login
  • Google OAuth 2.0 - Sign in with Google
  • JWT Tokens - Access and refresh token mechanism
  • Email Verification - OTP-based account verification

πŸ’³ Payment Integration

Secure payment processing is handled through Stripe:

  • Credit/Debit card payments
  • Webhook integration for payment verification
  • Refund handling
  • Subscription support (if applicable)

πŸ“¦ Scripts

Backend

npm run dev      # Start development server with hot reload
npm run build    # Compile TypeScript to JavaScript
npm test         # Run tests

Frontend

npm run dev      # Start Vite development server
npm run build    # Build for production
npm run lint     # Run ESLint
npm run preview  # Preview production build

🀝 Contributing

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

πŸ“„ License

This project is licensed under the ISC License.


πŸ‘¨β€πŸ’» Author

Nishad N


πŸ™ Acknowledgments


Made with ❀️ by Nishad

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages