Skip to content

manogna7s/Aarambh01

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Aarambh LMS - Learning Management System

Aarambh LMS MongoDB React Node.js

A comprehensive Learning Management System with role-based access for Admins, Teachers, and Students.


🌟 Features

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

  • Browse and enroll in courses
  • Submit assignments with AI detection
  • Track grades and attendance
  • Participate in discussion forums
  • Receive real-time notifications
  • View learning progress and badges

For Teachers πŸ‘©β€πŸ«

  • Create and manage courses
  • Create assignments with plagiarism detection
  • Grade student submissions
  • Mark attendance
  • Post announcements
  • Manage discussions
  • View student analytics

For Admins πŸ‘¨β€πŸ’Ό

  • Manage users (students, teachers)
  • Oversee all courses
  • System-wide announcements
  • View analytics and reports
  • Database management

πŸš€ Quick Start

Prerequisites

  • Node.js 16+ installed
  • MongoDB Atlas account
  • Git installed

Installation

  1. Clone the repository

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

    # Install frontend dependencies
    npm install
    
    # Install backend dependencies
    cd server
    npm install
  3. Configure environment variables

    The .env file already exists in /server/.env with MongoDB Atlas credentials.

  4. Whitelist your IP in MongoDB Atlas ⚠️ IMPORTANT

    • Go to MongoDB Atlas
    • Navigate to Network Access
    • Add your current IP address
    • Wait 2-3 minutes
  5. Initialize the database

    cd server
    node quick-init-database.js
  6. Start the development servers

    Backend (Terminal 1):

    cd server
    npm run dev

    Frontend (Terminal 2):

    npm run dev
  7. Access the application


πŸ” Test Credentials

Admin Account

  • Email: admin@aarambh.edu
  • Password: admin123

Teacher Account

  • Email: sarah.johnson@aarambh.edu
  • Password: teacher123

Student Account

  • Email: alice.williams@student.aarambh.edu
  • Password: student123

πŸ“Š Database Structure

The application uses MongoDB with 9 comprehensive collections:

  1. Users - Admin, Teachers, Students (role-based)
  2. Courses - Course content with modules and lessons
  3. Assignments - Tasks with AI detection and plagiarism check
  4. Submissions - Student work with grading workflow
  5. Discussions - Course forums with threaded replies
  6. Notifications - Real-time user alerts
  7. Attendance - Attendance tracking with statistics
  8. Grades - Comprehensive grade management with GPA
  9. Announcements - System and course-specific messages

πŸ“– See DATABASE_STRUCTURE.md for detailed schema documentation.


πŸ› οΈ Technology Stack

Frontend

  • React 18 - UI framework
  • TypeScript - Type safety
  • Tailwind CSS - Styling
  • Shadcn/ui - UI components
  • Vite - Build tool

Backend

  • Node.js - Runtime
  • Express - Web framework
  • MongoDB Atlas - Database
  • Mongoose - ODM
  • JWT - Authentication
  • Bcrypt - Password hashing
  • Nodemailer - Email service

πŸ“ Project Structure

Aarambh/
β”œβ”€β”€ src/                      # Frontend source code
β”‚   β”œβ”€β”€ components/          # React components
β”‚   β”œβ”€β”€ services/            # API services
β”‚   β”œβ”€β”€ config/              # Configuration
β”‚   └── styles/              # CSS styles
β”œβ”€β”€ server/                   # Backend source code
β”‚   β”œβ”€β”€ config/              # Database & email config
β”‚   β”œβ”€β”€ controllers/         # Route controllers
β”‚   β”œβ”€β”€ middleware/          # Auth middleware
β”‚   β”œβ”€β”€ models/              # Mongoose models
β”‚   β”œβ”€β”€ routes/              # API routes
β”‚   β”œβ”€β”€ services/            # Business logic
β”‚   └── server.js            # Entry point
β”œβ”€β”€ DATABASE_STRUCTURE.md     # Database documentation
β”œβ”€β”€ DATABASE_SETUP_GUIDE.md   # Setup instructions
β”œβ”€β”€ DATABASE_DIAGRAM.md       # Visual relationships
└── README.md                 # This file

πŸ—„οΈ Database Management

Initialize Database

cd server
node quick-init-database.js

Creates all collections with sample data.

Clear Database

