Learning-Management-System-Fullstack

E-Learning Management System Frontend

The E-Learning Management System Frontend is the frontend component of the E-Learning Management System, a web-based application that allows administrators and users to interact with the e-learning platform’s various components. The frontend is developed with Angular, and the backend is built using Django REST Framework.

Table of Contents

Project Overview

This frontend project is built with Angular, a popular web application framework developed by Google. It provides a user-friendly interface for managing courses, lessons, users, enrollments, and progress tracking. The frontend interacts with the backend APIs defined by Django to fetch and update data, handle user authentication, and display dynamic content.

Features

User Interfaces

Home Page:

Home Page

Course List:

Course List

Lesson List:

Lesson List

User List:

User List

Enrollment List:

Enrollment List

Progress List:

Progress List

Login Page:

Login Page

File Structure

The repository is organized as follows:

Learning-Management-System/
β”œβ”€β”€ LMS-Backend
β”‚   β”œβ”€β”€ (Backend code)
β”‚   └── ...
β”œβ”€β”€ LMS-Frontend
β”‚   β”œβ”€β”€ angular.json
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ README.md
β”‚   β”œβ”€β”€ LICENSE
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ login/
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ login.component.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ login.component.html
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   └── login.component.css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ footer/
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ footer.component.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ footer.component.html
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   └── footer.component.css
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ header/
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ header.component.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ header.component.html
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   └── header.component.css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ home/
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ home.component.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ home.component.html
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   └── home.component.css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ course-list/
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ course-list.component.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ course-list.component.html
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   └── course-list.component.css
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ lesson-list/
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ lesson-list.component.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ lesson-list.component.html
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   └── lesson-list.component.css
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ user-list/
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ user-list.component.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ user-list.component.html
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   └── user-list.component.css
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ enrollment-list/
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ enrollment-list.component.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ enrollment-list.component.html
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   └── enrollment-list.component.css
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ progress-list/
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ progress-list.component.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ progress-list.component.html
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   └── progress-list.component.css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ auth.interceptor.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ auth.service.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ user.service.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ course.service.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ lesson.service.ts
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ enrollment.service.ts
β”‚   β”‚   β”‚   β”‚   β”‚   └── progress.service.ts
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ app.routes.ts
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ app.component.ts
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ app.config.ts
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ app.config.service.ts
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ app.component.html
β”‚   β”‚   β”‚   β”‚   └── app.component.css
β”‚   β”‚   β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   β”‚   β”‚   └── images/
β”‚   β”‚   β”‚   β”‚   └── .gitkeep
β”‚   β”‚   β”‚   β”œβ”€β”€ main.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ styles.css
β”‚   β”‚   β”‚   └── index.html
β”‚   β”‚   β”œβ”€β”€ .editorconfig
β”‚   β”‚   β”œβ”€β”€ .gitignore
β”‚   β”‚   β”œβ”€β”€ angular.json
β”‚   β”‚   β”œβ”€β”€ package.json 
β”‚   β”‚   β”œβ”€β”€ package-lock.json
β”‚   β”‚   β”œβ”€β”€ tsconfig.json
β”‚   β”‚   β”œβ”€β”€ tsconfig.app.json
β”‚   β”‚   └── tsconfig.spec.json
β”‚   β”œβ”€β”€ LICENSE
β”‚   β”œβ”€β”€ README.md
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
└── README.md

Getting Started

Prerequisites

Make sure you have the following installed on your machine:

To check if you have these installed, run:

node -v
npm -v
ng version
python --version

Backend Setup

It is of utmost importance to set up the backend server before running the frontend application.

  1. Navigate to the backend directory:

    cd Learning-Management-System/LMS-Backend
    
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Run the backend server:

    python manage.py runserver
    

Frontend Setup

  1. Navigate to the frontend directory:

    cd Learning-Management-System/LMS-Frontend/app
    
  2. Install dependencies:

    npm install
    
  3. Start the development server:

    ng serve
    
  4. Open your browser and navigate to:

    http://localhost:4200
    

Styling and Design

Troubleshooting

Common Issues

  1. CORS Errors:
    • Ensure your backend server is configured to accept requests from http://localhost:4200. This should have been set up already in the Django backend.
  2. Unauthorized Access Errors:
    • Make sure the token is correctly stored in localStorage after login and is sent with each request that requires authorization.
  3. API Connection Issues:
    • Verify that the backend server is running and accessible at http://127.0.0.1:8000.

Debugging Tips

Contributing

Feel free to submit issues and contribute to the development of this project by opening a pull request.

License

This project is licensed under the MIT License.

Contact

If you have any questions or need further assistance, feel free to contact me at hoangson091104@gmail.com.


⬆ Back to Top