cd server
node clear-database.js

Removes all data (requires confirmation).

View Users

cd server
node view-users.js

Display all users by role.

Test Connection

cd server
node test-connection.js

Verify MongoDB connectivity.


πŸ“š Documentation


πŸ”§ Available Scripts

Frontend

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

Backend

cd server
npm run dev          # Start with nodemon (auto-reload)
npm start            # Start production server

🎨 Design

The UI design is based on the Figma project: https://www.figma.com/design/zkzPr2Es2INclQCyS2RrFL/Learning-Management-System-UI-Design

Design Principles

  • Pink Accent (#FF69B4) for key UI elements
  • Persistent Navigation - Always visible
  • Theme Support - Light and dark modes
  • Responsive Design - Mobile-friendly

πŸ› Troubleshooting

Database Connection Issues

Problem: "Could not connect to MongoDB" Solution:

  1. Whitelist your IP in MongoDB Atlas
  2. Check .env file has correct URI
  3. Verify internet connection

Port Already in Use

Problem: "Port 3001 already in use" Solution:

# Find and kill the process
lsof -ti:3001 | xargs kill -9

Dependencies Issues

Problem: Module not found Solution:

# Clean install
rm -rf node_modules package-lock.json
npm install

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

πŸš€ Deployment to Vercel

Frontend Deployment

  1. Prepare for deployment:

    # Make sure all dependencies are installed
    npm install
  2. Deploy to Vercel:

    • Install Vercel CLI: npm install -g vercel
    • Login to Vercel: vercel login
    • Deploy: vercel --prod

    OR (on Windows):

    npm run deploy:windows

    OR

    • Connect your GitHub repository to Vercel
    • Select your repository
    • Configure the project with these settings:
      • Framework Preset: Vite
      • Root Directory: ./
      • Build Command: npm run build
      • Output Directory: build (Note: This project uses build instead of the default dist)
      • Install Command: npm install
  3. Environment Variables: Set the following environment variables in your Vercel project settings:

    VITE_API_BASE_URL=https://your-backend-url.com/api
    

Backend Deployment

Since Vercel is primarily for frontend deployments, you'll need to deploy the backend separately. Here are some options:

Option 1: Render (Recommended)

  1. Create an account at Render
  2. Create a new Web Service
  3. Connect your GitHub repository
  4. Configure the service:
    • Name: aarambh-backend
    • Region: Select the closest region
    • Branch: main
    • Root Directory: server
    • Environment: Node
    • Build Command: npm install
    • Start Command: npm start
  5. Add environment variables in the Dashboard:
    PORT=3001
    MONGO_URI=your_mongodb_atlas_uri
    JWT_SECRET=your_jwt_secret
    GMAIL_USER=your_gmail_address
    GMAIL_PASS=your_app_password
    ALLOWED_ORIGINS=https://your-vercel-frontend.vercel.app
    

Option 2: Railway

  1. Create an account at Railway
  2. Create a new project
  3. Provision a new service using your GitHub repository
  4. Set the root directory to server
  5. Configure environment variables in the Railway dashboard

Option 3: Heroku

  1. Create an account at Heroku
  2. Install Heroku CLI
  3. Login: heroku login
  4. Create app: heroku create your-app-name
  5. Set buildpack: heroku buildpacks:set heroku/nodejs
  6. Deploy: git subtree push --prefix server heroku main
  7. Set environment variables: heroku config:set KEY=VALUE

Post-Deployment Steps

  1. Update the frontend environment variable VITE_API_BASE_URL to point to your deployed backend URL
  2. Redeploy the frontend with the updated environment variable
  3. Test the connection between frontend and backend
  4. Initialize the database on your deployed backend if needed

πŸ“„ License

This project is licensed under the MIT License.


πŸ™ Acknowledgments

  • Original Figma design by the LMS UI Design team
  • MongoDB Atlas for database hosting
  • Shadcn/ui for beautiful components
  • The open-source community

πŸ“ž Support

For issues and questions:

  1. Check the documentation files
  2. Review troubleshooting section
  3. Open an issue on GitHub
  4. Contact the development team

Built with ❀️ for education

Documentation β€’ Setup Guide β€’ Database Diagram

About

LMS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 57.2%
  • JavaScript 32.6%
  • CSS 9.6%
  • Other 0.6%